ValueObjectVariable.h revision fa3a16a2ea380ef38388ebe323817bd1b32c20cd
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    ValueObjectVariable (ExecutionContextScope *exe_scope, const lldb::VariableSP &var_sp);
29
30    virtual
31    ~ValueObjectVariable();
32
33    virtual size_t
34    GetByteSize();
35
36    virtual clang::ASTContext *
37    GetClangAST ();
38
39    virtual lldb::clang_type_t
40    GetClangType ();
41
42    virtual ConstString
43    GetTypeName();
44
45    virtual uint32_t
46    CalculateNumChildren();
47
48    virtual lldb::ValueType
49    GetValueType() const;
50
51    virtual bool
52    IsInScope ();
53
54protected:
55    virtual bool
56    UpdateValue ();
57
58    lldb::VariableSP  m_variable_sp;  ///< The variable that this value object is based upon
59
60private:
61    //------------------------------------------------------------------
62    // For ValueObject only
63    //------------------------------------------------------------------
64    DISALLOW_COPY_AND_ASSIGN (ValueObjectVariable);
65};
66
67} // namespace lldb_private
68
69#endif  // liblldb_ValueObjectVariable_h_
70