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_format_hint_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_format_hint_common::create(DAE& dae)
     21 {
     22 	domFx_surface_format_hint_commonRef ref = new domFx_surface_format_hint_common(dae);
     23 	return ref;
     24 }
     25 
     26 
     27 daeMetaElement *
     28 domFx_surface_format_hint_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_format_hint_common" );
     36 	meta->registerClass(domFx_surface_format_hint_common::create);
     37 
     38 	daeMetaCMPolicy *cm = NULL;
     39 	daeMetaElementAttribute *mea = NULL;
     40 	cm = new daeMetaSequence( meta, cm, 0, 1, 1 );
     41 
     42 	mea = new daeMetaElementAttribute( meta, cm, 0, 1, 1 );
     43 	mea->setName( "channels" );
     44 	mea->setOffset( daeOffsetOf(domFx_surface_format_hint_common,elemChannels) );
     45 	mea->setElementType( domFx_surface_format_hint_common::domChannels::registerElement(dae) );
     46 	cm->appendChild( mea );
     47 
     48 	mea = new daeMetaElementAttribute( meta, cm, 1, 1, 1 );
     49 	mea->setName( "range" );
     50 	mea->setOffset( daeOffsetOf(domFx_surface_format_hint_common,elemRange) );
     51 	mea->setElementType( domFx_surface_format_hint_common::domRange::registerElement(dae) );
     52 	cm->appendChild( mea );
     53 
     54 	mea = new daeMetaElementAttribute( meta, cm, 2, 0, 1 );
     55 	mea->setName( "precision" );
     56 	mea->setOffset( daeOffsetOf(domFx_surface_format_hint_common,elemPrecision) );
     57 	mea->setElementType( domFx_surface_format_hint_common::domPrecision::registerElement(dae) );
     58 	cm->appendChild( mea );
     59 
     60 	mea = new daeMetaElementArrayAttribute( meta, cm, 3, 0, -1 );
     61 	mea->setName( "option" );
     62 	mea->setOffset( daeOffsetOf(domFx_surface_format_hint_common,elemOption_array) );
     63 	mea->setElementType( domFx_surface_format_hint_common::domOption::registerElement(dae) );
     64 	cm->appendChild( mea );
     65 
     66 	mea = new daeMetaElementArrayAttribute( meta, cm, 4, 0, -1 );
     67 	mea->setName( "extra" );
     68 	mea->setOffset( daeOffsetOf(domFx_surface_format_hint_common,elemExtra_array) );
     69 	mea->setElementType( domExtra::registerElement(dae) );
     70 	cm->appendChild( mea );
     71 
     72 	cm->setMaxOrdinal( 4 );
     73 	meta->setCMRoot( cm );
     74 
     75 	meta->setElementSize(sizeof(domFx_surface_format_hint_common));
     76 	meta->validate();
     77 
     78 	return meta;
     79 }
     80 
     81 daeElementRef
     82 domFx_surface_format_hint_common::domChannels::create(DAE& dae)
     83 {
     84 	domFx_surface_format_hint_common::domChannelsRef ref = new domFx_surface_format_hint_common::domChannels(dae);
     85 	return ref;
     86 }
     87 
     88 
     89 daeMetaElement *
     90 domFx_surface_format_hint_common::domChannels::registerElement(DAE& dae)
     91 {
     92 	daeMetaElement* meta = dae.getMeta(ID());
     93 	if ( meta != NULL ) return meta;
     94 
     95 	meta = new daeMetaElement(dae);
     96 	dae.setMeta(ID(), *meta);
     97 	meta->setName( "channels" );
     98 	meta->registerClass(domFx_surface_format_hint_common::domChannels::create);
     99 
    100 	meta->setIsInnerClass( true );
    101 	//	Add attribute: _value
    102 	{
    103 		daeMetaAttribute *ma = new daeMetaAttribute;
    104 		ma->setName( "_value" );
    105 		ma->setType( dae.getAtomicTypes().get("Fx_surface_format_hint_channels_enum"));
    106 		ma->setOffset( daeOffsetOf( domFx_surface_format_hint_common::domChannels , _value ));
    107 		ma->setContainer( meta );
    108 		meta->appendAttribute(ma);
    109 	}
    110 
    111 	meta->setElementSize(sizeof(domFx_surface_format_hint_common::domChannels));
    112 	meta->validate();
    113 
    114 	return meta;
    115 }
    116 
    117 daeElementRef
    118 domFx_surface_format_hint_common::domRange::create(DAE& dae)
    119 {
    120 	domFx_surface_format_hint_common::domRangeRef ref = new domFx_surface_format_hint_common::domRange(dae);
    121 	return ref;
    122 }
    123 
    124 
    125 daeMetaElement *
    126 domFx_surface_format_hint_common::domRange::registerElement(DAE& dae)
    127 {
    128 	daeMetaElement* meta = dae.getMeta(ID());
    129 	if ( meta != NULL ) return meta;
    130 
    131 	meta = new daeMetaElement(dae);
    132 	dae.setMeta(ID(), *meta);
    133 	meta->setName( "range" );
    134 	meta->registerClass(domFx_surface_format_hint_common::domRange::create);
    135 
    136 	meta->setIsInnerClass( true );
    137 	//	Add attribute: _value
    138 	{
    139 		daeMetaAttribute *ma = new daeMetaAttribute;
    140 		ma->setName( "_value" );
    141 		ma->setType( dae.getAtomicTypes().get("Fx_surface_format_hint_range_enum"));
    142 		ma->setOffset( daeOffsetOf( domFx_surface_format_hint_common::domRange , _value ));
    143 		ma->setContainer( meta );
    144 		meta->appendAttribute(ma);
    145 	}
    146 
    147 	meta->setElementSize(sizeof(domFx_surface_format_hint_common::domRange));
    148 	meta->validate();
    149 
    150 	return meta;
    151 }
    152 
    153 daeElementRef
    154 domFx_surface_format_hint_common::domPrecision::create(DAE& dae)
    155 {
    156 	domFx_surface_format_hint_common::domPrecisionRef ref = new domFx_surface_format_hint_common::domPrecision(dae);
    157 	return ref;
    158 }
    159 
    160 
    161 daeMetaElement *
    162 domFx_surface_format_hint_common::domPrecision::registerElement(DAE& dae)
    163 {
    164 	daeMetaElement* meta = dae.getMeta(ID());
    165 	if ( meta != NULL ) return meta;
    166 
    167 	meta = new daeMetaElement(dae);
    168 	dae.setMeta(ID(), *meta);
    169 	meta->setName( "precision" );
    170 	meta->registerClass(domFx_surface_format_hint_common::domPrecision::create);
    171 
    172 	meta->setIsInnerClass( true );
    173 	//	Add attribute: _value
    174 	{
    175 		daeMetaAttribute *ma = new daeMetaAttribute;
    176 		ma->setName( "_value" );
    177 		ma->setType( dae.getAtomicTypes().get("Fx_surface_format_hint_precision_enum"));
    178 		ma->setOffset( daeOffsetOf( domFx_surface_format_hint_common::domPrecision , _value ));
    179 		ma->setContainer( meta );
    180 		meta->appendAttribute(ma);
    181 	}
    182 
    183 	meta->setElementSize(sizeof(domFx_surface_format_hint_common::domPrecision));
    184 	meta->validate();
    185 
    186 	return meta;
    187 }
    188 
    189 daeElementRef
    190 domFx_surface_format_hint_common::domOption::create(DAE& dae)
    191 {
    192 	domFx_surface_format_hint_common::domOptionRef ref = new domFx_surface_format_hint_common::domOption(dae);
    193 	return ref;
    194 }
    195 
    196 
    197 daeMetaElement *
    198 domFx_surface_format_hint_common::domOption::registerElement(DAE& dae)
    199 {
    200 	daeMetaElement* meta = dae.getMeta(ID());
    201 	if ( meta != NULL ) return meta;
    202 
    203 	meta = new daeMetaElement(dae);
    204 	dae.setMeta(ID(), *meta);
    205 	meta->setName( "option" );
    206 	meta->registerClass(domFx_surface_format_hint_common::domOption::create);
    207 
    208 	meta->setIsInnerClass( true );
    209 	//	Add attribute: _value
    210 	{
    211 		daeMetaAttribute *ma = new daeMetaAttribute;
    212 		ma->setName( "_value" );
    213 		ma->setType( dae.getAtomicTypes().get("Fx_surface_format_hint_option_enum"));
    214 		ma->setOffset( daeOffsetOf( domFx_surface_format_hint_common::domOption , _value ));
    215 		ma->setContainer( meta );
    216 		meta->appendAttribute(ma);
    217 	}
    218 
    219 	meta->setElementSize(sizeof(domFx_surface_format_hint_common::domOption));
    220 	meta->validate();
    221 
    222 	return meta;
    223 }
    224 
    225