MarlinMT  0.1.0
marlinmt::book::MemLayout Class Referenceabstract

MemLayout base class to store booked objects in MarlinMT. More...

#include <MemLayout.h>

Inherited by marlinmt::book::SharedMemLayout< T, MERGE, Args_t >, and marlinmt::book::SingleMemLayout< T, Args_t >.

Public Member Functions

template<typename T >
std::shared_ptr< const T > at (std::size_t idx) const
 Get Resource for an instance. More...
 
template<typename T >
std::shared_ptr< T > at (std::size_t idx)
 Get Resource for an instance. More...
 
template<typename T >
std::shared_ptr< const T > merged ()
 Get Completed Resource. More...
 
 MemLayout ()=default
 
 MemLayout (const MemLayout &)=default
 
MemLayoutoperator= (const MemLayout &)=default
 
 MemLayout (MemLayout &&)=default
 
MemLayoutoperator= (MemLayout &&)=default
 
virtual ~MemLayout ()=default
 

Protected Member Functions

virtual std::shared_ptr< void > impAt (std::size_t idx) const =0
 implementation from at More...
 
virtual std::shared_ptr< void > impMerged ()=0
 implementation from merged More...
 

Detailed Description

MemLayout base class to store booked objects in MarlinMT.

Definition at line 14 of file MemLayout.h.

Constructor & Destructor Documentation

◆ MemLayout() [1/3]

marlinmt::book::MemLayout::MemLayout ( )
default

Referenced by merged().

◆ MemLayout() [2/3]

marlinmt::book::MemLayout::MemLayout ( const MemLayout )
default

◆ MemLayout() [3/3]

marlinmt::book::MemLayout::MemLayout ( MemLayout &&  )
default

◆ ~MemLayout()

virtual marlinmt::book::MemLayout::~MemLayout ( )
virtualdefault

Referenced by merged().

Member Function Documentation

◆ at() [1/2]

template<typename T >
std::shared_ptr< const T > marlinmt::book::MemLayout::at ( std::size_t  idx) const
inline

Get Resource for an instance.

Parameters
idxinstance id
Returns
const pointer to Resource

Definition at line 22 of file MemLayout.h.

References impAt().

◆ at() [2/2]

template<typename T >
std::shared_ptr< T > marlinmt::book::MemLayout::at ( std::size_t  idx)
inline

Get Resource for an instance.

Parameters
idxinstance id
Returns
pointer to Resource

Definition at line 32 of file MemLayout.h.

References impAt().

◆ impAt()

virtual std::shared_ptr< void > marlinmt::book::MemLayout::impAt ( std::size_t  idx) const
protectedpure virtual

◆ impMerged()

virtual std::shared_ptr< void > marlinmt::book::MemLayout::impMerged ( )
protectedpure virtual

◆ merged()

template<typename T >
std::shared_ptr< const T > marlinmt::book::MemLayout::merged ( )
inline

Get Completed Resource.

Same for every Instance.

Note
may recalculation for every call

Definition at line 41 of file MemLayout.h.

References impAt(), impMerged(), MemLayout(), operator=(), and ~MemLayout().

◆ operator=() [1/2]

◆ operator=() [2/2]

MemLayout& marlinmt::book::MemLayout::operator= ( MemLayout &&  )
default

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