aboutsummaryrefslogtreecommitdiff
path: root/src/stable/buffer.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/buffer.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/buffer.h')
-rw-r--r--src/stable/buffer.h82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/stable/buffer.h b/src/stable/buffer.h
index a8303fa..21a5812 100644
--- a/src/stable/buffer.h
+++ b/src/stable/buffer.h
@@ -12,47 +12,47 @@
12 12
13namespace Bu 13namespace Bu
14{ 14{
15 class Buffer : public Bu::Filter 15 class Buffer : public Bu::Filter
16 { 16 {
17 public: 17 public:
18 Buffer( Bu::Stream &rNext, int iWhat=Both, int iBufSize=4096 ); 18 Buffer( Bu::Stream &rNext, int iWhat=Both, int iBufSize=4096 );
19 virtual ~Buffer(); 19 virtual ~Buffer();
20 20
21 enum 21 enum
22 { 22 {
23 Write = 1, 23 Write = 1,
24 Read = 2, 24 Read = 2,
25 Both = 3 25 Both = 3
26 }; 26 };
27 27
28 virtual void start(); 28 virtual void start();
29 virtual Bu::size stop(); 29 virtual Bu::size stop();
30 30
31 virtual Bu::size read( void *pBuf, Bu::size nBytes ); 31 virtual Bu::size read( void *pBuf, Bu::size nBytes );
32 virtual Bu::size write( const void *pBuf, Bu::size nBytes ); 32 virtual Bu::size write( const void *pBuf, Bu::size nBytes );
33 using Stream::write; 33 using Stream::write;
34 34
35 Bu::size getReadFill() { return iReadBufFill; } 35 Bu::size getReadFill() { return iReadBufFill; }
36 bool isWritePending() { return iWriteBufFill > 0; } 36 bool isWritePending() { return iWriteBufFill > 0; }
37 37
38 virtual void flush(); 38 virtual void flush();
39 39
40 virtual bool isEos(); 40 virtual bool isEos();
41 41
42 private: 42 private:
43 void fillReadBuf(); 43 void fillReadBuf();
44 44
45 private: 45 private:
46 Bu::size sSoFar; 46 Bu::size sSoFar;
47 int iBufSize; 47 int iBufSize;
48 char *sReadBuf; 48 char *sReadBuf;
49 char *sWriteBuf; 49 char *sWriteBuf;
50 int iReadBufFill; 50 int iReadBufFill;
51 int iReadPos; 51 int iReadPos;
52 int iWriteBufFill; 52 int iWriteBufFill;
53 int iWritePos; 53 int iWritePos;
54 int iWhat; 54 int iWhat;
55 }; 55 };
56}; 56};
57 57
58#endif 58#endif