[#BloombergLP-bslma-TestAllocatorStashedStatistics] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::TestAllocatorStashedStatistics :relfileprefix: ../../ :mrdocs: 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`. == Synopsis Declared in `<bslma_testallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class TestAllocatorStashedStatistics; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslma/TestAllocatorStashedStatistics/2constructor.adoc[`TestAllocatorStashedStatistics`] [.small]#[constructor]# | Create a `TestAllocatorStashedStatistics` object with its members initialized by the current statistics values of the specified `testAllocator`, and the address of it as `origin`. | xref:BloombergLP/bslma/TestAllocatorStashedStatistics/markRestored.adoc[`markRestored`] | Set the `origin` to a null pointer to indicate that this stash has been restored and must not be used again with `TestAllocator::restoreStatistics`. The behavior is undefined if this function has been previously invoked on this object. | xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numAllocations.adoc[`numAllocations`] | Return the `numAllocations` attribute value. | xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numBlocksInUse.adoc[`numBlocksInUse`] | Return the `numBlocksInUse` attribute value. | xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numBlocksMax.adoc[`numBlocksMax`] | Return the `numBlocksMax` attribute value. | xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numBlocksTotal.adoc[`numBlocksTotal`] | Return the `numBlocksTotal` attribute value. | xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numBoundsErrors.adoc[`numBoundsErrors`] | Return the `numBoundsErrors` attribute value. | xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numBytesInUse.adoc[`numBytesInUse`] | Return the `numBytesInUse` attribute value. | xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numBytesMax.adoc[`numBytesMax`] | Return the `numBytesMax` attribute value. | xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numBytesTotal.adoc[`numBytesTotal`] | Return the `numBytesTotal` attribute value. | xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numDeallocations.adoc[`numDeallocations`] | Return the `numDeallocations` attribute value. | xref:BloombergLP/bslma/TestAllocatorStashedStatistics/numMismatches.adoc[`numMismatches`] | Return the `numMismatches` attribute value. | xref:BloombergLP/bslma/TestAllocatorStashedStatistics/origin.adoc[`origin`] | Return a const pointer to the test allocator that was saved. | xref:BloombergLP/bslma/TestAllocatorStashedStatistics/restore.adoc[`restore`] | Call `origin‐>restoreStatistics(*this)`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#