home *** CD-ROM | disk | FTP | other *** search
- #ifndef __RWINT_H__
- #define __RWINT_H__
- pragma push_align_members(64);
-
- /*
- * Declarations for an integer class.
- *
- * $Header: E:/vcs/rw/rwint.h_v 1.2 18 Feb 1992 09:54:40 KEFFER $
- *
- ****************************************************************************
- *
- * Rogue Wave
- * P.O. Box 2328
- * Corvallis, OR 97339
- * Voice: (503) 754-3010 FAX: (503) 757-6650
- *
- * Copyright (C) 1989, 1990, 1991. This software is subject to copyright
- * protection under the laws of the United States and other countries.
- *
- ***************************************************************************
- *
- * $Log: E:/vcs/rw/rwint.h_v $
- *
- * Rev 1.2 18 Feb 1992 09:54:40 KEFFER
- *
- * Rev 1.1 28 Oct 1991 09:08:20 keffer
- * Changed inclusions to <rw/xxx.h>
- *
- * Rev 1.0 28 Jul 1991 08:16:28 keffer
- * Tools.h++ V4.0.5 PVCS baseline version
- *
- */
-
- #include "rw/tooldefs.h"
- #include "rw/rstream.h"
-
- class RWExport RWInteger{
- int intBase;
- public:
- RWInteger(int i=0) {intBase = i;}
-
- RWBoolean operator==(const RWInteger& i) const {return intBase==i.intBase;}
-
- #ifndef ZTC_TYPE_CONVERSION_BUG
- operator int() const {return intBase;}
- #endif
- unsigned binaryStoreSize() const {return sizeof(int);}
- void restoreFrom(RWvistream& s);
- void restoreFrom(RWFile& f);
- void saveOn(RWvostream& s) const;
- void saveOn(RWFile& f) const;
-
- int value() const {return intBase;}
- int value(int newval) {int temp=intBase; intBase=newval; return temp;}
-
- friend ostream& operator<<(ostream& o, const RWInteger& x)
- { return o << x.intBase; }
- friend istream& operator>>(istream& i, RWInteger& x)
- { return i >> x.intBase;}
- };
-
- pragma pop_align_members();
- #endif /* __RWINT_H__ */
-