|
Rumba C++ SDK
|
Base class of all Rumba values. More...
#include <Value.h>
Public Member Functions | |
| Value () | |
| Value (Value &&other)=default | |
| Value (const Value &other)=default | |
| Value & | operator= (Value &&other)=default |
| Value & | operator= (const Value &other)=default |
| virtual | ~Value ()=default |
| Value | duplicate () const |
| Duplicate the value. More... | |
| bool | as_bool () const |
| Returns the value as a bool. More... | |
| int | as_int () const |
| Returns the value as an integer. More... | |
| float | as_float () const |
| Returns the value as a float. More... | |
| double | as_double () const |
| Returns the value as a double. More... | |
| const std::string & | as_string () const |
| Returns the value as a string. More... | |
| std::wstring | as_wstring () const |
| Returns the value as a wstring. More... | |
| Imath::V2f | as_V2f () const |
| Returns the value as a V2f. More... | |
| Imath::V3f | as_V3f () const |
| Returns the value as a V3f. More... | |
| Imath::V4f | as_V4f () const |
| Returns the value as a V4f. More... | |
| const Imath::V2d & | as_V2d () const |
| Returns the value as a V2d. More... | |
| const Imath::V3d & | as_V3d () const |
| Returns the value as a V3d. More... | |
| const Imath::V4d & | as_V4d () const |
| Returns the value as a V4d. More... | |
| const Imath::V2i & | as_V2i () const |
| Returns the value as a V2i. More... | |
| const Imath::V3i & | as_V3i () const |
| Returns the value as a V3i. More... | |
| const Imath::V4i & | as_V4i () const |
| Returns the value as a V4i. More... | |
| Imath::M44f | as_M44f () const |
| Returns the value as a M44f. More... | |
| const Imath::M44d & | as_M44d () const |
| Returns the value as a M44d. More... | |
| const Imath::Box3f & | as_Box3f () const |
| Returns the value as a Box3f. More... | |
| const Imath::Color4f & | as_Color4f () const |
| Returns the value as a Color4f. More... | |
| Imath::Quatf | as_Quatf () const |
| Returns the value as a Quatf. More... | |
| const Imath::Quatd & | as_Quatd () const |
| Returns the value as a Quatd. More... | |
| std::shared_ptr< const UserData > | as_user_data () const |
| Returns the value as a user data. More... | |
| StringView | type_name () const |
| Return the type name of the Value. More... | |
| virtual bool | has_node_delegate () const |
| Check if this value can produces a NodeDelegate. More... | |
| virtual std::shared_ptr< NodeDelegate > | node_delegate (const std::shared_ptr< NodeDelegate > &parent, const StringView &name) const |
| bool | operator== (const Value &o) const |
| Compare the two values. More... | |
| bool | operator!= (const Value &o) const |
| bool | is_instance (const char *value_type_name) const |
| Check if this type derives from another value type. More... | |
| operator bool () const | |
Create Rumba objects | |
| Value (bool) | |
| Create a boolean value. More... | |
| Value (int) | |
| Create an integer value. More... | |
| Value (float) | |
| Create a float value. More... | |
| Value (double) | |
| Create a double value (stored in a float right now) More... | |
| Value (const char *string) | |
| Create a string value. More... | |
| Value (const wchar_t *string) | |
| Create a string value. More... | |
| Value (const std::string &string) | |
| Create a string value. More... | |
| Value (const std::wstring &string) | |
| Create a wide string value. More... | |
| Value (const Imath::V2f &) | |
| Create a Imath::V2f value. More... | |
| Value (const Imath::V3f &) | |
| Create a Imath::V3f value. More... | |
| Value (const Imath::V4f &) | |
| Create a Imath::V4f value. More... | |
| Value (const Imath::V2d &) | |
| Create a Imath::V2d value. More... | |
| Value (const Imath::V3d &) | |
| Create a Imath::V3d value. More... | |
| Value (const Imath::V4d &) | |
| Create a Imath::V4d value. More... | |
| Value (const Imath::V2i &) | |
| Create a Imath::V2i value. More... | |
| Value (const Imath::V3i &) | |
| Create a Imath::V3i value. More... | |
| Value (const Imath::V4i &) | |
| Create a Imath::V4i value. More... | |
| Value (const Imath::Color4f &) | |
| Create a Imath::Color4f value. More... | |
| Value (const Imath::M44f &) | |
| Create a Imath::M44f value. More... | |
| Value (const Imath::M44d &) | |
| Create a Imath::M44d value. More... | |
| Value (const Imath::Box3f &) | |
| Create a Imath::Box3f value. More... | |
| Value (const Imath::Quatf &) | |
| Create a Imath::Quatf value. More... | |
| Value (const Imath::Quatd &) | |
| Create a Imath::Quatd value. More... | |
| Value (const std::shared_ptr< const UserData > &user_data) | |
| Create a user data value. More... | |
Static Public Member Functions | |
| static bool | validate_type_name (const char *type_name) |
| Return true if the name is a valid type name. More... | |
| static Value | get_default_value (const char *type_name) |
| Return a default value for a given type. More... | |
Static Public Attributes | |
| static const Value | default_value |
| The default value. More... | |
Base class of all Rumba values.
| maquina::Value::Value | ( | ) |
|
default |
|
default |
|
virtualdefault |
| maquina::Value::Value | ( | bool | ) |
Create a boolean value.
| maquina::Value::Value | ( | int | ) |
Create an integer value.
| maquina::Value::Value | ( | float | ) |
Create a float value.
| maquina::Value::Value | ( | double | ) |
Create a double value (stored in a float right now)
| maquina::Value::Value | ( | const char * | string | ) |
Create a string value.
| maquina::Value::Value | ( | const wchar_t * | string | ) |
Create a string value.
| maquina::Value::Value | ( | const std::string & | string | ) |
Create a string value.
| maquina::Value::Value | ( | const std::wstring & | string | ) |
Create a wide string value.
| maquina::Value::Value | ( | const Imath::V2f & | ) |
Create a Imath::V2f value.
| maquina::Value::Value | ( | const Imath::V3f & | ) |
Create a Imath::V3f value.
| maquina::Value::Value | ( | const Imath::V4f & | ) |
Create a Imath::V4f value.
| maquina::Value::Value | ( | const Imath::V2d & | ) |
Create a Imath::V2d value.
| maquina::Value::Value | ( | const Imath::V3d & | ) |
Create a Imath::V3d value.
| maquina::Value::Value | ( | const Imath::V4d & | ) |
Create a Imath::V4d value.
| maquina::Value::Value | ( | const Imath::V2i & | ) |
Create a Imath::V2i value.
| maquina::Value::Value | ( | const Imath::V3i & | ) |
Create a Imath::V3i value.
| maquina::Value::Value | ( | const Imath::V4i & | ) |
Create a Imath::V4i value.
| maquina::Value::Value | ( | const Imath::Color4f & | ) |
Create a Imath::Color4f value.
| maquina::Value::Value | ( | const Imath::M44f & | ) |
Create a Imath::M44f value.
| maquina::Value::Value | ( | const Imath::M44d & | ) |
Create a Imath::M44d value.
| maquina::Value::Value | ( | const Imath::Box3f & | ) |
Create a Imath::Box3f value.
| maquina::Value::Value | ( | const Imath::Quatf & | ) |
Create a Imath::Quatf value.
| maquina::Value::Value | ( | const Imath::Quatd & | ) |
Create a Imath::Quatd value.
| maquina::Value::Value | ( | const std::shared_ptr< const UserData > & | user_data | ) |
Create a user data value.
| bool maquina::Value::as_bool | ( | ) | const |
Returns the value as a bool.
You must be sure this value is an integer, a float or a boolean or you get false.
| const Imath::Box3f& maquina::Value::as_Box3f | ( | ) | const |
Returns the value as a Box3f.
You must be sure this value is a Box3f or you will have an empty box.
| const Imath::Color4f& maquina::Value::as_Color4f | ( | ) | const |
Returns the value as a Color4f.
You must be sure this value is a Color4f or you will have {0,0,0,0}.
| double maquina::Value::as_double | ( | ) | const |
Returns the value as a double.
You must be sure this value is an integer, a float or a boolean or you get 0.0.
| float maquina::Value::as_float | ( | ) | const |
Returns the value as a float.
You must be sure this value is an integer, a float or a boolean or you get 0.f.
| int maquina::Value::as_int | ( | ) | const |
Returns the value as an integer.
You must be sure this value is an integer, a float or a boolean or you get 0.
| const Imath::M44d& maquina::Value::as_M44d | ( | ) | const |
Returns the value as a M44d.
You must be sure this value is a M44f or M44d or you will have an identity matrix.
| Imath::M44f maquina::Value::as_M44f | ( | ) | const |
Returns the value as a M44f.
You must be sure this value is a M44f or M44d or you will have an identity matrix.
| const Imath::Quatd& maquina::Value::as_Quatd | ( | ) | const |
Returns the value as a Quatd.
You must be sure this value is a Quatf/Quatd or you will have an identity quaternion.
| Imath::Quatf maquina::Value::as_Quatf | ( | ) | const |
Returns the value as a Quatf.
You must be sure this value is a Quatf/ or you will have an identity quaternion.
| const std::string& maquina::Value::as_string | ( | ) | const |
Returns the value as a string.
You must be sure this value is a string or you will have an empty string.
| std::shared_ptr<const UserData> maquina::Value::as_user_data | ( | ) | const |
Returns the value as a user data.
You must be sure this value is a user data or you will have a nullptr.
| const Imath::V2d& maquina::Value::as_V2d | ( | ) | const |
Returns the value as a V2d.
You must be sure this value is a V2d or you will have {0,0}.
| Imath::V2f maquina::Value::as_V2f | ( | ) | const |
Returns the value as a V2f.
You must be sure this value is a V2f/V2d or you will have {0,0}.
| const Imath::V2i& maquina::Value::as_V2i | ( | ) | const |
Returns the value as a V2i.
You must be sure this value is a V2i or you will have {0,0}.
| const Imath::V3d& maquina::Value::as_V3d | ( | ) | const |
Returns the value as a V3d.
You must be sure this value is a V3d or you will have {0,0,0}.
| Imath::V3f maquina::Value::as_V3f | ( | ) | const |
Returns the value as a V3f.
You must be sure this value is a V3f/V3d or you will have {0,0,0}.
| const Imath::V3i& maquina::Value::as_V3i | ( | ) | const |
Returns the value as a V3i.
You must be sure this value is a V3i or you will have {0,0,0}.
| const Imath::V4d& maquina::Value::as_V4d | ( | ) | const |
Returns the value as a V4d.
You must be sure this value is a V4d or you will have {0,0,0,0}.
| Imath::V4f maquina::Value::as_V4f | ( | ) | const |
Returns the value as a V4f.
You must be sure this value is a V4f/V4d or you will have {0,0,0,0}.
| const Imath::V4i& maquina::Value::as_V4i | ( | ) | const |
Returns the value as a V4i.
You must be sure this value is a V4i or you will have {0,0,0,0}.
| std::wstring maquina::Value::as_wstring | ( | ) | const |
Returns the value as a wstring.
You must be sure this value is a string or you will have an empty string.
| Value maquina::Value::duplicate | ( | ) | const |
Duplicate the value.
In most cases, the duplication is a light process, i-e, the internal buffers are shared and copied-on-write
|
static |
Return a default value for a given type.
|
virtual |
Check if this value can produces a NodeDelegate.
| bool maquina::Value::is_instance | ( | const char * | value_type_name | ) | const |
Check if this type derives from another value type.
|
virtual |
Build a NodeDelegate from this value. This method returns nullptr if has_node_delegate() is false.
| parent | ancestor of the produced delegate, typically the owner of this Value, can be nullptr |
| name | given name to node delegate. |
|
inline |
| bool maquina::Value::operator!= | ( | const Value & | o | ) | const |
| bool maquina::Value::operator== | ( | const Value & | o | ) | const |
Compare the two values.
| StringView maquina::Value::type_name | ( | ) | const |
Return the type name of the Value.
For basic types names are : "Int", "Bool", "Float", "String", "V2f", "V3f", "V4f", "V2i", "V3i", "V4i", "M44f", "Box3f", "Color4f", "Quat4f"
|
static |
Return true if the name is a valid type name.
|
static |
The default value.