summaryrefslogtreecommitdiff
path: root/src/sfile.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-04-03 05:09:12 +0000
committerMike Buland <eichlan@xagasoft.com>2007-04-03 05:09:12 +0000
commitc884da672645231b5ec47706c886381dab1b391a (patch)
treef9c0a0c4fb9006c2c1aa10c8c65de2f6e42894de /src/sfile.h
parentda89e6d30e57bd6dbb10b4d36b093ce9bbf5c666 (diff)
downloadlibbu++-c884da672645231b5ec47706c886381dab1b391a.tar.gz
libbu++-c884da672645231b5ec47706c886381dab1b391a.tar.bz2
libbu++-c884da672645231b5ec47706c886381dab1b391a.tar.xz
libbu++-c884da672645231b5ec47706c886381dab1b391a.zip
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...
Diffstat (limited to 'src/sfile.h')
-rw-r--r--src/sfile.h36
1 files changed, 36 insertions, 0 deletions
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 @@
1#ifndef SFILE_H
2#define SFILE_H
3
4#include <stdint.h>
5
6#include "stream.h"
7
8namespace Bu
9{
10 class SFile : public Bu::Stream
11 {
12 public:
13 SFile( const char *sName, const char *sFlags );
14 virtual ~SFile();
15
16 virtual void close();
17 virtual size_t read( char *pBuf, size_t nBytes );
18 virtual size_t write( const char *pBuf, size_t nBytes );
19
20 virtual long tell();
21 virtual void seek( long offset );
22 virtual void setPos( long pos );
23 virtual void setPosEnd( long pos );
24 virtual bool isEOS();
25
26 virtual bool canRead();
27 virtual bool canWrite();
28 virtual bool canSeek();
29
30 private:
31 FILE *fh;
32
33 };
34}
35
36#endif