|
| | Any () |
| | Creates an empty any type. More...
|
| |
| template<typename ValueType > |
| | Any (const ValueType &value) |
| | Creates an Any which stores the init parameter inside. More...
|
| |
| | Any (const Any &other) |
| | Copy constructor, works with empty Anys and initialized Any values. More...
|
| |
| | ~Any () |
| |
| Any & | Swap (Any &rhs) |
| | Swaps the content of the two Anys. More...
|
| |
| template<typename ValueType > |
| Any & | operator= (const ValueType &rhs) |
| | Assignment operator for all types != Any. More...
|
| |
| Any & | operator= (const Any &rhs) |
| | Assignment operator for Any. More...
|
| |
| bool | Empty () const |
| | Returns true if the Any is empty. More...
|
| |
| std::string | ToString () const |
| | Returns a string representation for the content. If this Any is empty, returns an empty string. More...
|
| |
| std::string | ToJSON () const |
| | Returns a JSON representation for the content. More...
|
| |
| const std::type_info & | Type () const |
| | Returns the type information of the stored content. If the Any is empty typeid(void) is returned. It is suggested to always query an Any for its type info before trying to extract data via an any_cast/ref_any_cast. More...
|
| |
An Any class represents a general type and is capable of storing any type, supporting type-safe extraction of the internally stored data.
Code taken from the Boost 1.46.1 library. Original copyright by Kevlin Henney. Modified for CppMicroServices.
Definition at line 144 of file usAny.h.
| std::string us::Any::ToString |
( |
| ) |
const |
|
inline |
Returns a string representation for the content. If this Any is empty, returns an empty string.
Custom types should either provide a std::ostream& operator<<(std::ostream& os, const CustomType& ct) function or specialize the any_value_to_string template function for meaningful output.
Definition at line 239 of file usAny.h.
References Empty().