Example #1
0
VError VJSONObject::Clone( VJSONValue& outValue, VJSONCloner& inCloner) const
{
	VError err = VE_OK;
	EJSONStatus status = EJSON_unhandled;

	if (fImpl != NULL)
	{
		status = fImpl->IJSON_Clone( this, inCloner, outValue, &err);
	}
	
	if (status == EJSON_unhandled)
	{
		VJSONObject *clone = new VJSONObject();
		if (clone != NULL)
		{
			err = CloneProperties( inCloner, clone);
		}
		else
		{
			err = VE_MEMORY_FULL;
		}
		outValue.SetObject( clone);
		ReleaseRef( &clone);
	}

	return err;
}
// base clone function
GError GAnimElement::BaseClone(const GElement& Source) {

	GError err;
	const GAnimElement& tmpElem = (const GAnimElement &)Source;

	DeleteProperties();
	err = CloneProperties(tmpElem);
	if (err == G_NO_ERROR)
		err = GElement::BaseClone(Source);
	return err;
}