All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SdfAllowed Class Reference

Indicates if an operation is allowed and, if not, why not. More...

Inherits equality_comparable< SdfAllowed >.

Public Types

typedef std::pair< bool,
std::string > 
Pair
 

Public Member Functions

 SdfAllowed ()
 Construct true. More...
 
 SdfAllowed (bool x)
 Construct true. More...
 
 SdfAllowed (const char *whyNot)
 Construct false with annotation whyNot. More...
 
 SdfAllowed (const std::string &whyNot)
 Construct false with annotation whyNot. More...
 
 SdfAllowed (bool condition, const char *whyNot)
 Construct in condition with annotation whyNot if false. More...
 
 SdfAllowed (bool condition, const std::string &whyNot)
 Construct in condition with annotation whyNot if false. More...
 
 SdfAllowed (const Pair &x)
 Construct from bool,string pair x. More...
 
 operator UnspecifiedBoolType () const
 Returns true in a boolean context if allowed, false otherwise. More...
 
bool operator! () const
 Returns false in a boolean context if allowed, true otherwise. More...
 
 operator const std::string & () const
 Returns the reason why the operation is not allowed. More...
 
SDF_API const std::string & GetWhyNot () const
 Returns the reason why the operation is not allowed. More...
 
bool IsAllowed (std::string *whyNot) const
 Returns true if allowed, otherwise fills whyNot if not NULL and returns false. More...
 
bool operator== (const SdfAllowed &other) const
 Compare to other. More...
 

Detailed Description

Indicates if an operation is allowed and, if not, why not.

A SdfAllowed either evaluates to true in a boolean context or evaluates to false and has a string annotation.

Definition at line 47 of file allowed.h.

Constructor & Destructor Documentation

SdfAllowed ( )
inline

Construct true.

Definition at line 55 of file allowed.h.

SdfAllowed ( bool  x)
inline

Construct true.

Definition at line 57 of file allowed.h.

SdfAllowed ( const char *  whyNot)
inline

Construct false with annotation whyNot.

Definition at line 59 of file allowed.h.

SdfAllowed ( const std::string &  whyNot)
inline

Construct false with annotation whyNot.

Definition at line 61 of file allowed.h.

SdfAllowed ( bool  condition,
const char *  whyNot 
)
inline

Construct in condition with annotation whyNot if false.

Definition at line 63 of file allowed.h.

SdfAllowed ( bool  condition,
const std::string &  whyNot 
)
inline

Construct in condition with annotation whyNot if false.

Definition at line 66 of file allowed.h.

SdfAllowed ( const Pair &  x)
inline

Construct from bool,string pair x.

Definition at line 69 of file allowed.h.

Member Function Documentation

SDF_API const std::string& GetWhyNot ( ) const

Returns the reason why the operation is not allowed.

If the operation is allowed this returns the empty string.

bool IsAllowed ( std::string *  whyNot) const
inline

Returns true if allowed, otherwise fills whyNot if not NULL and returns false.

Definition at line 101 of file allowed.h.

operator const std::string & ( ) const
inline

Returns the reason why the operation is not allowed.

If the operation is allowed this returns the empty string.

Definition at line 90 of file allowed.h.

operator UnspecifiedBoolType ( ) const
inline

Returns true in a boolean context if allowed, false otherwise.

Definition at line 77 of file allowed.h.

bool operator! ( ) const
inline

Returns false in a boolean context if allowed, true otherwise.

Definition at line 83 of file allowed.h.

bool operator== ( const SdfAllowed other) const
inline

Compare to other.

Returns true if both are true or both are false and reasons why not are identical.

Definition at line 111 of file allowed.h.


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