Changeset 962 for applications/bdmtoolbox
- Timestamp:
- 05/19/10 21:32:40 (15 years ago)
- Location:
- applications/bdmtoolbox/mex
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/bdmtoolbox/mex/CMakeLists.txt
r954 r962 41 41 42 42 MEX(class_defaults) 43 EXEC(class_defaults) -
applications/bdmtoolbox/mex/class_defaults.cpp
r944 r962 31 31 //CONFIG 32 32 UImxArray Cfg(input[0]); 33 Cfg.writeFile("class_defaults.cfg"); 34 if ( n_output<1 ) mexErrMsgTxt ( "No output - nothing to do!" ); 35 36 #else 37 int main ( int argc, char* argv[] ) { 38 const char *fname; 39 if ( argc>1 ) { 40 fname = argv[1]; 41 } else { 42 fname="class_defaults.cfg"; 43 } 44 UIFile Cfg ( fname ); 45 #endif 46 33 47 shared_ptr<root> r=UI::build<root>(Cfg); 34 35 if ( n_output<1 ) mexErrMsgTxt ( "No output - nothing to do!" ); 48 49 #ifdef MEX 36 50 UImxArray Ret; 37 UI::save( r, Ret.getRoot());51 UI::save(*r, Ret); 38 52 39 53 output[0] = Ret.create_mxArray(); 54 #else 55 UIFile Out; 56 UI::save(*r,Out); 57 Out.writeFile("defaults"); 58 #endif 40 59 } 41 #endif