Class that can hold any value type (and change value type mid lifetime)
More...
#include "Any.h"
Class that can hold any value type (and change value type mid lifetime)
Definition at line 60 of file Any.h.
◆ Any() [1/4]
template<class T >
scl::utils::Any::Any |
( |
T && |
value | ) |
|
|
inline |
Move a value into an Any.
- Template Parameters
-
T | being the given value type |
- Parameters
-
value | being the value to construct from |
Definition at line 81 of file Any.h.
◆ Any() [2/4]
scl::utils::Any::Any |
( |
Any && |
| ) |
|
|
default |
◆ Any() [3/4]
◆ Any() [4/4]
scl::utils::Any::Any |
( |
const Any & |
| ) |
|
|
delete |
◆ as()
template<class U >
U scl::utils::Any::as |
( |
| ) |
const |
|
inline |
Attempts to cast this Any.
- Template Parameters
-
U | being the type to cast to |
- Returns
- the type safe value
- Exceptions
-
Definition at line 122 of file Any.h.
◆ canCastTo()
template<class U >
bool scl::utils::Any::canCastTo |
( |
| ) |
const |
|
inline |
Safely determines whether or not you can cast from the current value type to the one given as argument.
- Template Parameters
-
U | being the desired cast type |
- Returns
- TRUE if it is the current value type, FALSE otherwise
Definition at line 111 of file Any.h.
◆ operator=() [1/3]
Any& scl::utils::Any::operator= |
( |
Any && |
| ) |
|
|
default |
◆ operator=() [2/3]
Any& scl::utils::Any::operator= |
( |
const Any & |
| ) |
|
|
delete |
◆ operator=() [3/3]
template<class T >
Any& scl::utils::Any::operator= |
( |
T && |
value | ) |
|
|
inline |
Assign a new value to this Any.
- Template Parameters
-
T | being the new value type |
- Parameters
-
- Returns
- a reference to this Any
Definition at line 98 of file Any.h.
◆ impl
A PIMPL.
Definition at line 66 of file Any.h.
◆ ti
The type_info of the current value type.
Definition at line 72 of file Any.h.
The documentation for this class was generated from the following file: