]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Core/StreamAsynchronousIO.h
Merge ^/head r317971 through r318379.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Core / StreamAsynchronousIO.h
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> // for size_t
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   size_t Write(const void *src, size_t src_len) override;
34
35 private:
36   Debugger &m_debugger;
37   std::string m_data;
38   bool m_for_stdout;
39 };
40
41 } // namespace lldb_private
42
43 #endif // liblldb_StreamAsynchronousIO_h