Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bslma::TestAllocatorMonitor Class Reference

#include <bslma_testallocatormonitor.h>

List of all members.

Public Member Functions

 TestAllocatorMonitor (const TestAllocator *testAllocator)
 ~TestAllocatorMonitor ()
void reset (const bslma::TestAllocator *testAllocator=0)
bool isInUseDown () const
bool isInUseSame () const
bool isInUseUp () const
bool isMaxSame () const
bool isMaxUp () const
bool isTotalSame () const
bool isTotalUp () const
bsls::Types::Int64 numBlocksInUseChange () const
bsls::Types::Int64 numBlocksMaxChange () const
bsls::Types::Int64 numBlocksTotalChange () const

Detailed Description

This mechanism provides a set of boolean accessor methods indicating whether a change has occurred in the state of the TestAllocator object (supplied at construction) since the construction of the monitor. See the Statistics section of @DESCRIPTION for the statics tracked.

See Component bslma_testallocatormonitor


Constructor & Destructor Documentation

bslma::TestAllocatorMonitor::TestAllocatorMonitor ( const TestAllocator testAllocator  )  [explicit]

Create a TestAllocatorMonitor object to track changes in statistics of the specified testAllocator.

bslma::TestAllocatorMonitor::~TestAllocatorMonitor (  ) 

Destroy this object.


Member Function Documentation

void bslma::TestAllocatorMonitor::reset ( const bslma::TestAllocator testAllocator = 0  ) 

Change the allocator monitored by this object to the specified testAllocator and initialize the allocator properties monitored by this object to the current state of testAllocator. If no testAllocator is passed, do not modify the allocator held by this object and re-initialize the allocator properties monitored by this object to the current state of that allocator.

bool bslma::TestAllocatorMonitor::isInUseDown (  )  const

Return true if the numBlocksInUse statistic of the tracked test allocator has decreased since construction of this monitor, and false otherwise.

bool bslma::TestAllocatorMonitor::isInUseSame (  )  const

Return true if the numBlocksInUse statistic of the tracked test allocator has not changed since construction of this monitor, and false otherwise.

bool bslma::TestAllocatorMonitor::isInUseUp (  )  const

Return true if the numBlocksInUse statistic of the tracked test allocator has increased since construction of this monitor, and false otherwise.

bool bslma::TestAllocatorMonitor::isMaxSame (  )  const

Return true if the numBlocksMax statistic of the tracked test allocator has not changed since construction of this monitor, and false otherwise.

bool bslma::TestAllocatorMonitor::isMaxUp (  )  const

Return true if the numBlocksMax statistic of the tracked test allocator has increased since construction of this monitor, and false otherwise.

bool bslma::TestAllocatorMonitor::isTotalSame (  )  const

Return true if the numBlocksTotal statistic of the tracked test allocator has not changed since construction of this monitor, and false otherwise.

bool bslma::TestAllocatorMonitor::isTotalUp (  )  const

Return true if the numBlocksTotal statistic of the tracked test allocator has increased since construction of this monitor, and false otherwise.

bsls::Types::Int64 bslma::TestAllocatorMonitor::numBlocksInUseChange (  )  const

Return the change in the numBlocksInUse statistic of the tracked test allocator since construction of this monitor.

bsls::Types::Int64 bslma::TestAllocatorMonitor::numBlocksMaxChange (  )  const

Return the change in the numBlocksMax statistic of the tracked test allocator since construction of this monitor.

bsls::Types::Int64 bslma::TestAllocatorMonitor::numBlocksTotalChange (  )  const

Return the change in the numBlocksTotal statistic of the tracked test allocator since construction of this monitor.


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