1/* 2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7#include "VariableValueNodeChild.h" 8 9#include "Variable.h" 10#include "ValueLocation.h" 11 12 13VariableValueNodeChild::VariableValueNodeChild(Variable* variable) 14 : 15 fVariable(variable) 16{ 17 fVariable->AcquireReference(); 18 SetLocation(fVariable->Location(), B_OK); 19} 20 21 22VariableValueNodeChild::~VariableValueNodeChild() 23{ 24 fVariable->ReleaseReference(); 25} 26 27 28const BString& 29VariableValueNodeChild::Name() const 30{ 31 return fVariable->Name(); 32} 33 34 35Type* 36VariableValueNodeChild::GetType() const 37{ 38 return fVariable->GetType(); 39} 40 41 42ValueNode* 43VariableValueNodeChild::Parent() const 44{ 45 return NULL; 46} 47 48 49status_t 50VariableValueNodeChild::ResolveLocation(ValueLoader* valueLoader, 51 ValueLocation*& _location) 52{ 53 _location = fVariable->Location(); 54 _location->AcquireReference(); 55 return B_OK; 56} 57