1 /* 2 * Copyright 2006 Sony Computer Entertainment Inc. 3 * 4 * Licensed under the MIT Open Source License, for details please see license.txt or the website 5 * http://www.opensource.org/licenses/mit-license.php 6 * 7 */ 8 9 #include <dae.h> 10 #include <dae/daeDom.h> 11 #include <dom/domFx_code_profile.h> 12 #include <dae/daeMetaCMPolicy.h> 13 #include <dae/daeMetaSequence.h> 14 #include <dae/daeMetaChoice.h> 15 #include <dae/daeMetaGroup.h> 16 #include <dae/daeMetaAny.h> 17 #include <dae/daeMetaElementAttribute.h> 18 19 daeElementRef 20 domFx_code_profile::create(DAE& dae) 21 { 22 domFx_code_profileRef ref = new domFx_code_profile(dae); 23 return ref; 24 } 25 26 27 daeMetaElement * 28 domFx_code_profile::registerElement(DAE& dae) 29 { 30 daeMetaElement* meta = dae.getMeta(ID()); 31 if ( meta != NULL ) return meta; 32 33 meta = new daeMetaElement(dae); 34 dae.setMeta(ID(), *meta); 35 meta->setName( "fx_code_profile" ); 36 meta->registerClass(domFx_code_profile::create); 37 38 // Add attribute: _value 39 { 40 daeMetaAttribute *ma = new daeMetaAttribute; 41 ma->setName( "_value" ); 42 ma->setType( dae.getAtomicTypes().get("xsString")); 43 ma->setOffset( daeOffsetOf( domFx_code_profile , _value )); 44 ma->setContainer( meta ); 45 meta->appendAttribute(ma); 46 } 47 48 // Add attribute: sid 49 { 50 daeMetaAttribute *ma = new daeMetaAttribute; 51 ma->setName( "sid" ); 52 ma->setType( dae.getAtomicTypes().get("xsNCName")); 53 ma->setOffset( daeOffsetOf( domFx_code_profile , attrSid )); 54 ma->setContainer( meta ); 55 ma->setIsRequired( false ); 56 57 meta->appendAttribute(ma); 58 } 59 60 meta->setElementSize(sizeof(domFx_code_profile)); 61 meta->validate(); 62 63 return meta; 64 } 65 66