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_cube_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_cube_common::create(DAE& dae) 21 { 22 domFx_surface_init_cube_commonRef ref = new domFx_surface_init_cube_common(dae); 23 return ref; 24 } 25 26 27 daeMetaElement * 28 domFx_surface_init_cube_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_cube_common" ); 36 meta->registerClass(domFx_surface_init_cube_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_cube_common,elemAll) ); 45 mea->setElementType( domFx_surface_init_cube_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_cube_common,elemPrimary) ); 51 mea->setElementType( domFx_surface_init_cube_common::domPrimary::registerElement(dae) ); 52 cm->appendChild( mea ); 53 54 mea = new daeMetaElementArrayAttribute( meta, cm, 0, 6, 6 ); 55 mea->setName( "face" ); 56 mea->setOffset( daeOffsetOf(domFx_surface_init_cube_common,elemFace_array) ); 57 mea->setElementType( domFx_surface_init_cube_common::domFace::registerElement(dae) ); 58 cm->appendChild( mea ); 59 60 cm->setMaxOrdinal( 0 ); 61 meta->setCMRoot( cm ); 62 // Ordered list of sub-elements 63 meta->addContents(daeOffsetOf(domFx_surface_init_cube_common,_contents)); 64 meta->addContentsOrder(daeOffsetOf(domFx_surface_init_cube_common,_contentsOrder)); 65 66 meta->addCMDataArray(daeOffsetOf(domFx_surface_init_cube_common,_CMData), 1); 67 meta->setElementSize(sizeof(domFx_surface_init_cube_common)); 68 meta->validate(); 69 70 return meta; 71 } 72 73 daeElementRef 74 domFx_surface_init_cube_common::domAll::create(DAE& dae) 75 { 76 domFx_surface_init_cube_common::domAllRef ref = new domFx_surface_init_cube_common::domAll(dae); 77 return ref; 78 } 79 80 81 daeMetaElement * 82 domFx_surface_init_cube_common::domAll::registerElement(DAE& dae) 83 { 84 daeMetaElement* meta = dae.getMeta(ID()); 85 if ( meta != NULL ) return meta; 86 87 meta = new daeMetaElement(dae); 88 dae.setMeta(ID(), *meta); 89 meta->setName( "all" ); 90 meta->registerClass(domFx_surface_init_cube_common::domAll::create); 91 92 meta->setIsInnerClass( true ); 93 94 // Add attribute: ref 95 { 96 daeMetaAttribute *ma = new daeMetaAttribute; 97 ma->setName( "ref" ); 98 ma->setType( dae.getAtomicTypes().get("xsIDREF")); 99 ma->setOffset( daeOffsetOf( domFx_surface_init_cube_common::domAll , attrRef )); 100 ma->setContainer( meta ); 101 ma->setIsRequired( true ); 102 103 meta->appendAttribute(ma); 104 } 105 106 meta->setElementSize(sizeof(domFx_surface_init_cube_common::domAll)); 107 meta->validate(); 108 109 return meta; 110 } 111 112 daeElementRef 113 domFx_surface_init_cube_common::domPrimary::create(DAE& dae) 114 { 115 domFx_surface_init_cube_common::domPrimaryRef ref = new domFx_surface_init_cube_common::domPrimary(dae); 116 return ref; 117 } 118 119 120 daeMetaElement * 121 domFx_surface_init_cube_common::domPrimary::registerElement(DAE& dae) 122 { 123 daeMetaElement* meta = dae.getMeta(ID()); 124 if ( meta != NULL ) return meta; 125 126 meta = new daeMetaElement(dae); 127 dae.setMeta(ID(), *meta); 128 meta->setName( "primary" ); 129 meta->registerClass(domFx_surface_init_cube_common::domPrimary::create); 130 131 meta->setIsInnerClass( true ); 132 daeMetaCMPolicy *cm = NULL; 133 daeMetaElementAttribute *mea = NULL; 134 cm = new daeMetaSequence( meta, cm, 0, 0, 1 ); 135 136 mea = new daeMetaElementArrayAttribute( meta, cm, 0, 6, 6 ); 137 mea->setName( "order" ); 138 mea->setOffset( daeOffsetOf(domFx_surface_init_cube_common::domPrimary,elemOrder_array) ); 139 mea->setElementType( domFx_surface_init_cube_common::domPrimary::domOrder::registerElement(dae) ); 140 cm->appendChild( mea ); 141 142 cm->setMaxOrdinal( 0 ); 143 meta->setCMRoot( cm ); 144 145 // Add attribute: ref 146 { 147 daeMetaAttribute *ma = new daeMetaAttribute; 148 ma->setName( "ref" ); 149 ma->setType( dae.getAtomicTypes().get("xsIDREF")); 150 ma->setOffset( daeOffsetOf( domFx_surface_init_cube_common::domPrimary , attrRef )); 151 ma->setContainer( meta ); 152 ma->setIsRequired( true ); 153 154 meta->appendAttribute(ma); 155 } 156 157 meta->setElementSize(sizeof(domFx_surface_init_cube_common::domPrimary)); 158 meta->validate(); 159 160 return meta; 161 } 162 163 daeElementRef 164 domFx_surface_init_cube_common::domPrimary::domOrder::create(DAE& dae) 165 { 166 domFx_surface_init_cube_common::domPrimary::domOrderRef ref = new domFx_surface_init_cube_common::domPrimary::domOrder(dae); 167 return ref; 168 } 169 170 171 daeMetaElement * 172 domFx_surface_init_cube_common::domPrimary::domOrder::registerElement(DAE& dae) 173 { 174 daeMetaElement* meta = dae.getMeta(ID()); 175 if ( meta != NULL ) return meta; 176 177 meta = new daeMetaElement(dae); 178 dae.setMeta(ID(), *meta); 179 meta->setName( "order" ); 180 meta->registerClass(domFx_surface_init_cube_common::domPrimary::domOrder::create); 181 182 meta->setIsInnerClass( true ); 183 // Add attribute: _value 184 { 185 daeMetaAttribute *ma = new daeMetaAttribute; 186 ma->setName( "_value" ); 187 ma->setType( dae.getAtomicTypes().get("Fx_surface_face_enum")); 188 ma->setOffset( daeOffsetOf( domFx_surface_init_cube_common::domPrimary::domOrder , _value )); 189 ma->setContainer( meta ); 190 meta->appendAttribute(ma); 191 } 192 193 meta->setElementSize(sizeof(domFx_surface_init_cube_common::domPrimary::domOrder)); 194 meta->validate(); 195 196 return meta; 197 } 198 199 daeElementRef 200 domFx_surface_init_cube_common::domFace::create(DAE& dae) 201 { 202 domFx_surface_init_cube_common::domFaceRef ref = new domFx_surface_init_cube_common::domFace(dae); 203 return ref; 204 } 205 206 207 daeMetaElement * 208 domFx_surface_init_cube_common::domFace::registerElement(DAE& dae) 209 { 210 daeMetaElement* meta = dae.getMeta(ID()); 211 if ( meta != NULL ) return meta; 212 213 meta = new daeMetaElement(dae); 214 dae.setMeta(ID(), *meta); 215 meta->setName( "face" ); 216 meta->registerClass(domFx_surface_init_cube_common::domFace::create); 217 218 meta->setIsInnerClass( true ); 219 220 // Add attribute: ref 221 { 222 daeMetaAttribute *ma = new daeMetaAttribute; 223 ma->setName( "ref" ); 224 ma->setType( dae.getAtomicTypes().get("xsIDREF")); 225 ma->setOffset( daeOffsetOf( domFx_surface_init_cube_common::domFace , attrRef )); 226 ma->setContainer( meta ); 227 ma->setIsRequired( true ); 228 229 meta->appendAttribute(ma); 230 } 231 232 meta->setElementSize(sizeof(domFx_surface_init_cube_common::domFace)); 233 meta->validate(); 234 235 return meta; 236 } 237 238