Home | History | Annotate | Download | only in dom
      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_surface_init_volume_common.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_surface_init_volume_common::create(DAE& dae)
     21 {
     22 	domFx_surface_init_volume_commonRef ref = new domFx_surface_init_volume_common(dae);
     23 	return ref;
     24 }
     25 
     26 
     27 daeMetaElement *
     28 domFx_surface_init_volume_common::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_surface_init_volume_common" );
     36 	meta->registerClass(domFx_surface_init_volume_common::create);
     37 
     38 	daeMetaCMPolicy *cm = NULL;
     39 	daeMetaElementAttribute *mea = NULL;
     40 	cm = new daeMetaChoice( meta, cm, 0, 0, 1, 1 );
     41 
     42 	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
     43 	mea->setName( "all" );
     44 	mea->setOffset( daeOffsetOf(domFx_surface_init_volume_common,elemAll) );
     45 	mea->setElementType( domFx_surface_init_volume_common::domAll::registerElement(dae) );
     46 	cm->appendChild( mea );
     47 
     48 	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
     49 	mea->setName( "primary" );
     50 	mea->setOffset( daeOffsetOf(domFx_surface_init_volume_common,elemPrimary) );
     51 	mea->setElementType( domFx_surface_init_volume_common::domPrimary::registerElement(dae) );
     52 	cm->appendChild( mea );
     53 
     54 	cm->setMaxOrdinal( 0 );
     55 	meta->setCMRoot( cm );
     56 	// Ordered list of sub-elements
     57 	meta->addContents(daeOffsetOf(domFx_surface_init_volume_common,_contents));
     58 	meta->addContentsOrder(daeOffsetOf(domFx_surface_init_volume_common,_contentsOrder));
     59 
     60 	meta->addCMDataArray(daeOffsetOf(domFx_surface_init_volume_common,_CMData), 1);
     61 	meta->setElementSize(sizeof(domFx_surface_init_volume_common));
     62 	meta->validate();
     63 
     64 	return meta;
     65 }
     66 
     67 daeElementRef
     68 domFx_surface_init_volume_common::domAll::create(DAE& dae)
     69 {
     70 	domFx_surface_init_volume_common::domAllRef ref = new domFx_surface_init_volume_common::domAll(dae);
     71 	return ref;
     72 }
     73 
     74 
     75 daeMetaElement *
     76 domFx_surface_init_volume_common::domAll::registerElement(DAE& dae)
     77 {
     78 	daeMetaElement* meta = dae.getMeta(ID());
     79 	if ( meta != NULL ) return meta;
     80 
     81 	meta = new daeMetaElement(dae);
     82 	dae.setMeta(ID(), *meta);
     83 	meta->setName( "all" );
     84 	meta->registerClass(domFx_surface_init_volume_common::domAll::create);
     85 
     86 	meta->setIsInnerClass( true );
     87 
     88 	//	Add attribute: ref
     89 	{
     90 		daeMetaAttribute *ma = new daeMetaAttribute;
     91 		ma->setName( "ref" );
     92 		ma->setType( dae.getAtomicTypes().get("xsIDREF"));
     93 		ma->setOffset( daeOffsetOf( domFx_surface_init_volume_common::domAll , attrRef ));
     94 		ma->setContainer( meta );
     95 		ma->setIsRequired( true );
     96 
     97 		meta->appendAttribute(ma);
     98 	}
     99 
    100 	meta->setElementSize(sizeof(domFx_surface_init_volume_common::domAll));
    101 	meta->validate();
    102 
    103 	return meta;
    104 }
    105 
    106 daeElementRef
    107 domFx_surface_init_volume_common::domPrimary::create(DAE& dae)
    108 {
    109 	domFx_surface_init_volume_common::domPrimaryRef ref = new domFx_surface_init_volume_common::domPrimary(dae);
    110 	return ref;
    111 }
    112 
    113 
    114 daeMetaElement *
    115 domFx_surface_init_volume_common::domPrimary::registerElement(DAE& dae)
    116 {
    117 	daeMetaElement* meta = dae.getMeta(ID());
    118 	if ( meta != NULL ) return meta;
    119 
    120 	meta = new daeMetaElement(dae);
    121 	dae.setMeta(ID(), *meta);
    122 	meta->setName( "primary" );
    123 	meta->registerClass(domFx_surface_init_volume_common::domPrimary::create);
    124 
    125 	meta->setIsInnerClass( true );
    126 
    127 	//	Add attribute: ref
    128 	{
    129 		daeMetaAttribute *ma = new daeMetaAttribute;
    130 		ma->setName( "ref" );
    131 		ma->setType( dae.getAtomicTypes().get("xsIDREF"));
    132 		ma->setOffset( daeOffsetOf( domFx_surface_init_volume_common::domPrimary , attrRef ));
    133 		ma->setContainer( meta );
    134 		ma->setIsRequired( true );
    135 
    136 		meta->appendAttribute(ma);
    137 	}
    138 
    139 	meta->setElementSize(sizeof(domFx_surface_init_volume_common::domPrimary));
    140 	meta->validate();
    141 
    142 	return meta;
    143 }
    144 
    145