refactor: add eoOperatorFoundry
- Simpler relationships between encoding and set of operators in foundry. - Rename "instanciate" in "instantiate"
This commit is contained in:
parent
2e23b837e4
commit
ae81793f7c
8 changed files with 193 additions and 112 deletions
|
|
@ -28,14 +28,14 @@ int main(int /*argc*/, char** /*argv*/)
|
|||
// Forge container using indices.
|
||||
eoForgeVector<OpInterface> indexed_factories;
|
||||
|
||||
// Capture constructor's parameters and defer instanciation.
|
||||
// Capture constructor's parameters and defer instantiation.
|
||||
indexed_factories.add<OpA>("I'm A");
|
||||
indexed_factories.setup<OpA>(0, "I'm actually A"); // Edit
|
||||
indexed_factories.add<OpB>("I'm B", " prime");
|
||||
indexed_factories.add<OpB>("I'm a B", " junior");
|
||||
|
||||
// Actually instanciante and call.
|
||||
indexed_factories.instanciate(0)();
|
||||
indexed_factories.instanciate(1)();
|
||||
indexed_factories.instanciate(2)();
|
||||
// Actually instantiante and call.
|
||||
indexed_factories.instantiate(0)();
|
||||
indexed_factories.instantiate(1)();
|
||||
indexed_factories.instantiate(2)();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue