|
|
@@ -70,10 +70,13 @@ namespace CodeDweller { |
|
|
|
|
|
|
|
/// Constructor. |
|
|
|
// |
|
|
|
// \param[in] bufferSize is the size in bytes of the input |
|
|
|
// \param[in] bufSize is the size in bytes of the input |
|
|
|
// buffer and output buffer. |
|
|
|
// |
|
|
|
explicit ChildStreambuf(std::size_t bufferSize = 4096); |
|
|
|
explicit ChildStreambuf(std::size_t bufSize = 4096); |
|
|
|
|
|
|
|
/// Thread start function to send data to the child. |
|
|
|
void sendToChild(); |
|
|
|
|
|
|
|
#ifdef _WIN32 |
|
|
|
|
|
|
@@ -141,12 +144,6 @@ namespace CodeDweller { |
|
|
|
/// Override streambuf::sync(). |
|
|
|
int sync(); |
|
|
|
|
|
|
|
/// Copy constructor not implemented. |
|
|
|
ChildStreambuf(const ChildStreambuf &) = delete; |
|
|
|
|
|
|
|
/// Assignment operator not implemented. |
|
|
|
ChildStreambuf &operator=(const ChildStreambuf &) = delete; |
|
|
|
|
|
|
|
/// Input and output handles. |
|
|
|
#ifdef _WIN32 |
|
|
|
HANDLE inputHandle; |
|
|
@@ -156,12 +153,21 @@ namespace CodeDweller { |
|
|
|
int outputFileDescriptor; |
|
|
|
#endif |
|
|
|
|
|
|
|
/// Size of buffers. |
|
|
|
std::size_t bufferSize; |
|
|
|
|
|
|
|
/// Read buffer. |
|
|
|
std::vector<char> readBuffer; |
|
|
|
|
|
|
|
/// Write buffer. |
|
|
|
std::vector<char> writeBuffer; |
|
|
|
|
|
|
|
/// Copy constructor not implemented. |
|
|
|
ChildStreambuf(const ChildStreambuf &) = delete; |
|
|
|
|
|
|
|
/// Assignment operator not implemented. |
|
|
|
ChildStreambuf &operator=(const ChildStreambuf &) = delete; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
/// Stream buffer for reading from the stdout and writing to the |