diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2011-01-19 23:02:44 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2011-01-19 23:02:44 +0000 |
| commit | 10c557562e1d67c55314c212371ea9cb7f802863 (patch) | |
| tree | 5834f4060874de33df5d0f9ebe115059d2541189 /src/membuf.h | |
| parent | dfb29c814b9c3327df3ab90e333b43504768e6d6 (diff) | |
| download | libbu++-10c557562e1d67c55314c212371ea9cb7f802863.tar.gz libbu++-10c557562e1d67c55314c212371ea9cb7f802863.tar.bz2 libbu++-10c557562e1d67c55314c212371ea9cb7f802863.tar.xz libbu++-10c557562e1d67c55314c212371ea9cb7f802863.zip | |
Started work adding more functions to stream, and changing to a new size type.
Diffstat (limited to 'src/membuf.h')
| -rw-r--r-- | src/membuf.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/membuf.h b/src/membuf.h index 9e406c1..a75aca1 100644 --- a/src/membuf.h +++ b/src/membuf.h | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | #include <stdint.h> | 11 | #include <stdint.h> |
| 12 | 12 | ||
| 13 | #include "bu/config.h" | ||
| 13 | #include "bu/stream.h" | 14 | #include "bu/stream.h" |
| 14 | #include "bu/fstring.h" | 15 | #include "bu/fstring.h" |
| 15 | 16 | ||
| @@ -27,14 +28,14 @@ namespace Bu | |||
| 27 | virtual ~MemBuf(); | 28 | virtual ~MemBuf(); |
| 28 | 29 | ||
| 29 | virtual void close(); | 30 | virtual void close(); |
| 30 | virtual size_t read( void *pBuf, size_t nBytes ); | 31 | virtual size read( void *pBuf, size iBytes ); |
| 31 | 32 | ||
| 32 | virtual size_t write( const void *pBuf, size_t nBytes ); | 33 | virtual size write( const void *pBuf, size iBytes ); |
| 33 | using Stream::write; | 34 | using Stream::write; |
| 34 | virtual long tell(); | 35 | virtual size tell(); |
| 35 | virtual void seek( long offset ); | 36 | virtual void seek( size offset ); |
| 36 | virtual void setPos( long pos ); | 37 | virtual void setPos( size pos ); |
| 37 | virtual void setPosEnd( long pos ); | 38 | virtual void setPosEnd( size pos ); |
| 38 | virtual bool isEos(); | 39 | virtual bool isEos(); |
| 39 | virtual bool isOpen(); | 40 | virtual bool isOpen(); |
| 40 | virtual void flush(); | 41 | virtual void flush(); |
| @@ -45,14 +46,14 @@ namespace Bu | |||
| 45 | virtual bool isSeekable(); | 46 | virtual bool isSeekable(); |
| 46 | virtual bool isBlocking(); | 47 | virtual bool isBlocking(); |
| 47 | virtual void setBlocking( bool bBlocking=true ); | 48 | virtual void setBlocking( bool bBlocking=true ); |
| 48 | virtual void setSize( long iSize ); | 49 | virtual void setSize( size iSize ); |
| 49 | 50 | ||
| 50 | Bu::FString &getString(); | 51 | Bu::FString &getString(); |
| 51 | void setString( const Bu::FString &sNewData ); | 52 | void setString( const Bu::FString &sNewData ); |
| 52 | 53 | ||
| 53 | private: | 54 | private: |
| 54 | Bu::FString sBuf; | 55 | Bu::FString sBuf; |
| 55 | long nPos; | 56 | size nPos; |
| 56 | }; | 57 | }; |
| 57 | } | 58 | } |
| 58 | 59 | ||
