Dynamic Neural Field Composer 0.0.0
A C++20 library and interactive application for building and simulating Dynamic Neural Field (DNF) architectures.
Loading...
Searching...
No Matches
element_factory.h
Go to the documentation of this file.
1#pragma once
2
3#include "elements/element.h"
29#include "elements/resize.h"
30#include "elements/resize_2d.h"
31#include "elements/collapse.h"
32#include "elements/expand.h"
33
35{
45 {
46 private:
47 std::unordered_map<ElementLabel, std::function<std::shared_ptr<Element>(
49 const ElementSpecificParameters&)>> elementCreators;
50 public:
52
58 std::shared_ptr<Element> createElement(ElementLabel type,
59 const ElementCommonParameters& elementCommonParameters,
60 const ElementSpecificParameters& elementSpecificParameters);
61
65 std::shared_ptr<Element> createElement(ElementLabel type);
66 private:
67 void setupElementCreators();
68 };
69}
Factory that creates concrete Element objects from type labels and parameters.
Definition element_factory.h:45
std::shared_ptr< Element > createElement(ElementLabel type, const ElementCommonParameters &elementCommonParameters, const ElementSpecificParameters &elementSpecificParameters)
Create and return an element of the given type.
Definition element_factory.cpp:186
ElementFactory()
Definition element_factory.cpp:8
Definition element_parameters.h:10
ElementLabel
Definition element_parameters.h:12
Definition element_parameters.h:188
Definition element_parameters.h:206