home *** CD-ROM | disk | FTP | other *** search
- #ifndef __RWBSTREAM_H__
- #define __RWBSTREAM_H__
- pragma push_align_members(64);
-
- /*
- * rwb[io]stream --- Use Binary reads and writes
- *
- * $Header: E:/vcs/rw/bstream.h_v 1.6 18 Feb 1992 09:54:08 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/bstream.h_v $
- *
- * Rev 1.6 18 Feb 1992 09:54:08 KEFFER
- *
- * Rev 1.5 05 Nov 1991 13:51:40 keffer
- * Can now live in the DLL.
- *
- * Rev 1.4 17 Oct 1991 09:12:40 keffer
- * Changed include path to <rw/xxx.h>
- *
- * Rev 1.2 29 Jul 1991 11:33:32 keffer
- * Macro CHAR_MATCHES_UCHAR checks for overloaded unsigned char
- *
- * Rev 1.1 24 Jul 1991 13:06:40 keffer
- * Added pvcs keywords
- *
- */
-
- #include "rw/vstream.h"
-
- /************************************************
- * *
- * class RWbistream *
- * *
- ************************************************/
-
- class RWExport RWbistream : public RWvistream {
- public:
-
- RWbistream(istream& str);
- RWbistream(streambuf* s);
-
- virtual int get();
- virtual RWvistream& get(char&);
- #ifndef CHAR_MATCHES_UCHAR
- virtual RWvistream& get(unsigned char&);
- #endif
- virtual RWvistream& get(char*, unsigned N);
- virtual RWvistream& get(double*, unsigned N);
- virtual RWvistream& get(float*, unsigned N);
- virtual RWvistream& get(int*, unsigned N);
- virtual RWvistream& get(long*, unsigned N);
- virtual RWvistream& get(short*, unsigned N);
- #ifndef CHAR_MATCHES_UCHAR
- virtual RWvistream& get(unsigned char*, unsigned N);
- #endif
- virtual RWvistream& get(unsigned short*, unsigned N);
- virtual RWvistream& get(unsigned int*, unsigned N);
- virtual RWvistream& get(unsigned long*, unsigned N);
- virtual RWvistream& getString(char* s, unsigned maxlen);
- virtual RWvistream& operator>>(char&);
- virtual RWvistream& operator>>(double&);
- virtual RWvistream& operator>>(float&);
- virtual RWvistream& operator>>(int&);
- virtual RWvistream& operator>>(long&);
- virtual RWvistream& operator>>(short&);
- #ifndef CHAR_MATCHES_UCHAR
- virtual RWvistream& operator>>(unsigned char&);
- #endif
- virtual RWvistream& operator>>(unsigned int&);
- virtual RWvistream& operator>>(unsigned long&);
- virtual RWvistream& operator>>(unsigned short&);
- protected:
- void near checkRead() const;
- };
-
- /************************************************
- * *
- * class RWbostream *
- * *
- ************************************************/
-
- class RWExport RWbostream : public RWvostream {
- public:
-
- RWbostream(ostream& str);
- RWbostream(streambuf* s);
-
- virtual RWvostream& operator<<(const char*);
- virtual RWvostream& operator<<(char);
- #ifndef CHAR_MATCHES_UCHAR
- virtual RWvostream& operator<<(unsigned char);
- #endif
- virtual RWvostream& operator<<(double);
- virtual RWvostream& operator<<(float);
- virtual RWvostream& operator<<(int);
- virtual RWvostream& operator<<(unsigned int);
- virtual RWvostream& operator<<(long);
- virtual RWvostream& operator<<(unsigned long);
- virtual RWvostream& operator<<(short);
- virtual RWvostream& operator<<(unsigned short);
-
- virtual RWvostream& put(char);
- virtual RWvostream& put(const char* p, unsigned N);
- #ifndef CHAR_MATCHES_UCHAR
- virtual RWvostream& put(unsigned char);
- virtual RWvostream& put(const unsigned char* p, unsigned N);
- #endif
- virtual RWvostream& put(const short* p, unsigned N);
- virtual RWvostream& put(const unsigned short* p, unsigned N);
- virtual RWvostream& put(const int* p, unsigned N);
- virtual RWvostream& put(const unsigned int* p, unsigned N);
- virtual RWvostream& put(const long* p, unsigned N);
- virtual RWvostream& put(const unsigned long* p, unsigned N);
- virtual RWvostream& put(const float* p, unsigned N);
- virtual RWvostream& put(const double* p, unsigned N);
- };
-
- pragma pop_align_members();
- #endif /* __RWBSTREAM_H__ */
-