Changeset 23:e6c4c31ce833 in xplcommon for src/xplcommon/win32/StreamBuffer.h
- Timestamp:
- 01/02/13 06:50:19 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/xplcommon/win32/StreamBuffer.h
r21 r23 52 52 protected: 53 53 /** 54 * The buffered stream this stream buffer belongs to.55 */56 BufferedStream& stream;57 58 protected:59 /**60 54 * Construct the stream buffer with the given capacity and for the 61 55 * given stream. 62 56 */ 63 57 StreamBuffer(size_t capacity, BufferedStream* stream); 58 59 /** 60 * Get the stream. 61 * 62 * This just casts the overlappable of the Completer part knowing 63 * that it must be a BufferedStream 64 */ 65 BufferedStream& getStream() const; 64 66 65 67 private: … … 83 85 inline StreamBuffer::StreamBuffer(size_t capacity, BufferedStream* stream) : 84 86 Buffer(capacity), 85 Completer(stream), 86 stream(*stream) 87 Completer(stream) 87 88 { 89 } 90 91 //------------------------------------------------------------------------------ 92 93 inline BufferedStream& StreamBuffer::getStream() const 94 { 95 return static_cast<BufferedStream&>(overlappable); 88 96 } 89 97 … … 92 100 inline const ::xplcommon::Failable& StreamBuffer::getFailable() const 93 101 { 94 return stream;102 return overlappable; 95 103 } 96 104 … … 99 107 inline ::xplcommon::Failable& StreamBuffer::getFailable() 100 108 { 101 return stream;109 return overlappable; 102 110 } 103 111
Note:
See TracChangeset
for help on using the changeset viewer.