VideoTools
|
A map-like container for command-line options and their values. More...
#include <goptionmap.h>
Public Types | |
typedef std::multimap < std::string, OptionValue > | Map |
typedef Map::value_type | value_type |
typedef Map::iterator | iterator |
typedef Map::const_iterator | const_iterator |
Public Member Functions | |
OptionMap () | |
Default constructor for an empty map. | |
void | insert (const Map::value_type &) |
Inserts the key/value pair into the map. More... | |
const_iterator | begin () const |
Returns the begin iterator. | |
const_iterator | end () const |
Returns the off-the-end iterator. | |
const_iterator | find (const std::string &) const |
Finds the map entry with the given key. | |
void | clear () |
Clears the map. | |
bool | contains (const std::string &) const |
Returns true if the map contains the given key, but ignoring un-valued() 'off' options. More... | |
size_t | count (const std::string &key) const |
Returns the number of times the key appears in the multimap. | |
std::string | value (const std::string &key) const |
Returns the value of the valued() option identified by the given key. More... | |
A map-like container for command-line options and their values.
Normally populated by G::OptionParser.
Definition at line 38 of file goptionmap.h.
|
inline |
Returns true if the map contains the given key, but ignoring un-valued() 'off' options.
Definition at line 122 of file goptionmap.h.
|
inline |
Inserts the key/value pair into the map.
The ordering of values in the map with the same key is normally the order of insertion (but this depends on the underlying multimap implementation for c++98).
Definition at line 92 of file goptionmap.h.
|
inline |
Returns the value of the valued() option identified by the given key.
Multiple matching values are concatenated with a comma separator (normally in the order of insertion).
Definition at line 144 of file goptionmap.h.