]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/llvm/tools/lldb/include/lldb/Core/StreamString.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / llvm / tools / lldb / include / lldb / Core / StreamString.h
1 //===-- StreamString.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_StreamString_h_
11 #define liblldb_StreamString_h_
12
13 #include <string>
14
15 #include "lldb/Core/Stream.h"
16
17 namespace lldb_private {
18
19 class StreamString : public Stream
20 {
21 public:
22     StreamString ();
23
24     StreamString (uint32_t flags,
25                   uint32_t addr_size,
26                   lldb::ByteOrder byte_order);
27
28     virtual
29     ~StreamString ();
30
31     virtual void
32     Flush ();
33
34     virtual size_t
35     Write (const void *s, size_t length);
36
37     void
38     Clear();
39
40     bool
41     Empty() const;
42
43     const char *
44     GetData () const;
45
46     size_t
47     GetSize() const;
48
49     std::string &
50     GetString();
51
52     const std::string &
53     GetString() const;
54
55     void
56     FillLastLineToColumn (uint32_t column, char fill_char);
57
58 protected:
59     std::string m_packet;
60
61 };
62
63 } // namespace lldb_private
64 #endif  // #ifndef liblldb_StreamString_h_