Category : C Source Code
Archive   : CPPOOPS.ZIP
Filename : INTEGER.HXX

 
Output of file : INTEGER.HXX contained in archive : CPPOOPS.ZIP
#ifndef INTEGER_H
#define INTEGER_H

/* Integer.hxx -- declarations for Integer object

THIS SOFTWARE FITS THE DESCRIPTION IN THE U.S. COPYRIGHT ACT OF A
"UNITED STATES GOVERNMENT WORK". IT WAS WRITTEN AS A PART OF THE
AUTHOR'S OFFICIAL DUTIES AS A GOVERNMENT EMPLOYEE. THIS MEANS IT
CANNOT BE COPYRIGHTED. THIS SOFTWARE IS FREELY AVAILABLE TO THE
PUBLIC FOR USE WITHOUT A COPYRIGHT NOTICE, AND THERE ARE NO
RESTRICTIONS ON ITS USE, NOW OR SUBSEQUENTLY.

Author:
K. E. Gorlen
Computer Systems Laboratory, DCRT
National Institutes of Health
Bethesda, MD 20892

$Log: Integer.hxx,v $
* Revision 1.3 88/02/04 12:59:23 keith
* Make Class class_CLASSNAME const.
*
* Revision 1.2 88/01/16 23:39:20 keith
* Remove pre-RCS modification history
*
*/

#include "Object.hxx"

extern const Class class_Integer;
#ifdef OBJECTIO
overload Integer_reader;
#endif //OBJECTIO

class Integer: public Object {
int val;
#ifdef OBJECTIO
void parseInteger(istream& strm) { strm >> val; }
#endif //OBJECTIO
protected:
#ifdef OBJECTIO
Integer(fileDescTy&,Integer&);
Integer(istream&,Integer&);
friend void Integer_reader(istream& strm, Object& where);
friend void Integer_reader(fileDescTy& fd, Object& where);
virtual void storer(fileDescTy&);
virtual void storer(ostream&);
#endif //OBJECTIO
public:
Integer(int v =0) { val = v; }
#ifdef OBJECTIO
Integer(istream&);
#endif //OBJECTIO
int value() { return val; }
int value(int newval) { return val = newval; }
virtual int compare(const Object&);
virtual Object* copy(); // { return shallowCopy(); }
virtual void deepenShallowCopy(); // {}
virtual unsigned hash();
virtual const Class* isA();
virtual bool isEqual(const Object&);
#ifdef OBJECTIO
virtual void printOn(ostream& strm);
virtual void scanFrom(istream& strm);
#endif //OBJECTIO
virtual const Class* species();
};

#endif


  3 Responses to “Category : C Source Code
Archive   : CPPOOPS.ZIP
Filename : INTEGER.HXX

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/