Evo C++ Library v0.5.1
|
#include <evo/type.h>
Nullable primitive base type.
Public Types | |
typedef void | EvoNullableType |
Identify as nullable type. More... | |
Public Member Functions | |
Nullable () | |
Constructor. More... | |
Nullable (const Nullable< T > &src) | |
Copy constructor. More... | |
Nullable (ValNull) | |
Constructor to explicitly set as null. More... | |
Nullable (T num) | |
Constructor to init with num. More... | |
int | compare (const Nullable< T > &val) const |
Comparison. More... | |
int | compare (T val) const |
Comparison. More... | |
T & | denull () |
Clears null flag and returns value reference. More... | |
bool | null () const |
Get whether null. More... | |
operator SafeBoolType () const | |
Safe (explicit) evaluation as bool type. More... | |
bool | operator! () const |
Negation operator returns whether null or 0. More... | |
bool | operator!= (const Nullable< T > &val) const |
Inequality operator. More... | |
bool | operator!= (T val) const |
Inequality operator. More... | |
const T & | operator* () const |
Dereference for explicit conversion to underlying type (const). More... | |
T & | operator* () |
Dereference for explicit conversion to underlying type. More... | |
bool | operator< (const Nullable< T > &val) const |
Less than operator. More... | |
bool | operator< (T val) const |
Less than operator. More... | |
bool | operator<= (const Nullable< T > &val) const |
Less than or equal operator. More... | |
bool | operator<= (T val) const |
Less than or equal operator. More... | |
Nullable< T > & | operator= (const Nullable< T > &src) |
Assignment/Copy operator. More... | |
Nullable< T > & | operator= (T value) |
Constructor to init with value. More... | |
Nullable< T > & | operator= (ValNull) |
Assignment operator to set as null. More... | |
bool | operator== (const Nullable< T > &val) const |
Equality operator. More... | |
bool | operator== (T val) const |
Equality operator. More... | |
bool | operator> (const Nullable< T > &val) const |
Greater than operator. More... | |
bool | operator> (T val) const |
Greater than operator. More... | |
bool | operator>= (const Nullable< T > &val) const |
Greater than or equal operator. More... | |
bool | operator>= (T val) const |
Greater than or equal operator. More... | |
Nullable< T > & | set () |
Set as null. More... | |
Nullable< T > & | set (const Nullable< T > &src) |
Set as copy of given value. More... | |
Nullable< T > & | set (T src) |
Set as given value. More... | |
bool | valid () const |
Get whether valid (not null). More... | |
const T & | value () const |
Get underlying value (const). More... | |
T & | value () |
Get underlying value. More... | |
typedef void EvoNullableType |
Identify as nullable type.
|
inline |
Constructor.
|
inline |
Constructor to init with num.
num | Number to use |
|
inline |
Comparison.
val | Value to compare to |
|
inline |
Comparison.
val | Value to compare to |
|
inline |
Clears null flag and returns value reference.
Nullable<bool>
template specialization returns by value instead of reference
|
inline |
Get whether null.
|
inlineinherited |
Safe (explicit) evaluation as bool type.
|
inline |
Negation operator returns whether null or 0.
Inequality operator.
val | Value to compare to |
|
inline |
Inequality operator.
val | Value to compare to |
|
inline |
Dereference for explicit conversion to underlying type (const).
Alternative to value().
|
inline |
Dereference for explicit conversion to underlying type.
Alternative to value().
|
inline |
Less than operator.
val | Value to compare to |
val
|
inline |
Less than operator.
val | Value to compare to |
val
|
inline |
Less than or equal operator.
val | Value to compare to |
val
, true if null
|
inline |
Less than or equal operator.
val | Value to compare to |
val
, true if null Assignment/Copy operator.
src | Source to copy |
|
inline |
Constructor to init with value.
value | Number to use |
Assignment operator to set as null.
|
inline |
Equality operator.
val | Value to compare to |
|
inline |
Equality operator.
val | Value to compare to |
|
inline |
Greater than operator.
val | Value to compare to |
val
, false if null
|
inline |
Greater than operator.
val | Value to compare to |
val
, false if null
|
inline |
Greater than or equal operator.
val | Value to compare to |
val
|
inline |
Greater than or equal operator.
val | Value to compare to |
val
|
inline |
Set as null.
Set as copy of given value.
src | Source to copy |
|
inline |
Set as given value.
src | Source to set |
|
inline |
Get whether valid (not null).
|
inline |
|
inline |