Jim Ingham | 47beabb | 2012-10-16 21:41:58 +0000 | [diff] [blame^] | 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 | |
| 10 | namespace lldb { |
| 11 | |
| 12 | %feature("docstring", |
| 13 | "A container for options to use when evaluating expressions." |
| 14 | ) SBExpressionOptions; |
| 15 | |
| 16 | class SBExpressionOptions |
| 17 | { |
| 18 | friend class SBFrame; |
| 19 | friend class SBValue; |
| 20 | |
| 21 | public: |
| 22 | SBExpressionOptions(); |
| 23 | |
| 24 | SBExpressionOptions (const lldb::SBExpressionOptions &rhs); |
| 25 | |
| 26 | SBExpressionOptions (bool coerce_to_id, |
| 27 | bool unwind_on_error, |
| 28 | bool keep_in_memory, |
| 29 | bool run_others, |
| 30 | DynamicValueType use_dynamic, |
| 31 | uint32_t timeout_usec); |
| 32 | |
| 33 | ~SBExpressionOptions(); |
| 34 | |
| 35 | bool |
| 36 | DoesCoerceToId () const; |
| 37 | |
| 38 | %feature("docstring", |
| 39 | "Sets whether to coerce the expression result to ObjC id type after evaluation." |
| 40 | ) SetCoerceToId; |
| 41 | void |
| 42 | SetCoerceToId (bool coerce = true); |
| 43 | |
| 44 | bool |
| 45 | DoesUnwindOnError () const; |
| 46 | |
| 47 | %feature("docstring", |
| 48 | "Sets whether to unwind the expression stack on error." |
| 49 | ) SetUnwindOnError; |
| 50 | void |
| 51 | SetUnwindOnError (bool unwind = false); |
| 52 | |
| 53 | bool |
| 54 | DoesKeepInMemory () const; |
| 55 | |
| 56 | %feature("docstring", |
| 57 | "Sets whether to keep the expression result in the target program's memory - forced to true when creating SBValues." |
| 58 | ) SetKeepInMemory; |
| 59 | void |
| 60 | SetKeepInMemory (bool keep = true); |
| 61 | |
| 62 | lldb::DynamicValueType |
| 63 | GetUseDynamic () const; |
| 64 | |
| 65 | %feature("docstring", |
| 66 | "Sets whether to cast the expression result to its dynamic type." |
| 67 | ) SetUseDynamic; |
| 68 | void |
| 69 | SetUseDynamic (lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget); |
| 70 | |
| 71 | uint32_t |
| 72 | GetTimeoutUsec () const; |
| 73 | |
| 74 | %feature("docstring", |
| 75 | "Sets the duration we will wait before cancelling expression evaluation. 0 means wait forever." |
| 76 | ) SetTimeoutUsec; |
| 77 | void |
| 78 | SetTimeoutUsec (uint32_t timeout = 0); |
| 79 | |
| 80 | bool |
| 81 | GetRunOthers () const; |
| 82 | |
| 83 | %feature("docstring", |
| 84 | "Sets whether to run all threads if the expression does not complete on one thread." |
| 85 | ) SetRunOthers; |
| 86 | void |
| 87 | SetRunOthers (bool run_others = true); |
| 88 | |
| 89 | protected: |
| 90 | |
| 91 | SBExpressionOptions (lldb_private::EvaluateExpressionOptions &expression_options); |
| 92 | |
| 93 | lldb_private::EvaluateExpressionOptions * |
| 94 | get () const; |
| 95 | |
| 96 | lldb_private::EvaluateExpressionOptions & |
| 97 | ref () const; |
| 98 | |
| 99 | private: |
| 100 | // This auto_pointer is made in the constructor and is always valid. |
| 101 | mutable std::auto_ptr<lldb_private::EvaluateExpressionOptions> m_opaque_ap; |
| 102 | }; |
| 103 | |
| 104 | } // namespace lldb |