ETL
0.04.19
|
#include <algorithm>
#include <typeinfo>
#include <cassert>
Go to the source code of this file.
Classes | |
class | value_store_type< T > |
class | value |
Abstraction of the concept of a generic value. More... | |
struct | value::contentholder |
class | value::holder< T > |
class | bad_value_cast |
Functions | |
template<typename ValueType > | |
ValueType * | value_cast (value *v) |
template<typename ValueType > | |
const ValueType * | value_cast (const value *v) |
template<typename ValueType > | |
ValueType | value_cast (const value &v) |
ValueType* value_cast | ( | value * | v | ) |
Returns a pointer to the desired value type if the value_type and the internal binary format agree (mediated by using the value_store_type class), otherwise it returns 0.
Definition at line 200 of file _value.h.
References value::content, value::holder< T >::obj, and value::type().
Referenced by value_cast().
const ValueType* value_cast | ( | const value * | v | ) |
Same as above except tweaked to allow const cast (possibly for purposes involving type agreement... if const impacts a typeid call I do not know...)
Definition at line 213 of file _value.h.
References value_cast().
ValueType value_cast | ( | const value & | v | ) |
Extract a copy of the internal object and will throw a bad_value_cast exception if the types do not agree.
Definition at line 226 of file _value.h.
References value_cast().