46 using Map = std::multimap<std::string,OptionValue,std::less<std::string>> ;
47 using value_type = Map::value_type ;
48 using iterator = Map::iterator ;
49 using const_iterator = Map::const_iterator ;
52 void insert(
const Map::value_type & ) ;
56 void replace( std::string_view key ,
const std::string &
value ) ;
59 void increment( std::string_view key ) noexcept ;
62 const_iterator
begin()
const noexcept ;
65 const_iterator
cbegin()
const noexcept ;
68 const_iterator
end()
const noexcept ;
71 const_iterator
cend()
const noexcept ;
74 const_iterator
find( std::string_view )
const noexcept ;
80 bool contains( std::string_view )
const noexcept ;
84 bool contains(
const char * )
const noexcept ;
87 bool contains(
const std::string & )
const noexcept ;
90 std::size_t
count( std::string_view key )
const noexcept ;
94 std::string
value( std::string_view key , std::string_view default_ = {} )
const ;
101 unsigned int number( std::string_view key ,
unsigned int default_ )
const noexcept ;
105 using Range = std::pair<Map::const_iterator,Map::const_iterator> ;
106 Range findRange( std::string_view key )
const noexcept ;
107 Map::iterator findFirst( std::string_view key ) noexcept ;
108 static std::string join( Map::const_iterator , Map::const_iterator , std::string_view ) ;
A multimap-like container for command-line options and their values.
const_iterator find(std::string_view) const noexcept
Finds the map entry with the given key.
const_iterator begin() const noexcept
Returns the begin iterator.
void increment(std::string_view key) noexcept
Increments the repeat count for the given entry.
void replace(std::string_view key, const std::string &value)
Replaces all matching values with a single value.
const_iterator cend() const noexcept
Returns the off-the-end iterator.
const_iterator end() const noexcept
Returns the off-the-end iterator.
bool contains(std::string_view) const noexcept
Returns true if the map contains the given key, but ignoring 'off' option-values.
const_iterator cbegin() const noexcept
Returns the begin iterator.
unsigned int number(std::string_view key, unsigned int default_) const noexcept
Returns the matching value as a number.
void clear()
Clears the map.
std::string value(std::string_view key, std::string_view default_={}) const
Returns the matching value, with concatentation into a comma-separated list if multivalued (with no e...
std::size_t count(std::string_view key) const noexcept
Returns the total repeat count for all matching entries.
void insert(const Map::value_type &)
Inserts the key/value pair into the map.