3rdParty/boost/1.78.0/libs/iostreams/doc/functions/tee.html
teeThe class templates tee_filter and tee_device provide two ways to split an output sequence so that all data is directed simultaneously to two different locations. A tee_filter is an OutputFilter which copies all data to a Sink specified at construction in addition to passing it downstream unmodified. A tee_device is a Sink which copies all data to two Sinks specified at construction.
The overloaded function template tee is an object generator which given a Sink or a pair of Sinks returns an appropriate specialization of tee_filter or tee_device.
namespaceboost {namespaceiostreams {template<typename[Sink](#tee_filter_template_params)>class[tee\_filter](#tee_filter){public:typedeftypenamechar_type_of<Sink>::type char_type;typedef[implementation-defined]category;explicit[tee\_filter](#tee_filter_ctor)([const] Sink& snk);// OutputFilter member functions};template<typename[Sink1](#tee_device_template_params),typename[Sink2](#tee_device_template_params)>class[tee\_device](#tee_device){public:typedeftypenamechar_type_of<Sink1>::type char_type;typedef[implementation-defined]category;[tee\_device](#tee_device_ctor)([const]const& sink1, [const] Sink2& sink2);// Sink member functions};template<typename[Sink](#tee_unary_template_params)>[tee\_filter](#tee_filter)<Sink>[tee](#tee_unary)([const] Sink& snk);template<typename[Sink1](#tee_binary_template_params),typename[Sink2](#tee_binary_template_params)>[tee\_device](#tee_device)<Sink1, Sink2>[tee](#tee_binary)([const] Sink1& sink1, [const] Sink2& sink2);
} } // End namespace boost::io
tee_filterAn OutputFilter which copies all data which passes through it to a Sink specified at construction. A tee_filter is Closable, Flushable, Localizable and OptimallyBuffered.
| | | | Sink | - | A Blocking Sink |
tee_filter::tee_filterexplicittee_filter([const] Sink& sink);
Constructs an instance of tee_filter based on the given Sink. The function parameter is a non-const reference if Sink is a stream or stream buffer type, and a const reference otherwise.
tee_deviceA Sink which copies all data to each of two Sinks specified at construction. A tee_device is Closable, Flushable, Localizable and OptimallyBuffered.
| | | | Sink1 | - | A Blocking Sink | | Sink2 | - | A Blocking Sink with the same character type as Sink1 |
tee_device::tee_devicetee_device([const]const& sink1, [const] Sink2& sink2);
Constructs an instance of tee_device based on the given pair of Sinks. Each function parameter is a non-const reference if the corresponding template argument is a stream or stream buffer type, and a const reference otherwise.
teetemplate<typenameSink>
tee_filter<Sink> tee([const] Sink& snk);
| | | | Sink | - | A Blocking Sink |
Constructs an instance of an appropriate specialization of tee_filter based on the given Sink. The function parameter is a non-const reference if Sink is a stream or stream buffer type, and a const reference otherwise.
template<typenameSink1,typenameSink2>
tee_device<Sink1, Sink2> tee([const] Sink1& sink1, [const] Sink2& sink2);
| | | | Sink1 | - | A Blocking Sink | | Sink2 | - | A Blocking Sink |
Constructs an instance of an appropriate specialization of tee_device based on the given pair of Sinks. Each function parameter is a non-const reference if the corresponding template argument is a stream or stream buffer type, and a const reference otherwise.
© Copyright 2008 CodeRage, LLC
© Copyright 2004-2007 Jonathan Turkanis
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)