aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/poco/Foundation/src/PipeStream.cpp
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:45:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:01 +0300
commit2d37894b1b037cf24231090eda8589bbb44fb6fc (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/poco/Foundation/src/PipeStream.cpp
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
downloadydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/poco/Foundation/src/PipeStream.cpp')
-rw-r--r--contrib/libs/poco/Foundation/src/PipeStream.cpp254
1 files changed, 127 insertions, 127 deletions
diff --git a/contrib/libs/poco/Foundation/src/PipeStream.cpp b/contrib/libs/poco/Foundation/src/PipeStream.cpp
index 8a6194307e..96fb323581 100644
--- a/contrib/libs/poco/Foundation/src/PipeStream.cpp
+++ b/contrib/libs/poco/Foundation/src/PipeStream.cpp
@@ -1,127 +1,127 @@
-//
-// PipeStream.cpp
-//
-// Library: Foundation
-// Package: Processes
-// Module: PipeStream
-//
-// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
-// and Contributors.
-//
-// SPDX-License-Identifier: BSL-1.0
-//
-
-
-#include "Poco/PipeStream.h"
-
-
-namespace Poco {
-
-
-//
-// PipeStreamBuf
-//
-
-
-PipeStreamBuf::PipeStreamBuf(const Pipe& pipe, openmode mode):
- BufferedStreamBuf(STREAM_BUFFER_SIZE, mode),
- _pipe(pipe)
-{
-}
-
-
-PipeStreamBuf::~PipeStreamBuf()
-{
-}
-
-
-int PipeStreamBuf::readFromDevice(char* buffer, std::streamsize length)
-{
- return _pipe.readBytes(buffer, (int) length);
-}
-
-
-int PipeStreamBuf::writeToDevice(const char* buffer, std::streamsize length)
-{
- return _pipe.writeBytes(buffer, (int) length);
-}
-
-
-void PipeStreamBuf::close()
-{
- _pipe.close(Pipe::CLOSE_BOTH);
-}
-
-
-//
-// PipeIOS
-//
-
-
-PipeIOS::PipeIOS(const Pipe& pipe, openmode mode):
- _buf(pipe, mode)
-{
- poco_ios_init(&_buf);
-}
-
-
-PipeIOS::~PipeIOS()
-{
- try
- {
- _buf.sync();
- }
- catch (...)
- {
- }
-}
-
-
-PipeStreamBuf* PipeIOS::rdbuf()
-{
- return &_buf;
-}
-
-
-void PipeIOS::close()
-{
- _buf.sync();
- _buf.close();
-}
-
-
-//
-// PipeOutputStream
-//
-
-
-PipeOutputStream::PipeOutputStream(const Pipe& pipe):
- PipeIOS(pipe, std::ios::out),
- std::ostream(&_buf)
-{
-}
-
-
-PipeOutputStream::~PipeOutputStream()
-{
-}
-
-
-//
-// PipeInputStream
-//
-
-
-PipeInputStream::PipeInputStream(const Pipe& pipe):
- PipeIOS(pipe, std::ios::in),
- std::istream(&_buf)
-{
-}
-
-
-PipeInputStream::~PipeInputStream()
-{
-}
-
-
-} // namespace Poco
+//
+// PipeStream.cpp
+//
+// Library: Foundation
+// Package: Processes
+// Module: PipeStream
+//
+// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// SPDX-License-Identifier: BSL-1.0
+//
+
+
+#include "Poco/PipeStream.h"
+
+
+namespace Poco {
+
+
+//
+// PipeStreamBuf
+//
+
+
+PipeStreamBuf::PipeStreamBuf(const Pipe& pipe, openmode mode):
+ BufferedStreamBuf(STREAM_BUFFER_SIZE, mode),
+ _pipe(pipe)
+{
+}
+
+
+PipeStreamBuf::~PipeStreamBuf()
+{
+}
+
+
+int PipeStreamBuf::readFromDevice(char* buffer, std::streamsize length)
+{
+ return _pipe.readBytes(buffer, (int) length);
+}
+
+
+int PipeStreamBuf::writeToDevice(const char* buffer, std::streamsize length)
+{
+ return _pipe.writeBytes(buffer, (int) length);
+}
+
+
+void PipeStreamBuf::close()
+{
+ _pipe.close(Pipe::CLOSE_BOTH);
+}
+
+
+//
+// PipeIOS
+//
+
+
+PipeIOS::PipeIOS(const Pipe& pipe, openmode mode):
+ _buf(pipe, mode)
+{
+ poco_ios_init(&_buf);
+}
+
+
+PipeIOS::~PipeIOS()
+{
+ try
+ {
+ _buf.sync();
+ }
+ catch (...)
+ {
+ }
+}
+
+
+PipeStreamBuf* PipeIOS::rdbuf()
+{
+ return &_buf;
+}
+
+
+void PipeIOS::close()
+{
+ _buf.sync();
+ _buf.close();
+}
+
+
+//
+// PipeOutputStream
+//
+
+
+PipeOutputStream::PipeOutputStream(const Pipe& pipe):
+ PipeIOS(pipe, std::ios::out),
+ std::ostream(&_buf)
+{
+}
+
+
+PipeOutputStream::~PipeOutputStream()
+{
+}
+
+
+//
+// PipeInputStream
+//
+
+
+PipeInputStream::PipeInputStream(const Pipe& pipe):
+ PipeIOS(pipe, std::ios::in),
+ std::istream(&_buf)
+{
+}
+
+
+PipeInputStream::~PipeInputStream()
+{
+}
+
+
+} // namespace Poco