#include <ImFusion/Base/DataComponentFactory.h>
Factory singleton for creating DataComponents from string IDs.
More...
Factory singleton for creating DataComponents from string IDs.
Every DataComponent implements the id() method returning a unique string identifier for that specific type of DataComponent. DataComponents have to be registered with DataComponentFactory using this string ID and a factory method for instantiating a DataComponent of such type. During registration DataComponentFactory ensures the uniqueness of the registered DataComponents and otherwise raises an assertion/logs a warning.
- See also
- DataComponentBase ,
◆ registerComponent()
Registers a DataComponent with the DataComponentFactory.
- Note
- The string IDs of DataComponents have to be unique. If you register an ID a second time, the previously registered factory method will be overwritten. Debug builds will also raise an assertion.
- Parameters
-
◆ createComponent()
Instantiates a DataComponent specified by the given ID.
- Parameters
-
The documentation for this class was generated from the following file:
- ImFusion/Base/DataComponentFactory.h