Changeset 16:d70b0c40fe4a in xplcommon for src/xplcommon/posix/StreamBuffer.h
- Timestamp:
- 12/29/12 10:24:28 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/xplcommon/posix/StreamBuffer.h
r14 r16 28 28 // either expressed or implied, of the FreeBSD Project. 29 29 30 #ifndef XPLCOMMON_POSIX_ WAITABLEBUFFER_H31 #define XPLCOMMON_POSIX_ WAITABLEBUFFER_H30 #ifndef XPLCOMMON_POSIX_STREAMBUFFER_H 31 #define XPLCOMMON_POSIX_STREAMBUFFER_H 32 32 //------------------------------------------------------------------------------ 33 33 … … 35 35 #include "../Failable.h" 36 36 37 #include "Buffered Waitable.h"37 #include "BufferedStream.h" 38 38 39 39 //------------------------------------------------------------------------------ … … 44 44 45 45 /** 46 * Base class for buffers used by a Buffered Waitable.46 * Base class for buffers used by a BufferedStream. 47 47 */ 48 class WaitableBuffer : public ::xplcommon::Buffer,49 public ::xplcommon::FailableReference<WaitableBuffer>48 class StreamBuffer : public ::xplcommon::Buffer, 49 public ::xplcommon::FailableReference<StreamBuffer> 50 50 { 51 51 protected: 52 52 /** 53 * Our waitable.53 * Our buffered stream. 54 54 */ 55 Buffered Waitable& waitable;55 BufferedStream& stream; 56 56 57 57 protected: … … 59 59 * Construct the buffer with the given waitable. 60 60 */ 61 WaitableBuffer(size_t capacity, BufferedWaitable* waitable);61 StreamBuffer(size_t capacity, BufferedStream* stream); 62 62 63 63 private: … … 72 72 ::xplcommon::Failable& getFailable(); 73 73 74 friend class FailableReference< WaitableBuffer>;74 friend class FailableReference<StreamBuffer>; 75 75 }; 76 76 … … 79 79 //------------------------------------------------------------------------------ 80 80 81 inline WaitableBuffer::WaitableBuffer(size_t capacity, 82 BufferedWaitable* waitable) : 81 inline StreamBuffer::StreamBuffer(size_t capacity, BufferedStream* stream) : 83 82 Buffer(capacity), 84 waitable(*waitable)83 stream(*stream) 85 84 { 86 85 } … … 88 87 //------------------------------------------------------------------------------ 89 88 90 inline const ::xplcommon::Failable& WaitableBuffer::getFailable() const89 inline const ::xplcommon::Failable& StreamBuffer::getFailable() const 91 90 { 92 return waitable;91 return stream; 93 92 } 94 93 95 94 //------------------------------------------------------------------------------ 96 95 97 inline ::xplcommon::Failable& WaitableBuffer::getFailable()96 inline ::xplcommon::Failable& StreamBuffer::getFailable() 98 97 { 99 return waitable;98 return stream; 100 99 } 101 100 … … 105 104 106 105 //------------------------------------------------------------------------------ 107 #endif // XPLCOMMON_POSIX_ WAITABLEBUFFER_H106 #endif // XPLCOMMON_POSIX_STREAMBUFFER_H 108 107 109 108 // Local Variables:
Note:
See TracChangeset
for help on using the changeset viewer.