Project
Loading...
Searching...
No Matches
o2::framework::MessageContext::ContainerRefObject< T > Class Template Reference

#include <MessageContext.h>

Inherits o2::framework::MessageContext::ContextObject.

Public Types

using value_type = typename T::value_type
 
using return_type = T
 
using buffer_type = return_type
 

Public Member Functions

 ContainerRefObject ()=delete
 default contructor forbidden, object always has to control message instances
 
template<typename ContextType , typename... Args>
 ContainerRefObject (ContextType *context, fair::mq::MessagePtr &&headerMsg, RouteIndex routeIndex, int index, Args &&... args)
 constructor taking header message by move and creating the paypload message
 
 ~ContainerRefObject () override=default
 
fair::mq::Parts finalize () final
 Finalize object and return parts by move This retrieves the actual message from the vector object and moves it to the parts.
 
 operator return_type & ()
 return reference to the handled vector object
 
return_typeget ()
 return reference to the handled vector object
 
value_typedata ()
 return data pointer of the handled vector object
 
- Public Member Functions inherited from o2::framework::MessageContext::ContextObject
 ContextObject ()=delete
 
 ContextObject (fair::mq::MessagePtr &&headerMsg, fair::mq::MessagePtr &&payloadMsg, RouteIndex routeIndex)
 
 ContextObject (fair::mq::MessagePtr &&headerMsg, RouteIndex routeIndex)
 
virtual ~ContextObject ()=default
 
RouteIndex route () const
 return the channel name
 
bool empty () const
 
o2::header::DataHeader const * header ()
 
o2::framework::DataProcessingHeader const * dataProcessingHeader ()
 
o2::header::Stack const * headerStack ()
 

Additional Inherited Members

- Protected Attributes inherited from o2::framework::MessageContext::ContextObject
fair::mq::Parts mParts
 
RouteIndex mRouteIndex {-1}
 

Detailed Description

template<typename T>
class o2::framework::MessageContext::ContainerRefObject< T >

ContainerRefObject handles a message object holding an instance of type T The allocator type is required to be o2::pmr::polymorphic_allocator can not adopt an existing message, because the polymorphic_allocator will call type constructor, so this works only with new messages FIXME: not sure if we want to have this for all container types

Definition at line 248 of file MessageContext.h.

Member Typedef Documentation

◆ buffer_type

Definition at line 253 of file MessageContext.h.

◆ return_type

template<typename T >
using o2::framework::MessageContext::ContainerRefObject< T >::return_type = T

Definition at line 252 of file MessageContext.h.

◆ value_type

template<typename T >
using o2::framework::MessageContext::ContainerRefObject< T >::value_type = typename T::value_type

Definition at line 251 of file MessageContext.h.

Constructor & Destructor Documentation

◆ ContainerRefObject() [1/2]

template<typename T >
o2::framework::MessageContext::ContainerRefObject< T >::ContainerRefObject ( )
delete

default contructor forbidden, object always has to control message instances

◆ ContainerRefObject() [2/2]

template<typename T >
template<typename ContextType , typename... Args>
o2::framework::MessageContext::ContainerRefObject< T >::ContainerRefObject ( ContextType *  context,
fair::mq::MessagePtr &&  headerMsg,
RouteIndex  routeIndex,
int  index,
Args &&...  args 
)
inline

constructor taking header message by move and creating the paypload message

Definition at line 259 of file MessageContext.h.

◆ ~ContainerRefObject()

template<typename T >
o2::framework::MessageContext::ContainerRefObject< T >::~ContainerRefObject ( )
overridedefault

Member Function Documentation

◆ data()

return data pointer of the handled vector object

Definition at line 302 of file MessageContext.h.

◆ finalize()

template<typename T >
fair::mq::Parts o2::framework::MessageContext::ContainerRefObject< T >::finalize ( )
inlinefinalvirtual

Finalize object and return parts by move This retrieves the actual message from the vector object and moves it to the parts.

Reimplemented from o2::framework::MessageContext::ContextObject.

Definition at line 281 of file MessageContext.h.

◆ get()

template<typename T >
return_type & o2::framework::MessageContext::ContainerRefObject< T >::get ( )
inline

return reference to the handled vector object

Definition at line 296 of file MessageContext.h.

◆ operator return_type &()

template<typename T >
o2::framework::MessageContext::ContainerRefObject< T >::operator return_type & ( )
inline

return reference to the handled vector object

Definition at line 290 of file MessageContext.h.


The documentation for this class was generated from the following file: