|
DynExp
Highly flexible laboratory automation for dynamically changing experiments.
|
Library type that holds factory functions to all available inter-module events. More...
#include <Module.h>
Public Types | |
| using | EventFactoryFuncPtrType = std::function< InterModuleEventBase::InterModuleEventPtrType(void)> |
Type of a function pointer pointing to a factory function to create an instance of an inter-module event derived from InterModuleEventBase. | |
Public Member Functions | |
| void | Register (size_t ID, EventFactoryFuncPtrType EventFactoryFuncPtr) |
Adds an inter-module event derived from InterModuleEventBase to this library. | |
| auto & | GetEvents () const noexcept |
| Getter for Events. | |
Static Public Member Functions | |
| static InterModuleEventLibrary & | Get () |
Getter for the singleton instance of InterModuleEventLibrary. | |
Private Member Functions | |
| InterModuleEventLibrary ()=default | |
Constructs an instance of InterModuleEventLibrary. Private to make singleton class. | |
Private Attributes | |
| std::map< size_t, EventFactoryFuncPtrType > | Events |
Maps the unique ID of inter-module events derived from InterModuleEventBase to their respective factory function. | |
Library type that holds factory functions to all available inter-module events.
| using DynExp::InterModuleEventLibrary::EventFactoryFuncPtrType = std::function<InterModuleEventBase::InterModuleEventPtrType(void)> |
Type of a function pointer pointing to a factory function to create an instance of an inter-module event derived from InterModuleEventBase.
|
privatedefault |
Constructs an instance of InterModuleEventLibrary. Private to make singleton class.
|
static |
Getter for the singleton instance of InterModuleEventLibrary.
InterModuleEventLibrary. Definition at line 432 of file Module.cpp.
|
inlinenoexcept |
|
inline |
Adds an inter-module event derived from InterModuleEventBase to this library.
| ID | Uniqe ID of the event derived from InterModuleEventBase. |
| EventFactoryFuncPtr | Factory function of the event derived from InterModuleEventBase. |
|
private |
Maps the unique ID of inter-module events derived from InterModuleEventBase to their respective factory function.