All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_MemoryCounterGather Class Reference

#include <UT_MemoryCounter.h>

+ Inheritance diagram for UT_MemoryCounterGather:

Public Member Functions

 UT_MemoryCounterGather (UT_Set< const void * > &gatherset)
virtual ~UT_MemoryCounterGather ()
virtual void reset ()
virtual bool countShared (size_t size, exint refcount, const void *p)
- Public Member Functions inherited from UT_MemoryCounter
 UT_MemoryCounter ()
virtual ~UT_MemoryCounter ()
void countUnshared (size_t size)
virtual size_t getCount () const
bool mustCountShared () const
bool mustCountUnshared () const

Additional Inherited Members

- Protected Member Functions inherited from UT_MemoryCounter
 UT_MemoryCounter (const bool countshared, const bool countunshared)

Detailed Description

This class is for gathering a set of shared memory blocks using the same interface as memory counting, to avoid needing two separate interfaces propagated to everything. This is intended to be used before counting memory with UT_MemoryCounterNew or UT_MemoryCounterNewSafe.

Definition at line 522 of file UT_MemoryCounter.h.

Constructor & Destructor Documentation

UT_MemoryCounterGather::UT_MemoryCounterGather ( UT_Set< const void * > &  gatherset)

Definition at line 525 of file UT_MemoryCounter.h.

virtual UT_MemoryCounterGather::~UT_MemoryCounterGather ( )

Definition at line 529 of file UT_MemoryCounter.h.

Member Function Documentation

virtual bool UT_MemoryCounterGather::countShared ( size_t  size,
exint  refcount,
const void p 

This inserts the pointer p into the gathered set. NOTE: If p is already there, it's not inserted again.

Reimplemented from UT_MemoryCounter.

Definition at line 544 of file UT_MemoryCounter.h.

virtual void UT_MemoryCounterGather::reset ( void  )

This resets any data structures used for counting to their freshly-constructed state. NOTE: This particular implementation does not necessarily restore the gathered set to its initial state, if it had elements to begin with.

Reimplemented from UT_MemoryCounter.

Definition at line 536 of file UT_MemoryCounter.h.

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