Counter

This class captures the concept of a simple integer counter that counts upwards from a given, by default zero, initial value. A Counter object can be connected to a Message in which the counter will display its current value.

[ Index | Source | Summary | Member Functions ]

Quick Index


Class Summary

class Counter
{

public:
Counter(int start, int end);
Counter();
void ConnectTo(Message& msg);
void Next();
void Reset();
~Counter();
}; // Counter

Back to the top of Counter


Counter(int start, int end);

Construct a Counter object with an initial value and a maximum value beyond which the Counter cannot be incremented.

  Counter(int start, int end);

Back to the top of Counter


Counter();

Construct a Counter object with an initial value of zero and which can be incremented without limit.

  Counter();

Back to the top of Counter


void ConnectTo(Message& msg);

Create an association between the Counter object and a Message object. The text string equivalent of the Counter's object will be set in the Message object.

  void ConnectTo(Message& msg);

Back to the top of Counter


void Next();

Advance the Counter to its next value. The operation has no effect if the Counter is at its maximum value.

  void Next();

Back to the top of Counter


void Reset();

Set the Counter back to its original (initial) value.

  void Reset();

Back to the top of Counter


~Counter();

Reclaim all resources associated with the Counter.

 ~Counter();

Back to the top of Counter


Member Functions

public:
void ConnectTo(Message& msg);
void Next();
void Reset();

Back to the top of Counter


Generated from source by the Cocoon utilities on Thu Apr 02 12:40:32 1998 .

Report problems to jkotula@unimax.com