44 using Map = std::multimap<std::string,OptionValue> ;
45 using value_type = Map::value_type ;
46 using iterator = Map::iterator ;
47 using const_iterator = Map::const_iterator ;
50 void insert(
const Map::value_type & ) ;
54 void replace(
const std::string & key ,
const std::string &
value ) ;
57 void increment(
const std::string & key ) ;
60 const_iterator
begin()
const ;
63 const_iterator
cbegin()
const ;
66 const_iterator
end()
const ;
69 const_iterator
cend()
const ;
72 const_iterator
find(
const std::string & )
const ;
78 bool contains(
const std::string & )
const ;
82 bool contains(
const char * )
const ;
85 std::size_t
count(
const std::string & key )
const ;
89 std::string
value(
const std::string & key ,
const std::string & default_ = std::string() )
const ;
96 std::string
value(
const char * key ,
const char * default_ =
nullptr )
const ;
100 std::string join( Map::const_iterator , Map::const_iterator ,
const std::string & )
const ;
101 static bool compare(
const Map::value_type & ,
const Map::value_type & ) ;
A multimap-like container for command-line options and their values.
const_iterator cend() const
Returns the off-the-end iterator.
std::size_t count(const std::string &key) const
Returns the total repeat count for all matching entries.
void clear()
Clears the map.
const_iterator find(const std::string &) const
Finds the map entry with the given key.
std::string value(const std::string &key, const std::string &default_=std::string()) const
Returns the matching value, with concatentation into a comma-separated list if multivalued.
const_iterator cbegin() const
Returns the begin iterator.
const_iterator end() const
Returns the off-the-end iterator.
void increment(const std::string &key)
Increments the repeat count for the given entry.
void insert(const Map::value_type &)
Inserts the key/value pair into the map.
void replace(const std::string &key, const std::string &value)
Replaces all matching values with a single value.
bool contains(const std::string &) const
Returns true if the map contains the given key, but ignoring 'off' option-values.
const_iterator begin() const
Returns the begin iterator.