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

Counter Class Reference

Internal counter. More...

#include <counter.h>

List of all members.

Public Methods

jint getValue ()
 Get current value. More...


Static Public Methods

Counter * getCounter ()
 Get static instance. More...


Public Attributes

Hash< ObjectTable, jint, LI1table
 hashtable of couples (unique_id, pointer_to_object).


Protected Methods

 Counter ()
 Default constructor.


Private Attributes

jint _value
 current value of counter.


Detailed Description

Internal counter.

This class implements counter. Each call to getValue() method increments stored value, so each call returns unique value. This class is used for generating unique IDs of profiler library objects (these IDs are needed during communication between profiler library and java part - gui to uniquely identify each object).

See also:
IdObject, ObjectTable
Author:
Marek Przeczek

Definition at line 55 of file counter.h.


Member Function Documentation

Counter * Counter::getCounter   [static]
 

Get static instance.

It returns static instance of Counter object.

Returns:
pointer to object

Definition at line 37 of file counter.cpp.

Referenced by IdObject::IdObject(), Prof::getData(), Prof::getInfo(), and Prof::getInfoBinaryFormat().

jint Counter::getValue   [inline]
 

Get current value.

This method returns current value of the counter and increments it, so next time, greater value will be returned.

Returns:
value

Definition at line 82 of file counter.h.

Referenced by IdObject::IdObject().


The documentation for this class was generated from the following files:
Generated on Mon Jan 28 14:53:28 2002 for Java Profiler Dynamic Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001