ValueObjectVariable.h revision fe6dc6e241c52822710380cec0931351a1d7b2d3
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 uint64_t
35    GetByteSize();
36
37    virtual ConstString
38    GetTypeName();
39
40    virtual ConstString
41    GetQualifiedTypeName();
42
43    virtual size_t
44    CalculateNumChildren();
45
46    virtual lldb::ValueType
47    GetValueType() const;
48
49    virtual bool
50    IsInScope ();
51
52    virtual lldb::ModuleSP
53    GetModule();
54
55    virtual SymbolContextScope *
56    GetSymbolContextScope();
57
58    virtual bool
59    GetDeclaration (Declaration &decl);
60
61protected:
62    virtual bool
63    UpdateValue ();
64
65    virtual clang::ASTContext *
66    GetClangASTImpl ();
67
68    virtual lldb::clang_type_t
69    GetClangTypeImpl ();
70
71    lldb::VariableSP  m_variable_sp;  ///< The variable that this value object is based upon
72
73private:
74    ValueObjectVariable (ExecutionContextScope *exe_scope, const lldb::VariableSP &var_sp);
75    //------------------------------------------------------------------
76    // For ValueObject only
77    //------------------------------------------------------------------
78    DISALLOW_COPY_AND_ASSIGN (ValueObjectVariable);
79};
80
81} // namespace lldb_private
82
83#endif  // liblldb_ValueObjectVariable_h_
84