allpix::BaseDelegate
Module: Delegate classes
Base for all delegates. More…
#include <delegates.h>
Inherited by allpix::ModuleDelegate< T >
Public Functions
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. |
virtual void | process(std::shared_ptr< BaseMessage > msg, std::string name, DelegateTypes & dest) =0 Process a message and forward it to its final destination. |
Protected Attributes
Name | |
---|---|
MsgFlags | flags_ |
Detailed Description
class allpix::BaseDelegate;
Base for all delegates.
The base class is used as type-erasure for its subclasses
Public Functions Documentation
function BaseDelegate
BaseDelegate(
const BaseDelegate &
) =delete
Copying a delegate is not allowed.
function operator=
BaseDelegate & operator=(
const BaseDelegate &
) =delete
Copying a delegate is not allowed.
function BaseDelegate
BaseDelegate(
BaseDelegate &&
) =default
Enable default move behaviour.
function operator=
BaseDelegate & operator=(
BaseDelegate &&
) =default
Enable default move behaviour.
function BaseDelegate
inline explicit BaseDelegate(
MsgFlags flags
)
Construct a delegate with the supplied flags.
Parameters:
- flags Configuration flags
function ~BaseDelegate
virtual ~BaseDelegate() =default
Essential virtual destructor.
function isRequired
inline bool isRequired() const
Check if delegate has a required message.
Return: True if message is required, false otherwise
function getFlags
inline MsgFlags getFlags() const
Get the flags for this delegate.
Return: Message flags
function getDetector
virtual std::shared_ptr< Detector > getDetector() const =0
Get the detector bound to a delegate.
Return: Linked detector
Reimplemented by: allpix::ModuleDelegate::getDetector
function getUniqueName
virtual std::string getUniqueName() =0
Get the unique identifier for the bound object.
Return: Unique identifier
Reimplemented by: allpix::ModuleDelegate::getUniqueName
function process
virtual void process(
std::shared_ptr< BaseMessage > msg,
std::string name,
DelegateTypes & dest
) =0
Process a message and forward it to its final destination.
Parameters:
- msg Message to process
- name Name of the message
- dest Destination of the message
Reimplemented by: allpix::FilterAllDelegate::process, allpix::StoreDelegate::process, allpix::FilterDelegate::process, allpix::SingleBindDelegate::process, allpix::VectorBindDelegate::process
Protected Attributes Documentation
variable flags_
MsgFlags flags_;
Updated on 2024-12-13 at 08:31:37 +0000