A value-type representing a property value. More...
Public Member Functions | |
Value () | |
Default constructor. | |
Value (bool boolValue) | |
Creates a boolean property value. | |
Value (int integerValue) | |
Creates an integer property value. | |
Value (float floatValue) | |
Creates a float property value. | |
Value (const Vector2 &vectorValue) | |
Creates a Vector2 property value. | |
Value (const Vector3 &vectorValue) | |
Creates a Vector3 property value. | |
Value (const Vector4 &vectorValue) | |
Creates a Vector4 property value. | |
Value (const Matrix3 &matrixValue) | |
Creates a Matrix3 property value. | |
Value (const Matrix &matrixValue) | |
Creates a Matrix property value. | |
Value (const Rect< int > &vectorValue) | |
Creates a Vector4 property value. | |
Value (const AngleAxis &angleAxis) | |
Creates an orientation property value. | |
Value (const Quaternion &quaternion) | |
Creates an orientation property value. | |
Value (const std::string &stringValue) | |
Creates an string property value. | |
Value (const char *stringValue) | |
Creates a string property value. | |
Value (Property::Array &arrayValue) | |
Creates an array property value. | |
Value (Property::Map &mapValue) | |
Creates a map property value. | |
Value (const Extents &extentsValue) | |
Creates an extents property value. | |
Value (Type type) | |
Explicitly sets a type and initialize it. | |
Value (const Value &value) | |
Copy constructor. | |
Value & | operator= (const Value &value) |
Assigns a property value. | |
~Value () | |
Non-virtual destructor. | |
Type | GetType () const |
Queries the type of this property value. | |
template<typename T > | |
T | Get () const |
Retrieves a specific value. | |
bool | Get (bool &boolValue) const |
Retrieves a boolean value. | |
bool | Get (float &floatValue) const |
Retrieves a floating-point value. | |
bool | Get (int &integerValue) const |
Retrieves an integer value. | |
bool | Get (Rect< int > &rect) const |
Retrieves an integer rectangle. | |
bool | Get (Vector2 &vectorValue) const |
Retrieves a vector value. | |
bool | Get (Vector3 &vectorValue) const |
Retrieves a vector value. | |
bool | Get (Vector4 &vectorValue) const |
Retrieves a vector value. | |
bool | Get (Matrix3 &matrixValue) const |
Retrieves a matrix3 value. | |
bool | Get (Matrix &matrixValue) const |
Retrieves a matrix value. | |
bool | Get (AngleAxis &angleAxisValue) const |
Retrieves an angle-axis value. | |
bool | Get (Quaternion &quaternionValue) const |
Retrieves a quaternion value. | |
bool | Get (std::string &stringValue) const |
Retrieves an string property value. | |
bool | Get (Property::Array &arrayValue) const |
Retrieves an array property value. | |
bool | Get (Property::Map &mapValue) const |
Retrieves an map property value. | |
Property::Array * | GetArray () const |
Retrieves the Array API of the Property::Value without copying the contents of the map. | |
Property::Map * | GetMap () const |
Retrieves the Map API of the Property::Value without copying the contents of the map. | |
bool | Get (Extents &extentsValue) const |
Retrieves an extents. | |
Friends | |
std::ostream & | operator<< (std::ostream &ouputStream, const Property::Value &value) |
Output to stream. |
Detailed Description
A value-type representing a property value.
- Since:
- 2.4, DALi version 1.0.0
Constructor & Destructor Documentation
Default constructor.
This creates a property with type Property::NONE.
- Since:
- 2.4, DALi version 1.0.0
Dali::Property::Value::Value | ( | bool | boolValue | ) |
Creates a boolean property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] boolValue A boolean value
Dali::Property::Value::Value | ( | int | integerValue | ) |
Creates an integer property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] integerValue An integer value
Dali::Property::Value::Value | ( | float | floatValue | ) |
Creates a float property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] floatValue A floating-point value
Dali::Property::Value::Value | ( | const Vector2 & | vectorValue | ) |
Creates a Vector2 property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] vectorValue A vector of 2 floating-point values
Dali::Property::Value::Value | ( | const Vector3 & | vectorValue | ) |
Creates a Vector3 property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] vectorValue A vector of 3 floating-point values
Dali::Property::Value::Value | ( | const Vector4 & | vectorValue | ) |
Creates a Vector4 property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] vectorValue A vector of 4 floating-point values
Dali::Property::Value::Value | ( | const Matrix3 & | matrixValue | ) |
Creates a Matrix3 property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] matrixValue A matrix of 3x3 floating-point values
Dali::Property::Value::Value | ( | const Matrix & | matrixValue | ) |
Creates a Matrix property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] matrixValue A matrix of 4x4 floating-point values
Dali::Property::Value::Value | ( | const Rect< int > & | vectorValue | ) |
Creates a Vector4 property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] vectorValue A vector of 4 integer values
Dali::Property::Value::Value | ( | const AngleAxis & | angleAxis | ) |
Creates an orientation property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] angleAxis An angle-axis representing the rotation
Dali::Property::Value::Value | ( | const Quaternion & | quaternion | ) |
Creates an orientation property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] quaternion A quaternion representing the rotation
Dali::Property::Value::Value | ( | const std::string & | stringValue | ) |
Creates an string property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] stringValue A string
Dali::Property::Value::Value | ( | const char * | stringValue | ) |
Creates a string property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] stringValue A string
Dali::Property::Value::Value | ( | Property::Array & | arrayValue | ) |
Creates an array property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] arrayValue An array
Dali::Property::Value::Value | ( | Property::Map & | mapValue | ) |
Creates a map property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] mapValue An array
Dali::Property::Value::Value | ( | const Extents & | extentsValue | ) |
Creates an extents property value.
- Since:
- 4.0, DALi version 1.2.62
- Parameters:
-
[in] extentsValue A collection of 4 uint16_t values
Dali::Property::Value::Value | ( | Type | type | ) | [explicit] |
Explicitly sets a type and initialize it.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] type The property value type
Dali::Property::Value::Value | ( | const Value & | value | ) |
Copy constructor.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] value The property value to copy
Non-virtual destructor.
This class is not a base class.
- Since:
- 2.4, DALi version 1.0.0
Member Function Documentation
T Dali::Property::Value::Get | ( | ) | const |
Retrieves a specific value.
Works on a best-effort approach; if value type is not convertible returns a default value of the type.
- Since:
- 2.4, DALi version 1.0.0
- Returns:
- A value of type T
bool Dali::Property::Value::Get | ( | bool & | boolValue | ) | const |
Retrieves a boolean value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[out] boolValue On return, a boolean value
- Returns:
true
if the value is successfully retrieved,false
if the type is not convertible
- Precondition:
- GetType() is a type convertible to bool.
bool Dali::Property::Value::Get | ( | float & | floatValue | ) | const |
Retrieves a floating-point value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[out] floatValue On return, a floating-point value
- Returns:
true
if the value is successfully retrieved,false
if the type is not convertible
- Precondition:
- GetType() is a type convertible to float.
bool Dali::Property::Value::Get | ( | int & | integerValue | ) | const |
Retrieves an integer value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[out] integerValue On return, an integer value
- Returns:
true
if the value is successfully retrieved,false
if the type is not convertible
- Precondition:
- GetType() is a type convertible to int.
bool Dali::Property::Value::Get | ( | Rect< int > & | rect | ) | const |
Retrieves an integer rectangle.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[out] rect On return, an integer rectangle
- Returns:
true
if the value is successfully retrieved,false
if the type is not convertible
- Precondition:
- GetType() is a type convertible to Rect<int>.
bool Dali::Property::Value::Get | ( | Vector2 & | vectorValue | ) | const |
bool Dali::Property::Value::Get | ( | Vector3 & | vectorValue | ) | const |
bool Dali::Property::Value::Get | ( | Vector4 & | vectorValue | ) | const |
bool Dali::Property::Value::Get | ( | Matrix3 & | matrixValue | ) | const |
bool Dali::Property::Value::Get | ( | Matrix & | matrixValue | ) | const |
bool Dali::Property::Value::Get | ( | AngleAxis & | angleAxisValue | ) | const |
bool Dali::Property::Value::Get | ( | Quaternion & | quaternionValue | ) | const |
Retrieves a quaternion value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[out] quaternionValue On return, a quaternion value
- Returns:
true
if the value is successfully retrieved,false
if the type is not convertible
- Precondition:
- GetType() is a type convertible to Quaternion.
bool Dali::Property::Value::Get | ( | std::string & | stringValue | ) | const |
Retrieves an string property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[out] stringValue A string
- Returns:
true
if the value is successfully retrieved,false
if the type is not convertible
- Precondition:
- GetType() is a type convertible to string.
bool Dali::Property::Value::Get | ( | Property::Array & | arrayValue | ) | const |
Retrieves an array property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[out] arrayValue The array as a vector Property Values
- Returns:
true
if the value is successfully retrieved,false
if the type is not convertible
- Precondition:
- GetType() returns Property::ARRAY.
bool Dali::Property::Value::Get | ( | Property::Map & | mapValue | ) | const |
Retrieves an map property value.
- Since:
- 2.4, DALi version 1.0.0
- Returns:
true
if the value is successfully retrieved,false
if the type is not convertible
- Precondition:
- GetType() returns Property::MAP.
bool Dali::Property::Value::Get | ( | Extents & | extentsValue | ) | const |
Property::Array* Dali::Property::Value::GetArray | ( | ) | const |
Retrieves the Array API of the Property::Value without copying the contents of the map.
- Since:
- 2.4, DALi version 1.0.0
- Returns:
- The Array API of the Property::Value or NULL if not a Property::Array
Property::Map* Dali::Property::Value::GetMap | ( | ) | const |
Retrieves the Map API of the Property::Value without copying the contents of the map.
- Since:
- 2.4, DALi version 1.0.0
- Returns:
- The Map API of the Property::Value or NULL if not a Property::Map
Type Dali::Property::Value::GetType | ( | ) | const |
Queries the type of this property value.
- Since:
- 2.4, DALi version 1.0.0
- Returns:
- The type ID
Assigns a property value.
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] value The property value to assign from
- Returns:
- a reference to this
Friends And Related Function Documentation
std::ostream& operator<< | ( | std::ostream & | ouputStream, |
const Property::Value & | value | ||
) | [friend] |
Output to stream.
- Since:
- 2.4, DALi version 1.0.0
- Since:
- 2.4, DALi version 1.0.0
- Parameters:
-
[in] ouputStream The output stream operator [in] value The value to insert
- Returns:
- The output stream operator