status_t
AbstractArrayValueNode::ResolvedLocationAndValue(ValueLoader* valueLoader,
	ValueLocation*& _location, Value*& _value)
{
	// get the location
	ValueLocation* location = NodeChild()->Location();
	if (location == NULL)
		return B_BAD_VALUE;

	location->AcquireReference();
	_location = location;
	_value = NULL;
	return B_OK;
}
status_t
InternalArrayValueNodeChild::ResolveLocation(ValueLoader* valueLoader,
	ValueLocation*& _location)
{
	// This is an internal child node for a non-final dimension -- just clone
	// the parent's location.
	ValueLocation* parentLocation = fParent->Location();
	if (parentLocation == NULL)
		return B_BAD_VALUE;

	parentLocation->AcquireReference();
	_location = parentLocation;

	return B_OK;
}
Esempio n. 3
0
	void SetInfo(Type* type, ValueLocation* location)
	{
		if (type != NULL)
			type->AcquireReference();
		if (location != NULL)
			location->AcquireReference();

		if (this->type != NULL)
			this->type->ReleaseReference();
		if (this->location != NULL)
			this->location->ReleaseReference();

		this->type = type;
		this->location = location;
	}