![]() |
Entity Generator 4.2.0
Composable, deterministic entity generation for C++23
|
Per-call entity generation and selection options. More...
#include <entitygen.hpp>
Public Attributes | |
| std::optional< std::vector< std::wstring > > | component_keys {} |
| Optional key subset; absent selects all, an empty vector selects none. Unknown keys are skipped and registration order is preserved. | |
| std::optional< std::wstring > | group {} |
| Optional registered group name, mutually exclusive with component_keys. Required by eg::generate_group; also supported by the other generation methods. | |
| std::size_t | count {1} |
| Number of entities for batch methods (ignored by single-entity methods). | |
| std::function< bool(const entity &)> | validator {} |
| Optional entity validator; false retries the whole entity. Concurrent batches require a thread-safe callable and captured state. | |
| input_map | inputs {} |
Per-call inputs for the components (a country, a reference date, a forced sex, ...), read with generation_context::input(). They are part of the entity's replay signature. Give strings as std::string{"BR"}; a bare literal also works with C++23 compilers. | |
Per-call entity generation and selection options.
Defaults select all registered components, generate one entity in a batch, and accept entities without an entity-level validator. Component validation, weights, conditions, registration order and the generator's retry policy still apply. Replay requires the same request and instance setup.
Definition at line 1223 of file entitygen.hpp.
| std::optional<std::vector<std::wstring> > dasmig::entity_request::component_keys {} |
Optional key subset; absent selects all, an empty vector selects none. Unknown keys are skipped and registration order is preserved.
Definition at line 1227 of file entitygen.hpp.
| std::size_t dasmig::entity_request::count {1} |
Number of entities for batch methods (ignored by single-entity methods).
Definition at line 1234 of file entitygen.hpp.
| std::optional<std::wstring> dasmig::entity_request::group {} |
Optional registered group name, mutually exclusive with component_keys. Required by eg::generate_group; also supported by the other generation methods.
Definition at line 1231 of file entitygen.hpp.
| input_map dasmig::entity_request::inputs {} |
Per-call inputs for the components (a country, a reference date, a forced sex, ...), read with generation_context::input(). They are part of the entity's replay signature. Give strings as std::string{"BR"}; a bare literal also works with C++23 compilers.
Definition at line 1244 of file entitygen.hpp.
| std::function<bool(const entity&)> dasmig::entity_request::validator {} |
Optional entity validator; false retries the whole entity. Concurrent batches require a thread-safe callable and captured state.
Definition at line 1238 of file entitygen.hpp.