PACK Qt Binding
$VERSION$
|
#include <nullable.h>
Public Member Functions | |
Nullable () | |
Nullable (const NullValue &) | |
Nullable (const std::nullptr_t &) | |
Nullable (const T &t) | |
Nullable (const Nullable< T > &t) | |
Nullable< T > & | operator= (const T &t) |
Nullable< T > & | operator= (const Nullable< T > &t) |
bool | isNull () const |
operator T () const | |
T & | value () |
T | value (const T &defaultval=T()) const |
T | valueOrDefault () const |
Helper to automatically convert to base type. More... | |
T & | data () |
T | data (const T &defaultval=T()) const |
T | dataOrDefault () const |
Helper to automatically convert to base type. More... | |
T * | operator-> () const |
converts the nullable to a pointer of the wrapped class - acting like a smart pointer More... | |
bool | operator== (const T &t) const |
bool | operator!= (const T &t) const |
bool | operator== (const Nullable< T > &t) const |
bool | operator!= (const Nullable< T > &t) const |
bool | operator== (const NullValue &) const |
compares the Nullable with the special null value More... | |
bool | operator!= (const NullValue &) const |
compares the Nullable with the special null value More... | |
bool | operator== (const std::nullptr_t &) const |
compares the Nullable with the special null value More... | |
bool | operator!= (const std::nullptr_t &) const |
compares the Nullable with the special null value More... | |
wrapper around scalar values that makes them NULL-able, i.e. the virtual value NULL is added to the range of the wrapped value; wrapped classes must have a default constructor and =, == and != operators
creates a NULL value
creates a wrapped non-NULL value that is equivalent to the original
|
inline |
returns a reference to the wrapped value - the result is undefined if it us currently NULL
|
inline |
returns the original value, if it is currently NULL it returns the given default value, if no default is given an instance created with the default constructor is returned
|
inline |
Helper to automatically convert to base type.
|
inline |
returns whether this instance is NULL
|
inline |
converts this nullable to the original wrapped class - uses the default constructor if it is NULL
|
inline |
compares this instance with a value of the original class, NULL is different from ANY instance of the original class
compares two nullable instances, if both are NULL it returns false
compares the Nullable with the special null value
|
inline |
compares the Nullable with the special null value
|
inline |
converts the nullable to a pointer of the wrapped class - acting like a smart pointer
makes this instance non-NULL and equivalent to the given value
copies the given nullable value
|
inline |
compares this instance with a value of the original class, NULL is different from ANY instance of the original class
compares two nullable instances, if both are NULL it returns true
compares the Nullable with the special null value
|
inline |
compares the Nullable with the special null value
|
inline |
returns a reference to the wrapped value - the result is undefined if it us currently NULL
|
inline |
returns the original value, if it is currently NULL it returns the given default value, if no default is given an instance created with the default constructor is returned
|
inline |
Helper to automatically convert to base type.