Classes |
struct | AnyContainerBase |
| Base container to hold type for match verification and instance cloning function. More...
|
class | AnyContainerImpl |
| Templated class to hold value for type. More...
|
struct | AnyContainerImplCloner |
| Templated Clone function from container base. More...
|
struct | AnyContainerImplDelete |
| Templated Delete function from container base. More...
|
Public Member Functions |
| Any () |
| Default constructor.
|
| ~Any () |
| Destructor. Free resources.
|
template<typename Type > |
| Any (const Type &value) |
| Constructs a Any type with the given value.
|
| Any (const Any &any) |
| Copy Constructor.
|
template<typename Type > |
Any & | operator= (const Type &value) |
| Assigns a given value to the Any type.
|
Any & | operator= (const Any &any) |
| Assignment operator.
|
template<typename Type > |
void | Get (Type &type) const |
| Gets a value of type Type from container.
|
const std::type_info & | GetType () const |
| Returns the type info of the stored value.
|
template<typename Type > |
const Type & | Get () const |
| Retrieves the stored value in the Any type.
|
template<typename Type > |
Type * | GetPointer () |
| Returns pointer of Type to the value stored.
|
template<typename Type > |
const Type * | GetPointer () const |
| Returns pointer of Type to the value stored.
|
bool | Empty () const |
| Returns whether container holds a value.
|
Static Public Member Functions |
static void | AssertAlways (const char *assertMessage) |
| Passes Assert message.
|
Stores a value of any type.
Examples of use:
{.cpp}
Any uintVariable = 5u;
Any floatVariable( 4.5f );
Any strVariable( std::string( "Hello world" ) );
uintVariable = 1u;
unsigned int variable = AnyCast< unsigned int >( uintVariable );
if ( typeid( int ) == uintVariable.GetType() )
- Since:
- 2.4, DALi version 1.0.0