$darkmode
#include <cstdint>#include <memory>#include <string>#include <type_traits>#include <utility>#include <fable/fable_fwd.hpp>#include <cloe/model.hpp>#include <cloe/sync.hpp>Go to the source code of this file.
Classes | |
| class | cloe::Component |
| class | cloe::ComponentFactory |
Macros | |
| #define | DEFINE_COMPONENT_FACTORY(xFactoryType, xConfigType, xName, xDescription) |
| #define | DEFINE_COMPONENT_FACTORY_MAKE(xFactoryType, xComponentType, xInputType) |
This file provides the base classes for component models.
| #define DEFINE_COMPONENT_FACTORY | ( | xFactoryType, | |
| xConfigType, | |||
| xName, | |||
| xDescription | |||
| ) |
This macro defines a ComponentFactory named xFactoryType and with the configuration xConfigType. It should be used within the desired namespace.
The make method needs to be implemented:
The DEFINE_COMPONENT_FACTORY_MAKE macro can also be used to use the default implementation.
| #define DEFINE_COMPONENT_FACTORY_MAKE | ( | xFactoryType, | |
| xComponentType, | |||
| xInputType | |||
| ) |
This macro defines the xFactoryType::make method for components with exactly one input component.
For this to work, the xComponentType must have a constructor with the following signature (see DEFINE_COMPONENT_FACTORY macro):
xComponentType(const std::string&, const xConfigType&, std::shared_ptr<xInputType>)