home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD 24 / PCPLUS115.iso / pcplus / tclite / include / integer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-28  |  710 b   |  27 lines

  1. #ifndef    INTEGER_H
  2. #define    INTEGER_H
  3.  
  4. #include "object.h"
  5.  
  6. extern const Class class_Integer;
  7.  
  8. class Integer: public Object {
  9.     int val;
  10.     void parseInteger(istream& strm)    { strm >> val; }
  11. public:
  12.     Integer(int v =0)        { val = v; }
  13.     Integer(istream&);
  14.     int value() const         { return val; }
  15.     int value(int newval)        { return val = newval; }
  16.     virtual int compare(const Object&) const;
  17.     virtual Object* copy() const;
  18.     virtual void    deepenShallowCopy();
  19.     virtual unsigned hash()  const;
  20.     virtual const Class* isA() const;
  21.     virtual bool isEqual(const Object&) const;
  22.     virtual void printOn(ostream& strm) const;
  23.     virtual const Class* species() const;
  24. };
  25.  
  26. #endif
  27.