PCL
|
An object that can be in consistently defined or undefined/inconsistent states. More...
#include <IntegrationMetadata.h>
Public Member Functions | |
ConsistentlyDefined () | |
ConsistentlyDefined (const ConsistentlyDefined &)=default | |
ConsistentlyDefined (const T &value) | |
void | ForceValue (const T &value) |
bool | IsConsistent () const |
bool | IsConsistentlyDefined (const String &what=String()) const |
bool | IsDefined () const |
const T & | operator() () const |
ConsistentlyDefined & | operator+= (const ConsistentlyDefined &other) |
ConsistentlyDefined & | operator+= (const T &otherValue) |
ConsistentlyDefined & | operator= (const ConsistentlyDefined &other) |
T & | operator= (const T &value) |
void | SetInconsistent () |
String | ToString () const |
void | Undefine () |
ConsistentlyDefined is similar to Optional: it stores an instance of the template argument T, along with a defined state Boolean flag. In addition, this class includes a consistency state flag. A consistently defined object has been both defined and optionally ckecked for consistency against other objects or values. Two objects are considered consistent if an equality operator is true for them.
As happens with Optional, ConsistentlyDefined objects update their defined and consistency states automatically as they are created, copied and assigned.
Definition at line 88 of file IntegrationMetadata.h.
|
inline |
Constructs an undefined, consistent ConsistentlyDefined object.
The value instance will be default-constructed implicitly, which means that the type T must provide valid default construction semantics.
Definition at line 98 of file IntegrationMetadata.h.
|
default |
Copy constructor.
The value instance will be copy-constructed implicitly, which means that the type T must provide valid copy construction semantics if this constructor is invoked.
|
inline |
Constructs a defined, consistent ConsistentlyDefined object with the specified value.
Definition at line 121 of file IntegrationMetadata.h.
|
inline |
Changes the value in this object in a forcible way, i.e. without checking for consistency.
Definition at line 322 of file IntegrationMetadata.h.
|
inline |
Returns true iff this object is consistent, even if it has not been defined.
Definition at line 274 of file IntegrationMetadata.h.
|
inline |
If this object is in defined/consistent state, then this function returns true.
If this object is in undefined state, this function returns false.
If this object is in defined/inconsistent state, this function returns false. In this case, if the what string is not empty, a warning message will be written to the core platform's console alerting about the inconsistent state.
Definition at line 290 of file IntegrationMetadata.h.
|
inline |
Returns true iff this object has been defined, even if it's inconsistent.
Definition at line 265 of file IntegrationMetadata.h.
|
inline |
Returns a reference to the value stored in this object.
If this object is undefined, the returned value may be unpredictable, depending on construction semantics for the type T.
Definition at line 257 of file IntegrationMetadata.h.
|
inline |
Addition/assignment operator. Returns a reference to this object.
If this object is inconsistent, then this function does nothing but returning a reference to this.
If this object is consistent, then:
Definition at line 201 of file IntegrationMetadata.h.
|
inline |
Addition/assignment operator. Returns a reference to this object.
If this object is inconsistent, then this function does nothing but returning a reference to this.
If this object is consistent, then:
Definition at line 237 of file IntegrationMetadata.h.
|
inline |
Copy assignment operator. Returns a reference to this object.
If this object is inconsistent, then this function does nothing but returning a reference to this.
If this object is consistent, then:
Definition at line 157 of file IntegrationMetadata.h.
|
inline |
Assigns the specified value to this object. Returns a reference to this object. After assigning a value, a ConsistentlyDefined object will be in defined/consistent state.
Definition at line 132 of file IntegrationMetadata.h.
|
inline |
Force this object to be in inconsistent state.
Definition at line 313 of file IntegrationMetadata.h.
|
inline |
Returns a String representation of the value in this object if it has been defined (even if it's inconsistent). Otherwise returns an empty string.
Definition at line 332 of file IntegrationMetadata.h.
|
inline |
Force this object to be in undefined state.
Definition at line 305 of file IntegrationMetadata.h.