10#include <kernel/util/dist.hpp> 
   51    typedef std::map<String, String, String::NoCaseLess> 
EntryMap;
 
  162    std::pair<String, bool> 
query(
String key_path) 
const;
 
  261    template<
typename T_>
 
  264      std::pair<String, bool> it = this->
get_entry(key);
 
  266        return it.first.parse(x);
 
  268        return rtn_non_exist;
 
  393      read(comm, filename, replace);
 
  422    void read(std::istream& ifs, 
bool replace = 
true);
 
  437      write(comm, filename);
 
  468    void write(std::ostream& os, String::size_type indent = 0) 
const;
 
static Comm world()
Returns a copy of the world communicator.
A class organizing a tree of key-value pairs.
PropertyMap * add_section(String name)
Adds a new sub-section to this map.
ConstSectionIterator begin_section() const
Returns the first section iterator.
EntryMap & get_entry_map()
Returns a reference to the entry map.
EntryIterator begin_entry()
Returns the first entry iterator.
const PropertyMap * get_root() const
Returns a pointer to the root section.
PropertyMap * _parent
pointer to the parent node
SectionIterator begin_section()
Returns the first section iterator.
const EntryMap & get_entry_map() const
Returns a reference to the entry map.
bool erase_section(String name)
Erases a sub-section.
SectionIterator end_section()
Returns the last section iterator.
const PropertyMap * get_parent() const
Returns a pointer to the parent section.
PropertyMap * get_parent()
Returns a pointer to the parent section.
ConstEntryIterator begin_entry() const
Returns the first entry iterator.
PropertyMap * get_root()
Returns a pointer to the root section.
std::unique_ptr< PropertyMap > treeify_structures() const
Builds a new property map by inserting subsection based on section names.
EntryMap::iterator EntryIterator
entry iterator type
ConstSectionIterator end_section() const
Returns the last section iterator.
std::map< String, std::shared_ptr< PropertyMap >, String::NoCaseLess > SectionMap
section-map type
PropertyMap * get_sub_section(String name)
Retrieves a sub-section by its name.
PropertyMap * query_section(String sec_path)
Queries a section by its section path.
SectionMap::iterator SectionIterator
section iterator type
PropertyMap(const PropertyMap &)=delete
Delete copy constructor.
EntryIterator end_entry()
Returns the last entry iterator.
std::pair< String, bool > query(String key_path) const
Queries a value by its key path.
std::map< String, String, String::NoCaseLess > EntryMap
entry-map type
EntryMap::const_iterator ConstEntryIterator
const entry iterator type
EntryMap _values
a map storing the key-value-pairs
PropertyMap & operator=(const PropertyMap &)=delete
Delete copy assignment operator.
SectionMap _sections
a map storing the sub-sections
virtual ~PropertyMap()
Virtual Destructor.
bool erase_entry(String key)
Erases a key-value pair.
bool add_entry(String key, String value, bool replace=true)
Adds a new key-value pair to this map.
void merge(const PropertyMap §ion, bool replace=true)
Merges another PropertyMap into this.
std::pair< String, bool > get_entry(String key) const
Retrieves a value by its key.
SectionMap::const_iterator ConstSectionIterator
const section iterator type
void read(String filename, bool replace=true)
Parses a file in INI-format.
ConstEntryIterator end_entry() const
Returns the last entry iterator.
void write(String filename) const
Writes the property map into a file.
bool parse_entry(const String &key, T_ &x, bool rtn_non_exist=true) const
Parses an object from the value of an entry.
A class providing case-insensitive String comparison.
String class implementation.
@ value
specifies whether the space should supply basis function values