blob: d645d828dd11d91c02c3dff2374134632f5a1c51 [file] [log] [blame]
/*
* Copyright 2006 Sony Computer Entertainment Inc.
*
* Licensed under the MIT Open Source License, for details please see license.txt or the website
* http://www.opensource.org/licenses/mit-license.php
*
*/
#include <dae.h>
#include <dae/daeDom.h>
#include <dom/domFx_code_profile.h>
#include <dae/daeMetaCMPolicy.h>
#include <dae/daeMetaSequence.h>
#include <dae/daeMetaChoice.h>
#include <dae/daeMetaGroup.h>
#include <dae/daeMetaAny.h>
#include <dae/daeMetaElementAttribute.h>
daeElementRef
domFx_code_profile::create(DAE& dae)
{
domFx_code_profileRef ref = new domFx_code_profile(dae);
return ref;
}
daeMetaElement *
domFx_code_profile::registerElement(DAE& dae)
{
daeMetaElement* meta = dae.getMeta(ID());
if ( meta != NULL ) return meta;
meta = new daeMetaElement(dae);
dae.setMeta(ID(), *meta);
meta->setName( "fx_code_profile" );
meta->registerClass(domFx_code_profile::create);
// Add attribute: _value
{
daeMetaAttribute *ma = new daeMetaAttribute;
ma->setName( "_value" );
ma->setType( dae.getAtomicTypes().get("xsString"));
ma->setOffset( daeOffsetOf( domFx_code_profile , _value ));
ma->setContainer( meta );
meta->appendAttribute(ma);
}
// Add attribute: sid
{
daeMetaAttribute *ma = new daeMetaAttribute;
ma->setName( "sid" );
ma->setType( dae.getAtomicTypes().get("xsNCName"));
ma->setOffset( daeOffsetOf( domFx_code_profile , attrSid ));
ma->setContainer( meta );
ma->setIsRequired( false );
meta->appendAttribute(ma);
}
meta->setElementSize(sizeof(domFx_code_profile));
meta->validate();
return meta;
}