Changeset 25523
- Timestamp:
- 09/03/20 10:48:33 (5 years ago)
- Location:
- issm/trunk-jpl/src/c/classes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/ElementHook.cpp
r25508 r25523 75 75 76 76 /*preliminary, before marshall starts: */ 77 if(marshallhandle->OperationNumber() ==MARSHALLING_WRITE || marshallhandle->OperationNumber()==MARSHALLING_SIZE){77 if(marshallhandle->OperationNumber()!=MARSHALLING_LOAD){ 78 78 if(this->hneighbors)hneighbors_null=false; 79 79 if(this->hnodes){ -
issm/trunk-jpl/src/c/classes/ExternalResults/GenericExternalResult.h
r25508 r25523 63 63 /*Marshal result name*/ 64 64 int size = 0; 65 if(marshallhandle->OperationNumber() ==MARSHALLING_WRITE || marshallhandle->OperationNumber() == MARSHALLING_SIZE) size=strlen(result_name)+1;65 if(marshallhandle->OperationNumber()!=MARSHALLING_LOAD) size=strlen(result_name)+1; 66 66 marshallhandle->call(size); 67 67 marshallhandle->call(this->result_name,size); … … 70 70 this->value=0; 71 71 bool isnull=true; 72 if(marshallhandle->OperationNumber() ==MARSHALLING_WRITE || marshallhandle->OperationNumber() == MARSHALLING_SIZE){72 if(marshallhandle->OperationNumber()!=MARSHALLING_LOAD){ 73 73 if(value) isnull=false; 74 74 } … … 168 168 } /*}}}*/ 169 169 int ObjectEnum(void){ /*{{{*/ 170 _error_("template ObjectEnum not implemented for this ResultType\n");170 return GenericExternalResultEnum; 171 171 } /*}}}*/ 172 172 void Marshall(MarshallHandle* marshallhandle){/*{{{*/ 173 _error_("not implemented yet!"); 173 _printf_(" WARNING: result "<<this->result_name<<" is a GenericExternalResult and cannot be marshalled (need overload)\n"); 174 /*Nothing for now*/ 174 175 } 175 176 /*}}}*/ … … 239 240 } /*}}}*/ 240 241 template <> inline void GenericExternalResult<bool>::Marshall(MarshallHandle* marshallhandle){/*{{{*/ 241 242 printf("-------------- file: GenericExternalResult.h line: %i\n",__LINE__); 242 243 this->GenericMarshall(marshallhandle); 243 244 … … 256 257 } /*}}}*/ 257 258 template <> inline void GenericExternalResult<int>::Marshall(MarshallHandle* marshallhandle){/*{{{*/ 259 printf("-------------- file: GenericExternalResult.h line: %i\n",__LINE__); 258 260 this->GenericMarshall(marshallhandle); 259 261 } /*}}}*/ … … 274 276 } /*}}}*/ 275 277 template <> inline void GenericExternalResult<double>::Marshall(MarshallHandle* marshallhandle){/*{{{*/ 278 printf("-------------- file: GenericExternalResult.h line: %i\n",__LINE__); 276 279 this->GenericMarshall(marshallhandle); 277 280 } /*}}}*/ … … 343 346 } /*}}}*/ 344 347 template <> inline void GenericExternalResult<char*>::Marshall(MarshallHandle* marshallhandle){/*{{{*/ 345 346 int size = 0; 347 348 if(marshallhandle->OperationNumber()==MARSHALLING_WRITE || marshallhandle->OperationNumber() == MARSHALLING_SIZE)size=strlen(value)+1; 349 348 printf("-------------- file: GenericExternalResult.h line: %i\n",__LINE__); 350 349 marshallhandle->call(this->id); 351 350 marshallhandle->call(this->result_name); 352 marshallhandle->call(size); 353 marshallhandle->call(this->value,size); 351 marshallhandle->call(this->value); 354 352 marshallhandle->call(this->step); 355 353 marshallhandle->call(this->time); … … 473 471 } /*}}}*/ 474 472 template <> inline void GenericExternalResult<int*>::Marshall(MarshallHandle* marshallhandle){/*{{{*/ 473 printf("-------------- file: GenericExternalResult.h line: %i\n",__LINE__); 475 474 476 475 int object_enum = this->ObjectEnum(); … … 606 605 } /*}}}*/ 607 606 template <> inline void GenericExternalResult<IssmPDouble*>::Marshall(MarshallHandle* marshallhandle){/*{{{*/ 607 printf("-------------- file: GenericExternalResult.h line: %i\n",__LINE__); 608 608 609 609 int object_enum = this->ObjectEnum(); … … 829 829 /*}}}*/ 830 830 template <> inline void GenericExternalResult<Vector<IssmDouble>*>::Marshall(MarshallHandle* marshallhandle){/*{{{*/ 831 832 831 _error_("GenericExternalResult instantiated for type Vector<IssmDouble>* called " << result_name << " not implemented yet"); 833 834 832 } /*}}}*/ 835 833 -
issm/trunk-jpl/src/c/classes/Inputs/ControlInput.cpp
r25508 r25523 122 122 int object_enum = ControlInputEnum; 123 123 marshallhandle->call(object_enum); 124 _error_("Not implemented"); 124 125 marshallhandle->call(this->control_id); 126 marshallhandle->call(this->enum_type); 127 marshallhandle->call(this->layout_enum); 128 129 /*Allocate memory*/ 130 if(marshallhandle->OperationNumber()==MARSHALLING_LOAD){ 131 switch(this->layout_enum){ 132 case TriaInputEnum: 133 this->values =new TriaInput(); 134 this->savedvalues=new TriaInput(); 135 this->minvalues =new TriaInput(); 136 this->maxvalues =new TriaInput(); 137 this->gradient =new TriaInput(); 138 break; 139 case PentaInputEnum: 140 this->values =new PentaInput(); 141 this->savedvalues=new PentaInput(); 142 this->minvalues =new PentaInput(); 143 this->maxvalues =new PentaInput(); 144 this->gradient =new PentaInput(); 145 break; 146 case TransientInputEnum: 147 this->values =new TransientInput(); 148 this->savedvalues=new TransientInput(); 149 this->minvalues =new TransientInput(); 150 this->maxvalues =new TransientInput(); 151 this->gradient =new TransientInput(); 152 break; 153 default: 154 _error_("Input of Enum \"" << EnumToStringx(this->layout_enum) << "\" not supported yet"); 155 } 156 } 157 158 this->values->Marshall(marshallhandle); 159 this->savedvalues->Marshall(marshallhandle); 160 this->minvalues->Marshall(marshallhandle); 161 this->maxvalues->Marshall(marshallhandle); 162 this->gradient->Marshall(marshallhandle); 125 163 } 126 164 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp
r25508 r25523 87 87 marshallhandle->call(object_enum); 88 88 89 if(marshallhandle->OperationNumber() ==MARSHALLING_WRITE || marshallhandle->OperationNumber()==MARSHALLING_SIZE){89 if(marshallhandle->OperationNumber()!=MARSHALLING_LOAD){ 90 90 91 91 /*Marshall num_inputs first*/ … … 137 137 this->inputs[index]=pentainput2; 138 138 } 139 else if(object_enum==ControlInputEnum){ 140 ControlInput* input=new ControlInput(); 141 input->Marshall(marshallhandle); 142 this->inputs[index]=input; 143 } 139 144 else{ 140 145 _error_("input "<<EnumToStringx(object_enum)<<" not supported");
Note:
See TracChangeset
for help on using the changeset viewer.