Oracle Coherence for C++ API
Release 3.7.1.0

E22845-01

ClassBasedHeapAnalyzer::ClassStats Class Reference

#include <coherence/lang/ClassBasedHeapAnalyzer.hpp>

Inherits Object, and Comparable.

List of all members.


Detailed Description

Statistics relating to a class.
 

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 (x->compareTo(y) == 0) == (x->equals(y)).

Parameters:
 v the Object to be compared
Returns:
a negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified object
Exceptions:
 ClassCastException if the specified Object's type prevents it from being compared to this Object
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);

Parameters:
 out the stream used to output the description

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.

Constructor & Destructor Documentation

ClassStats ( int64_t  cObjs,
    int64_t  cBytes,
    int64_t  cAlloc 
  )    [protected]

Create a new ClassStats.

Parameters:
 cObjs the instance count
 cBytes the byte count
 cAlloc the allocation count
Returns:
the new ClassStats


The documentation for this class was generated from the following file:
Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.