Unicode string dictionary. More...
Classes | |
| class | Impl |
| Implementation of the unicode string dictionary. More... | |
Public Member Functions | |
| StringDictionary () | |
| Implementation. | |
| StringDictionary (const StringDictionary &rhs) | |
| Constructs a dictionary. | |
| ~StringDictionary () | |
| Releases resources. | |
| void | add (const String &key, const String &value) |
| Adds the (key,value) pair to the dictionary. | |
| String | remove (const String &key) |
| Removes the value associated with key. | |
| String | find (const String &key, bool throw_exception=false) const |
| Returns the value associated with key. | |
| void | fill (StringList ¶m_names, StringList &values) const |
| Fills keys and values with the corresponding values from the dictionary. | |
Private Attributes | |
| Impl * | m_p |
| Implementation. | |
Unicode string dictionary.
Maintains a list of (key,value) pairs allowing one character string to another. This type of dictionary is used, for example, for translations, in which case the key is the language and the value is the corresponding translation.
Definition at line 37 of file arccore/src/common/arccore/common/StringDictionary.h.
| Arcane::StringDictionary::StringDictionary | ( | ) |
Implementation.
Constructs a dictionary
Definition at line 63 of file StringDictionary.cc.
References m_p.
Referenced by StringDictionary().
| Arcane::StringDictionary::StringDictionary | ( | const StringDictionary & | rhs | ) |
Constructs a dictionary.
Definition at line 72 of file StringDictionary.cc.
References m_p, and StringDictionary().
| Arcane::StringDictionary::~StringDictionary | ( | ) |
Adds the (key,value) pair to the dictionary.
If a value already exists for key, it is replaced by the new one.
Definition at line 90 of file StringDictionary.cc.
References m_p.
| void Arcane::StringDictionary::fill | ( | StringList & | param_names, |
| StringList & | values ) const |
Fills keys and values with the corresponding values from the dictionary.
Definition at line 129 of file StringDictionary.cc.
References Arcane::CollectionBase::clear(), and m_p.
Returns the value associated with key.
If no value is associated with key, the null string is returned. It is not possible to distinguish between a value corresponding to the null string and a not found value unless throw_exception is true, in which case an exception is thrown if there is no value corresponding to key.
Definition at line 114 of file StringDictionary.cc.
References m_p.
Removes the value associated with key.
If no value was associated with key, nothing happens.
Definition at line 99 of file StringDictionary.cc.
References m_p.
|
private |
Implementation.
Definition at line 82 of file arccore/src/common/arccore/common/StringDictionary.h.
Referenced by add(), fill(), find(), remove(), StringDictionary(), StringDictionary(), and ~StringDictionary().