1//===-- SWIG interface for SBExpressionOptions -----------------------------------------------*- 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
10namespace lldb {
11
12%feature("docstring",
13"A container for options to use when evaluating expressions."
14) SBExpressionOptions;
15
16class SBExpressionOptions
17{
18friend class SBFrame;
19friend class SBValue;
20
21public:
22    SBExpressionOptions();
23
24    SBExpressionOptions (const lldb::SBExpressionOptions &rhs);
25
26    ~SBExpressionOptions();
27
28    bool
29    GetCoerceResultToId () const;
30
31    %feature("docstring", "Sets whether to coerce the expression result to ObjC id type after evaluation.") SetCoerceResultToId;
32
33    void
34    SetCoerceResultToId (bool coerce = true);
35
36    bool
37    GetUnwindOnError () const;
38
39    %feature("docstring", "Sets whether to unwind the expression stack on error.") SetUnwindOnError;
40
41    void
42    SetUnwindOnError (bool unwind = true);
43
44    bool
45    GetIgnoreBreakpoints () const;
46
47    %feature("docstring", "Sets whether to ignore breakpoint hits while running expressions.") SetUnwindOnError;
48
49    void
50    SetIgnoreBreakpoints (bool ignore = true);
51
52    lldb::DynamicValueType
53    GetFetchDynamicValue () const;
54
55    %feature("docstring", "Sets whether to cast the expression result to its dynamic type.") SetFetchDynamicValue;
56
57    void
58    SetFetchDynamicValue (lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget);
59
60    uint32_t
61    GetTimeoutInMicroSeconds () const;
62
63    %feature("docstring", "Sets the timeout in microseconds to run the expression for. If try all threads is set to true and the expression doesn't complete within the specified timeout, all threads will be resumed for the same timeout to see if the expresson will finish.") SetTimeoutInMicroSeconds;
64    void
65    SetTimeoutInMicroSeconds (uint32_t timeout = 0);
66
67    bool
68    GetTryAllThreads () const;
69
70    %feature("docstring", "Sets whether to run all threads if the expression does not complete on one thread.") SetTryAllThreads;
71    void
72    SetTryAllThreads (bool run_others = true);
73
74protected:
75
76    SBExpressionOptions (lldb_private::EvaluateExpressionOptions &expression_options);
77
78    lldb_private::EvaluateExpressionOptions *
79    get () const;
80
81    lldb_private::EvaluateExpressionOptions &
82    ref () const;
83
84private:
85    // This auto_pointer is made in the constructor and is always valid.
86    mutable std::unique_ptr<lldb_private::EvaluateExpressionOptions> m_opaque_ap;
87};
88
89} // namespace lldb
90