Indicates if an operation is allowed and, if not, why not.
More...
#include <allowed.h>
|
typedef std::pair< bool, std::string > | Pair |
|
|
| SdfAllowed () |
| Construct true .
|
|
| SdfAllowed (bool x) |
| Construct true .
|
|
| SdfAllowed (const char *whyNot) |
| Construct false with annotation whyNot .
|
|
| SdfAllowed (const std::string &whyNot) |
| Construct false with annotation whyNot .
|
|
| SdfAllowed (bool condition, const char *whyNot) |
| Construct in condition with annotation whyNot if false .
|
|
| SdfAllowed (bool condition, const std::string &whyNot) |
| Construct in condition with annotation whyNot if false .
|
|
| SdfAllowed (const Pair &x) |
| Construct from bool,string pair x .
|
|
| operator UnspecifiedBoolType () const |
| Returns true in a boolean context if allowed, false otherwise.
|
|
bool | operator! () const |
| Returns false in a boolean context if allowed, true otherwise.
|
|
| operator const std::string & () const |
| Returns the reason why the operation is not allowed.
|
|
SDF_API const std::string & | GetWhyNot () const |
| Returns the reason why the operation is not allowed.
|
|
bool | IsAllowed (std::string *whyNot) const |
| Returns true if allowed, otherwise fills whyNot if not NULL and returns false .
|
|
bool | operator== (const SdfAllowed &other) const |
| Compare to other .
|
|
bool | operator!= (const SdfAllowed &other) const |
|
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.
◆ Pair
typedef std::pair<bool, std::string> Pair |
◆ SdfAllowed() [1/7]
Construct true
.
Definition at line 54 of file allowed.h.
◆ SdfAllowed() [2/7]
Construct true
.
Definition at line 56 of file allowed.h.
◆ SdfAllowed() [3/7]
Construct false
with annotation whyNot
.
Definition at line 58 of file allowed.h.
◆ SdfAllowed() [4/7]
Construct false
with annotation whyNot
.
Definition at line 60 of file allowed.h.
◆ SdfAllowed() [5/7]
SdfAllowed |
( |
bool |
condition, |
|
|
const char * |
whyNot |
|
) |
| |
|
inline |
Construct in condition
with annotation whyNot
if false
.
Definition at line 62 of file allowed.h.
◆ SdfAllowed() [6/7]
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() [7/7]
Construct from bool,string pair x
.
Definition at line 68 of file allowed.h.
◆ ~SdfAllowed()
◆ GetWhyNot()
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.
◆ IsAllowed()
bool 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.
◆ operator const std::string &()
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.
◆ operator UnspecifiedBoolType()
operator UnspecifiedBoolType |
( |
| ) |
const |
|
inline |
Returns true
in a boolean context if allowed, false
otherwise.
Definition at line 76 of file allowed.h.
◆ operator!()
Returns false
in a boolean context if allowed, true
otherwise.
Definition at line 82 of file allowed.h.
◆ operator!=()
◆ operator==()
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: