|
ORE Studio 0.0.4
|
Combines a generation engine with a scoped environment. More...
#include <generation_context.hpp>

Public Types | |
| using | entries = generation_environment::entries |
Public Member Functions | |
| generation_context (std::uint64_t seed, entries initial={}) | |
| Constructs a context with a specific seed and optional entries. | |
| generation_context (entries initial={}) | |
| Constructs a context with a random seed and optional entries. | |
| generation_context | child (entries overrides) const |
| Creates a child context with the same engine but overridden env. | |
| generation_engine & | engine () |
| Returns the generation engine. | |
| const generation_environment & | env () const |
| Returns the generation environment. | |
| std::uint64_t | seed () const |
| boost::uuids::uuid | generate_uuid () |
| int | random_int (int min, int max) |
| bool | random_bool (double probability=0.5) |
| std::chrono::system_clock::time_point | past_timepoint (int years_back=3) |
| std::string | alphanumeric (std::size_t length) |
| template<typename T > | |
| const T & | pick (const std::vector< T > &items) |
| template<typename T , std::size_t N> | |
| const T & | pick (const std::array< T, N > &items) |
Combines a generation engine with a scoped environment.
The engine is shared across parent and child contexts so random sequences remain consistent. The environment supports parent-child scoping for passing contextual data (tenant_id, modified_by, FK references) through entity generation graphs.