9#ifndef LLDB_UTILITY_STREAMTEE_H
10#define LLDB_UTILITY_STREAMTEE_H
61 collection::iterator pos, end;
111 size_t WriteImpl(
const void *s,
size_t length)
override {
116 size_t min_bytes_written = SIZE_MAX;
117 collection::iterator pos, end;
122 Stream *strm = pos->get();
124 const size_t bytes_written = strm->
Write(s, length);
125 if (min_bytes_written > bytes_written)
126 min_bytes_written = bytes_written;
129 if (min_bytes_written == SIZE_MAX)
131 return min_bytes_written;
size_t GetNumStreams() const
~StreamTee() override=default
void SetStreamAtIndex(uint32_t idx, const lldb::StreamSP &stream_sp)
std::recursive_mutex m_streams_mutex
StreamTee & operator=(const StreamTee &rhs)
lldb::StreamSP GetStreamAtIndex(uint32_t idx)
StreamTee(lldb::StreamSP &stream_sp, lldb::StreamSP &stream_2_sp)
size_t AppendStream(const lldb::StreamSP &stream_sp)
StreamTee(bool colors=false)
std::vector< lldb::StreamSP > collection
StreamTee(const StreamTee &rhs)
size_t WriteImpl(const void *s, size_t length) override
Output character bytes to the stream.
void Flush() override
Flush the stream.
StreamTee(lldb::StreamSP &stream_sp)
A stream class that can stream formatted output to a file.
size_t Write(const void *src, size_t src_len)
Output character bytes to the stream.
Stream & operator=(const Stream &rhs)
virtual void Flush()=0
Flush the stream.
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Stream > StreamSP