From c884da672645231b5ec47706c886381dab1b391a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 3 Apr 2007 05:09:12 +0000 Subject: The file stream is imported and works, as does our first test, and the new tweaks to archive. The && operator is now a template function, and as such requires no special handling. It could be worth it to check this out for other types, yet dangerous, since it would let you archive anything, even a class, without writing the proper functions for it...we shall see what happens... --- src/sfile.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/sfile.h (limited to 'src/sfile.h') diff --git a/src/sfile.h b/src/sfile.h new file mode 100644 index 0000000..304f6b7 --- /dev/null +++ b/src/sfile.h @@ -0,0 +1,36 @@ +#ifndef SFILE_H +#define SFILE_H + +#include + +#include "stream.h" + +namespace Bu +{ + class SFile : public Bu::Stream + { + public: + SFile( const char *sName, const char *sFlags ); + virtual ~SFile(); + + virtual void close(); + virtual size_t read( char *pBuf, size_t nBytes ); + virtual size_t write( const char *pBuf, size_t nBytes ); + + virtual long tell(); + virtual void seek( long offset ); + virtual void setPos( long pos ); + virtual void setPosEnd( long pos ); + virtual bool isEOS(); + + virtual bool canRead(); + virtual bool canWrite(); + virtual bool canSeek(); + + private: + FILE *fh; + + }; +} + +#endif -- cgit v1.2.3