42 #ifndef OPTIONS_FROM_STREAM_H
43 #define OPTIONS_FROM_STREAM_H
50 namespace OptionsFromStreamPack {
51 namespace OptionsFromStreamUtilityPack {
58 operator bool()
const {
return val_; }
117 namespace OptionsFromStreamPack {
125 namespace OptionsFromStreamUtilityPack {
317 return (*itr).second;
429 typedef OptionsFromStreamUtilityPack::options_group_map_t::iterator
iterator;
431 typedef OptionsFromStreamUtilityPack::options_group_map_t::const_iterator
const_iterator;
559 const_cast<OptionsFromStreamUtilityPack::option_to_value_map_t*>(&(*itr).second.first) );
583 namespace OptionsFromStreamPack {
585 namespace OptionsFromStreamUtilityPack {
687 #endif // OPTIONS_FROM_STREAM_H
Extracts options from a text stream and then allows convenient access to them.
OptionsGroup(option_to_value_map_t *option_to_value_map)
option_to_value_map_t::iterator iterator
OptionsFromStream()
Construct with no options set.
std::map< std::string, options_group_pair_t > options_group_map_t
option_to_value_map_t::const_iterator const_iterator
void print_options(std::ostream &out) const
Print the options to an output stream.
const std::string & option_name(OptionsGroup::const_iterator &itr)
static bool options_group_exists(const options_group_t &options_group)
int num_options_groups() const
OptionsFromStreamUtilityPack::options_group_map_t::const_iterator const_iterator
non-const iterator through options group access options
OptionsFromStreamUtilityPack::options_group_map_t options_group_map_t
std::map< std::string, std::string > option_to_value_map_t
OptionsFromStreamUtilityPack::OptionsGroup options_group_t
{OptionsGroup} typedef
std::string & option_value(const std::string &option_name)
OptionsGroup & operator=(const OptionsGroup &)
void clear_options()
Clear all the options.
options_group_map_t options_group_map_
static bool option_exists(const std::string &option_value)
void read_options(std::istream &in)
Add / modify options read in from a text stream.
OptionsFromStreamUtilityPack::option_to_value_map_t option_to_value_map_t
OptionsFromStreamUtilityPack::false_bool_t false_bool_t
Class used to encapsulate options belonging an options group.
const OptionsFromStream::options_group_t options_group(OptionsFromStream::const_iterator &itr)
const std::string & options_group_name(OptionsFromStream::const_iterator &itr)
void reset_unaccessed_options_groups()
Reset the flags to false for if the options groups was accessed.
static std::string option_does_not_exist_
options_group_t options_group(const std::string &options_group_name)
option_to_value_map_t * option_to_value_map_
void print_unaccessed_options_groups(std::ostream &out) const
Print a list of options groups never accessed (accessed flag is falsed).
bool options_group_exists() const
Returns true if this options groups exists.
std::pair< option_to_value_map_t, false_bool_t > options_group_pair_t
OptionsFromStreamUtilityPack::options_group_map_t::iterator iterator
const iterator through options group access options
const std::string & option_value(OptionsGroup::const_iterator &itr)