root/applications/bdmtoolbox/mex/class_defaults.cpp @ 895

Revision 797, 1.1 kB (checked in by smidl, 14 years ago)

new objects: mgdirac + mexFnc

Line 
1/*!
2\file
3\brief check how the structure is processed
4
5
6 */
7
8#include <stat/emix.h>
9#include <estim/particles.h>
10#include <estim/kalman.h>
11#include <mpdm/arx_agent.h>
12
13
14using namespace bdm;
15
16#ifdef MEX
17#include <mex/mex_parser.h>
18#include <mex/mex_function.h>
19
20void mexFunction ( int n_output, mxArray *output[], int n_input, const mxArray *input[] ) {
21        // Check the number of inputs and output arguments
22        if ( n_input<1 ) mexErrMsgTxt ( "Usage:\n"
23                                                "instance=class_defaults(struct)\n"
24                                                "  struct              % configuration structure of a class\n"
25                                                "output:\n"
26                                                "  the same structure filled with the defaults.\n\n"
27                                                "This operation is usefull for obtaining info about a class construction" );
28
29        RV::clear_all();
30        //CONFIG
31        UImxArray Cfg(input[0]);
32        shared_ptr<root> r=UI::build<root>(Cfg);
33       
34        if ( n_output<1 ) mexErrMsgTxt ( "No output - nothing to do!" );
35        UImxArray Ret;
36        UI::save(r, Ret.getRoot());
37       
38        output[0] = Ret.create_mxArray();
39}
40#endif
Note: See TracBrowser for help on using the browser.