ValueObjectVariable.h revision 931acecd4e3af534028936431dc0f75a9fd6eb02
1//===-- ValueObjectVariable.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_ValueObjectVariable_h_ 11#define liblldb_ValueObjectVariable_h_ 12 13// C Includes 14// C++ Includes 15// Other libraries and framework includes 16// Project includes 17#include "lldb/Core/ValueObject.h" 18 19namespace lldb_private { 20 21//---------------------------------------------------------------------- 22// A ValueObject that contains a root variable that may or may not 23// have children. 24//---------------------------------------------------------------------- 25class ValueObjectVariable : public ValueObject 26{ 27public: 28 static lldb::ValueObjectSP 29 Create (ExecutionContextScope *exe_scope, const lldb::VariableSP &var_sp); 30 31 virtual 32 ~ValueObjectVariable(); 33 34 virtual size_t 35 GetByteSize(); 36 37 virtual ConstString 38 GetTypeName(); 39 40 virtual uint32_t 41 CalculateNumChildren(); 42 43 virtual lldb::ValueType 44 GetValueType() const; 45 46 virtual bool 47 IsInScope (); 48 49 virtual Module* 50 GetModule(); 51 52 virtual SymbolContextScope * 53 GetSymbolContextScope(); 54 55 virtual bool 56 GetDeclaration (Declaration &decl); 57 58protected: 59 virtual bool 60 UpdateValue (); 61 62 virtual clang::ASTContext * 63 GetClangASTImpl (); 64 65 virtual lldb::clang_type_t 66 GetClangTypeImpl (); 67 68 lldb::VariableSP m_variable_sp; ///< The variable that this value object is based upon 69 70private: 71 ValueObjectVariable (ExecutionContextScope *exe_scope, const lldb::VariableSP &var_sp); 72 //------------------------------------------------------------------ 73 // For ValueObject only 74 //------------------------------------------------------------------ 75 DISALLOW_COPY_AND_ASSIGN (ValueObjectVariable); 76}; 77 78} // namespace lldb_private 79 80#endif // liblldb_ValueObjectVariable_h_ 81