Changeset 4873 for issm/trunk/src/c/Container/Parameters.cpp
- Timestamp:
- 07/29/10 10:07:56 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Container/Parameters.cpp
r4855 r4873 309 309 } 310 310 /*}}}*/ 311 /*FUNCTION Parameters::FindParam(FILE** pfid,int enum_type){{{1*/ 312 int Parameters::FindParam(FILE** pfid,int enum_type){ 313 314 /*Go through a dataset, and find a Param* object 315 *which parameter name is "name" : */ 316 317 vector<Object*>::iterator object; 318 Param* param=NULL; 319 320 int found=0; 321 322 for ( object=objects.begin() ; object < objects.end(); object++ ){ 323 324 /*Ok, this object is a parameter, recover it and ask which name it has: */ 325 param=(Param*)(*object); 326 327 if(param->EnumType()==enum_type){ 328 /*Ok, this is the one! Recover the value of this parameter: */ 329 param->GetParameterValue(pfid); 330 found=1; 331 break; 332 } 333 } 334 return found; 335 } 336 /*}}}*/ 311 337 312 338 /*FUNCTION Parameters::SetParam(bool boolean,int enum_type);{{{1*/ … … 418 444 } 419 445 /*}}}*/ 446 /*FUNCTION Parameters::SetParam(FILE* fid,int enum_type);{{{1*/ 447 void Parameters::SetParam(FILE* fid,int enum_type){ 448 449 Param* param=NULL; 450 451 /*first, figure out if the param has already been created: */ 452 param=(Param*)this->FindParamObject(enum_type); 453 454 if(param) param->SetValue(fid); //already exists, just set it. 455 else this->AddObject(new FileParam(enum_type,fid)); //just add the new parameter. 456 } 457 /*}}}*/ 420 458 421 459 /*FUNCTION Parameters::FindParamObject{{{1*/
Note:
See TracChangeset
for help on using the changeset viewer.