#include <coherence/lang/ClassBasedHeapAnalyzer.hpp>
Inherits Object, and Comparable.
Public Types | |||||||
typedef spec::Handle | Handle | ||||||
ClassStats Handle definition. | |||||||
typedef spec::View | View | ||||||
ClassStats View definition. | |||||||
typedef spec::Holder | Holder | ||||||
ClassStats Holder definition. | |||||||
Public Member Functions | |||||||
virtual int64_t | getObjectCount () const | ||||||
Return the instance count for the class. | |||||||
virtual int64_t | getByteCount () const | ||||||
Return the byte count for the class. | |||||||
virtual int64_t | getAllocationCount () const | ||||||
Return the allocation count for the class. | |||||||
int32_t | compareTo (Object::View v) const | ||||||
Compare this object with the specified object for order. Return a negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified object.
It is strongly recommended, but not strictly required, that
| |||||||
virtual void | toStream (std::ostream &out) const | ||||||
Output a human-readable description of this Object to the given stream. coherence::lang::operator<<(std::ostream, Object::View) is defined and will call into the toStream method, to output Objects. If a managed String object is desired, the COH_TO_STRING macro can be used to build up a String from streamable contents.
Object::View vKey = ... Object::View vValue = ... std::cout << vKey << " = " << vValue << std::endl; String::Handle hs = COH_TO_STRING(vKey << " = " << vValue);
| |||||||
Protected Member Functions | |||||||
ClassStats (int64_t cObjs, int64_t cBytes, int64_t cAlloc) | |||||||
Create a new ClassStats. | |||||||
Protected Attributes | |||||||
int64_t | m_cInstanceCount | ||||||
The number of instances of the class. | |||||||
int64_t | m_cByteCount | ||||||
The byte size of all the instances. | |||||||
int64_t | m_cAllocationCount | ||||||
The total number of allocations of the class. |
ClassStats | ( | int64_t | cObjs, | |
int64_t | cBytes, | |||
int64_t | cAlloc | |||
) | [protected] |
Create a new ClassStats.
cObjs | the instance count | |
cBytes | the byte count | |
cAlloc | the allocation count |