Changeset 25528
- Timestamp:
- 09/03/20 15:11:20 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/datastructures/DataSet.cpp
r25508 r25528 94 94 95 95 vector<Object*>::iterator obj; 96 int obj_size=0;97 96 int obj_enum=0; 98 97 int i; 99 98 100 if(marshallhandle->OperationNumber()==MARSHALLING_WRITE || marshallhandle->OperationNumber()==MARSHALLING_SIZE){ 99 int obj_size=0; 100 if(marshallhandle->OperationNumber()!=MARSHALLING_LOAD){ 101 101 obj_size=objects.size(); 102 102 } 103 103 else{ 104 clear(); 104 /*FIXME: if the assert below does not go off, then remove else{}*/ 105 _assert_(this->Size()==0); 106 //clear(); 105 107 } 106 108 … … 114 116 115 117 /*Now branch according to direction of marshalling: */ 116 if(marshallhandle->OperationNumber() ==MARSHALLING_WRITE || marshallhandle->OperationNumber()==MARSHALLING_SIZE){118 if(marshallhandle->OperationNumber()!=MARSHALLING_LOAD){ 117 119 if(!(this->sorted && numsorted>0 && this->id_offsets)){ 118 120 this->sorted_ids=NULL; … … 152 154 *stored in the buffer: */ 153 155 if(obj_enum==NodeEnum){ 154 Node* node=NULL; 155 node=new Node(); 156 Node* node=new Node(); 156 157 node->Marshall(marshallhandle); 157 158 this->AddObject(node); 158 159 } 159 160 else if(obj_enum==VertexEnum){ 160 Vertex* vertex=NULL; 161 vertex=new Vertex(); 161 Vertex* vertex=new Vertex(); 162 162 vertex->Marshall(marshallhandle); 163 163 this->AddObject(vertex); 164 164 } 165 165 else if(obj_enum==MaticeEnum){ 166 Matice* matice=NULL; 167 matice=new Matice(); 166 Matice* matice=new Matice(); 168 167 matice->Marshall(marshallhandle); 169 168 this->AddObject(matice); 170 169 } 171 170 else if(obj_enum==MatestarEnum){ 172 Matestar* matestar=NULL; 173 matestar=new Matestar(); 171 Matestar* matestar=new Matestar(); 174 172 matestar->Marshall(marshallhandle); 175 173 this->AddObject(matestar); 176 174 } 177 175 else if(obj_enum==SpcStaticEnum){ 178 SpcStatic* spcstatic=NULL; 179 spcstatic=new SpcStatic(); 176 SpcStatic* spcstatic=new SpcStatic(); 180 177 spcstatic->Marshall(marshallhandle); 181 178 this->AddObject(spcstatic); 182 179 } 183 180 else if(obj_enum==SpcDynamicEnum){ 184 SpcDynamic* spcdynamic=NULL; 185 spcdynamic=new SpcDynamic(); 181 SpcDynamic* spcdynamic=new SpcDynamic(); 186 182 spcdynamic->Marshall(marshallhandle); 187 183 this->AddObject(spcdynamic); 188 184 } 189 185 else if(obj_enum==SpcTransientEnum){ 190 SpcTransient* spctransient=NULL; 191 spctransient=new SpcTransient(); 186 SpcTransient* spctransient=new SpcTransient(); 192 187 spctransient->Marshall(marshallhandle); 193 188 this->AddObject(spctransient); 194 189 } 195 190 else if(obj_enum==TriaEnum){ 196 Tria* tria=NULL; 197 tria=new Tria(); 191 Tria* tria=new Tria(); 198 192 tria->Marshall(marshallhandle); 199 193 this->AddObject(tria); 200 194 } 201 195 else if(obj_enum==PentaEnum){ 202 Penta* penta=NULL; 203 penta=new Penta(); 196 Penta* penta=new Penta(); 204 197 penta->Marshall(marshallhandle); 205 198 this->AddObject(penta); 206 199 } 207 200 else if(obj_enum==TetraEnum){ 208 Tetra* tetra=NULL; 209 tetra=new Tetra(); 201 Tetra* tetra=new Tetra(); 210 202 tetra->Marshall(marshallhandle); 211 203 this->AddObject(tetra); 212 204 } 213 205 else if(obj_enum==SegEnum){ 214 Seg* seg=NULL; 215 seg=new Seg(); 206 Seg* seg=new Seg(); 216 207 seg->Marshall(marshallhandle); 217 208 this->AddObject(seg); 218 209 } 219 210 else if(obj_enum==RiftfrontEnum){ 220 Riftfront* rift=NULL; 221 rift=new Riftfront(); 211 Riftfront* rift=new Riftfront(); 222 212 rift->Marshall(marshallhandle); 223 213 this->AddObject(rift); 224 214 } 225 215 else if(obj_enum==NumericalfluxEnum){ 226 Numericalflux* numflux=NULL; 227 numflux=new Numericalflux(); 216 Numericalflux* numflux=new Numericalflux(); 228 217 numflux->Marshall(marshallhandle); 229 218 this->AddObject(numflux); 230 219 } 231 220 else if(obj_enum==PengridEnum){ 232 Pengrid* pengrid=NULL; 233 pengrid=new Pengrid(); 221 Pengrid* pengrid=new Pengrid(); 234 222 pengrid->Marshall(marshallhandle); 235 223 this->AddObject(pengrid); 236 224 } 237 225 else if(obj_enum==PenpairEnum){ 238 Penpair* penpair=NULL; 239 penpair=new Penpair(); 226 Penpair* penpair=new Penpair(); 240 227 penpair->Marshall(marshallhandle); 241 228 this->AddObject(penpair); … … 245 232 result->Marshall(marshallhandle); 246 233 this->AddObject(result); 234 } 235 else if(obj_enum==DependentObjectEnum){ 236 DependentObject* dep=new DependentObject(); 237 dep->Marshall(marshallhandle); 238 this->AddObject(dep); 239 } 240 else if(obj_enum==GenericExternalResultEnum){ 241 _printf_(" WARNING: Could not load GenericExternalResult, need overload\n"); 247 242 } 248 243 else _error_("could not recognize enum type: " << obj_enum << ": " << EnumToStringx(obj_enum) );
Note:
See TracChangeset
for help on using the changeset viewer.