allpix::Message
Generic class for all messages. More…
#include <Message.hpp>
Inherits from allpix::BaseMessage
Public Functions
Name | |
---|---|
Message(std::vector< T > data) Constructs a message containing the supplied data. |
|
Message(std::vector< T > data, const std::shared_ptr< const Detector > & detector) Constructs a message bound to a detector containing the supplied data. |
|
~Message() override Destructs messages, skipping optional cleanup of objects. |
|
const std::vector< T > & | getData() const Get a reference to the data in this message. |
virtual std::vector< std::reference_wrapper< Object > > | getObjectArray() override Get data as list of objects if the contents can be converted. |
Additional inherited members
Public Functions inherited from allpix::BaseMessage
Name | |
---|---|
BaseMessage(const BaseMessage & ) =default Use default copy and move behaviour. |
|
BaseMessage & | operator=(const BaseMessage & ) =default Use default copy and move behaviour. |
BaseMessage(BaseMessage && ) =default Use default copy and move behaviour. |
|
BaseMessage & | operator=(BaseMessage && ) =default Use default copy and move behaviour. |
virtual | ~BaseMessage() Essential virtual destructor. |
std::shared_ptr< const Detector > | getDetector() const Get detector bound to this message. |
Protected Functions inherited from allpix::BaseMessage
Name | |
---|---|
BaseMessage() Construct a general message not linked to a detector. |
|
BaseMessage(std::shared_ptr< const Detector > detector) Construct a general message bound to a detector. |
Detailed Description
template <typename T >
class allpix::Message;
Generic class for all messages.
An instantiation of this class should the preferred way to send objects
Public Functions Documentation
function Message
explicit Message(
std::vector< T > data
)
Constructs a message containing the supplied data.
Parameters:
- data List of data objects
function Message
Message(
std::vector< T > data,
const std::shared_ptr< const Detector > & detector
)
Constructs a message bound to a detector containing the supplied data.
Parameters:
- data List of data objects
- detector Linked detector
function ~Message
~Message() override
Destructs messages, skipping optional cleanup of objects.
function getData
const std::vector< T > & getData() const
Get a reference to the data in this message.
function getObjectArray
virtual std::vector< std::reference_wrapper< Object > > getObjectArray() override
Get data as list of objects if the contents can be converted.
Return: Data as list of object references (throws if not possible)
Reimplements: allpix::BaseMessage::getObjectArray
Updated on 2024-12-13 at 08:31:36 +0000