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

#include <allowed.h>

Public Types

typedef std::pair< bool,
std::string
Pair
 
typedef _State SdfAllowed::* UnspecifiedBoolType
 

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...
 
 ~SdfAllowed ()
 
 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
 
SDF_API const std::stringGetWhyNot () const
 
bool IsAllowed (std::string *whyNot) const
 
bool operator== (const SdfAllowed &other) const
 
bool operator!= (const SdfAllowed &other) const
 

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 46 of file allowed.h.

Member Typedef Documentation

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

Definition at line 51 of file allowed.h.

typedef _State SdfAllowed::* SdfAllowed::UnspecifiedBoolType

Definition at line 72 of file allowed.h.

Constructor & Destructor Documentation

SdfAllowed::SdfAllowed ( )
inline

Construct true.

Definition at line 54 of file allowed.h.

SdfAllowed::SdfAllowed ( bool  x)
inline

Construct true.

Definition at line 56 of file allowed.h.

SdfAllowed::SdfAllowed ( const char *  whyNot)
inline

Construct false with annotation whyNot.

Definition at line 58 of file allowed.h.

SdfAllowed::SdfAllowed ( const std::string whyNot)
inline

Construct false with annotation whyNot.

Definition at line 60 of file allowed.h.

SdfAllowed::SdfAllowed ( bool  condition,
const char *  whyNot 
)
inline

Construct in condition with annotation whyNot if false.

Definition at line 62 of file allowed.h.

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

Construct in condition with annotation whyNot if false.

Definition at line 65 of file allowed.h.

SdfAllowed::SdfAllowed ( const Pair x)
inline

Construct from bool,string pair x.

Definition at line 68 of file allowed.h.

SdfAllowed::~SdfAllowed ( )
inline

Definition at line 69 of file allowed.h.

Member Function Documentation

SDF_API const std::string& SdfAllowed::GetWhyNot ( ) const

Returns the reason why the operation is not allowed. If the operation is allowed this returns the empty string.

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

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

Definition at line 100 of file allowed.h.

SdfAllowed::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 89 of file allowed.h.

SdfAllowed::operator UnspecifiedBoolType ( ) const
inline

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

Definition at line 76 of file allowed.h.

bool SdfAllowed::operator! ( void  ) const
inline

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

Definition at line 82 of file allowed.h.

bool SdfAllowed::operator!= ( const SdfAllowed other) const
inline

Definition at line 115 of file allowed.h.

bool SdfAllowed::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 110 of file allowed.h.


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