Quick Links: |
#include <bdlc_flathashtable.h>
Public Member Functions | |
DestroyEntryArrayProctor (ENTRY_TYPE *firstEntry, ENTRY_TYPE *lastEntry, const bsl::uint8_t *firstControl, const bsl::uint8_t *lastControl) | |
~DestroyEntryArrayProctor () | |
void | moveEnd (bsl::ptrdiff_t offset) |
void | release () |
This component-private, mechanism class template provides a proctor that, unless its release
method has been previously invoked, on destruction automatically destroys the populated ENTRY_TYPE
elements of an ENTRY_TYPE
array supplied on construction as indicated by a "control" byte array supplied on construction.
See Component bdlc_flathashtable
bdlc::FlatHashTable_ImplUtil::DestroyEntryArrayProctor< ENTRY_TYPE >::DestroyEntryArrayProctor | ( | ENTRY_TYPE * | firstEntry, | |
ENTRY_TYPE * | lastEntry, | |||
const bsl::uint8_t * | firstControl, | |||
const bsl::uint8_t * | lastControl | |||
) |
Create a new DestroyEntryArrayProctor
object for the contiguous ENTRY_TYPE
storage delimited by the range specified by [firstEntry, lastEntry)
controlled by the bytes in the range specified by [firstControl, lastControl)
. The behavior is undefined unless 'bsldistance(firstEntry, lastEntry) == bsl::distance(<code>firstControl, lastControl). Note that these ranges may be valid sub-ranges (or "views") of larger arrays, and these sub-ranges can be grown or shrunk by moveEnd
.
bdlc::FlatHashTable_ImplUtil::DestroyEntryArrayProctor< ENTRY_TYPE >::~DestroyEntryArrayProctor | ( | ) |
Destroy this object and each object in the entry storage array held by this object where the most-significant bit of the corresponding element in the control array held by this object is unset.
void bdlc::FlatHashTable_ImplUtil::DestroyEntryArrayProctor< ENTRY_TYPE >::moveEnd | ( | bsl::ptrdiff_t | offset | ) |
Move the end of the entry and control ranges held by this object by the specified offset
.
void bdlc::FlatHashTable_ImplUtil::DestroyEntryArrayProctor< ENTRY_TYPE >::release | ( | ) |
Release the entry and control ranges held by this object from management by this object, and set this object's held entry and control arrays to the corresponding empty arrays. If the entry and control arrays held by this object are empty, this method has no effect.