|
CatapultServer
v0.5.0.1 (Elephant)
|
A simple bag of properties. More...
Public Types | |
| template<typename TValue > | |
| using | OrderedKeyValueMap = std::vector< std::pair< std::string, TValue > > |
| A strongly typed ordered key to value map. More... | |
| template<typename TValue > | |
| using | UnorderedKeyValueMap = std::unordered_map< std::string, TValue > |
| A strongly typed unordered key to value map. More... | |
| using | ValuesContainer = std::unordered_map< std::string, OrderedKeyValueMap< std::string > > |
| Underlying container that a configuration bag is created around. More... | |
Public Member Functions | |
| ConfigurationBag (ValuesContainer &&values) | |
| Creates a new configuration bag around values. More... | |
| size_t | size () const |
| Returns the number of properties in this bag. More... | |
| size_t | size (const char *section) const |
| Returns the number of section properties in this bag. More... | |
| bool | contains (const ConfigurationKey &key) const |
Returns true if the property identified by key is contained in this bag. More... | |
| std::unordered_set< std::string > | sections () const |
| Gets the names of all sections in this bag. More... | |
| template<typename T > | |
| bool | tryGet (const ConfigurationKey &key, T &value) const |
| template<typename T > | |
| T | get (const ConfigurationKey &key) const |
| Gets the property identified by key from this bag. More... | |
| template<typename T > | |
| UnorderedKeyValueMap< T > | getAll (const char *section) const |
| Gets all section properties from this bag. More... | |
| template<typename T > | |
| OrderedKeyValueMap< T > | getAllOrdered (const char *section) const |
| Gets all section properties from this bag preserving source order. More... | |
Static Public Member Functions | |
| static ConfigurationBag | FromStream (std::istream &input) |
| Loads a configuration bag from the specified stream (input). More... | |
| static ConfigurationBag | FromPath (const std::string &path) |
| Loads a configuration bag from the specified path. More... | |
Private Member Functions | |
| const std::string * | lookup (const ConfigurationKey &key) const |
Private Attributes | |
| ValuesContainer | m_values |
A simple bag of properties.
| using catapult::utils::ConfigurationBag::OrderedKeyValueMap = std::vector<std::pair<std::string, TValue> > |
A strongly typed ordered key to value map.
| using catapult::utils::ConfigurationBag::UnorderedKeyValueMap = std::unordered_map<std::string, TValue> |
A strongly typed unordered key to value map.
| using catapult::utils::ConfigurationBag::ValuesContainer = std::unordered_map<std::string, OrderedKeyValueMap<std::string> > |
Underlying container that a configuration bag is created around.
|
inline |
Creates a new configuration bag around values.

|
inline |
Returns true if the property identified by key is contained in this bag.

|
static |
Loads a configuration bag from the specified path.


|
static |
Loads a configuration bag from the specified stream (input).


|
inline |
Gets the property identified by key from this bag.


|
inline |
Gets all section properties from this bag.

|
inline |
Gets all section properties from this bag preserving source order.

|
inlineprivate |

|
inline |
Gets the names of all sections in this bag.

|
inline |
Returns the number of properties in this bag.

|
inline |
Returns the number of section properties in this bag.
|
inline |
Tries to get the property identified by key from this bag and puts it into value.


|
private |