Dictionary key and value holder and accessor.
#include <dictionary.h>
|
| const char * | key () const noexcept |
| | key - item key accessor
|
| const char * | value () const noexcept |
| | value - item value accessor
|
|
| operator bool () const |
| | operator bool - converts holder to bool returns true if entry valid, false otherwise
|
| bool | isNull () const |
| | isNull - checks that entry invalid (null)
|
set - change value of the current item
- Parameters
-
| value | new value |
| flags | access flags, FlagDontStrdupVal only accepted, other flags ignored |
|
| void | set (const char *value, int flags=0) noexcept |
| | Change the value of this entry.
|
| void | set (const std::string &value, int flags=0) noexcept |
| | Change the value of this entry.
|
Helper operators.
Syntax shugar. - Parameters
-
| value | new item value. Always strduped. Use set() to be more flexibility. |
- Returns
- referenct to this
|
| Entry & | operator= (const char *value) noexcept |
| | Assign a value through the entry holder.
|
| Entry & | operator= (const std::string &value) noexcept |
| | Assign a value through the entry holder.
|
|
|
template<bool> |
| class | DictionaryIterator |
|
class | Dictionary |
| bool | operator== (const Entry &lhs, const Entry &rhs) |
| | Compare two entries.
|
| bool | operator!= (const Entry &lhs, const Entry &rhs) |
| | Compare two entries.
|
◆ isNull()
| bool av::Dictionary::Entry::isNull |
( |
| ) |
const |
- Returns
- true if entry null, false otherwise
◆ key()
| const char * av::Dictionary::Entry::key |
( |
| ) |
const |
|
noexcept |
- Returns
- current item key, or null if entry null
◆ operator=() [1/2]
| Entry & av::Dictionary::Entry::operator= |
( |
const char * | value | ) |
|
|
noexcept |
- Parameters
-
| value | the new value; it is copied |
- Returns
- this entry holder
◆ operator=() [2/2]
| Entry & av::Dictionary::Entry::operator= |
( |
const std::string & | value | ) |
|
|
noexcept |
- Parameters
-
| value | the new value; it is copied |
- Returns
- this entry holder
◆ set() [1/2]
| void av::Dictionary::Entry::set |
( |
const char * | value, |
|
|
int | flags = 0 ) |
|
noexcept |
- Parameters
-
| value | the new value |
| flags | AV_DICT_DONT_STRDUP_VAL is the only flag that applies here |
◆ set() [2/2]
| void av::Dictionary::Entry::set |
( |
const std::string & | value, |
|
|
int | flags = 0 ) |
|
noexcept |
- Parameters
-
| value | the new value |
| flags | AV_DICT_DONT_STRDUP_VAL is the only flag that applies here |
◆ value()
| const char * av::Dictionary::Entry::value |
( |
| ) |
const |
|
noexcept |
- Returns
- current item value or null if entry null
◆ operator!=
| bool operator!= |
( |
const Entry & | lhs, |
|
|
const Entry & | rhs ) |
|
friend |
- Parameters
-
| lhs | the left entry |
| rhs | the right entry |
- Returns
- true when they refer to different elements
◆ operator==
| bool operator== |
( |
const Entry & | lhs, |
|
|
const Entry & | rhs ) |
|
friend |
- Parameters
-
| lhs | the left entry |
| rhs | the right entry |
- Returns
- true when both refer to the same dictionary element
The documentation for this class was generated from the following file: