ETL  0.04.19
Classes | Public Member Functions | Private Attributes | Friends | List of all members
value Class Reference

Abstraction of the concept of a generic value. More...

#include <ETL/value>

Classes

struct  contentholder
class  holder

Public Member Functions

 value ()
 value (const value &v)
template<typename T >
 value (const T &v)
valueswap (value &rhs)
template<typename ValueType >
valueoperator= (const ValueType &rhs)
valueoperator= (const value &rhs)
bool empty () const
const std::type_info & type () const

Private Attributes

contentholdercontent

Friends

template<typename ValueType >
ValueType * value_cast (value *v)

Detailed Description

Abstraction of the concept of a generic value.

Modified from ideas for the boost::any type. Added binary compatibility structure

Definition at line 66 of file _value.h.

Constructor & Destructor Documentation

value::value ( )
inline

Definition at line 78 of file _value.h.

Referenced by operator=().

value::value ( const value v)
inline

Definition at line 83 of file _value.h.

template<typename T >
value::value ( const T &  v)
inline

Definition at line 91 of file _value.h.

Member Function Documentation

value& value::swap ( value rhs)
inline

Definition at line 99 of file _value.h.

References content.

template<typename ValueType >
value& value::operator= ( const ValueType &  rhs)
inline

Definition at line 106 of file _value.h.

References value().

value& value::operator= ( const value rhs)
inline

Definition at line 112 of file _value.h.

References value().

bool value::empty ( ) const
inline

Definition at line 120 of file _value.h.

References content.

const std::type_info& value::type ( ) const
inline

Definition at line 125 of file _value.h.

References content, and value::contentholder::type().

Referenced by value_cast().

Friends And Related Function Documentation

template<typename ValueType >
ValueType* value_cast ( value v)
friend

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.

See Also
value_store_type

Definition at line 200 of file _value.h.

Member Data Documentation

contentholder* value::content
private

Definition at line 75 of file _value.h.

Referenced by empty(), swap(), type(), and value_cast().


The documentation for this class was generated from the following file: