An Any object can hold any kind of value. More...
#include <any.h>

Classes | |
| struct | AbstractObject |
| struct | Object |
Public Member Functions | |
| Any () | |
| ~Any () | |
| Any (const Any &a) | |
| template<typename T > | |
| Any (const T &t) | |
| Constructor. | |
| Any (const char *s) | |
| Constructor for const char* objects. | |
| const std::type_info & | type () const |
| Return type of value in Any object. | |
| bool | null () const |
| Does this object contain a value? | |
Private Member Functions | |
| template<typename T > | |
| Any (const T *) | |
| Forbid Any values containing pointers. | |
Private Attributes | |
| AbstractObject * | it_ |
Friends | |
| template<typename U > | |
| U * | any_cast (const Any *any) |
| Convert an Any object to its underlying value type. | |
An Any object can hold any kind of value.
This class is inspired by boost::any_cast but without the typical boost bloat.
Definition at line 13 of file any.h.
| Dv::Any::Any | ( | const T & | t | ) | [inline] |
| Dv::Any::Any | ( | const char * | s | ) | [inline] |
| Dv::Any::Any | ( | const T * | ) | [inline, private] |
Forbid Any values containing pointers.
Use e.g. vectors. Except const char*, see above.
| const std::type_info& Dv::Any::type | ( | ) | const [inline] |
Return type of value in Any object.
This almost only be used for comparing with another typeid(T).
Definition at line 36 of file any.h.
References it_, and Dv::Any::AbstractObject::type().
| bool Dv::Any::null | ( | ) | const [inline] |
| U* any_cast | ( | const Any * | any | ) | [friend] |
AbstractObject* Dv::Any::it_ [private] |
| dvutil-1.0.10 | [ 5 December, 2009] |