allpix::BaseMessage

Type-erased base class for all messages. More…

#include <Message.hpp>

Inherited by allpix::Message< T >

Public Functions

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.
virtual std::vector< std::reference_wrapper< Object > > getObjectArray()
Get list of objects stored in this message if possible.

Protected Functions

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

class allpix::BaseMessage;

Type-erased base class for all messages.

This class can (and should) not be instantiated directly. Deriving from this class is allowed, but in almost all cases instantiating a version of the Message class should be preferred.

Public Functions Documentation

function BaseMessage

BaseMessage(
    const BaseMessage & 
) =default

Use default copy and move behaviour.

function operator=

BaseMessage & operator=(
    const BaseMessage & 
) =default

Use default copy and move behaviour.

function BaseMessage

BaseMessage(
    BaseMessage && 
) =default

Use default copy and move behaviour.

function operator=

BaseMessage & operator=(
    BaseMessage && 
) =default

Use default copy and move behaviour.

function ~BaseMessage

virtual ~BaseMessage()

Essential virtual destructor.

function getDetector

inline std::shared_ptr< const Detector > getDetector() const

Get detector bound to this message.

Return: Linked detector

function getObjectArray

virtual std::vector< std::reference_wrapper< Object > > getObjectArray()

Get list of objects stored in this message if possible.

Exceptions:

Return: Array of base objects

Reimplemented by: allpix::Message::getObjectArray

The override method should return the exact same data but then casted to objects or throw the default exception if this is not possible.

Protected Functions Documentation

function BaseMessage

BaseMessage()

Construct a general message not linked to a detector.

function BaseMessage

explicit BaseMessage(
    std::shared_ptr< const Detector > detector
)

Construct a general message bound to a detector.

Parameters:

  • detector Linked detector

Updated on 2024-12-13 at 08:31:36 +0000