ClangPersistentVariables.h revision 427f290ff96f3ab9f2cf3a1af7001d2c560424c7
1//===-- ClangPersistentVariables.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 liblldb_ClangPersistentVariables_h_ 11#define liblldb_ClangPersistentVariables_h_ 12 13#include "lldb/Expression/ClangExpressionVariable.h" 14 15namespace lldb_private 16{ 17 18//---------------------------------------------------------------------- 19/// @class ClangPersistentVariables ClangPersistentVariables.h "lldb/Expression/ClangPersistentVariables.h" 20/// @brief Manages persistent values that need to be preserved between expression invocations. 21/// 22/// A list of variables that can be accessed and updated by any expression. See 23/// ClangPersistentVariable for more discussion. Also provides an increasing, 24/// 0-based counter for naming result variables. 25//---------------------------------------------------------------------- 26class ClangPersistentVariables : public ClangExpressionVariableList 27{ 28public: 29 30 //---------------------------------------------------------------------- 31 /// Constructor 32 //---------------------------------------------------------------------- 33 ClangPersistentVariables (); 34 35 lldb::ClangExpressionVariableSP 36 CreatePersistentVariable (const lldb::ValueObjectSP &valobj_sp); 37 38 lldb::ClangExpressionVariableSP 39 CreatePersistentVariable (const ConstString &name, 40 const TypeFromUser& user_type, 41 lldb::ByteOrder byte_order, 42 uint32_t addr_byte_size); 43 44 //---------------------------------------------------------------------- 45 /// Return the next entry in the sequence of strings "$0", "$1", ... for 46 /// use naming persistent expression convenience variables. 47 /// 48 /// @return 49 /// A string that contains the next persistent variable name. 50 //---------------------------------------------------------------------- 51 ConstString 52 GetNextPersistentVariableName (); 53 54private: 55 uint32_t m_next_persistent_variable_id; ///< The counter used by GetNextResultName(). 56}; 57 58} 59 60#endif 61