ALib C++ Library
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::lang::AllocatorMember< HeapAllocator > Struct Reference

Description:

Specialization of this helper-struct for type HeapAllocator. Does not define a member and thus does not increase the footprint of a type that inherits this specialization.

Definition at line 682 of file allocation.inl.

Collaboration diagram for alib::lang::AllocatorMember< HeapAllocator >:
[legend]

Public Type Index:

using AllocatorType
 Exposes the allocator type.
 

Public Static Field Index:

static constexpr HeapAllocator HEAP_ALLOCATOR_INSTANCE {}
 

Public Method Index:

 AllocatorMember ()
 
 AllocatorMember ()=default
 Default Constructor.
 
 AllocatorMember (const HeapAllocator &heapAllocator) noexcept
 
 AllocatorMember (HeapAllocator &pAllocator) noexcept
 
AllocatorInterface< HeapAllocatorAI () const noexcept
 
AllocatorInterface< HeapAllocatorAI () const noexcept
 
HeapAllocatorGetAllocator () const noexcept
 
HeapAllocatorGetAllocator () const noexcept
 

Protected Field Index:

HeapAllocatorallocator
 The allocator stored.
 

Type Definition Details:

◆ AllocatorType

using alib::lang::AllocatorMember< HeapAllocator >::AllocatorType

Exposes the allocator type.

Definition at line 655 of file allocation.inl.

Field Details:

◆ allocator

The allocator stored.

Definition at line 651 of file allocation.inl.

◆ HEAP_ALLOCATOR_INSTANCE

HeapAllocator alib::lang::AllocatorMember< HeapAllocator >::HEAP_ALLOCATOR_INSTANCE {}
staticconstexpr

This is an empty instance of the empty heap allocation type.. It is used to receive a non-const reference with method GetAllocator.

Definition at line 686 of file allocation.inl.

Constructor(s) / Destructor Details:

◆ AllocatorMember() [1/3]

alib::lang::AllocatorMember< HeapAllocator >::AllocatorMember ( const HeapAllocator & heapAllocator)
inlinenoexcept

Constructor.

Parameters
heapAllocatorThis parameter is ignored, as always HEAP_ALLOCATOR_INSTANCE is used.

Definition at line 693 of file allocation.inl.

◆ AllocatorMember() [2/3]

alib::lang::AllocatorMember< HeapAllocator >::AllocatorMember ( )
inline

Default constructor. Only applicable if the allocator type is default-constructible, i.e., HeapAllocator.

Template Parameters
TIfDefaulted, must not be given.

Definition at line 662 of file allocation.inl.

◆ AllocatorMember() [3/3]

alib::lang::AllocatorMember< HeapAllocator >::AllocatorMember ( HeapAllocator & pAllocator)
inlinenoexcept

Constructor.

Parameters
pAllocatorA reference to the allocator to store in member allocator.

Definition at line 666 of file allocation.inl.

Method Details:

◆ AI() [1/2]

This is a convenience operator that returns the AllocatorInterface for the stored allocator (by calling Allocator::operator()()).

Returns
The allocator interface of the stored allocator.

Definition at line 676 of file allocation.inl.

◆ AI() [2/2]

This is a convenience operator which returns the AllocatorInterface for the stored allocator (by calling Allocator::operator()()).

Returns
The allocator interface of the stored allocator.

Definition at line 703 of file allocation.inl.

◆ GetAllocator() [1/2]

HeapAllocator & alib::lang::AllocatorMember< HeapAllocator >::GetAllocator ( ) const
inlinenoexcept

Returns the reference to the allocator.

Returns
The allocator given with construction.

Definition at line 671 of file allocation.inl.

◆ GetAllocator() [2/2]

HeapAllocator & alib::lang::AllocatorMember< HeapAllocator >::GetAllocator ( ) const
inlinenoexcept

Static implementation of interface function. (Optimized out.)

Returns
A reference to the 'fake' object defined with# HEAP_ALLOCATOR_INSTANCE.

Definition at line 697 of file allocation.inl.


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