xref: /trueos/contrib/llvm/tools/lldb/include/lldb/API/SBTypeFormat.h (revision fa88ea9f26d1e5430901a9ca6c47daebcc5af5de)
1 //===-- SBTypeFormat.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 LLDB_SBTypeFormat_h_
11 #define LLDB_SBTypeFormat_h_
12 
13 #include "lldb/API/SBDefines.h"
14 
15 namespace lldb {
16 
17 class SBTypeFormat
18 {
19 public:
20 
21     SBTypeFormat();
22 
23     SBTypeFormat (lldb::Format format,
24                   uint32_t options = 0); // see lldb::eTypeOption values
25 
26     SBTypeFormat (const char* type,
27                   uint32_t options = 0); // see lldb::eTypeOption values
28 
29     SBTypeFormat (const lldb::SBTypeFormat &rhs);
30 
31     ~SBTypeFormat ();
32 
33     bool
34     IsValid() const;
35 
36     lldb::Format
37     GetFormat ();
38 
39     const char*
40     GetTypeName ();
41 
42     uint32_t
43     GetOptions();
44 
45     void
46     SetFormat (lldb::Format);
47 
48     void
49     SetTypeName (const char*);
50 
51     void
52     SetOptions (uint32_t);
53 
54     bool
55     GetDescription (lldb::SBStream &description,
56                     lldb::DescriptionLevel description_level);
57 
58     lldb::SBTypeFormat &
59     operator = (const lldb::SBTypeFormat &rhs);
60 
61     bool
62     IsEqualTo (lldb::SBTypeFormat &rhs);
63 
64     bool
65     operator == (lldb::SBTypeFormat &rhs);
66 
67     bool
68     operator != (lldb::SBTypeFormat &rhs);
69 
70 protected:
71     friend class SBDebugger;
72     friend class SBTypeCategory;
73     friend class SBValue;
74 
75     lldb::TypeFormatImplSP
76     GetSP ();
77 
78     void
79     SetSP (const lldb::TypeFormatImplSP &typeformat_impl_sp);
80 
81     lldb::TypeFormatImplSP m_opaque_sp;
82 
83     SBTypeFormat (const lldb::TypeFormatImplSP &);
84 
85     enum class Type
86     {
87         eTypeKeepSame,
88         eTypeFormat,
89         eTypeEnum
90     };
91 
92     bool
93     CopyOnWrite_Impl(Type);
94 
95 };
96 
97 
98 } // namespace lldb
99 
100 #endif // LLDB_SBTypeFormat_h_
101