A hierarchical environment properties holder created from a composite property.
More...
|
| | EnvironmentProperties (std::unique_ptr< const Impl::BindingMap > &&bindings_) |
| | Create an environment properties instance. More...
|
| |
| | EnvironmentProperties () |
| | Create an empty environment properties instance. More...
|
| |
| iterator | begin () |
| | Get an iterator positioned at the beginning of the environment properties list. More...
|
| |
| const_iterator | begin () const |
| | Get a const iterator positioned at the beginning of the environment properties list. More...
|
| |
| bool | empty () const |
| | Returns true if the environment properties object is empty. More...
|
| |
| iterator | end () |
| | Get an iterator positioned at the end of the environment properties list. More...
|
| |
| const_iterator | end () const |
| | Get a const iterator positioned at the end of the environment properties list. More...
|
| |
| std::shared_ptr< EnvironmentProperties > | getComposite (std::string_view name) const |
| | Get a child environment properties instance with the specified name. More...
|
| |
| std::shared_ptr< EnvironmentProperties > | getCompositeOrNull (std::string_view name) const |
| | Get a child environment properties instance with the specified name. More...
|
| |
| template<typename BaseT > |
| std::unique_ptr< BaseT > | getUnique (std::string_view name) const |
| | Get a polymorphic value of the specified type and name. More...
|
| |
| template<typename BaseT > |
| std::unique_ptr< BaseT > | getUnique (std::string_view name, std::unique_ptr< BaseT > &&defaultValue) const |
| | Get a polymorphic value of the specified type and name. More...
|
| |
| template<typename ValueT > |
| ValueT | getValue (std::string_view name) const |
| | Get a non-polymorphic value of the specified type and name. More...
|
| |
| template<typename ValueT > |
| ValueT | getValue (std::string_view name, const ValueT &defaultValue) const |
| | Get a non-polymorphic value of the specified type and name. More...
|
| |
| bool | hasComposite (std::string_view name) const |
| | Returns true if the composite property has a child composite binding with the specified name. More...
|
| |
| template<typename BaseT > |
| bool | hasUnique (std::string_view name) const |
| | Returns true if the composite property has a unique pointer binding matching the specified type and name. More...
|
| |
| template<typename ValueT > |
| bool | hasValue (std::string_view name) const |
| | Returns true if the composite property has a value binding matching the specified type and name. More...
|
| |
A hierarchical environment properties holder created from a composite property.
An instance of this class contains a set of value and/or shared injector bindings, which were created from the parsing of a composite property within a hierarchical property file.
The direct or indirect value binding descendants of an EnvironmentProperties instance represent the simple and composite properties that were contained within the composite property in the hierarchical property file. Descendant value bindings may be a mixture of untyped simple properties (supplied as std::string) and typed simple properties (supplied as the type specified within the injector configuration). All descendant shared bindings are more instances of the EnvironmentProperties.
EnvironmentProperties instances may be iterated over. As the contained items being iterated over are of different types, (T, std::unique_ptr<T>, and std::shared_ptr<EnvironmentProperties>), de-referenced iterators provide opaque EnvironmentProperties::Item proxy objects. The EnvironmentProperties::Item class provides a similar API to the EnvironmentProperties class, allowing type and name examination of the contained binding, and extraction via getValue, getUnique, and getComposite methods.