Tizen Native API
|
A Map of property values. More...
Public Types | |
typedef std::size_t | SizeType |
Size type. | |
Public Member Functions | |
Map () | |
Default constructor. | |
Map (const Map &other) | |
Copy Constructor. | |
~Map () | |
Non-virtual destructor. | |
SizeType | Count () const |
Retrieve 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. | |
void | Insert (const std::string &key, const Value &value) |
Inserts the key-value pair in the Map. | |
Value & | GetValue (SizeType position) const |
Retrieve the value at the specified position. | |
const std::string & | GetKey (SizeType position) const |
Retrieve the key at the specified position. | |
StringValuePair & | GetPair (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 (const std::string &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 key. | |
Value & | operator[] (const std::string &key) |
Operator to access the element with the specified key. | |
Map & | operator= (const Map &other) |
Assignment Operator. |
Detailed Description
A Map of property values.
- Since :
- 2.4
Member Typedef Documentation
typedef std::size_t Dali::Property::Map::SizeType |
Size type.
- Since :
- 2.4
Constructor & Destructor Documentation
Default constructor.
- Since :
- 2.4
Dali::Property::Map::Map | ( | const Map & | other | ) |
Non-virtual destructor.
- Since :
- 2.4
Member Function Documentation
void Dali::Property::Map::Clear | ( | ) |
Clears the map.
- Since :
- 2.4
SizeType Dali::Property::Map::Count | ( | ) | const |
Retrieve the number of elements in the map.
- Since :
- 2.4
- Returns:
- The number of elements in the map.
bool Dali::Property::Map::Empty | ( | ) | const |
Returns whether the map is empty.
- Since :
- 2.4
- Returns:
- true if empty, false otherwise
Value* Dali::Property::Map::Find | ( | const char * | key | ) | const |
Finds the value for the specified key if it exists.
- Since :
- 2.4
- Parameters:
-
[in] key The key to find.
- Returns:
- A const pointer to the value if it exists, NULL otherwise
Value* Dali::Property::Map::Find | ( | const std::string & | key | ) | const |
Finds the value for the specified key if it exists.
- Since :
- 2.4
- Parameters:
-
[in] key The key to find.
- Returns:
- A const pointer to the value if it exists, NULL otherwise
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.
- Since :
- 2.4
- Parameters:
-
[in] key The key to find. [in] type The type to check.
- Returns:
- A const pointer to the value if it exists, NULL otherwise
const std::string& Dali::Property::Map::GetKey | ( | SizeType | position | ) | const |
Retrieve the key at the specified position.
- Since :
- 2.4
- Returns:
- A const reference to the key at the specified position.
- Note:
- Will assert if position >= Count()
StringValuePair& Dali::Property::Map::GetPair | ( | SizeType | position | ) | const |
Retrieve the key & the value at the specified position.
- Since :
- 2.4
- Returns:
- A reference to the pair of key and value at the specified position.
- Note:
- Will assert if position >= Count()
Value& Dali::Property::Map::GetValue | ( | SizeType | position | ) | const |
Retrieve the value at the specified position.
- Since :
- 2.4
- Returns:
- A reference to the value at the specified position.
- Note:
- Will assert if position >= Count()
void Dali::Property::Map::Insert | ( | const char * | key, |
const Value & | value | ||
) |
Inserts the key-value pair in the Map.
Does not check for duplicates
- Since :
- 2.4
- Parameters:
-
key to insert value to insert
void Dali::Property::Map::Insert | ( | const std::string & | key, |
const Value & | value | ||
) |
Inserts the key-value pair in the Map.
Does not check for duplicates
- Since :
- 2.4
- Parameters:
-
key to insert 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.
- Since :
- 2.4
- Parameters:
-
[in] from The map to merge from.
Assignment Operator.
- Since :
- 2.4
- Parameters:
-
[in] other The map to copy from.
- Returns:
- The copied map.
const Value& Dali::Property::Map::operator[] | ( | const std::string & | key | ) | const |
Const operator to access element with the specified key.
- Since :
- 2.4
- Parameters:
-
[in] key The key whose value to access.
- Returns:
- The value for the element with the specified key, if key doesn't exist, then Property::NONE is returned.
- Note:
- Will assert if invalid-key is given.
Value& Dali::Property::Map::operator[] | ( | const std::string & | key | ) |
Operator to access the element with the specified key.
- Since :
- 2.4
- Parameters:
-
[in] key The key whose value to access.
- Returns:
- A reference to the value for the element with the specified key.
- Note:
- If an element with the key does not exist, then it is created.