Changeset 6175 for issm/trunk
- Timestamp:
- 10/07/10 08:13:26 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk/src/c/Container/DataSet.cpp ¶
r5326 r6175 47 47 /*FUNCTION DataSet::Copy{{{1*/ 48 48 DataSet* DataSet::Copy(void){ 49 50 49 51 50 DataSet* copy=NULL; … … 198 197 memcpy(&enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int); 199 198 200 if(enum_type==NodeEnum){ 201 Node* node=NULL; 202 node=new Node(); 203 node->Demarshall(&marshalled_dataset); 204 dataset->AddObject(node); 205 } 206 else if(enum_type==VertexEnum){ 207 Vertex* vertex=NULL; 208 vertex=new Vertex(); 209 vertex->Demarshall(&marshalled_dataset); 210 dataset->AddObject(vertex); 211 } 212 else if(enum_type==DoubleParamEnum){ 213 DoubleParam* doubleparam=NULL; 214 doubleparam=new DoubleParam(); 215 doubleparam->Demarshall(&marshalled_dataset); 216 dataset->AddObject(doubleparam); 217 } 218 else if(enum_type==TriaEnum){ 219 Tria* tria=NULL; 220 tria=new Tria(); 221 tria->Demarshall(&marshalled_dataset); 222 dataset->AddObject(tria); 223 } 224 else if(enum_type==TriaVertexInputEnum){ 225 TriaVertexInput* triavertexinput=NULL; 226 triavertexinput=new TriaVertexInput(); 227 triavertexinput->Demarshall(&marshalled_dataset); 228 dataset->AddObject(triavertexinput); 229 } 230 else if(enum_type==PentaVertexInputEnum){ 231 PentaVertexInput* pentavertexinput=NULL; 232 pentavertexinput=new PentaVertexInput(); 233 pentavertexinput->Demarshall(&marshalled_dataset); 234 dataset->AddObject(pentavertexinput); 235 } 236 else if(enum_type==TriaVertexElementResultEnum){ 237 TriaVertexElementResult* triavertexelementresult=NULL; 238 triavertexelementresult=new TriaVertexElementResult(); 239 triavertexelementresult->Demarshall(&marshalled_dataset); 240 dataset->AddObject(triavertexelementresult); 241 } 242 else if(enum_type==PentaVertexElementResultEnum){ 243 PentaVertexElementResult* pentavertexelementresult=NULL; 244 pentavertexelementresult=new PentaVertexElementResult(); 245 pentavertexelementresult->Demarshall(&marshalled_dataset); 246 dataset->AddObject(pentavertexelementresult); 247 } 248 else if(enum_type==PentaEnum){ 249 Penta* penta=NULL; 250 penta=new Penta(); 251 penta->Demarshall(&marshalled_dataset); 252 dataset->AddObject(penta); 253 } 254 else if(enum_type==MaticeEnum){ 255 Matice* matice=NULL; 256 matice=new Matice(); 257 matice->Demarshall(&marshalled_dataset); 258 dataset->AddObject(matice); 259 } 260 else if(enum_type==MatparEnum){ 261 Matpar* matpar=NULL; 262 matpar=new Matpar(); 263 matpar->Demarshall(&marshalled_dataset); 264 dataset->AddObject(matpar); 265 } 266 else if(enum_type==SpcEnum){ 267 Spc* spc=NULL; 268 spc=new Spc(); 269 spc->Demarshall(&marshalled_dataset); 270 dataset->AddObject(spc); 271 } 272 else if(enum_type==PengridEnum){ 273 Pengrid* pengrid=NULL; 274 pengrid=new Pengrid(); 275 pengrid->Demarshall(&marshalled_dataset); 276 dataset->AddObject(pengrid); 277 } 278 else if(enum_type==PenpairEnum){ 279 Penpair* penpair=NULL; 280 penpair=new Penpair(); 281 penpair->Demarshall(&marshalled_dataset); 282 dataset->AddObject(penpair); 283 } 284 else if(enum_type==IcefrontEnum){ 285 Icefront* icefront=NULL; 286 icefront=new Icefront(); 287 icefront->Demarshall(&marshalled_dataset); 288 dataset->AddObject(icefront); 289 } 290 else if(enum_type==NumericalfluxEnum){ 291 Numericalflux* numericalflux=NULL; 292 numericalflux=new Numericalflux(); 293 numericalflux->Demarshall(&marshalled_dataset); 294 dataset->AddObject(numericalflux); 295 } 296 else if(enum_type==RiftfrontEnum){ 297 Riftfront* riftfront=NULL; 298 riftfront=new Riftfront(); 299 riftfront->Demarshall(&marshalled_dataset); 300 dataset->AddObject(riftfront); 301 } 302 else if(enum_type==DoubleInputEnum){ 303 DoubleInput* doubleinput=NULL; 304 doubleinput=new DoubleInput(); 305 doubleinput->Demarshall(&marshalled_dataset); 306 dataset->AddObject(doubleinput); 307 } 308 else if(enum_type==IntInputEnum){ 309 IntInput* intinput=NULL; 310 intinput=new IntInput(); 311 intinput->Demarshall(&marshalled_dataset); 312 dataset->AddObject(intinput); 313 } 314 else if(enum_type==BoolInputEnum){ 315 BoolInput* boolinput=NULL; 316 boolinput=new BoolInput(); 317 boolinput->Demarshall(&marshalled_dataset); 318 dataset->AddObject(boolinput); 319 } 320 else if(enum_type==IntParamEnum){ 321 IntParam* intparam=NULL; 322 intparam=new IntParam(); 323 intparam->Demarshall(&marshalled_dataset); 324 dataset->AddObject(intparam); 325 } 326 else if(enum_type==BoolParamEnum){ 327 BoolParam* boolparam=NULL; 328 boolparam=new BoolParam(); 329 boolparam->Demarshall(&marshalled_dataset); 330 dataset->AddObject(boolparam); 331 } 332 else if(enum_type==StringParamEnum){ 333 StringParam* stringparam=NULL; 334 stringparam=new StringParam(); 335 stringparam->Demarshall(&marshalled_dataset); 336 dataset->AddObject(stringparam); 337 } 338 else if(enum_type==DoubleVecExternalResultEnum){ 339 DoubleVecExternalResult* doublevecexternalresult=NULL; 340 doublevecexternalresult=new DoubleVecExternalResult(); 341 doublevecexternalresult->Demarshall(&marshalled_dataset); 342 dataset->AddObject(doublevecexternalresult); 343 } 344 else if(enum_type==DoubleExternalResultEnum){ 345 DoubleExternalResult* doubleexternalresult=NULL; 346 doubleexternalresult=new DoubleExternalResult(); 347 doubleexternalresult->Demarshall(&marshalled_dataset); 348 dataset->AddObject(doubleexternalresult); 349 } 350 else{ 351 ISSMERROR("could not recognize enum type: %i (%s)",enum_type,EnumToString(enum_type)); 199 switch(enum_type){ 200 case NodeEnum:{ 201 Node* node=NULL; 202 node=new Node(); 203 node->Demarshall(&marshalled_dataset); 204 dataset->AddObject(node);} 205 break; 206 case VertexEnum:{ 207 Vertex* vertex=NULL; 208 vertex=new Vertex(); 209 vertex->Demarshall(&marshalled_dataset); 210 dataset->AddObject(vertex);} 211 break; 212 case DoubleParamEnum:{ 213 DoubleParam* doubleparam=NULL; 214 doubleparam=new DoubleParam(); 215 doubleparam->Demarshall(&marshalled_dataset); 216 dataset->AddObject(doubleparam);} 217 break; 218 case TriaEnum:{ 219 Tria* tria=NULL; 220 tria=new Tria(); 221 tria->Demarshall(&marshalled_dataset); 222 dataset->AddObject(tria);} 223 break; 224 case TriaVertexInputEnum:{ 225 TriaVertexInput* triavertexinput=NULL; 226 triavertexinput=new TriaVertexInput(); 227 triavertexinput->Demarshall(&marshalled_dataset); 228 dataset->AddObject(triavertexinput);} 229 break; 230 case PentaVertexInputEnum:{ 231 PentaVertexInput* pentavertexinput=NULL; 232 pentavertexinput=new PentaVertexInput(); 233 pentavertexinput->Demarshall(&marshalled_dataset); 234 dataset->AddObject(pentavertexinput);} 235 break; 236 case TriaVertexElementResultEnum:{ 237 TriaVertexElementResult* triavertexelementresult=NULL; 238 triavertexelementresult=new TriaVertexElementResult(); 239 triavertexelementresult->Demarshall(&marshalled_dataset); 240 dataset->AddObject(triavertexelementresult);} 241 break; 242 case PentaVertexElementResultEnum:{ 243 PentaVertexElementResult* pentavertexelementresult=NULL; 244 pentavertexelementresult=new PentaVertexElementResult(); 245 pentavertexelementresult->Demarshall(&marshalled_dataset); 246 dataset->AddObject(pentavertexelementresult);} 247 break; 248 case PentaEnum:{ 249 Penta* penta=NULL; 250 penta=new Penta(); 251 penta->Demarshall(&marshalled_dataset); 252 dataset->AddObject(penta);} 253 break; 254 case MaticeEnum:{ 255 Matice* matice=NULL; 256 matice=new Matice(); 257 matice->Demarshall(&marshalled_dataset); 258 dataset->AddObject(matice);} 259 break; 260 case MatparEnum:{ 261 Matpar* matpar=NULL; 262 matpar=new Matpar(); 263 matpar->Demarshall(&marshalled_dataset); 264 dataset->AddObject(matpar);} 265 break; 266 case SpcEnum:{ 267 Spc* spc=NULL; 268 spc=new Spc(); 269 spc->Demarshall(&marshalled_dataset); 270 dataset->AddObject(spc);} 271 break; 272 case PengridEnum:{ 273 Pengrid* pengrid=NULL; 274 pengrid=new Pengrid(); 275 pengrid->Demarshall(&marshalled_dataset); 276 dataset->AddObject(pengrid);} 277 break; 278 case PenpairEnum:{ 279 Penpair* penpair=NULL; 280 penpair=new Penpair(); 281 penpair->Demarshall(&marshalled_dataset); 282 dataset->AddObject(penpair);} 283 break; 284 case IcefrontEnum:{ 285 Icefront* icefront=NULL; 286 icefront=new Icefront(); 287 icefront->Demarshall(&marshalled_dataset); 288 dataset->AddObject(icefront);} 289 break; 290 case NumericalfluxEnum:{ 291 Numericalflux* numericalflux=NULL; 292 numericalflux=new Numericalflux(); 293 numericalflux->Demarshall(&marshalled_dataset); 294 dataset->AddObject(numericalflux);} 295 break; 296 case RiftfrontEnum:{ 297 Riftfront* riftfront=NULL; 298 riftfront=new Riftfront(); 299 riftfront->Demarshall(&marshalled_dataset); 300 dataset->AddObject(riftfront);} 301 break; 302 case DoubleInputEnum:{ 303 DoubleInput* doubleinput=NULL; 304 doubleinput=new DoubleInput(); 305 doubleinput->Demarshall(&marshalled_dataset); 306 dataset->AddObject(doubleinput);} 307 break; 308 case IntInputEnum:{ 309 IntInput* intinput=NULL; 310 intinput=new IntInput(); 311 intinput->Demarshall(&marshalled_dataset); 312 dataset->AddObject(intinput);} 313 break; 314 case BoolInputEnum:{ 315 BoolInput* boolinput=NULL; 316 boolinput=new BoolInput(); 317 boolinput->Demarshall(&marshalled_dataset); 318 dataset->AddObject(boolinput);} 319 break; 320 case IntParamEnum:{ 321 IntParam* intparam=NULL; 322 intparam=new IntParam(); 323 intparam->Demarshall(&marshalled_dataset); 324 dataset->AddObject(intparam);} 325 break; 326 case BoolParamEnum:{ 327 BoolParam* boolparam=NULL; 328 boolparam=new BoolParam(); 329 boolparam->Demarshall(&marshalled_dataset); 330 dataset->AddObject(boolparam);} 331 break; 332 case StringParamEnum:{ 333 StringParam* stringparam=NULL; 334 stringparam=new StringParam(); 335 stringparam->Demarshall(&marshalled_dataset); 336 dataset->AddObject(stringparam);} 337 break; 338 case DoubleVecExternalResultEnum:{ 339 DoubleVecExternalResult* doublevecexternalresult=NULL; 340 doublevecexternalresult=new DoubleVecExternalResult(); 341 doublevecexternalresult->Demarshall(&marshalled_dataset); 342 dataset->AddObject(doublevecexternalresult);} 343 break; 344 case DoubleExternalResultEnum:{ 345 DoubleExternalResult* doubleexternalresult=NULL; 346 doubleexternalresult=new DoubleExternalResult(); 347 doubleexternalresult->Demarshall(&marshalled_dataset); 348 dataset->AddObject(doubleexternalresult);} 349 break; 350 default: 351 ISSMERROR("could not recognize enum type: %i (%s)",enum_type,EnumToString(enum_type)); 352 352 } 353 353
Note:
See TracChangeset
for help on using the changeset viewer.