#include <value.h>
|
std::unique_ptr< Imp > | _imp |
|
Definition at line 47 of file value.h.
◆ Value() [1/4]
Default constructor. Creates an empty Value.
◆ Value() [2/4]
template<typename T >
Ufe::Value::Value |
( |
const T & |
v | ) |
|
Create a Value from the argument.
- Parameters
-
◆ Value() [3/4]
Ufe::Value::Value |
( |
const Value & |
| ) |
|
Default copy constructor.
◆ Value() [4/4]
Ufe::Value::Value |
( |
Value && |
| ) |
|
|
noexcept |
◆ ~Value()
◆ empty()
bool Ufe::Value::empty |
( |
| ) |
const |
- Returns
- True iff this value is empty.
◆ get()
template<typename T >
T Ufe::Value::get |
( |
| ) |
const |
- Returns
- The current value if template type matches actual type.
- Exceptions
-
InvalidValueGet | If the template type doesn't match the type of the actual value. |
◆ isType()
template<typename T >
bool Ufe::Value::isType |
( |
| ) |
const |
- Returns
- True if the contained value is an object of type T.
◆ operator!=()
bool Ufe::Value::operator!= |
( |
const Value & |
rhs | ) |
const |
◆ operator=() [1/2]
Default assignment operator.
◆ operator=() [2/2]
Move assignment. Right hand side becomes empty.
◆ operator==()
bool Ufe::Value::operator== |
( |
const Value & |
rhs | ) |
const |
◆ safeGet()
template<typename T >
T Ufe::Value::safeGet |
( |
T |
arg | ) |
const |
Returns a copy of the value if the template type matches actual type. Returns the input argument value otherwise. Especially useful to return a default when dealing with an empty Ufe::Value.
- Returns
- The current value if template type matches actual type, otherwise arg.
◆ typeName()
std::string Ufe::Value::typeName |
( |
| ) |
const |
Returns the C++ type name of the contained value if non-empty. For basic types uses the typeid(T) function. For complex types will return more human readable string for easier comparison.
- Returns
- Empty string if Value is empty.
-
"bool", "int", "float", "double" for basic types.
-
"std::string" for std::string type.
-
"Ufe::Vector2i" for Ufe::Vector2i type.
-
"Ufe::Vector2f" for Ufe::Vector2f type.
-
"Ufe::Vector2d" for Ufe::Vector2d type.
-
"Ufe::Vector3i" for Ufe::Vector3i type.
-
"Ufe::Vector3f" for Ufe::Vector3f type.
-
"Ufe::Vector3d" for Ufe::Vector3d type.
-
"Ufe::Vector4i" for Ufe::Vector4i type.
-
"Ufe::Vector4f" for Ufe::Vector4f type.
-
"Ufe::Vector4d" for Ufe::Vector4d type.
-
"Ufe::Color3f" for Ufe::Color3f type.
-
"Ufe::Color4f" for Ufe::Color4f type.
◆ _imp
std::unique_ptr<Imp> Ufe::Value::_imp |
|
private |
The documentation for this class was generated from the following file: