PCL
pcl::pcl_bool Class Reference

A first-class data type that can be safely used to implement Boolean process parameters on all supported platforms. More...

#include <MetaParameter.h>

Public Member Functions

 pcl_bool ()=default
 
template<typename T >
 pcl_bool (const T &value)
 
constexpr operator bool () const
 
constexpr operator int () const
 
template<typename T >
pcl_booloperator= (const T &value)
 

Detailed Description

pcl_bool is the only recommended way to implement process parameters that are formally described by the MetaBoolean class. Process parameters declared as pcl_bool instances will have the correct size and numerical type to be accessed and interpreted as valid Boolean parameters by the PixInsight core application on all supported platforms and C++ compilers.

See also
MetaBoolean

Definition at line 1405 of file MetaParameter.h.

Constructor & Destructor Documentation

◆ pcl_bool() [1/2]

pcl::pcl_bool::pcl_bool ( )
default

Default constructor. Constructs a pcl_bool instance with the logical false value.

◆ pcl_bool() [2/2]

template<typename T >
pcl::pcl_bool::pcl_bool ( const T &  value)
inline

Copy constructor. Constructs a pcl_bool instance whose logical state is true if and only if the specified value is nonzero. The T template argument type must have integer equality comparison semantics.

Definition at line 1421 of file MetaParameter.h.

Member Function Documentation

◆ operator bool()

constexpr pcl::pcl_bool::operator bool ( ) const
inlineconstexpr

bool type conversion operator. Returns the current logical state of this pcl_bool instance as a bool object.

Definition at line 1442 of file MetaParameter.h.

◆ operator int()

constexpr pcl::pcl_bool::operator int ( ) const
inlineconstexpr

int type conversion operator. Returns zero if the current logical state of this pcl_bool object is false; one if it is true.

Definition at line 1453 of file MetaParameter.h.

◆ operator=()

template<typename T >
pcl_bool& pcl::pcl_bool::operator= ( const T &  value)
inline

Assignment operator. Sets the logical state of this pcl_bool instance to true if and only if the specified value is nonzero. The T template argument type must have integer equality comparison semantics.

Definition at line 1432 of file MetaParameter.h.


The documentation for this class was generated from the following file: