allpix::SingleBindDelegate
Module: Delegate classes
Delegate for binding a single message. More…
#include <delegates.h>
Inherits from allpix::ModuleDelegate< T >, allpix::BaseDelegate
Public Functions
Name | |
---|---|
SingleBindDelegate(MsgFlags flags, T * obj) Construct a single bound delegate for the given module. |
|
virtual void | process(std::shared_ptr< BaseMessage > msg, std::string , DelegateTypes & dest) override Saves the message in the passed destination. |
Additional inherited members
Public Functions inherited from allpix::ModuleDelegate< T >
Name | |
---|---|
ModuleDelegate(MsgFlags flags, T * obj) Construct a module delegate for the given module. |
|
virtual std::string | getUniqueName() override Get the unique name of the bound module. |
virtual std::shared_ptr< Detector > | getDetector() const override Get the detector bound to this module. |
Protected Attributes inherited from allpix::ModuleDelegate< T >
Name | |
---|---|
T *const | obj_ |
Public Functions inherited from allpix::BaseDelegate
Name | |
---|---|
BaseDelegate(const BaseDelegate & ) =delete Copying a delegate is not allowed. |
|
BaseDelegate & | operator=(const BaseDelegate & ) =delete Copying a delegate is not allowed. |
BaseDelegate(BaseDelegate && ) =default Enable default move behaviour. |
|
BaseDelegate & | operator=(BaseDelegate && ) =default Enable default move behaviour. |
BaseDelegate(MsgFlags flags) Construct a delegate with the supplied flags. |
|
virtual | ~BaseDelegate() =default Essential virtual destructor. |
bool | isRequired() const Check if delegate has a required message. |
MsgFlags | getFlags() const Get the flags for this delegate. |
virtual std::shared_ptr< Detector > | getDetector() const =0 Get the detector bound to a delegate. |
virtual std::string | getUniqueName() =0 Get the unique identifier for the bound object. |
Protected Attributes inherited from allpix::BaseDelegate
Name | |
---|---|
MsgFlags | flags_ |
Detailed Description
template <typename T ,
typename R >
class allpix::SingleBindDelegate;
Delegate for binding a single message.
Public Functions Documentation
function SingleBindDelegate
inline SingleBindDelegate(
MsgFlags flags,
T * obj
)
Construct a single bound delegate for the given module.
Parameters:
function process
inline virtual void process(
std::shared_ptr< BaseMessage > msg,
std::string ,
DelegateTypes & dest
) override
Saves the message in the passed destination.
Parameters:
- msg Message to process
- dest Destination of the message
Exceptions:
- UnexpectedMessageException If this delegate has already received the message after the previous reset (not thrown if the ALLOW_OVERWRITE flag is passed)
Reimplements: allpix::BaseDelegate::process
The saved value is overwritten if the ALLOW_OVERWRITE flag is enabled.
Updated on 2024-12-13 at 08:31:37 +0000