|
libzypp
17.7.0
|
Simple value<>name mapping supporting aliases. More...
#include <NamedValue.h>
Classes | |
| class | TInserter |
Public Member Functions | |
| bool | empty () const |
| Whether not initialized (no (name,value) pair remembered) More... | |
| bool | insert (const Tp &value_r, const std::string &name_r) |
| Remember name (1st call) or alias (subsequent calls). More... | |
Get value for name or alias. | |
| bool | haveValue (const std::string &name_r) const |
Whether there is a value mapped for name_r. More... | |
| bool | getValue (const std::string &name_r, Tp &value_r) const |
| Get value mapped for name or alias. More... | |
| const Tp & | getValue (const std::string &name_r) const |
Get name for value. | |
| bool | haveName (const std::string &value_r) const |
Whether there is a name mapped for value_r. More... | |
| bool | getName (const Tp &value_r, std::string &name_r) const |
| Get name of value. More... | |
| const std::string & | getName (const Tp &value_r) const |
Inserter | |
| TInserter | operator() (const Tp &value_r) |
Private Types | |
| typedef std::map< std::string, Tp > | NameMap |
| typedef std::map< Tp, std::string > | ValueMap |
Private Attributes | |
| NameMap | _nameMap |
| ValueMap | _valueMap |
Simple value<>name mapping supporting aliases.
Definition at line 41 of file NamedValue.h.
|
private |
Definition at line 43 of file NamedValue.h.
|
private |
Definition at line 44 of file NamedValue.h.
|
inline |
Whether not initialized (no (name,value) pair remembered)
Definition at line 48 of file NamedValue.h.
|
inline |
Whether there is a value mapped for name_r.
Definition at line 56 of file NamedValue.h.
|
inline |
Get value mapped for name or alias.
true if name or alias was found. Definition at line 65 of file NamedValue.h.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 74 of file NamedValue.h.
|
inline |
Whether there is a name mapped for value_r.
Definition at line 83 of file NamedValue.h.
|
inline |
Get name of value.
true if name or alias was found. Definition at line 92 of file NamedValue.h.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 101 of file NamedValue.h.
|
inline |
Definition at line 123 of file NamedValue.h.
|
inline |
Remember name (1st call) or alias (subsequent calls).
| std::logic_error | if name_r is already used as name or alias. |
| std::logic_error | if _tWithAlias is false and a name for value_r is already defined. |
Definition at line 132 of file NamedValue.h.
|
private |
Definition at line 154 of file NamedValue.h.
|
private |
Definition at line 155 of file NamedValue.h.