Debugger: Split into core library and application.
[haiku.git] / src / kits / debugger / value / value_nodes / ExpressionValueNode.cpp
blob899cba17f7d452309d9e854884b07f97498451e8
1 /*
2 * Copyright 2014, Rene Gollent, rene@gollent.com
3 * Distributed under the terms of the MIT License.
4 */
7 #include "ExpressionValueNode.h"
9 #include <new>
11 #include "Type.h"
14 // #pragma mark - ExpressionValueNode
17 ExpressionValueNode::ExpressionValueNode(ExpressionValueNodeChild* nodeChild,
18 Type* type)
20 ChildlessValueNode(nodeChild),
21 fType(type)
23 fType->AcquireReference();
27 ExpressionValueNode::~ExpressionValueNode()
29 fType->ReleaseReference();
33 Type*
34 ExpressionValueNode::GetType() const
36 return fType;
40 status_t
41 ExpressionValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader,
42 ValueLocation*& _location, Value*& _value)
44 return B_NOT_SUPPORTED;
48 // #pragma mark - ExpressionValueNodeChild
51 ExpressionValueNodeChild::ExpressionValueNodeChild(const BString& expression,
52 Type* resultType)
54 fExpression(expression),
55 fResultType(resultType)
57 fResultType->AcquireReference();
61 ExpressionValueNodeChild::~ExpressionValueNodeChild()
63 fResultType->ReleaseReference();
67 const BString&
68 ExpressionValueNodeChild::Name() const
70 return fExpression;
74 Type*
75 ExpressionValueNodeChild::GetType() const
77 return fResultType;
81 ValueNode*
82 ExpressionValueNodeChild::Parent() const
84 return NULL;
88 status_t
89 ExpressionValueNodeChild::ResolveLocation(ValueLoader* valueLoader,
90 ValueLocation*& _location)
92 _location = NULL;
93 return B_OK;