Ignore:
Timestamp:
Jan 11, 2006 3:55:15 PM (18 years ago)
Author:
dkearney
Message:

modified matlab bindings and tests.
includes all popular functions available in RpLibrary? and RpUnits
compile and run, but not all tests work as they should
some of these functions will be removed soon because the id field is
no longer a valid argument. path ids should be incorporated in paths from now on.

File:
1 edited

Legend:

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

    r135 r154  
    33 *  INTERFACE: Matlab Rappture Library Source
    44 *
    5  *    retStr = rpLibNodeType(lib)
     5 *    [retStr,err] = rpLibNodeType(lib)
    66 *
    77 * ======================================================================
     
    1616#include "RpMatlabInterface.h"
    1717
     18/**********************************************************************/
     19// METHOD: [retStr,err] = rpLibNodeType(nodeHandle)
     20/// Return the type name of the node represented by 'nodeHandle'
     21/**
     22 * This method returns the type name of the node represented`
     23 * by 'nodeHandle'.
     24 * Error code, err=0 on success, anything else is failure.
     25 */
     26
     27
    1828void mexFunction(int nlhs, mxArray *plhs[],
    1929                 int nrhs, const mxArray *prhs[])
     
    2131    const char *output_buf;
    2232    int libIndex = 0;
     33    int err = 1;
    2334    RpLibrary* lib = NULL;
    2435
     
    2637    if (nrhs != 1)
    2738        mexErrMsgTxt("One input required.");
    28     else if (nlhs > 1)
     39    else if (nlhs > 2)
    2940        mexErrMsgTxt("Too many output arguments.");
    3041
     
    3748        if (lib) {
    3849            output_buf = rpNodeType(lib);
     50            if (output_buf) {
     51                err = 0;
     52            }
    3953        }
    4054    }
     
    4256    /* Set C-style string output_buf to MATLAB mexFunction output*/
    4357    plhs[0] = mxCreateString(output_buf);
     58    plhs[1] = mxCreateDoubleScalar(err);
    4459
    4560    return;
Note: See TracChangeset for help on using the changeset viewer.