Changeset 22588
- Timestamp:
- 03/20/18 17:46:13 (7 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/Params
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Params/DataSetParam.cpp
r20827 r22588 24 24 25 25 enum_type=in_enum_type; 26 value=in_value->Copy(); ;26 value=in_value->Copy(); 27 27 } 28 28 /*}}}*/ … … 74 74 } 75 75 /*}}}*/ 76 void DataSetParam::SetValue(DataSet* dataset){/*{{{*/ 77 this->value=dataset; 78 } 79 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Params/DataSetParam.h
r20827 r22588 70 70 void SetValue(Vector<IssmDouble>* vec){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");} 71 71 void SetValue(Matrix<IssmDouble>* mat){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");} 72 void SetValue(DataSet* dataset) {_error_("DataSet param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a DataSet yet");}72 void SetValue(DataSet* dataset); 73 73 void SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("DataSet param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");} 74 74 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Params/Param.h
r21508 r22588 53 53 virtual void SetValue(char* string)=0; 54 54 virtual void SetValue(char** stringarray,int M)=0; 55 virtual void SetValue(DataSet* dataset){_error_("not implemented yet");}; 55 56 virtual void SetValue(IssmDouble* IssmDoublearray,int M)=0; 56 57 virtual void SetValue(IssmDouble* pIssmDoublearray,int M,int N)=0; -
issm/trunk-jpl/src/c/classes/Params/Parameters.cpp
r22561 r22588 554 554 param=xDynamicCast<Param*>(this->FindParamObject(enum_type)); 555 555 556 if(param) param->SetValue(dataset); //already exists, just set it. 557 else this->AddObject(new DataSetParam(enum_type,dataset)); //just add the new parameter. 556 if(param){ 557 param->SetValue(dataset); //already exists, just set it. 558 } 559 else{ 560 this->AddObject(new DataSetParam(enum_type,dataset)); //just add the new parameter. 561 } 558 562 } 559 563 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.