summaryrefslogtreecommitdiff
path: root/src/stable/staticmembuf.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
commitec05778d5718a7912e506764d443a78d6a6179e3 (patch)
tree78a9a01532180030c095acefc45763f07c14edb8 /src/stable/staticmembuf.h
parentb20414ac1fe80a71a90601f4cd1767fa7014a9ba (diff)
downloadlibbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.gz
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.bz2
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.xz
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.zip
Converted tabs to spaces with tabconv.
Diffstat (limited to 'src/stable/staticmembuf.h')
-rw-r--r--src/stable/staticmembuf.h84
1 files changed, 42 insertions, 42 deletions
diff --git a/src/stable/staticmembuf.h b/src/stable/staticmembuf.h
index 332e27d..2be05a0 100644
--- a/src/stable/staticmembuf.h
+++ b/src/stable/staticmembuf.h
@@ -15,51 +15,51 @@
15 15
16namespace Bu 16namespace Bu
17{ 17{
18 /** 18 /**
19 * An immutable, read-only memory buffer. Construct this buffer around a 19 * An immutable, read-only memory buffer. Construct this buffer around a
20 * block of raw memory, provide the length of the block, and you can read 20 * block of raw memory, provide the length of the block, and you can read
21 * from that block via this class as though it were a normal stream. 21 * from that block via this class as though it were a normal stream.
22 * 22 *
23 * Use this class instead of MemBuf when you have a string already, and 23 * Use this class instead of MemBuf when you have a string already, and
24 * don't need to change it. MemBuf will make a copy of your string for 24 * don't need to change it. MemBuf will make a copy of your string for
25 * it's own use (often) and this will not (ever). 25 * it's own use (often) and this will not (ever).
26 *@ingroup Streams 26 *@ingroup Streams
27 */ 27 */
28 class StaticMemBuf : public Stream 28 class StaticMemBuf : public Stream
29 { 29 {
30 public: 30 public:
31 StaticMemBuf( const void *pData, size iSize ); 31 StaticMemBuf( const void *pData, size iSize );
32 virtual ~StaticMemBuf(); 32 virtual ~StaticMemBuf();
33 33
34 virtual void close(); 34 virtual void close();
35 virtual size read( void *pBuf, size iBytes ); 35 virtual size read( void *pBuf, size iBytes );
36 36
37 virtual size write( const void *pBuf, size iBytes ); 37 virtual size write( const void *pBuf, size iBytes );
38 using Stream::write; 38 using Stream::write;
39 virtual size tell(); 39 virtual size tell();
40 virtual void seek( size offset ); 40 virtual void seek( size offset );
41 virtual void setPos( size pos ); 41 virtual void setPos( size pos );
42 virtual void setPosEnd( size pos ); 42 virtual void setPosEnd( size pos );
43 virtual bool isEos(); 43 virtual bool isEos();
44 virtual bool isOpen(); 44 virtual bool isOpen();
45 virtual void flush(); 45 virtual void flush();
46 virtual bool canRead(); 46 virtual bool canRead();
47 virtual bool canWrite(); 47 virtual bool canWrite();
48 virtual bool isReadable(); 48 virtual bool isReadable();
49 virtual bool isWritable(); 49 virtual bool isWritable();
50 virtual bool isSeekable(); 50 virtual bool isSeekable();
51 virtual bool isBlocking(); 51 virtual bool isBlocking();
52 virtual void setBlocking( bool bBlocking=true ); 52 virtual void setBlocking( bool bBlocking=true );
53 virtual void setSize( size iSize ); 53 virtual void setSize( size iSize );
54 virtual size getSize() const; 54 virtual size getSize() const;
55 virtual size getBlockSize() const; 55 virtual size getBlockSize() const;
56 virtual Bu::String getLocation() const; 56 virtual Bu::String getLocation() const;
57 57
58 private: 58 private:
59 const void *pData; 59 const void *pData;
60 size iSize; 60 size iSize;
61 size nPos; 61 size nPos;
62 }; 62 };
63} 63}
64 64
65#endif 65#endif