]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/source/API/SBVariablesOptions.cpp
Import mandoc 1.4.1rc2
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / source / API / SBVariablesOptions.cpp
1 //===-- SBVariablesOptions.cpp --------------------------------------*- 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
11 #include "lldb/API/SBVariablesOptions.h"
12
13 using namespace lldb;
14 using namespace lldb_private;
15
16 class VariablesOptionsImpl
17 {
18 public:
19     VariablesOptionsImpl () :
20     m_include_arguments(false),
21     m_include_locals(false),
22     m_include_statics(false),
23     m_in_scope_only(false),
24     m_include_runtime_support_values(false),
25     m_use_dynamic(lldb::eNoDynamicValues)
26     {}
27
28     VariablesOptionsImpl (const VariablesOptionsImpl&) = default;
29     
30     ~VariablesOptionsImpl () = default;
31     
32     VariablesOptionsImpl&
33     operator = (const VariablesOptionsImpl&) = default;
34     
35     bool
36     GetIncludeArguments () const
37     {
38         return m_include_arguments;
39     }
40     
41     void
42     SetIncludeArguments (bool b)
43     {
44         m_include_arguments = b;
45     }
46     
47     bool
48     GetIncludeLocals () const
49     {
50         return m_include_locals;
51     }
52     
53     void
54     SetIncludeLocals (bool b)
55     {
56         m_include_locals = b;
57     }
58     
59     bool
60     GetIncludeStatics () const
61     {
62         return m_include_statics;
63     }
64     
65     void
66     SetIncludeStatics (bool b)
67     {
68         m_include_statics = b;
69     }
70     
71     bool
72     GetInScopeOnly () const
73     {
74         return m_in_scope_only;
75     }
76     
77     void
78     SetInScopeOnly (bool b)
79     {
80         m_in_scope_only = b;
81     }
82     
83     bool
84     GetIncludeRuntimeSupportValues () const
85     {
86         return m_include_runtime_support_values;
87     }
88     
89     void
90     SetIncludeRuntimeSupportValues (bool b)
91     {
92         m_include_runtime_support_values = b;
93     }
94     
95     lldb::DynamicValueType
96     GetUseDynamic () const
97     {
98         return m_use_dynamic;
99     }
100     
101     void
102     SetUseDynamic (lldb::DynamicValueType d)
103     {
104         m_use_dynamic = d;
105     }
106
107     
108 private:
109     bool m_include_arguments : 1;
110     bool m_include_locals : 1;
111     bool m_include_statics : 1;
112     bool m_in_scope_only : 1;
113     bool m_include_runtime_support_values : 1;
114     lldb::DynamicValueType m_use_dynamic;
115 };
116
117 SBVariablesOptions::SBVariablesOptions () :
118 m_opaque_ap(new VariablesOptionsImpl())
119 {
120 }
121
122 SBVariablesOptions::SBVariablesOptions (const SBVariablesOptions& options) :
123 m_opaque_ap(new VariablesOptionsImpl(options.ref()))
124 {
125 }
126
127 SBVariablesOptions&
128 SBVariablesOptions::operator = (const SBVariablesOptions& options)
129 {
130     m_opaque_ap.reset(new VariablesOptionsImpl(options.ref()));
131     return *this;
132 }
133
134 SBVariablesOptions::~SBVariablesOptions () = default;
135
136 bool
137 SBVariablesOptions::IsValid () const
138 {
139     return m_opaque_ap.get() != nullptr;
140 }
141
142 bool
143 SBVariablesOptions::GetIncludeArguments () const
144 {
145     return m_opaque_ap->GetIncludeArguments();
146 }
147
148 void
149 SBVariablesOptions::SetIncludeArguments (bool arguments)
150 {
151     m_opaque_ap->SetIncludeArguments(arguments);
152 }
153
154 bool
155 SBVariablesOptions::GetIncludeLocals () const
156 {
157     return m_opaque_ap->GetIncludeLocals();
158 }
159
160 void
161 SBVariablesOptions::SetIncludeLocals (bool locals)
162 {
163     m_opaque_ap->SetIncludeLocals(locals);
164 }
165
166 bool
167 SBVariablesOptions::GetIncludeStatics () const
168 {
169     return m_opaque_ap->GetIncludeStatics();
170 }
171
172 void
173 SBVariablesOptions::SetIncludeStatics (bool statics)
174 {
175     m_opaque_ap->SetIncludeStatics(statics);
176 }
177
178 bool
179 SBVariablesOptions::GetInScopeOnly () const
180 {
181     return m_opaque_ap->GetInScopeOnly();
182 }
183
184 void
185 SBVariablesOptions::SetInScopeOnly (bool in_scope_only)
186 {
187     m_opaque_ap->SetInScopeOnly(in_scope_only);
188 }
189
190 bool
191 SBVariablesOptions::GetIncludeRuntimeSupportValues () const
192 {
193     return m_opaque_ap->GetIncludeRuntimeSupportValues();
194 }
195
196 void
197 SBVariablesOptions::SetIncludeRuntimeSupportValues (bool runtime_support_values)
198 {
199     m_opaque_ap->SetIncludeRuntimeSupportValues(runtime_support_values);
200 }
201
202 lldb::DynamicValueType
203 SBVariablesOptions::GetUseDynamic () const
204 {
205     return m_opaque_ap->GetUseDynamic();
206 }
207
208 void
209 SBVariablesOptions::SetUseDynamic (lldb::DynamicValueType dynamic)
210 {
211     m_opaque_ap->SetUseDynamic(dynamic);
212 }
213
214 VariablesOptionsImpl *
215 SBVariablesOptions::operator->()
216 {
217     return m_opaque_ap.operator->();
218 }
219
220 const VariablesOptionsImpl *
221 SBVariablesOptions::operator->() const
222 {
223     return m_opaque_ap.operator->();
224 }
225
226 VariablesOptionsImpl *
227 SBVariablesOptions::get ()
228 {
229     return m_opaque_ap.get();
230 }
231
232 VariablesOptionsImpl &
233 SBVariablesOptions::ref()
234 {
235     return *m_opaque_ap;
236 }
237
238 const VariablesOptionsImpl &
239 SBVariablesOptions::ref() const
240 {
241     return *m_opaque_ap;
242 }
243
244 SBVariablesOptions::SBVariablesOptions (VariablesOptionsImpl *lldb_object_ptr) :
245 m_opaque_ap(std::move(lldb_object_ptr))
246 {
247 }
248
249 void
250 SBVariablesOptions::SetOptions (VariablesOptionsImpl *lldb_object_ptr)
251 {
252     m_opaque_ap.reset(std::move(lldb_object_ptr));
253 }
254