]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Core/StreamAsynchronousIO.h
Merge lldb trunk r366426, resolve conflicts, and update FREEBSD-Xlist.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Core / StreamAsynchronousIO.h
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
18 namespace lldb_private {
19 class Debugger;
20
21 class StreamAsynchronousIO : public Stream {
22 public:
23   StreamAsynchronousIO(Debugger &debugger, bool for_stdout);
24
25   ~StreamAsynchronousIO() override;
26
27   void Flush() override;
28
29 protected:
30   size_t WriteImpl(const void *src, size_t src_len) override;
31
32 private:
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