SBExpressionOptions.h revision 47beabb1386be44e3f90dbc30a0b22c23b93a4dc
1//===-- SBEvent.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_SBExpressionOptions_h_ 11#define LLDB_SBExpressionOptions_h_ 12 13#include "lldb/API/SBDefines.h" 14 15#include <memory> 16#include <vector> 17 18namespace lldb { 19 20 21class SBExpressionOptions 22{ 23friend class SBFrame; 24friend class SBValue; 25 26public: 27 SBExpressionOptions(); 28 29 SBExpressionOptions (const lldb::SBExpressionOptions &rhs); 30 31 SBExpressionOptions (bool coerce_to_id, 32 bool unwind_on_error, 33 bool keep_in_memory, 34 bool run_others, 35 DynamicValueType use_dynamic, 36 uint32_t timeout_usec); 37 38 ~SBExpressionOptions(); 39 40 const SBExpressionOptions & 41 operator = (const lldb::SBExpressionOptions &rhs); 42 43 bool 44 DoesCoerceToId () const; 45 46 void 47 SetCoerceToId (bool coerce = true); 48 49 bool 50 DoesUnwindOnError () const; 51 52 void 53 SetUnwindOnError (bool unwind = false); 54 55 bool 56 DoesKeepInMemory () const; 57 58 void 59 SetKeepInMemory (bool keep = true); 60 61 lldb::DynamicValueType 62 GetUseDynamic () const; 63 64 void 65 SetUseDynamic (lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget); 66 67 uint32_t 68 GetTimeoutUsec () const; 69 70 void 71 SetTimeoutUsec (uint32_t timeout = 0); 72 73 bool 74 GetRunOthers () const; 75 76 void 77 SetRunOthers (bool run_others = true); 78 79protected: 80 81 SBExpressionOptions (lldb_private::EvaluateExpressionOptions &expression_options); 82 83 lldb_private::EvaluateExpressionOptions * 84 get () const; 85 86 lldb_private::EvaluateExpressionOptions & 87 ref () const; 88 89private: 90 // This auto_pointer is made in the constructor and is always valid. 91 mutable std::auto_ptr<lldb_private::EvaluateExpressionOptions> m_opaque_ap; 92}; 93 94} // namespace lldb 95 96#endif // LLDB_SBExpressionOptions_h_ 97