• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 <string>
14 
15 #include "lldb/Core/Stream.h"
16 #include "lldb/Core/StreamString.h"
17 
18 namespace lldb_private {
19 
20 class StreamAsynchronousIO :
21     public Stream
22 {
23 public:
24     StreamAsynchronousIO (Broadcaster &broadcaster, uint32_t broadcast_event_type);
25 
26     virtual ~StreamAsynchronousIO ();
27 
28     virtual void
29     Flush ();
30 
31     virtual size_t
32     Write (const void *src, size_t src_len);
33 
34 
35 private:
36     Broadcaster &m_broadcaster;
37     uint32_t m_broadcast_event_type;
38     StreamString m_accumulated_data;
39 };
40 
41 } // namespace lldb_private
42 #endif // #ifndef liblldb_StreamAsynchronousIO_h
43