Tizen Native API
4.0
|
A Map of property values, the key type could be String or Property::Index. More...
Public Member Functions | |
Map () | |
Default constructor. | |
Map (const Map &other) | |
Copy Constructor. | |
~Map () | |
Non-virtual destructor. | |
SizeType | Count () const |
Retrieves the number of elements in the map. | |
bool | Empty () const |
Returns whether the map is empty. | |
void | Insert (const char *key, const Value &value) |
Inserts the key-value pair in the Map, with the key type as string. | |
void | Insert (const std::string &key, const Value &value) |
Inserts the key-value pair in the Map, with the key type as string. | |
void | Insert (Property::Index key, const Value &value) |
Inserts the key-value pair in the Map, with the key type as index. | |
Property::Map & | Add (const char *key, const Value &value) |
Inserts the key-value pair in the Map, with the key type as string. | |
Property::Map & | Add (const std::string &key, const Value &value) |
Inserts the key-value pair in the Map, with the key type as string. | |
Property::Map & | Add (Property::Index key, const Value &value) |
Inserts the key-value pair in the Map, with the key type as index. | |
Value & | GetValue (SizeType position) const |
Retrieves the value at the specified position. | |
const std::string & | GetKey (SizeType position) const DALI_DEPRECATED_API |
Retrieves the key at the specified position. | |
Key | GetKeyAt (SizeType position) const |
Retrieve the key at the specified position. | |
StringValuePair & | GetPair (SizeType position) const DALI_DEPRECATED_API |
Retrieves the key & the value at the specified position. | |
KeyValuePair | GetKeyValue (SizeType position) const |
Retrieve the key & the value at the specified position. | |
Value * | Find (const char *key) const |
Finds the value for the specified key if it exists. | |
Value * | Find (const std::string &key) const |
Finds the value for the specified key if it exists. | |
Value * | Find (Property::Index key) const |
Finds the value for the specified key if it exists. | |
Value * | Find (Property::Index indexKey, const std::string &stringKey) const |
Finds the value for the specified keys if either exist. | |
Value * | Find (const std::string &key, Property::Type type) const |
Finds the value for the specified key if it exists and its type is type. | |
Value * | Find (Property::Index key, Property::Type type) const |
Finds the value for the specified key if it exists and its type is type. | |
void | Clear () |
Clears the map. | |
void | Merge (const Map &from) |
Merges values from the map 'from' to the current. | |
const Value & | operator[] (const std::string &key) const |
Const operator to access element with the specified string key. | |
Value & | operator[] (const std::string &key) |
Operator to access the element with the specified string key. | |
const Value & | operator[] (Property::Index key) const |
Const operator to access element with the specified index key. | |
Value & | operator[] (Property::Index key) |
Operator to access the element with the specified index key. | |
Map & | operator= (const Map &other) |
Assignment Operator. | |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const Property::Map &map) |
Output to stream. |
A Map of property values, the key type could be String or Property::Index.
Default constructor.
Dali::Property::Map::Map | ( | const Map & | other | ) |
Non-virtual destructor.
Property::Map& Dali::Property::Map::Add | ( | const char * | key, |
const Value & | value | ||
) |
Inserts the key-value pair in the Map, with the key type as string.
Does not check for duplicates
key | to insert |
value | to insert |
Property::Map& Dali::Property::Map::Add | ( | const std::string & | key, |
const Value & | value | ||
) |
Inserts the key-value pair in the Map, with the key type as string.
Does not check for duplicates
key | to insert |
value | to insert |
Property::Map& Dali::Property::Map::Add | ( | Property::Index | key, |
const Value & | value | ||
) |
Inserts the key-value pair in the Map, with the key type as index.
Does not check for duplicates
key | to insert |
value | to insert |
void Dali::Property::Map::Clear | ( | ) |
Clears the map.
SizeType Dali::Property::Map::Count | ( | ) | const |
Retrieves the number of elements in the map.
bool Dali::Property::Map::Empty | ( | ) | const |
Returns whether the map is empty.
true
if empty, false
otherwise Value* Dali::Property::Map::Find | ( | const char * | key | ) | const |
Finds the value for the specified key if it exists.
[in] | key | The key to find |
Value* Dali::Property::Map::Find | ( | const std::string & | key | ) | const |
Finds the value for the specified key if it exists.
[in] | key | The key to find |
Value* Dali::Property::Map::Find | ( | Property::Index | key | ) | const |
Finds the value for the specified key if it exists.
[in] | key | The key to find |
Value* Dali::Property::Map::Find | ( | Property::Index | indexKey, |
const std::string & | stringKey | ||
) | const |
Finds the value for the specified keys if either exist.
Will search for the index key first.
[in] | indexKey | The index key to find |
[in] | stringKey | The string key to find |
Value* Dali::Property::Map::Find | ( | const std::string & | key, |
Property::Type | type | ||
) | const |
Finds the value for the specified key if it exists and its type is type.
[in] | key | The key to find |
[in] | type | The type to check |
Value* Dali::Property::Map::Find | ( | Property::Index | key, |
Property::Type | type | ||
) | const |
Finds the value for the specified key if it exists and its type is type.
[in] | key | The key to find |
[in] | type | The type to check |
const std::string& Dali::Property::Map::GetKey | ( | SizeType | position | ) | const |
Retrieves the key at the specified position.
DEPRECATED_1_1.39 Position based retrieval is no longer supported after extending the key type to both Index and String.
[in] | position | The specified position |
Key Dali::Property::Map::GetKeyAt | ( | SizeType | position | ) | const |
Retrieve the key at the specified position.
[in] | position | The specified position |
KeyValuePair Dali::Property::Map::GetKeyValue | ( | SizeType | position | ) | const |
Retrieve the key & the value at the specified position.
[in] | position | The specified position |
StringValuePair& Dali::Property::Map::GetPair | ( | SizeType | position | ) | const |
Retrieves the key & the value at the specified position.
DEPRECATED_1_1.39 Position based retrieval is no longer supported after extending the key type to both Index and String.
[in] | position | The specified position |
Value& Dali::Property::Map::GetValue | ( | SizeType | position | ) | const |
Retrieves the value at the specified position.
[in] | position | The specified position |
void Dali::Property::Map::Insert | ( | const char * | key, |
const Value & | value | ||
) |
Inserts the key-value pair in the Map, with the key type as string.
Does not check for duplicates.
[in] | key | The key to insert |
[in] | value | The value to insert |
void Dali::Property::Map::Insert | ( | const std::string & | key, |
const Value & | value | ||
) |
Inserts the key-value pair in the Map, with the key type as string.
Does not check for duplicates.
[in] | key | The key to insert |
[in] | value | The value to insert |
void Dali::Property::Map::Insert | ( | Property::Index | key, |
const Value & | value | ||
) |
Inserts the key-value pair in the Map, with the key type as index.
Does not check for duplicates.
[in] | key | The key to insert |
[in] | value | The value to insert |
void Dali::Property::Map::Merge | ( | const Map & | from | ) |
Merges values from the map 'from' to the current.
Any values in 'from' will overwrite the values in the current map.
[in] | from | The map to merge from |
Assignment Operator.
[in] | other | The map to copy from |
const Value& Dali::Property::Map::operator[] | ( | const std::string & | key | ) | const |
Const operator to access element with the specified string key.
[in] | key | The key whose value to access |
Value& Dali::Property::Map::operator[] | ( | const std::string & | key | ) |
Operator to access the element with the specified string key.
[in] | key | The key whose value to access |
const Value& Dali::Property::Map::operator[] | ( | Property::Index | key | ) | const |
Const operator to access element with the specified index key.
[in] | key | The key whose value to access |
Value& Dali::Property::Map::operator[] | ( | Property::Index | key | ) |
Operator to access the element with the specified index key.
[in] | key | The key whose value to access |
std::ostream& operator<< | ( | std::ostream & | stream, |
const Property::Map & | map | ||
) | [friend] |
Output to stream.
[in] | stream | The output stream operator |
[in] | map | The map to insert |