blob: 476d58c3242fcd2a960e27649279dbd55d50f99e [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/domInputGlobal.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
domInputGlobal::create(DAE& dae)
{
domInputGlobalRef ref = new domInputGlobal(dae);
return ref;
}
daeMetaElement *
domInputGlobal::registerElement(DAE& dae)
{
daeMetaElement* meta = dae.getMeta(ID());
if ( meta != NULL ) return meta;
meta = new daeMetaElement(dae);
dae.setMeta(ID(), *meta);
meta->setName( "InputGlobal" );
meta->registerClass(domInputGlobal::create);
// Add attribute: semantic
{
daeMetaAttribute *ma = new daeMetaAttribute;
ma->setName( "semantic" );
ma->setType( dae.getAtomicTypes().get("xsNMTOKEN"));
ma->setOffset( daeOffsetOf( domInputGlobal , attrSemantic ));
ma->setContainer( meta );
ma->setIsRequired( true );
meta->appendAttribute(ma);
}
// Add attribute: source
{
daeMetaAttribute *ma = new daeMetaAttribute;
ma->setName( "source" );
ma->setType( dae.getAtomicTypes().get("xsAnyURI"));
ma->setOffset( daeOffsetOf( domInputGlobal , attrSource ));
ma->setContainer( meta );
ma->setIsRequired( true );
meta->appendAttribute(ma);
}
meta->setElementSize(sizeof(domInputGlobal));
meta->validate();
return meta;
}