|
Lunchbox
1.13.0
Multi-threaded C++ toolbox library for all application developers creating high-performance multi-threaded programs.
|
A class which can hold instances of any type. More...
#include <any.h>
Collaboration diagram for lunchbox::Any:Public Member Functions | |
Construction/Destruction | |
| Any () | |
| Construct a new, empty Any. More... | |
| template<typename ValueType > | |
| Any (const ValueType &value) | |
| Construct a new Any with the given value. More... | |
| Any (const Any &other) | |
| Copy-construct a new Any with copying content of other. More... | |
| ~Any () | |
| Destruct this Any. More... | |
Modifiers | |
| Any & | swap (Any &rhs) |
| Exchange the content of this and rhs. More... | |
| template<typename ValueType > | |
| Any & | operator= (const ValueType &rhs) |
| Assign a new value to this Any. More... | |
| Any & | operator= (Any rhs) |
| Exchange the content of this and rhs. More... | |
Queries | |
| bool | empty () const |
| const std::type_info & | type () const |
| bool | operator== (const Any &rhs) const |
| bool | operator!= (const Any &rhs) const |
Friends | |
| class | boost::serialization::access |
| template<typename ValueType > | |
| ValueType * | any_cast (Any *) |
| Retrieve the value stored in an Any including type checking. More... | |
| template<typename ValueType > | |
| ValueType * | unsafe_any_cast (Any *) |
| Retrieve the value stored in an Any without type checking. More... | |
A class which can hold instances of any type.
This class is based on boost.any with the extension to support serialization if the ValueType supports boost.serialization.
Example:
| lunchbox::Any::Any | ( | ) |
Construct a new, empty Any.
Referenced by operator=().
Here is the caller graph for this function:
|
inline |
| lunchbox::Any::Any | ( | const Any & | other | ) |
Copy-construct a new Any with copying content of other.
| lunchbox::Any::~Any | ( | ) |
Destruct this Any.
| bool lunchbox::Any::empty | ( | ) | const |
|
inline |
|
inline |
| bool lunchbox::Any::operator== | ( | const Any & | rhs | ) | const |
| const std::type_info& lunchbox::Any::type | ( | ) | const |
Referenced by lunchbox::any_cast().
Here is the caller graph for this function:
|
friend |
|
friend |