Preprocessor macros available in mimmo, for executable class registration and factorization. More...
Macros | |
#define | REGISTER(Base, Derived, name) |
#define | REGISTER_CUSTOM(Base, Derived, name, customCreator) |
#define | REGISTER_PORT(Name, Container, Datatype, ManipBlock) |
Functions | |
bool | isPORT_REGISTERED (const std::string name) |
template<class Base > | |
bool | isREGISTERED (const std::string name) |
Detailed Description
Preprocessor macros available in mimmo, for executable class registration and factorization.
Macro Definition Documentation
◆ REGISTER
#define REGISTER | ( | Base, | |
Derived, | |||
name | |||
) |
Register an executable mimmo class in the Factory singleton.
- Parameters
-
[in] Base name of Derived's base class [in] Derived name of the class [in] name string to register the creator's name
- Returns
- counter of the already registered classes
Definition at line 206 of file factory.hpp.
◆ REGISTER_CUSTOM
#define REGISTER_CUSTOM | ( | Base, | |
Derived, | |||
name, | |||
customCreator | |||
) |
Register an executable mimmo class in the Factory singleton, and passing with it the method also a custom creator method
- Parameters
-
[in] Base name of Derived's base class [in] Derived name of the class [in] name string to register the creator's name [in] customCreator method to create the class
- Returns
- counter of the already registered classes
Definition at line 222 of file factory.hpp.
◆ REGISTER_PORT
#define REGISTER_PORT | ( | Name, | |
Container, | |||
Datatype, | |||
ManipBlock | |||
) |
Macro to register a port directly on PortManager singleton. If the port does not exist create it, assign a unique id and return the latter. If the port already exists, does nothing.
- Parameters
-
[in] Name name of Derived's base class [in] Container name of the class [in] Datatype string to register the creator's name [in] ManipBlock name of the mimmo class header where ports are declared.
- Returns
- counter of the already registered classes
Definition at line 211 of file portManager.hpp.
Function Documentation
◆ isPORT_REGISTERED()
|
inline |
Return if a port Name is already registered or not.
- Parameters
-
[in] name string of the port's name
- Returns
- boolean true/false if the port name is already registered
Definition at line 224 of file portManager.hpp.
◆ isREGISTERED()
|
inline |
Return if a creator name referencing to a Base class is already registered or not.
- Parameters
-
[in] name string to register the creator's name
- Returns
- boolean true/false if the creator name is already registered
Definition at line 233 of file factory.hpp.