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

Last change on this file since 827 was 789, checked in by dkearney, 17 years ago

adding tool.version.rappture.language to xml files to keep track of language usage

File size: 1.6 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->put("tool.version.rappture.language", "matlab");
47            lib->result();
48            err = 0;
49            // cleanLibDict();
50        }
51    }
52
53    plhs[0] = mxCreateDoubleScalar(err);
54
55    return;
56}
Note: See TracBrowser for help on using the repository browser.