ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::containers::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 83 of file sharedval.inl.

Collaboration diagram for alib::containers::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& alib::containers::SharedVal< T, TAllocator >::FieldMembersWithAllocator::allocator

The allocator used.

Definition at line 92 of file sharedval.inl.

◆ custom

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

The instance of the custom type.

Definition at line 86 of file sharedval.inl.

◆ refCount

template<typename T, typename TAllocator = HeapAllocator>
std::atomic<unsigned int> alib::containers::SharedVal< T, TAllocator >::FieldMembersWithAllocator::refCount

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

Definition at line 89 of file sharedval.inl.

Constructor(s) / Destructor Details:

◆ FieldMembersWithAllocator()

template<typename T, typename TAllocator = HeapAllocator>
template<typename... TArgs>
alib::containers::SharedVal< T, TAllocator >::FieldMembersWithAllocator::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 99 of file sharedval.inl.

Method Details:

◆ GetAllocator()

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

Definition at line 105 of file sharedval.inl.


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