diff options
Diffstat (limited to '')
-rw-r--r-- | src/stable/conduit.h | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/src/stable/conduit.h b/src/stable/conduit.h index a1959a9..78d24eb 100644 --- a/src/stable/conduit.h +++ b/src/stable/conduit.h | |||
@@ -16,49 +16,49 @@ | |||
16 | 16 | ||
17 | namespace Bu | 17 | namespace Bu |
18 | { | 18 | { |
19 | /** | 19 | /** |
20 | * Simple inter-thread communication stream. This acts like a pair of | 20 | * Simple inter-thread communication stream. This acts like a pair of |
21 | * pipes for stream communication between any two things, but without the | 21 | * pipes for stream communication between any two things, but without the |
22 | * use of pipes, making this a bad choice for IPC. | 22 | * use of pipes, making this a bad choice for IPC. |
23 | */ | 23 | */ |
24 | class Conduit : public Stream | 24 | class Conduit : public Stream |
25 | { | 25 | { |
26 | public: | 26 | public: |
27 | Conduit( int iBlockSize=256 ); | 27 | Conduit( int iBlockSize=256 ); |
28 | virtual ~Conduit(); | 28 | virtual ~Conduit(); |
29 | 29 | ||
30 | virtual void close(); | 30 | virtual void close(); |
31 | virtual Bu::size read( void *pBuf, Bu::size nBytes ); | 31 | virtual Bu::size read( void *pBuf, Bu::size nBytes ); |
32 | virtual Bu::size peek( void *pBuf, Bu::size nBytes ); | 32 | virtual Bu::size peek( void *pBuf, Bu::size nBytes ); |
33 | virtual Bu::size peek( void *pBuf, Bu::size nBytes, Bu::size nSkip ); | 33 | virtual Bu::size peek( void *pBuf, Bu::size nBytes, Bu::size nSkip ); |
34 | virtual Bu::size write( const void *pBuf, Bu::size nBytes ); | 34 | virtual Bu::size write( const void *pBuf, Bu::size nBytes ); |
35 | virtual Bu::size tell(); | 35 | virtual Bu::size tell(); |
36 | virtual void seek( Bu::size offset ); | 36 | virtual void seek( Bu::size offset ); |
37 | virtual void setPos( Bu::size pos ); | 37 | virtual void setPos( Bu::size pos ); |
38 | virtual void setPosEnd( Bu::size pos ); | 38 | virtual void setPosEnd( Bu::size pos ); |
39 | virtual bool isEos(); | 39 | virtual bool isEos(); |
40 | virtual bool isOpen(); | 40 | virtual bool isOpen(); |
41 | virtual void flush(); | 41 | virtual void flush(); |
42 | virtual bool canRead(); | 42 | virtual bool canRead(); |
43 | virtual bool canWrite(); | 43 | virtual bool canWrite(); |
44 | virtual bool isReadable(); | 44 | virtual bool isReadable(); |
45 | virtual bool isWritable(); | 45 | virtual bool isWritable(); |
46 | virtual bool isSeekable(); | 46 | virtual bool isSeekable(); |
47 | virtual bool isBlocking(); | 47 | virtual bool isBlocking(); |
48 | virtual void setBlocking( bool bBlocking=true ); | 48 | virtual void setBlocking( bool bBlocking=true ); |
49 | virtual void setSize( Bu::size iSize ); | 49 | virtual void setSize( Bu::size iSize ); |
50 | 50 | ||
51 | virtual size getSize() const; | 51 | virtual size getSize() const; |
52 | virtual size getBlockSize() const; | 52 | virtual size getBlockSize() const; |
53 | virtual Bu::String getLocation() const; | 53 | virtual Bu::String getLocation() const; |
54 | 54 | ||
55 | private: | 55 | private: |
56 | QueueBuf qb; | 56 | QueueBuf qb; |
57 | mutable Mutex im; | 57 | mutable Mutex im; |
58 | Condition cBlock; | 58 | Condition cBlock; |
59 | bool bBlocking; | 59 | bool bBlocking; |
60 | bool bOpen; | 60 | bool bOpen; |
61 | }; | 61 | }; |
62 | } | 62 | } |
63 | 63 | ||
64 | #endif | 64 | #endif |