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_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_common::create(DAE& dae)
     21 {
     22 	domFx_surface_init_commonRef ref = new domFx_surface_init_common(dae);
     23 	return ref;
     24 }
     25 
     26 
     27 daeMetaElement *
     28 domFx_surface_init_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_common" );
     36 	meta->registerClass(domFx_surface_init_common::create);
     37 
     38 	meta->setIsTransparent( true );
     39 	daeMetaCMPolicy *cm = NULL;
     40 	daeMetaElementAttribute *mea = NULL;
     41 	cm = new daeMetaChoice( meta, cm, 0, 0, 1, 1 );
     42 
     43 	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
     44 	mea->setName( "init_as_null" );
     45 	mea->setOffset( daeOffsetOf(domFx_surface_init_common,elemInit_as_null) );
     46 	mea->setElementType( domFx_surface_init_common::domInit_as_null::registerElement(dae) );
     47 	cm->appendChild( mea );
     48 
     49 	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
     50 	mea->setName( "init_as_target" );
     51 	mea->setOffset( daeOffsetOf(domFx_surface_init_common,elemInit_as_target) );
     52 	mea->setElementType( domFx_surface_init_common::domInit_as_target::registerElement(dae) );
     53 	cm->appendChild( mea );
     54 
     55 	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
     56 	mea->setName( "init_cube" );
     57 	mea->setOffset( daeOffsetOf(domFx_surface_init_common,elemInit_cube) );
     58 	mea->setElementType( domFx_surface_init_cube_common::registerElement(dae) );
     59 	cm->appendChild( mea );
     60 
     61 	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
     62 	mea->setName( "init_volume" );
     63 	mea->setOffset( daeOffsetOf(domFx_surface_init_common,elemInit_volume) );
     64 	mea->setElementType( domFx_surface_init_volume_common::registerElement(dae) );
     65 	cm->appendChild( mea );
     66 
     67 	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
     68 	mea->setName( "init_planar" );
     69 	mea->setOffset( daeOffsetOf(domFx_surface_init_common,elemInit_planar) );
     70 	mea->setElementType( domFx_surface_init_planar_common::registerElement(dae) );
     71 	cm->appendChild( mea );
     72 
     73 	mea = new daeMetaElementArrayAttribute( meta, cm, 0, 1, -1 );
     74 	mea->setName( "init_from" );
     75 	mea->setOffset( daeOffsetOf(domFx_surface_init_common,elemInit_from_array) );
     76 	mea->setElementType( domFx_surface_init_from_common::registerElement(dae) );
     77 	cm->appendChild( mea );
     78 
     79 	cm->setMaxOrdinal( 0 );
     80 	meta->setCMRoot( cm );
     81 	// Ordered list of sub-elements
     82 	meta->addContents(daeOffsetOf(domFx_surface_init_common,_contents));
     83 	meta->addContentsOrder(daeOffsetOf(domFx_surface_init_common,_contentsOrder));
     84 
     85 	meta->addCMDataArray(daeOffsetOf(domFx_surface_init_common,_CMData), 1);
     86 	meta->setElementSize(sizeof(domFx_surface_init_common));
     87 	meta->validate();
     88 
     89 	return meta;
     90 }
     91 
     92 daeElementRef
     93 domFx_surface_init_common::domInit_as_null::create(DAE& dae)
     94 {
     95 	domFx_surface_init_common::domInit_as_nullRef ref = new domFx_surface_init_common::domInit_as_null(dae);
     96 	return ref;
     97 }
     98 
     99 
    100 daeMetaElement *
    101 domFx_surface_init_common::domInit_as_null::registerElement(DAE& dae)
    102 {
    103 	daeMetaElement* meta = dae.getMeta(ID());
    104 	if ( meta != NULL ) return meta;
    105 
    106 	meta = new daeMetaElement(dae);
    107 	dae.setMeta(ID(), *meta);
    108 	meta->setName( "init_as_null" );
    109 	meta->registerClass(domFx_surface_init_common::domInit_as_null::create);
    110 
    111 	meta->setIsInnerClass( true );
    112 
    113 	meta->setElementSize(sizeof(domFx_surface_init_common::domInit_as_null));
    114 	meta->validate();
    115 
    116 	return meta;
    117 }
    118 
    119 daeElementRef
    120 domFx_surface_init_common::domInit_as_target::create(DAE& dae)
    121 {
    122 	domFx_surface_init_common::domInit_as_targetRef ref = new domFx_surface_init_common::domInit_as_target(dae);
    123 	return ref;
    124 }
    125 
    126 
    127 daeMetaElement *
    128 domFx_surface_init_common::domInit_as_target::registerElement(DAE& dae)
    129 {
    130 	daeMetaElement* meta = dae.getMeta(ID());
    131 	if ( meta != NULL ) return meta;
    132 
    133 	meta = new daeMetaElement(dae);
    134 	dae.setMeta(ID(), *meta);
    135 	meta->setName( "init_as_target" );
    136 	meta->registerClass(domFx_surface_init_common::domInit_as_target::create);
    137 
    138 	meta->setIsInnerClass( true );
    139 
    140 	meta->setElementSize(sizeof(domFx_surface_init_common::domInit_as_target));
    141 	meta->validate();
    142 
    143 	return meta;
    144 }
    145 
    146