|
ORE Studio 0.0.4
|
Scoped key-value store for generation context data. More...
#include <generation_environment.hpp>

Public Types | |
| using | entries = std::unordered_map< std::string, std::string > |
Public Member Functions | |
| generation_environment (entries initial={}) | |
| Constructs a root environment with optional initial entries. | |
| generation_environment (std::shared_ptr< const generation_environment > parent, entries overrides) | |
| Constructs a child environment with overrides. | |
| std::optional< std::string > | get (std::string_view key) const |
| Gets a value by key, searching parent chain. | |
| std::string | get_or (std::string_view key, const std::string &default_value) const |
| Gets a value by key, returning default if not found. | |
| bool | has (std::string_view key) const |
| Checks if a key exists in this environment or parents. | |
| std::shared_ptr< const generation_environment > | parent () const |
| Returns the parent environment, if any. | |
Scoped key-value store for generation context data.
Supports parent-child chaining: a child environment inherits all entries from its parent, with overrides taking precedence.