ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
SharedVal< T, TAllocator >::FieldMembersWithAllocator Struct Reference

Description:

template<typename T, typename TAllocator = HeapAllocator>
struct alib::containers::SharedVal< T, TAllocator >::FieldMembersWithAllocator

Fields if TAllocator is not default constructible (not HeapAllocator).

Definition at line 93 of file sharedval.hpp.

#include <sharedval.hpp>

Collaboration diagram for SharedVal< T, TAllocator >::FieldMembersWithAllocator:
[legend]

Public Field Index:

TAllocator & allocator
 The allocator used.
 
custom
 The instance of the custom type.
 
std::atomic< unsigned int > refCount
 The reference counter used to implement the std::shared_ptr behavior.
 

Public Method Index:

template<typename... TArgs>
 FieldMembersWithAllocator (TAllocator &pAllocator, TArgs &&... args)
 
TAllocator & GetAllocator () const
 

Field Details:

◆ allocator

template<typename T , typename TAllocator = HeapAllocator>
TAllocator& allocator

The allocator used.

Definition at line 102 of file sharedval.hpp.

◆ custom

template<typename T , typename TAllocator = HeapAllocator>
T custom

The instance of the custom type.

Definition at line 96 of file sharedval.hpp.

◆ refCount

template<typename T , typename TAllocator = HeapAllocator>
std::atomic<unsigned int> refCount

The reference counter used to implement the std::shared_ptr behavior.

Definition at line 99 of file sharedval.hpp.

Constructor(s) / Destructor Details:

◆ FieldMembersWithAllocator()

template<typename T , typename TAllocator = HeapAllocator>
template<typename... TArgs>
FieldMembersWithAllocator ( TAllocator & pAllocator,
TArgs &&... args )
inline

Constructor.

Parameters
pAllocatorThe allocator, stored in parent AllocatorMember.
Template Parameters
TArgsThe argument types used for constructing T.
Parameters
argsThe arguments for constructing T.

Definition at line 109 of file sharedval.hpp.

Method Details:

◆ GetAllocator()

template<typename T , typename TAllocator = HeapAllocator>
TAllocator & GetAllocator ( ) const
inline
Returns
The stored allocator.

Definition at line 115 of file sharedval.hpp.


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