ATLAS Offline Software
Loading...
Searching...
No Matches
SG::ArenaHeapAllocator::initParams< T, clear, no_ctor, no_dtor > Struct Template Reference

Helper to initialize a parameters structure. More...

#include <ArenaHeapAllocator.h>

Inheritance diagram for SG::ArenaHeapAllocator::initParams< T, clear, no_ctor, no_dtor >:
Collaboration diagram for SG::ArenaHeapAllocator::initParams< T, clear, no_ctor, no_dtor >:

Public Types

typedef ArenaAllocatorBase::initParams< T, clear, no_ctor, no_dtor > Base

Public Member Functions

 initParams (size_t nblock=1000, const std::string &name="")
 Constructor.
ArenaAllocatorBase::Params params () const
 Return an initialized parameters structure.
 operator ArenaAllocatorBase::Params () const
 Return an initialized parameters structure.
 operator Params () const
 Return an initialized parameters structure.

Private Attributes

size_t m_nblock
 Saved value of the number of elements to allocate per block.
std::string m_name
 Saved value of the allocator name.

Detailed Description

template<typename T, bool clear = false, bool no_ctor = false, bool no_dtor = false>
struct SG::ArenaHeapAllocator::initParams< T, clear, no_ctor, no_dtor >

Helper to initialize a parameters structure.

This creates a Params class appropriately initialized for class T. Assumptions made:

  • The constructor and destructor calls will be filled in if non-trivial, unless no_ctor or no_dtor is set to true.
  • The clear call will be filled in if the optional template parameter clear is true.
  • No space will be reserved for an extra link.
  • canReclear is true and mustClear is false.
  • The link will be allocated externally to the element.

If these are not appropriate, you can derive from this class and make the appropriate changes.

Definition at line 86 of file ArenaHeapAllocator.h.

Member Typedef Documentation

◆ Base

template<typename T, bool clear = false, bool no_ctor = false, bool no_dtor = false>
typedef ArenaAllocatorBase::initParams<T, clear, no_ctor, no_dtor> SG::ArenaHeapAllocator::initParams< T, clear, no_ctor, no_dtor >::Base

Definition at line 90 of file ArenaHeapAllocator.h.

Constructor & Destructor Documentation

◆ initParams()

template<typename T, bool clear = false, bool no_ctor = false, bool no_dtor = false>
SG::ArenaHeapAllocator::initParams< T, clear, no_ctor, no_dtor >::initParams ( size_t nblock = 1000,
const std::string & name = "" )

Constructor.

Parameters
nblockValue to set in the parameters structure for the number of elements to allocate per block.
nameValue to set in the parameters structure for the allocator name.

Member Function Documentation

◆ operator ArenaAllocatorBase::Params()

template<typename T, bool clear = false, bool no_ctor = false, bool no_dtor = false>
SG::ArenaHeapAllocator::initParams< T, clear, no_ctor, no_dtor >::operator ArenaAllocatorBase::Params ( ) const
inline

Return an initialized parameters structure.

Definition at line 107 of file ArenaHeapAllocator.h.

◆ operator Params()

SG::ArenaAllocatorBase::initParams< T, clear, no_ctor, no_dtor >::operator Params ( ) const
inlineinherited

Return an initialized parameters structure.

Definition at line 335 of file ArenaAllocatorBase.h.

335{ return params(); }

◆ params()

template<typename T, bool clear = false, bool no_ctor = false, bool no_dtor = false>
ArenaAllocatorBase::Params SG::ArenaHeapAllocator::initParams< T, clear, no_ctor, no_dtor >::params ( ) const

Return an initialized parameters structure.

Member Data Documentation

◆ m_name

std::string SG::ArenaAllocatorBase::initParams< T, clear, no_ctor, no_dtor >::m_name
privateinherited

Saved value of the allocator name.

Definition at line 343 of file ArenaAllocatorBase.h.

◆ m_nblock

size_t SG::ArenaAllocatorBase::initParams< T, clear, no_ctor, no_dtor >::m_nblock
privateinherited

Saved value of the number of elements to allocate per block.

Definition at line 340 of file ArenaAllocatorBase.h.


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