Ignore:
Timestamp:
Jan 31, 2006, 9:15:36 AM (19 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/rpLibXml.cc

    r154 r162  
    2828                 int nrhs, const mxArray *prhs[])
    2929{
    30     const char* output_buf = NULL;
    3130    int libIndex = 0;
    3231    int err = 1;
    3332    RpLibrary* lib = NULL;
     33    std::string retStr = "";
    3434
    3535    /* Check for proper number of arguments. */
    36     if (nrhs != 1)
     36    if (nrhs != 1) {
    3737        mexErrMsgTxt("One input required.");
    38     else if (nlhs > 2)
    39         mexErrMsgTxt("Too many output arguments.");
     38    }
    4039
    4140    // grab the integer value of the library handle
     
    4645        lib = getObject_Lib(libIndex);
    4746        if (lib) {
    48             output_buf = rpXml(lib);
    49             if (output_buf) {
     47            retStr = lib->xml();
     48            if (!retStr.empty()) {
    5049                err = 0;
    5150            }
     
    5453
    5554    /* Set C-style string output_buf to MATLAB mexFunction output*/
    56     plhs[0] = mxCreateString(output_buf);
     55    plhs[0] = mxCreateString(retStr.c_str());
    5756    plhs[1] = mxCreateDoubleScalar(err);
    5857
Note: See TracChangeset for help on using the changeset viewer.