#include <bslma_testallocator.h>
This simple unconstrained attribute type is used to store all information necessary to restore the state of all statistics of a TestAllocator after a stashStatistics() call that resets them. See also TestAllocator::stashStatistics and TestAllocator::restoreStatistics.
See bslma_testallocator
◆ TestAllocatorStashedStatistics()
| bslma::TestAllocatorStashedStatistics::TestAllocatorStashedStatistics |
( |
TestAllocator * |
testAllocator | ) |
|
|
inline |
Create a TestAllocatorStashedStatistics object with its members initialized by the current statistics values of the specified testAllocator, and the address of it as origin.
◆ markRestored()
| void bslma::TestAllocatorStashedStatistics::markRestored |
( |
| ) |
|
|
inline |
Set the origin to a null pointer to indicate that this stash has been restored and must not be used again with TestAllocator::restoreStatistics.
- Precondition
- The behavior is undefined if this function has been previously invoked on this object.
◆ numAllocations()
Return the numAllocations attribute value.
◆ numBlocksInUse()
Return the numBlocksInUse attribute value.
◆ numBlocksMax()
Return the numBlocksMax attribute value.
◆ numBlocksTotal()
Return the numBlocksTotal attribute value.
◆ numBoundsErrors()
Return the numBoundsErrors attribute value.
◆ numBytesInUse()
Return the numBytesInUse attribute value.
◆ numBytesMax()
Return the numBytesMax attribute value.
◆ numBytesTotal()
Return the numBytesTotal attribute value.
◆ numDeallocations()
Return the numDeallocations attribute value.
◆ numMismatches()
Return the numMismatches attribute value.
◆ origin()
| TestAllocator * bslma::TestAllocatorStashedStatistics::origin |
( |
| ) |
const |
|
inline |
Return a const pointer to the test allocator that was saved.
◆ restore()
| void bslma::TestAllocatorStashedStatistics::restore |
( |
| ) |
|
|
inline |
Call origin->restoreStatistics(*this).
The documentation for this class was generated from the following file: