OpenDDS
Snapshot(2023/04/07-19:43)
|
Array class that provides a means to reset the underlying ACE_Allocator
.
More...
#include <DurabilityArray.h>
Public Member Functions | |
DurabilityArray (size_t size, ACE_Allocator *allocator) | |
DurabilityArray (size_t size, T const &default_value, ACE_Allocator *allocator) | |
DurabilityArray (DurabilityArray< T > const &rhs) | |
~DurabilityArray () | |
void | operator= (DurabilityArray< T > const &rhs) |
void | set_allocator (ACE_Allocator *allocator) |
Reset allocator. More... | |
void | swap (DurabilityArray< T > &rhs) |
![]() | |
ACE_DECLARE_STL_REVERSE_ITERATORS | ACE_Array_Base (size_type size=0, ACE_Allocator *the_allocator=0) |
ACE_Array_Base (size_type size, T const &default_value, ACE_Allocator *the_allocator=0) | |
ACE_Array_Base (ACE_Array_Base< T > const &s) | |
void | operator= (ACE_Array_Base< T > const &s) |
~ACE_Array_Base (void) | |
T & | operator[] (size_type slot) |
T const & | operator[] (size_type slot) const |
int | set (T const &new_item, size_type slot) |
int | get (T &item, size_type slot) const |
size_type | size (void) const |
int | size (size_type new_size) |
size_type | max_size (void) const |
int | max_size (size_type new_size) |
void | swap (ACE_Array_Base< T > &array) |
iterator | begin (void) |
iterator | end (void) |
const_iterator | begin (void) const |
const_iterator | end (void) const |
reverse_iterator | rbegin (void) |
reverse_iterator | rend (void) |
const_reverse_iterator | rbegin (void) const |
const_reverse_iterator | rend (void) const |
iterator | begin (void) |
iterator | end (void) |
const_iterator | begin (void) const |
const_iterator | end (void) const |
reverse_iterator | rbegin (void) |
reverse_iterator | rend (void) |
const_reverse_iterator | rbegin (void) const |
const_reverse_iterator | rend (void) const |
Additional Inherited Members | |
![]() | |
typedef T | TYPE |
typedef ACE_Array_Iterator< T > | ITERATOR |
typedef T | value_type |
typedef value_type * | iterator |
typedef value_type const * | const_iterator |
typedef value_type & | reference |
typedef value_type const & | const_reference |
typedef value_type * | pointer |
typedef value_type const * | const_pointer |
typedef ptrdiff_t | difference_type |
typedef ACE_Allocator::size_type | size_type |
![]() | |
bool | in_range (size_type slot) const |
![]() | |
size_type | max_size_ |
size_type | cur_size_ |
value_type * | array_ |
ACE_Allocator * | allocator_ |
Array class that provides a means to reset the underlying ACE_Allocator
.
This class only exists to provide a means to reset the allocator used by the ACE_Array_Base
base class. It has a specific use case, namely to correctly support instances created by a persistent allocator. The allocator address may change between process runs, meaning the allocator address stored in the persistent ACE_Array_Base
instance will be invalid. Use the set_allocator()
method to reset the allocator address before performing any operations that will require use of the allocator (e.g. increasing the size of the array).
Definition at line 38 of file DurabilityArray.h.
|
inline |
Definition at line 41 of file DurabilityArray.h.
|
inline |
Definition at line 46 of file DurabilityArray.h.
|
inline |
Definition at line 52 of file DurabilityArray.h.
References ACE_Array_Base< T >::array_, and size_.
|
inline |
Definition at line 59 of file DurabilityArray.h.
|
inline |
Definition at line 62 of file DurabilityArray.h.
References OpenDDS::DCPS::DurabilityArray< T >::swap().
|
inline |
Reset allocator.
Definition at line 69 of file DurabilityArray.h.
References ACE_Array_Base< T >::allocator_, and ACE_Allocator::instance().
|
inline |
Definition at line 77 of file DurabilityArray.h.
References ACE_Array_Base< T >::allocator_, ACE_Array_Base< T >::array_, ACE_Array_Base< T >::cur_size_, ACE_Array_Base< T >::max_size_, OPENDDS_END_VERSIONED_NAMESPACE_DECL, and OpenDDS::DCPS::swap().
Referenced by OpenDDS::DCPS::DurabilityArray< T >::operator=().