Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

SuifCounter Class Reference

This class help count the number of object instances for each subclass. More...

#include <suif_counter.h>

Inheritance diagram for SuifCounter:

AllWalker SuifWalker Walker List of all members.

Public Methods

 SuifCounter (SuifEnv*)
 Constructor.

Walker::ApplyStatus operator() (SuifObject*)
 This method does the actual work. More...

void count (SuifObject* obj)
 Count the number of instances reachable from the object obj.

NodeCounterget_node_counter (const MetaClass* mc)
ostream& print_result (ostream&) const
 Print the result to out.


Detailed Description

This class help count the number of object instances for each subclass.

This class works by creating a tree of NodeCounter, mirroring the class tree of the SuifObject class family. Each NodeCounter store the number of instances of a particular subclass.


Constructor & Destructor Documentation

SuifCounter::SuifCounter ( SuifEnv * env)

Constructor.


Member Function Documentation

void SuifCounter::count ( SuifObject * obj)

Count the number of instances reachable from the object obj.

NodeCounter * SuifCounter::get_node_counter ( const MetaClass * mc)

Returns:
the NodeCounter for the subclass in mc.

Walker::ApplyStatus SuifCounter::operator() ( SuifObject * obj) [virtual]

This method does the actual work.

See also:
Walker

Reimplemented from SuifWalker.

ostream & SuifCounter::print_result ( ostream & out) const

Print the result to out.


The documentation for this class was generated from the following files:
Generated at Mon Jul 31 13:44:39 2000 for NCI SUIF by doxygen 1.1.2 written by Dimitri van Heesch, © 1997-2000