Changeset 12015 for issm/trunk-jpl/src/c/Container/Options.cpp
- Timestamp:
- 04/16/12 19:08:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Container/Options.cpp
r11944 r12015 20 20 #include "../shared/shared.h" 21 21 #include "../EnumDefinitions/EnumDefinitions.h" 22 #if _SERIAL_23 22 #include "../io/io.h" 24 #endif25 23 /*}}}*/ 26 24 … … 31 29 } 32 30 /*}}}*/ 33 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)34 /*FUNCTION Options::Options(int istart, int nrhs, const mxArray* prhs[]){{{1*/35 Options::Options(int istart, int nrhs, const mxArray* prhs[]){36 37 int i;38 char *name = NULL;39 Option *option = NULL;40 41 /*loop over each name and value*/42 for (i=istart; i<nrhs; i=i+2){43 if (!mxIsClass(prhs[i],"char")) _error_("Argument %d must be name of option.",i+1);44 45 FetchData(&name,prhs[i]);46 if (i+1 == nrhs) _error_("Argument %d must exist and be value of option \"%s\".",i+2,name);47 48 //_printf_(true," Processing option \"%s\" of class \"%s\".\n",name,mxGetClassName(prhs[i+1]));49 option=(Option*)OptionParse(name,&prhs[i+1]);50 this->AddOption(option);51 option=NULL;52 }53 54 /*echo the dataset */55 //if (this->Size()) for(i=0;i<this->Size();i++) ((Option*)this->GetObjectByOffset(i))->Echo();56 }57 /*}}}*/58 #endif59 31 /*FUNCTION Options::~Options(){{{1*/ 60 32 Options::~Options(){
Note:
See TracChangeset
for help on using the changeset viewer.