NAME

OTC_Count - An integer count.

SYNOPSIS


#include <OTC/refcnt/count.hh>

class OTC_Count : public OTC_MPObject
{
  public:
    static os_typespec* get_os_typespec();
    ~OTC_Count();
    inline OTC_Count();
    inline OTC_Count(OTC_Count const& theCtr);
    inline OTC_Count& operator=(OTC_Count const& theCtr);
    inline void inc();
    inline void dec();
    inline void set(u_int theCount);
    inline u_int count() const;
};

CLASS TYPE

Concrete

DESCRIPTION

OTC_Count contains an integer count. It has a lower bound of 0 and an upper bound of the largest number which can be held in a u_int. When created, the count is set to the lower bound of 0.

CONSTRUCTION

inline OTC_Count();
inline OTC_Count(OTC_Count const& theCtr);

ASSIGNMENT

inline OTC_Count& operator=(OTC_Count const& theCtr);

MODIFIERS

inline void inc();
inline void dec();
inline void set(u_int theCount);

QUERY

inline u_int count() const;

NOTES

No check is made against the upper bound, if the count was incremented that far, it would quitely wrap around to 0.

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1991 1992 1993 OTC LIMITED
Copyright 1994 TELSTRA CORPORATION LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED