ValueObjectVariable.h revision b01000fd063629facd45044f137446fb748ee179
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 (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 void
52    UpdateValue (ExecutionContextScope *exe_scope);
53
54    virtual bool
55    IsInScope (StackFrame *frame);
56
57protected:
58
59    lldb::VariableSP  m_variable_sp;  ///< The variable that this value object is based upon
60
61private:
62    //------------------------------------------------------------------
63    // For ValueObject only
64    //------------------------------------------------------------------
65    DISALLOW_COPY_AND_ASSIGN (ValueObjectVariable);
66};
67
68} // namespace lldb_private
69
70#endif  // liblldb_ValueObjectVariable_h_
71