Debugger: Add dedicated functions for global {un}init.
[haiku.git] / src / apps / debugger / value / value_nodes / VariableValueNodeChild.cpp
blob82711de0f50f5167b47b2153a324cd033868994d
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
7 #include "VariableValueNodeChild.h"
9 #include "Variable.h"
10 #include "ValueLocation.h"
13 VariableValueNodeChild::VariableValueNodeChild(Variable* variable)
15 fVariable(variable)
17 fVariable->AcquireReference();
18 SetLocation(fVariable->Location(), B_OK);
22 VariableValueNodeChild::~VariableValueNodeChild()
24 fVariable->ReleaseReference();
28 const BString&
29 VariableValueNodeChild::Name() const
31 return fVariable->Name();
35 Type*
36 VariableValueNodeChild::GetType() const
38 return fVariable->GetType();
42 ValueNode*
43 VariableValueNodeChild::Parent() const
45 return NULL;
49 status_t
50 VariableValueNodeChild::ResolveLocation(ValueLoader* valueLoader,
51 ValueLocation*& _location)
53 _location = fVariable->Location();
54 _location->AcquireReference();
55 return B_OK;