MexModelManager Class Reference

A special form of ModelManager used in mex files. More...

#include <Matlab/MexModelManager.H>

Inheritance diagram for MexModelManager:
Inheritance graph
[legend]
Collaboration diagram for MexModelManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MexModelManager (const std::string &descrName="Mex Model", const std::string &tagName="mexModel")
 Default constructor.
virtual ~MexModelManager ()
 Virtual destructor ensures proper destruction of derived classes.
bool parseMexCommandLine (const int nrhs, const mxArray *prhs[], const char *usage, const int minarg, const int maxarg)
 Parse all input arguments.
uint numExtraMexArgs () const
 Get the number of available extra args.
const mxArray * getExtraMexArg (const uint num) const
 Get an extra arg, by number.
void exitMexFunction (int return_code=0)
 Called to leave the program, e.g. when printing the Help messages.

Protected Attributes

std::vector< const mxArray * > extraMexArgs
 non-option command-line args

Detailed Description

A special form of ModelManager used in mex files.

Definition at line 46 of file MexModelManager.H.


Constructor & Destructor Documentation

MexModelManager::MexModelManager ( const std::string descrName = "Mex Model",
const std::string tagName = "mexModel" 
)

Default constructor.

Parameters:
descrName descriptive name
tagName tag name (see ModelComponent.H)

Definition at line 56 of file MexModelManager.C.

References fpExceptionsLock(), fpExceptionsOff(), and fpExceptionsUnlock().

MexModelManager::~MexModelManager (  )  [virtual]

Virtual destructor ensures proper destruction of derived classes.

Definition at line 68 of file MexModelManager.C.


Member Function Documentation

void MexModelManager::exitMexFunction ( int  return_code = 0  ) 

Called to leave the program, e.g. when printing the Help messages.

This implementation calls mexErrMsgTxt.

Definition at line 176 of file MexModelManager.C.

References mexFatal(), and sformat().

const mxArray * MexModelManager::getExtraMexArg ( const uint  num  )  const

Get an extra arg, by number.

Definition at line 165 of file MexModelManager.C.

References extraMexArgs, mexFatal(), and sformat().

uint MexModelManager::numExtraMexArgs (  )  const

Get the number of available extra args.

Definition at line 161 of file MexModelManager.C.

References extraMexArgs.

bool MexModelManager::parseMexCommandLine ( const int  nrhs,
const mxArray *  prhs[],
const char *  usage,
const int  minarg,
const int  maxarg 
)

Parse all input arguments.

All strings that start with '-' are interpreted as command-line options, all other arguments will be available though getExtraMexArg(). Use '--help' for a list of available options. Returns true upon fully successful parse.

Parameters:
nrhs the number of command-line args
prhs the input args
usage a textual description of the expected usage format
minarg the minimum number of non-optional arguments
maxarg the maximum number of non-optional args, or -1 if unbounded

Definition at line 72 of file MexModelManager.C.

References ModelManager::clearExtraArgs(), ModelComponent::exportOptions(), extraMexArgs, ModelManager::getExtraArg(), MC_RECURSE, mexError(), ModelManager::numExtraArgs(), ModelManager::parseCommandLineCore(), and sformat().


Member Data Documentation

std::vector<const mxArray*> MexModelManager::extraMexArgs [protected]

non-option command-line args

Definition at line 87 of file MexModelManager.H.

Referenced by getExtraMexArg(), numExtraMexArgs(), and parseMexCommandLine().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:23:09 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3