Entity Generator 4.2.0
Composable, deterministic entity generation for C++23
Loading...
Searching...
No Matches
dasmig::entity_request Struct Reference

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.
 

Detailed Description

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.

Member Data Documentation

◆ component_keys

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.

◆ count

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.

◆ group

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.

◆ inputs

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.

◆ validator

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.


The documentation for this struct was generated from the following file: