/* Copyright (C) 2005-2006 Feeling Software Inc. MIT License: http://www.opensource.org/licenses/mit-license.php */ #include "StdAfx.h" #include "FCDocument/FCDocument.h" #include "FUtils/FUDaeWriter.h" using namespace FUDaeWriter; template FCDPhysicsParameter::FCDPhysicsParameter(FCDocument* document, const string& ref) : FCDPhysicsParameterGeneric(document, ref) { value = NULL; } template FCDPhysicsParameter::~FCDPhysicsParameter() { SAFE_DELETE(value); } // Clone template FCDPhysicsParameterGeneric* FCDPhysicsParameter::Clone() { FCDPhysicsParameterGeneric *clone = new FCDPhysicsParameter(GetDocument(), reference); ((FCDPhysicsParameter*)clone)->value = new T(*value); return clone; } template void FCDPhysicsParameter::SetValue(T val) { if(value) { SAFE_DELETE(value); } value = new T(); *value = val; } template void FCDPhysicsParameter::SetValue(T* val) { if(value) { SAFE_DELETE(value); } value = val; } // Flattening: overwrite the target parameter with this parameter template void FCDPhysicsParameter::Overwrite(FCDPhysicsParameterGeneric* target) { ((FCDPhysicsParameter*) target)->SetValue(value); } /* // Parse in this Collada parameter from the xml node tree template FUStatus FCDPhysicsParameter::LoadFromXML(xmlNode* parameterNode) { FUStatus status; return status; } */ // Write out this ColladaFX parameter to the xml node tree template xmlNode* FCDPhysicsParameter::WriteToXML(xmlNode* parentNode) const { xmlNode* parameterNode = FUXmlWriter::AddChild(parentNode, reference.c_str()); //TODO: complete return parameterNode; }