Tizen Native API  3.0
Dali::Property::Value Class Reference

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 (Type type)
 Explicitly sets a type and initialize it.
 Value (const Value &value)
 Copy constructor.
Valueoperator= (const Value &value)
 Assigns a property value.
 ~Value ()
 Non-virtual destructor.
Type GetType () const
 Queries the type of this property 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::ArrayGetArray () const
 Retrieves the Array API of the Property::Value without copying the contents of the map.
Property::MapGetMap () const
 Retrieves the Map API of the Property::Value without copying the contents of the map.

Friends

std::ostream & operator<< (std::ostream &ouputStream, const Property::Value &value)
 Output to stream.

Detailed Description

A value-type representing a property value.

Since:
3.0, DALi version 1.0.0

Constructor & Destructor Documentation

Default constructor.

This creates a property with type Property::NONE.

Since:
3.0, DALi version 1.0.0
Dali::Property::Value::Value ( bool  boolValue)

Creates a boolean property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]boolValueA boolean value
Dali::Property::Value::Value ( int  integerValue)

Creates an integer property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]integerValueAn integer value
Dali::Property::Value::Value ( float  floatValue)

Creates a float property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]floatValueA floating-point value
Dali::Property::Value::Value ( const Vector2 vectorValue)

Creates a Vector2 property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]vectorValueA vector of 2 floating-point values
Dali::Property::Value::Value ( const Vector3 vectorValue)

Creates a Vector3 property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]vectorValueA vector of 3 floating-point values
Dali::Property::Value::Value ( const Vector4 vectorValue)

Creates a Vector4 property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]vectorValueA vector of 4 floating-point values
Dali::Property::Value::Value ( const Matrix3 matrixValue)

Creates a Matrix3 property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]matrixValueA matrix of 3x3 floating-point values
Dali::Property::Value::Value ( const Matrix matrixValue)

Creates a Matrix property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]matrixValueA matrix of 4x4 floating-point values
Dali::Property::Value::Value ( const Rect< int > &  vectorValue)

Creates a Vector4 property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]vectorValueA vector of 4 integer values
Dali::Property::Value::Value ( const AngleAxis angleAxis)

Creates an orientation property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]angleAxisAn angle-axis representing the rotation
Dali::Property::Value::Value ( const Quaternion quaternion)

Creates an orientation property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]quaternionA quaternion representing the rotation
Dali::Property::Value::Value ( const std::string &  stringValue)

Creates an string property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]stringValueA string
Dali::Property::Value::Value ( const char *  stringValue)

Creates a string property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]stringValueA string

Creates an array property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]arrayValueAn array

Creates a map property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]mapValueAn array
Dali::Property::Value::Value ( Type  type) [explicit]

Explicitly sets a type and initialize it.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]typeThe property value type
Dali::Property::Value::Value ( const Value value)

Copy constructor.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]valueThe property value to copy

Non-virtual destructor.

This class is not a base class.

Since:
3.0, DALi version 1.0.0

Member Function Documentation

bool Dali::Property::Value::Get ( bool &  boolValue) const

Retrieves a boolean value.

Since:
3.0, DALi version 1.0.0
Parameters:
[out]boolValueOn 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:
3.0, DALi version 1.0.0
Parameters:
[out]floatValueOn 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:
3.0, DALi version 1.0.0
Parameters:
[out]integerValueOn 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:
3.0, DALi version 1.0.0
Parameters:
[out]rectOn 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

Retrieves a vector value.

Since:
3.0, DALi version 1.0.0
Parameters:
[out]vectorValueOn return, a vector value
Returns:
true if the value is successfully retrieved, false if the type is not convertible
Precondition:
GetType() is a type convertible to Vector2.
bool Dali::Property::Value::Get ( Vector3 vectorValue) const

Retrieves a vector value.

Since:
3.0, DALi version 1.0.0
Parameters:
[out]vectorValueOn return, a vector value
Returns:
true if the value is successfully retrieved, false if the type is not convertible
Precondition:
GetType() is a type convertible to Vector3.
bool Dali::Property::Value::Get ( Vector4 vectorValue) const

Retrieves a vector value.

Since:
3.0, DALi version 1.0.0
Parameters:
[out]vectorValueOn return, a vector value
Returns:
true if the value is successfully retrieved, false if the type is not convertible
Precondition:
GetType() is a type convertible to Vector4.
bool Dali::Property::Value::Get ( Matrix3 matrixValue) const

Retrieves a matrix3 value.

Since:
3.0, DALi version 1.0.0
Parameters:
[out]matrixValueOn return, a matrix3 value
Returns:
true if the value is successfully retrieved, false if the type is not convertible
Precondition:
GetType() is a type convertible to Matrix3.
bool Dali::Property::Value::Get ( Matrix matrixValue) const

Retrieves a matrix value.

Since:
3.0, DALi version 1.0.0
Parameters:
[out]matrixValueOn return, a matrix value
Returns:
true if the value is successfully retrieved, false if the type is not convertible
Precondition:
GetType() is a type convertible to Matrix.
bool Dali::Property::Value::Get ( AngleAxis angleAxisValue) const

Retrieves an angle-axis value.

Since:
3.0, DALi version 1.0.0
Parameters:
[out]angleAxisValueOn return, a angle-axis value
Returns:
true if the value is successfully retrieved, false if the type is not convertible
Precondition:
GetType() is a type convertible to AngleAxis.
bool Dali::Property::Value::Get ( Quaternion quaternionValue) const

Retrieves a quaternion value.

Since:
3.0, DALi version 1.0.0
Parameters:
[out]quaternionValueOn 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:
3.0, DALi version 1.0.0
Parameters:
[out]stringValueA 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:
3.0, DALi version 1.0.0
Parameters:
[out]arrayValueThe 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:
3.0, DALi version 1.0.0
Parameters:
[out]mapValueThe map as vector of string and Property Value pairs
Returns:
true if the value is successfully retrieved, false if the type is not convertible
Precondition:
GetType() returns Property::MAP.

Retrieves the Array API of the Property::Value without copying the contents of the map.

Since:
3.0, DALi version 1.0.0
Returns:
The Array API of the Property::Value or NULL if not a Property::Array

Retrieves the Map API of the Property::Value without copying the contents of the map.

Since:
3.0, DALi version 1.0.0
Returns:
The Map API of the Property::Value or NULL if not a Property::Map

Queries the type of this property value.

Since:
3.0, DALi version 1.0.0
Returns:
The type ID
Value& Dali::Property::Value::operator= ( const Value value)

Assigns a property value.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]valueThe 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:
3.0, DALi version 1.0.0
Since:
3.0, DALi version 1.0.0
Parameters:
[in]ouputStreamThe output stream operator
[in]valueThe value to insert
Returns:
The output stream operator