1/* 2 * Copyright 2015, Rene Gollent, rene@gollent.com. 3 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 4 * Distributed under the terms of the MIT License. 5 */ 6#ifndef ADDRESS_VALUE_NODE_H 7#define ADDRESS_VALUE_NODE_H 8 9 10#include "ValueNode.h" 11 12 13class AddressValueNodeChild; 14class AddressType; 15 16 17class AddressValueNode : public ValueNode { 18public: 19 AddressValueNode(ValueNodeChild* nodeChild, 20 AddressType* type); 21 virtual ~AddressValueNode(); 22 23 virtual Type* GetType() const; 24 25 virtual status_t ResolvedLocationAndValue( 26 ValueLoader* valueLoader, 27 ValueLocation*& _location, 28 Value*& _value); 29 30 // locking required 31 32 virtual status_t CreateChildren(TeamTypeInformation* info); 33 virtual int32 CountChildren() const; 34 virtual ValueNodeChild* ChildAt(int32 index) const; 35 36private: 37 AddressType* fType; 38 AddressValueNodeChild* fChild; 39}; 40 41 42class AddressValueNodeChild : public ValueNodeChild { 43public: 44 AddressValueNodeChild(AddressValueNode* parent, 45 const BString& name, Type* type); 46 virtual ~AddressValueNodeChild(); 47 48 virtual const BString& Name() const; 49 virtual Type* GetType() const; 50 virtual ValueNode* Parent() const; 51 52 virtual status_t ResolveLocation(ValueLoader* valueLoader, 53 ValueLocation*& _location); 54 55private: 56 AddressValueNode* fParent; 57 BString fName; 58 Type* fType; 59}; 60 61 62#endif // ADDRESS_VALUE_NODE_H 63