1 //===-- StreamAsynchronousIO.h -----------------------------------*- C++-*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef liblldb_StreamAsynchronousIO_h_ 11 #define liblldb_StreamAsynchronousIO_h_ 12 13 #include "lldb/Utility/Stream.h" 14 15 #include <string> 16 17 #include <stddef.h> 18 19 namespace lldb_private { 20 class Debugger; 21 } 22 23 namespace lldb_private { 24 25 class StreamAsynchronousIO : public Stream { 26 public: 27 StreamAsynchronousIO(Debugger &debugger, bool for_stdout); 28 29 ~StreamAsynchronousIO() override; 30 31 void Flush() override; 32 33 protected: 34 size_t WriteImpl(const void *src, size_t src_len) override; 35 36 private: 37 Debugger &m_debugger; 38 std::string m_data; 39 bool m_for_stdout; 40 }; 41 42 } // namespace lldb_private 43 44 #endif // liblldb_StreamAsynchronousIO_h 45