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_samplerRECT_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_samplerRECT_common::create(DAE& dae)
     21 {
     22 	domFx_samplerRECT_commonRef ref = new domFx_samplerRECT_common(dae);
     23 	return ref;
     24 }
     25 
     26 
     27 daeMetaElement *
     28 domFx_samplerRECT_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_samplerRECT_common" );
     36 	meta->registerClass(domFx_samplerRECT_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( "source" );
     44 	mea->setOffset( daeOffsetOf(domFx_samplerRECT_common,elemSource) );
     45 	mea->setElementType( domFx_samplerRECT_common::domSource::registerElement(dae) );
     46 	cm->appendChild( mea );
     47 
     48 	mea = new daeMetaElementAttribute( meta, cm, 1, 0, 1 );
     49 	mea->setName( "wrap_s" );
     50 	mea->setOffset( daeOffsetOf(domFx_samplerRECT_common,elemWrap_s) );
     51 	mea->setElementType( domFx_samplerRECT_common::domWrap_s::registerElement(dae) );
     52 	cm->appendChild( mea );
     53 
     54 	mea = new daeMetaElementAttribute( meta, cm, 2, 0, 1 );
     55 	mea->setName( "wrap_t" );
     56 	mea->setOffset( daeOffsetOf(domFx_samplerRECT_common,elemWrap_t) );
     57 	mea->setElementType( domFx_samplerRECT_common::domWrap_t::registerElement(dae) );
     58 	cm->appendChild( mea );
     59 
     60 	mea = new daeMetaElementAttribute( meta, cm, 3, 0, 1 );
     61 	mea->setName( "minfilter" );
     62 	mea->setOffset( daeOffsetOf(domFx_samplerRECT_common,elemMinfilter) );
     63 	mea->setElementType( domFx_samplerRECT_common::domMinfilter::registerElement(dae) );
     64 	cm->appendChild( mea );
     65 
     66 	mea = new daeMetaElementAttribute( meta, cm, 4, 0, 1 );
     67 	mea->setName( "magfilter" );
     68 	mea->setOffset( daeOffsetOf(domFx_samplerRECT_common,elemMagfilter) );
     69 	mea->setElementType( domFx_samplerRECT_common::domMagfilter::registerElement(dae) );
     70 	cm->appendChild( mea );
     71 
     72 	mea = new daeMetaElementAttribute( meta, cm, 5, 0, 1 );
     73 	mea->setName( "mipfilter" );
     74 	mea->setOffset( daeOffsetOf(domFx_samplerRECT_common,elemMipfilter) );
     75 	mea->setElementType( domFx_samplerRECT_common::domMipfilter::registerElement(dae) );
     76 	cm->appendChild( mea );
     77 
     78 	mea = new daeMetaElementAttribute( meta, cm, 6, 0, 1 );
     79 	mea->setName( "border_color" );
     80 	mea->setOffset( daeOffsetOf(domFx_samplerRECT_common,elemBorder_color) );
     81 	mea->setElementType( domFx_samplerRECT_common::domBorder_color::registerElement(dae) );
     82 	cm->appendChild( mea );
     83 
     84 	mea = new daeMetaElementAttribute( meta, cm, 7, 0, 1 );
     85 	mea->setName( "mipmap_maxlevel" );
     86 	mea->setOffset( daeOffsetOf(domFx_samplerRECT_common,elemMipmap_maxlevel) );
     87 	mea->setElementType( domFx_samplerRECT_common::domMipmap_maxlevel::registerElement(dae) );
     88 	cm->appendChild( mea );
     89 
     90 	mea = new daeMetaElementAttribute( meta, cm, 8, 0, 1 );
     91 	mea->setName( "mipmap_bias" );
     92 	mea->setOffset( daeOffsetOf(domFx_samplerRECT_common,elemMipmap_bias) );
     93 	mea->setElementType( domFx_samplerRECT_common::domMipmap_bias::registerElement(dae) );
     94 	cm->appendChild( mea );
     95 
     96 	mea = new daeMetaElementArrayAttribute( meta, cm, 9, 0, -1 );
     97 	mea->setName( "extra" );
     98 	mea->setOffset( daeOffsetOf(domFx_samplerRECT_common,elemExtra_array) );
     99 	mea->setElementType( domExtra::registerElement(dae) );
    100 	cm->appendChild( mea );
    101 
    102 	cm->setMaxOrdinal( 9 );
    103 	meta->setCMRoot( cm );
    104 
    105 	meta->setElementSize(sizeof(domFx_samplerRECT_common));
    106 	meta->validate();
    107 
    108 	return meta;
    109 }
    110 
    111 daeElementRef
    112 domFx_samplerRECT_common::domSource::create(DAE& dae)
    113 {
    114 	domFx_samplerRECT_common::domSourceRef ref = new domFx_samplerRECT_common::domSource(dae);
    115 	return ref;
    116 }
    117 
    118 
    119 daeMetaElement *
    120 domFx_samplerRECT_common::domSource::registerElement(DAE& dae)
    121 {
    122 	daeMetaElement* meta = dae.getMeta(ID());
    123 	if ( meta != NULL ) return meta;
    124 
    125 	meta = new daeMetaElement(dae);
    126 	dae.setMeta(ID(), *meta);
    127 	meta->setName( "source" );
    128 	meta->registerClass(domFx_samplerRECT_common::domSource::create);
    129 
    130 	meta->setIsInnerClass( true );
    131 	//	Add attribute: _value
    132 	{
    133 		daeMetaAttribute *ma = new daeMetaAttribute;
    134 		ma->setName( "_value" );
    135 		ma->setType( dae.getAtomicTypes().get("xsNCName"));
    136 		ma->setOffset( daeOffsetOf( domFx_samplerRECT_common::domSource , _value ));
    137 		ma->setContainer( meta );
    138 		meta->appendAttribute(ma);
    139 	}
    140 
    141 	meta->setElementSize(sizeof(domFx_samplerRECT_common::domSource));
    142 	meta->validate();
    143 
    144 	return meta;
    145 }
    146 
    147 daeElementRef
    148 domFx_samplerRECT_common::domWrap_s::create(DAE& dae)
    149 {
    150 	domFx_samplerRECT_common::domWrap_sRef ref = new domFx_samplerRECT_common::domWrap_s(dae);
    151 	return ref;
    152 }
    153 
    154 
    155 daeMetaElement *
    156 domFx_samplerRECT_common::domWrap_s::registerElement(DAE& dae)
    157 {
    158 	daeMetaElement* meta = dae.getMeta(ID());
    159 	if ( meta != NULL ) return meta;
    160 
    161 	meta = new daeMetaElement(dae);
    162 	dae.setMeta(ID(), *meta);
    163 	meta->setName( "wrap_s" );
    164 	meta->registerClass(domFx_samplerRECT_common::domWrap_s::create);
    165 
    166 	meta->setIsInnerClass( true );
    167 	//	Add attribute: _value
    168 	{
    169 		daeMetaAttribute *ma = new daeMetaAttribute;
    170 		ma->setName( "_value" );
    171 		ma->setType( dae.getAtomicTypes().get("Fx_sampler_wrap_common"));
    172 		ma->setOffset( daeOffsetOf( domFx_samplerRECT_common::domWrap_s , _value ));
    173 		ma->setContainer( meta );
    174 		meta->appendAttribute(ma);
    175 	}
    176 
    177 	meta->setElementSize(sizeof(domFx_samplerRECT_common::domWrap_s));
    178 	meta->validate();
    179 
    180 	return meta;
    181 }
    182 
    183 daeElementRef
    184 domFx_samplerRECT_common::domWrap_t::create(DAE& dae)
    185 {
    186 	domFx_samplerRECT_common::domWrap_tRef ref = new domFx_samplerRECT_common::domWrap_t(dae);
    187 	return ref;
    188 }
    189 
    190 
    191 daeMetaElement *
    192 domFx_samplerRECT_common::domWrap_t::registerElement(DAE& dae)
    193 {
    194 	daeMetaElement* meta = dae.getMeta(ID());
    195 	if ( meta != NULL ) return meta;
    196 
    197 	meta = new daeMetaElement(dae);
    198 	dae.setMeta(ID(), *meta);
    199 	meta->setName( "wrap_t" );
    200 	meta->registerClass(domFx_samplerRECT_common::domWrap_t::create);
    201 
    202 	meta->setIsInnerClass( true );
    203 	//	Add attribute: _value
    204 	{
    205 		daeMetaAttribute *ma = new daeMetaAttribute;
    206 		ma->setName( "_value" );
    207 		ma->setType( dae.getAtomicTypes().get("Fx_sampler_wrap_common"));
    208 		ma->setOffset( daeOffsetOf( domFx_samplerRECT_common::domWrap_t , _value ));
    209 		ma->setContainer( meta );
    210 		meta->appendAttribute(ma);
    211 	}
    212 
    213 	meta->setElementSize(sizeof(domFx_samplerRECT_common::domWrap_t));
    214 	meta->validate();
    215 
    216 	return meta;
    217 }
    218 
    219 daeElementRef
    220 domFx_samplerRECT_common::domMinfilter::create(DAE& dae)
    221 {
    222 	domFx_samplerRECT_common::domMinfilterRef ref = new domFx_samplerRECT_common::domMinfilter(dae);
    223 	return ref;
    224 }
    225 
    226 
    227 daeMetaElement *
    228 domFx_samplerRECT_common::domMinfilter::registerElement(DAE& dae)
    229 {
    230 	daeMetaElement* meta = dae.getMeta(ID());
    231 	if ( meta != NULL ) return meta;
    232 
    233 	meta = new daeMetaElement(dae);
    234 	dae.setMeta(ID(), *meta);
    235 	meta->setName( "minfilter" );
    236 	meta->registerClass(domFx_samplerRECT_common::domMinfilter::create);
    237 
    238 	meta->setIsInnerClass( true );
    239 	//	Add attribute: _value
    240 	{
    241 		daeMetaAttribute *ma = new daeMetaAttribute;
    242 		ma->setName( "_value" );
    243 		ma->setType( dae.getAtomicTypes().get("Fx_sampler_filter_common"));
    244 		ma->setOffset( daeOffsetOf( domFx_samplerRECT_common::domMinfilter , _value ));
    245 		ma->setContainer( meta );
    246 		meta->appendAttribute(ma);
    247 	}
    248 
    249 	meta->setElementSize(sizeof(domFx_samplerRECT_common::domMinfilter));
    250 	meta->validate();
    251 
    252 	return meta;
    253 }
    254 
    255 daeElementRef
    256 domFx_samplerRECT_common::domMagfilter::create(DAE& dae)
    257 {
    258 	domFx_samplerRECT_common::domMagfilterRef ref = new domFx_samplerRECT_common::domMagfilter(dae);
    259 	return ref;
    260 }
    261 
    262 
    263 daeMetaElement *
    264 domFx_samplerRECT_common::domMagfilter::registerElement(DAE& dae)
    265 {
    266 	daeMetaElement* meta = dae.getMeta(ID());
    267 	if ( meta != NULL ) return meta;
    268 
    269 	meta = new daeMetaElement(dae);
    270 	dae.setMeta(ID(), *meta);
    271 	meta->setName( "magfilter" );
    272 	meta->registerClass(domFx_samplerRECT_common::domMagfilter::create);
    273 
    274 	meta->setIsInnerClass( true );
    275 	//	Add attribute: _value
    276 	{
    277 		daeMetaAttribute *ma = new daeMetaAttribute;
    278 		ma->setName( "_value" );
    279 		ma->setType( dae.getAtomicTypes().get("Fx_sampler_filter_common"));
    280 		ma->setOffset( daeOffsetOf( domFx_samplerRECT_common::domMagfilter , _value ));
    281 		ma->setContainer( meta );
    282 		meta->appendAttribute(ma);
    283 	}
    284 
    285 	meta->setElementSize(sizeof(domFx_samplerRECT_common::domMagfilter));
    286 	meta->validate();
    287 
    288 	return meta;
    289 }
    290 
    291 daeElementRef
    292 domFx_samplerRECT_common::domMipfilter::create(DAE& dae)
    293 {
    294 	domFx_samplerRECT_common::domMipfilterRef ref = new domFx_samplerRECT_common::domMipfilter(dae);
    295 	return ref;
    296 }
    297 
    298 
    299 daeMetaElement *
    300 domFx_samplerRECT_common::domMipfilter::registerElement(DAE& dae)
    301 {
    302 	daeMetaElement* meta = dae.getMeta(ID());
    303 	if ( meta != NULL ) return meta;
    304 
    305 	meta = new daeMetaElement(dae);
    306 	dae.setMeta(ID(), *meta);
    307 	meta->setName( "mipfilter" );
    308 	meta->registerClass(domFx_samplerRECT_common::domMipfilter::create);
    309 
    310 	meta->setIsInnerClass( true );
    311 	//	Add attribute: _value
    312 	{
    313 		daeMetaAttribute *ma = new daeMetaAttribute;
    314 		ma->setName( "_value" );
    315 		ma->setType( dae.getAtomicTypes().get("Fx_sampler_filter_common"));
    316 		ma->setOffset( daeOffsetOf( domFx_samplerRECT_common::domMipfilter , _value ));
    317 		ma->setContainer( meta );
    318 		meta->appendAttribute(ma);
    319 	}
    320 
    321 	meta->setElementSize(sizeof(domFx_samplerRECT_common::domMipfilter));
    322 	meta->validate();
    323 
    324 	return meta;
    325 }
    326 
    327 daeElementRef
    328 domFx_samplerRECT_common::domBorder_color::create(DAE& dae)
    329 {
    330 	domFx_samplerRECT_common::domBorder_colorRef ref = new domFx_samplerRECT_common::domBorder_color(dae);
    331 	return ref;
    332 }
    333 
    334 
    335 daeMetaElement *
    336 domFx_samplerRECT_common::domBorder_color::registerElement(DAE& dae)
    337 {
    338 	daeMetaElement* meta = dae.getMeta(ID());
    339 	if ( meta != NULL ) return meta;
    340 
    341 	meta = new daeMetaElement(dae);
    342 	dae.setMeta(ID(), *meta);
    343 	meta->setName( "border_color" );
    344 	meta->registerClass(domFx_samplerRECT_common::domBorder_color::create);
    345 
    346 	meta->setIsInnerClass( true );
    347 	//	Add attribute: _value
    348 	{
    349 		daeMetaAttribute *ma = new daeMetaArrayAttribute;
    350 		ma->setName( "_value" );
    351 		ma->setType( dae.getAtomicTypes().get("Fx_color_common"));
    352 		ma->setOffset( daeOffsetOf( domFx_samplerRECT_common::domBorder_color , _value ));
    353 		ma->setContainer( meta );
    354 		meta->appendAttribute(ma);
    355 	}
    356 
    357 	meta->setElementSize(sizeof(domFx_samplerRECT_common::domBorder_color));
    358 	meta->validate();
    359 
    360 	return meta;
    361 }
    362 
    363 daeElementRef
    364 domFx_samplerRECT_common::domMipmap_maxlevel::create(DAE& dae)
    365 {
    366 	domFx_samplerRECT_common::domMipmap_maxlevelRef ref = new domFx_samplerRECT_common::domMipmap_maxlevel(dae);
    367 	return ref;
    368 }
    369 
    370 
    371 daeMetaElement *
    372 domFx_samplerRECT_common::domMipmap_maxlevel::registerElement(DAE& dae)
    373 {
    374 	daeMetaElement* meta = dae.getMeta(ID());
    375 	if ( meta != NULL ) return meta;
    376 
    377 	meta = new daeMetaElement(dae);
    378 	dae.setMeta(ID(), *meta);
    379 	meta->setName( "mipmap_maxlevel" );
    380 	meta->registerClass(domFx_samplerRECT_common::domMipmap_maxlevel::create);
    381 
    382 	meta->setIsInnerClass( true );
    383 	//	Add attribute: _value
    384 	{
    385 		daeMetaAttribute *ma = new daeMetaAttribute;
    386 		ma->setName( "_value" );
    387 		ma->setType( dae.getAtomicTypes().get("xsUnsignedByte"));
    388 		ma->setOffset( daeOffsetOf( domFx_samplerRECT_common::domMipmap_maxlevel , _value ));
    389 		ma->setContainer( meta );
    390 		meta->appendAttribute(ma);
    391 	}
    392 
    393 	meta->setElementSize(sizeof(domFx_samplerRECT_common::domMipmap_maxlevel));
    394 	meta->validate();
    395 
    396 	return meta;
    397 }
    398 
    399 daeElementRef
    400 domFx_samplerRECT_common::domMipmap_bias::create(DAE& dae)
    401 {
    402 	domFx_samplerRECT_common::domMipmap_biasRef ref = new domFx_samplerRECT_common::domMipmap_bias(dae);
    403 	return ref;
    404 }
    405 
    406 
    407 daeMetaElement *
    408 domFx_samplerRECT_common::domMipmap_bias::registerElement(DAE& dae)
    409 {
    410 	daeMetaElement* meta = dae.getMeta(ID());
    411 	if ( meta != NULL ) return meta;
    412 
    413 	meta = new daeMetaElement(dae);
    414 	dae.setMeta(ID(), *meta);
    415 	meta->setName( "mipmap_bias" );
    416 	meta->registerClass(domFx_samplerRECT_common::domMipmap_bias::create);
    417 
    418 	meta->setIsInnerClass( true );
    419 	//	Add attribute: _value
    420 	{
    421 		daeMetaAttribute *ma = new daeMetaAttribute;
    422 		ma->setName( "_value" );
    423 		ma->setType( dae.getAtomicTypes().get("xsFloat"));
    424 		ma->setOffset( daeOffsetOf( domFx_samplerRECT_common::domMipmap_bias , _value ));
    425 		ma->setContainer( meta );
    426 		meta->appendAttribute(ma);
    427 	}
    428 
    429 	meta->setElementSize(sizeof(domFx_samplerRECT_common::domMipmap_bias));
    430 	meta->validate();
    431 
    432 	return meta;
    433 }
    434 
    435