Changeset 162 for trunk/src/matlab/rpLibElement.cc
- Timestamp:
- Jan 31, 2006, 9:15:36 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/matlab/rpLibElement.cc
r154 r162 29 29 */ 30 30 31 32 31 void mexFunction(int nlhs, mxArray *plhs[], 33 32 int nrhs, const mxArray *prhs[]) … … 38 37 RpLibrary* lib = NULL; 39 38 RpLibrary* retLib = NULL; 40 char* path = NULL;39 std::string path = ""; 41 40 42 41 /* Check for proper number of arguments. */ 43 if (nrhs != 2) 42 if (nrhs != 2) { 44 43 mexErrMsgTxt("Two input required."); 45 else if (nlhs > 2) 46 mexErrMsgTxt("Too many output arguments."); 44 } 47 45 48 46 libIndex = getIntInput(prhs[0]); 49 47 path = getStringInput(prhs[1]); 50 48 51 /* Call the C subroutine. */52 if ( (libIndex > 0) && ( path) ) {49 /* Call the C++ subroutine. */ 50 if ( (libIndex > 0) && (!path.empty()) ) { 53 51 lib = getObject_Lib(libIndex); 54 52 if (lib) { 55 retLib = rpElement(lib,path);53 retLib = lib->element(path); 56 54 retLibIndex = storeObject_Lib(retLib); 57 55 if (retLibIndex) {
Note: See TracChangeset
for help on using the changeset viewer.