source:
issm/oecreview/Archive/23390-24306/ISSM-23689-23690.diff
Last change on this file was 24307, checked in by , 5 years ago | |
---|---|
File size: 2.5 KB |
-
../trunk-jpl/src/c/classes/ExternalResults/GenericExternalResult.h
55 55 void GenericMarshall(char** pmarshalled_data,int* pmarshalled_data_size, int marshall_direction){/*{{{*/ 56 56 57 57 MARSHALLING_ENUM(this->ObjectEnum()); 58 59 bool isnull=true;60 if(marshall_direction==MARSHALLING_FORWARD || marshall_direction == MARSHALLING_SIZE) if(value) isnull=false;61 62 58 MARSHALLING(id); 63 MARSHALLING(result_name);64 MARSHALLING(isnull)65 if (!isnull) MARSHALLING(value) else value=0;66 59 MARSHALLING(step); 67 60 MARSHALLING(time); 68 61 62 /*Marshal result name*/ 63 int size = 0; 64 if(marshall_direction==MARSHALLING_FORWARD || marshall_direction == MARSHALLING_SIZE) size=strlen(result_name)+1; 65 MARSHALLING(size); 66 MARSHALLING_DYNAMIC(result_name,char,size); 67 68 /*Marshall value*/ 69 this->value=0; 70 bool isnull=true; 71 if(marshall_direction==MARSHALLING_FORWARD || marshall_direction == MARSHALLING_SIZE){ 72 if(value) isnull=false; 73 } 74 MARSHALLING(isnull); 75 if(!isnull) MARSHALLING(value) 69 76 } /*}}}*/ 70 77 71 78 /*GenericExternalResult constructors and destructors*/ … … 76 83 N = 0; 77 84 step = 0; 78 85 time = 0; 79 value = NULL;86 value = 0; 80 87 } /*}}}*/ 81 88 GenericExternalResult(int in_id, int in_enum_type,ResultType in_values, int in_M,int in_N,int in_step,IssmDouble in_time){/*{{{*/ 82 89 _error_("template GenericExternalResult(int in_id, int in_enum_type,double* in_values, int in_M,int in_N,int in_step,IssmDouble in_time) not implemented for this ResultType\n"); -
../trunk-jpl/src/c/datastructures/DataSet.cpp
292 292 penpair->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction); 293 293 this->AddObject(penpair); 294 294 } 295 else if(obj_enum==DoubleExternalResultEnum){ 296 GenericExternalResult<double>* result=new GenericExternalResult<double>(); 297 result->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction); 298 result->Echo(); 299 this->AddObject(result); 300 } 295 301 else _error_("could not recognize enum type: " << obj_enum << ": " << EnumToStringx(obj_enum) ); 296 302 } 297 303 }
Note:
See TracBrowser
for help on using the repository browser.