Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
SplitterOutputStream.h
Go to the documentation of this file.
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4#ifndef _Stroika_Foundation_Streams_SplitterOutputStream_h_
5#define _Stroika_Foundation_Streams_SplitterOutputStream_h_ 1
6
7#include "Stroika/Foundation/StroikaPreComp.h"
8
10
11/**
12 * \file
13 *
14 * \note Code-Status: <a href="Code-Status.md#Beta">Beta</a>
15 *
16 */
17
18namespace Stroika::Foundation::Streams::SplitterOutputStream {
19
20 using OutputStream::Ptr;
21
22 /**
23 * A SplitterOutputStream wraps 2 output Streams,and duplicates all writes across the two.
24 *
25 * This can can be used easily to produce logging for the communications along a stream.
26 *
27 * \note \em Thread-Safety <a href="Thread-Safety.md#C++-Standard-Thread-Safety-For-Envelope-Plus-Must-Externally-Synchronize-Letter">C++-Standard-Thread-Safety-For-Envelope-Plus-Must-Externally-Synchronize-Letter</a>
28 *
29 * \par Example Usage
30 * \code
31 * \endcode
32 */
33 template <typename ELEMENT_TYPE>
34 Ptr<ELEMENT_TYPE> New (const typename OutputStream::Ptr<ELEMENT_TYPE>& realOut1, const typename OutputStream::Ptr<ELEMENT_TYPE>& realOut2);
35 template <typename ELEMENT_TYPE>
36 Ptr<ELEMENT_TYPE> New (Execution::InternallySynchronized internallySynchronized, const typename OutputStream::Ptr<ELEMENT_TYPE>& realOut1,
37 const typename OutputStream::Ptr<ELEMENT_TYPE>& realOut2);
38
39}
40
41/*
42 ********************************************************************************
43 ***************************** Implementation Details ***************************
44 ********************************************************************************
45 */
46#include "SplitterOutputStream.inl"
47
48#endif /*_Stroika_Foundation_Streams_SplitterOutputStream_h_*/