Ignore:
Timestamp:
Jan 31, 2006 9:15:36 AM (18 years ago)
Author:
dkearney
Message:

changed matlab api to call c++ functions instead of rappture's c api
removed following functions because they are outdated and should not be included at matlab/octave's release
src/octave/rpLibPutDoubleId.cc
src/octave/rpLibPutStringId.cc
src/matlab/rpLibPutDoubleId.cc
src/matlab/rpLibPutStringId.cc
cleaned up makefile to reflect the removal of above functions.
matlab bindings need to be retested. they receive a runtime error about undefined symbols

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/matlab/rpLibGet.cc

    r154 r162  
    3535    int         err         = 1;
    3636    RpLibrary*  lib         = NULL;
    37     char*       path        = NULL;
    38     const char* retString   = NULL;
     37    std::string path        = "";
     38    std::string retStr      = "";
    3939
    4040    /* Check for proper number of arguments. */
    41     if (nrhs != 2)
     41    if (nrhs != 2) {
    4242        mexErrMsgTxt("Two input required.");
    43     else if (nlhs > 2)
    44         mexErrMsgTxt("Too many output arguments.");
     43    }
    4544
    4645    libIndex = getIntInput(prhs[0]);
     
    4847
    4948    /* Call the C subroutine. */
    50     if ( (libIndex > 0) && (path) ) {
     49    if ( (libIndex > 0) && (!path.empty()) ) {
    5150        lib = getObject_Lib(libIndex);
    5251
    5352        if (lib) {
    54             retString = rpGet(lib,path);
    55             if (retString) {
    56                 err = 0;
    57             }
     53            retStr = lib->get(path);
     54            err = 0;
    5855        }
    5956    }
    6057
    6158    /* Set C-style string output_buf to MATLAB mexFunction output*/
    62     plhs[0] = mxCreateString(retString);
     59    plhs[0] = mxCreateString(retStr.c_str());
    6360    plhs[1] = mxCreateDoubleScalar(err);
    6461
Note: See TracChangeset for help on using the changeset viewer.