ALib C++ Library
Library Version: 2510 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 692 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 ()=default
 Default Constructor.
 
 AllocatorMember ()=delete
 Deleted default constructor. (The allocator has to be given with construction)
 
 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
 A reference to the allocator.
 

Type Definition Details:

◆ AllocatorType

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

Exposes the allocator type.

Definition at line 669 of file allocation.inl.

Field Details:

◆ allocator

A reference to the allocator.

Definition at line 665 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 696 of file allocation.inl.

Constructor(s) / Destructor Details:

◆ AllocatorMember() [1/2]

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 703 of file allocation.inl.

◆ AllocatorMember() [2/2]

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

Constructor.

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

Definition at line 676 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 686 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 713 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 681 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 707 of file allocation.inl.


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