# value Class Reference

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

`#include <ETL/value>`

List of all members.

## Public Member Functions

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

## Private Attributes

contentholder * | content

## Friends

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

## Classes

struct | contentholder
class | holder

## 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 65 of file _value.h.

## Constructor & Destructor Documentation

value::value | ( |  | ) | `[inline]`

Definition at line 77 of file _value.h.

Referenced by operator=().

value::value | ( | const value & | v | ) | `[inline]`

Definition at line 82 of file _value.h.

template<typename T>

value::value | ( | const T & | v | ) | `[inline]`

Definition at line 90 of file _value.h.

## Member Function Documentation

value& value::swap | ( | value & | rhs | ) | `[inline]`

Definition at line 98 of file _value.h.

References content.

template<typename ValueType>

value& value::operator= | ( | const ValueType & | rhs | ) | `[inline]`

Definition at line 105 of file _value.h.

References value().

value& value::operator= | ( | const value & | rhs | ) | `[inline]`

Definition at line 111 of file _value.h.

References value().

bool value::empty | ( |  | ) | const`[inline]`

Definition at line 119 of file _value.h.

References content.

const std::type_info& value::type | ( |  | ) | const`[inline]`

Definition at line 124 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 199 of file _value.h.

## Member Data Documentation

contentholder* value::content `[private]`

Definition at line 74 of file _value.h.

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

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

- _value.h