source: trunk/src/matlab/rpLibResult.cc @ 508

Last change on this file since 508 was 162, checked in by dkearney, 19 years ago

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 size: 1.5 KB
Line 
1/*
2 * ----------------------------------------------------------------------
3 *  INTERFACE: Matlab Rappture Library Source
4 *
5 *    [err] = rpLibResult(lib)
6 *
7 * ======================================================================
8 *  AUTHOR:  Derrick Kearney, Purdue University
9 *  Copyright (c) 2004-2005  Purdue Research Foundation
10 *
11 *  See the file "license.terms" for information on usage and
12 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 * ======================================================================
14 */
15
16#include "RpMatlabInterface.h"
17
18/**********************************************************************/
19// METHOD: [err] = rpLibResult (libHandle)
20/// Write Rappture Library to run.xml and signal end of processing.
21/**
22 * Usually the last call of the program, this function signals to the gui
23 * that processing has completed and the output is ready to be
24 * displayed
25 */
26
27void mexFunction(int nlhs, mxArray *plhs[],
28                 int nrhs, const mxArray *prhs[])
29{
30    int libIndex = 0;
31    int err = 1;
32    RpLibrary* lib = NULL;
33
34    /* Check for proper number of arguments. */
35    if (nrhs != 1) {
36        mexErrMsgTxt("One input required.");
37    }
38
39    // grab the integer value of the library handle
40    libIndex = getIntInput(prhs[0]);
41
42    /* Call the C subroutine. */
43    if (libIndex > 0) {
44        lib = getObject_Lib(libIndex);
45        if (lib) {
46            lib->result();
47            err = 0;
48            // cleanLibDict();
49        }
50    }
51
52    plhs[0] = mxCreateDoubleScalar(err);
53
54    return;
55}
Note: See TracBrowser for help on using the repository browser.