1//===-- StreamAsynchronousIO.h -----------------------------------*- C++-*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9#ifndef liblldb_StreamAsynchronousIO_h_ 10#define liblldb_StreamAsynchronousIO_h_ 11 12#include "lldb/Utility/Stream.h" 13 14#include <string> 15 16#include <stddef.h> 17 18namespace lldb_private { 19class Debugger; 20 21class StreamAsynchronousIO : public Stream { 22public: 23 StreamAsynchronousIO(Debugger &debugger, bool for_stdout); 24 25 ~StreamAsynchronousIO() override; 26 27 void Flush() override; 28 29protected: 30 size_t WriteImpl(const void *src, size_t src_len) override; 31 32private: 33 Debugger &m_debugger; 34 std::string m_data; 35 bool m_for_stdout; 36}; 37 38} // namespace lldb_private 39 40#endif // liblldb_StreamAsynchronousIO_h 41