29 #ifndef Pt_System_IOBuffer_h
30 #define Pt_System_IOBuffer_h
32 #include <Pt/System/Api.h>
33 #include <Pt/System/IODevice.h>
34 #include <Pt/Signal.h>
35 #include <Pt/StreamBuffer.h>
49 explicit IOBuffer(std::size_t bufferSize = 8192,
bool extend =
false);
53 explicit IOBuffer(
IODevice& ioDevice, std::size_t bufferSize = 8192,
bool extend =
false);
67 {
return _inputReady; }
72 {
return _outputReady; }
99 std::size_t endRead();
108 std::size_t endWrite();
112 bool isReading()
const;
116 bool isWriting()
const;
120 void init(std::size_t bufferSize,
bool extend);
123 virtual std::streamsize showmanyc();
126 virtual std::streamsize showfull();
132 virtual int_type underflow();
135 virtual int_type overflow(int_type ch);
138 virtual pos_type seekoff(off_type offset, std::ios::seekdir sd, std::ios::openmode mode);
141 virtual pos_type seekpos(pos_type p, std::ios::openmode mode );
144 virtual int_type pbackfail(int_type c);
150 std::size_t _ibufferSize;
152 std::size_t _obufferSize;
156 static const int _pbmax = 4;
163 #endif // Pt_System_IOBuffer_h
Connection Management for Signal and Slot Objects.
Definition: Connectable.h:49
Buffer for input and output streams.
Definition: StreamBuffer.h:51
Signal< IOBuffer & > & outputReady()
Notifies when a part of the buffer was written.
Definition: IOBuffer.h:71
Signal< IOBuffer & > & inputReady()
Notifies when input was read.
Definition: IOBuffer.h:66
Multicast Signal to call multiple slots.
Definition: Signal.h:109
Implements std::streambuf for I/O devices.
Definition: IOBuffer.h:43
Endpoint for I/O operations.
Definition: IODevice.h:55
IODevice * device()
Returns the I/O device.
Definition: IOBuffer.h:61