18 #if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3)) 27 #ifndef __MEX_PUBLISHED_API_HPP__ 28 #define __MEX_PUBLISHED_API_HPP__ 33 # define EXTERN_C extern "C" 35 # define EXTERN_C extern 39 #if defined(BUILDING_LIBMEX) 40 # include "mex/libmwmex_util.hpp" 46 # ifndef LIBMWMEX_API_EXTERN_C 47 # define LIBMWMEX_API_EXTERN_C EXTERN_C LIBMWMEX_API 54 #ifndef mex_typedefs_h 55 #define mex_typedefs_h 77 #define cicompare(s1,s2) utStrcmpi((s1),(s2)) 79 #define cicompare(s1,s2) strcmp((s1),(s2)) 81 #define cscompare(s1,s2) strcmp((s1),(s2)) 97 void (*initialize)(void);
98 void (*terminate)(void);
101 #define MEX_INFORMATION_VERSION 1 131 #ifdef DLL_EXPORT_SYM 132 # define MEXFUNCTION_LINKAGE EXTERN_C DLL_EXPORT_SYM 134 # ifdef MW_NEEDS_VERSION_H 135 # include "version.h" 136 # define MEXFUNCTION_LINKAGE EXTERN_C DLL_EXPORT_SYM 138 # define MEXFUNCTION_LINKAGE EXTERN_C 207 #define printf mexPrintf 279 #ifndef MEX_DOUBLE_HANDLE 281 #define mexCallMATLAB mexCallMATLABWithObject 282 #define mexCallMATLABWithTrap mexCallMATLABWithTrapWithObject 283 #define mexGetVariable mexGetVariableWithObject 284 #define mexGet(a,b) \ 285 NULL;do{mexGetIsDeprecated x;}while(0) 286 #define mexSet(a,b,c) \ 287 0;do{mexSetIsDeprecated x;}while(0)
struct _mexLocalFunctionTable * mexLocalFunctionTable
LIBMWMEX_API_EXTERN_C void mexWarnMsgTxt(const char *warn_msg)
Invoke an unidentified warning.
#define LIBMWMEX_API_EXTERN_C
LIBMWMEX_API_EXTERN_C void mexWarnMsgIdAndTxt(const char *identifier, const char *warn_msg,...)
Invoke a warning with message identifier 'identifier' and message derived from 'fmt' and subsequent a...
LIBMWMEX_API_EXTERN_C void mexSetTrapFlag(int flag)
set or clear mexCallMATLAB trap flag (if set then an error in mexCallMATLAB is caught and mexCallMATL...
LIBMWMEX_API_EXTERN_C void mexLock(void)
Lock a MEX-function so that it cannot be cleared from memory.
struct _mexInitTermTableEntry * mexInitTermTableEntry
LIBMWMEX_API_EXTERN_C mxArray * mexCallMATLABWithTrapWithObject(int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[], const char *fcn_name)
call MATLAB function with trap
LIBMWMEX_API_EXTERN_C void mexErrMsgTxt(const char *error_msg)
Issue error message and return to MATLAB prompt.
void(* mxFunctionPtr)(int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[])
Type representing the signature for MEX functions.
LIBMWMEX_API_EXTERN_C const char * mexFunctionName(void)
Return the name of a the MEXfunction currently executing.
void(* fn_clean_up_after_error)(void)
LIBMWMEX_API_EXTERN_C void mexMakeMemoryPersistent(void *ptr)
Remove memory previously allocated via mxCalloc from MATLAB's memory allocation list.
struct mxArray_tag mxArray
Forward declaration for mxArray.
void(* mex_exit_fn)(void)
LIBMWMEX_API_EXTERN_C int mexPrintf(const char *fmt,...)
mex equivalent to MATLAB's "disp" function
const char * name
The name of the global.
LIBMWMEX_API_EXTERN_C void mexMakeArrayPersistent(mxArray *pa)
Remove all components of an array plus the array header itself from MATLAB's memory allocation list...
struct _mexLocalFunctionTable * local_function_table
struct mexGlobalTableEntry_Tag mexGlobalTableEntry
void(* fn_mex_enter_mex_library)(mex_information x)
#define MEXFUNCTION_LINKAGE
struct _mexLocalFunctionTable _mexLocalFunctionTable
struct mexFunctionTableEntry_tag mexFunctionTableEntry
LIBMWMEX_API_EXTERN_C int mexAtExit(mex_exit_fn exit_fcn)
Register Mex-file's At-Exit function (accessed via MEX callback)
LIBMWMEX_API_EXTERN_C const mxArray * mexGetVariablePtr(const char *workspace, const char *name)
return a pointer to the array value with the specified variable name in the specified workspace ...
LIBMWMEX_API_EXTERN_C void mexErrMsgIdAndTxt(const char *identifier, const char *err_msg,...)
Issue formatted error message with corresponding error identifier and return to MATLAB prompt...
LIBMWMEX_API_EXTERN_C int mexCallMATLABWithObject(int nlhs, mxArray *plhs[], int nrhs, mxArray *prhs[], const char *fcn_name)
Call MATLAB function.
LIBMWMEX_API_EXTERN_C void mexUnlock(void)
Unlock a locked MEX-function so that it can be cleared from memory.
mxArray ** variable
A pointer to the variable.
mexLocalFunctionTable(* fn_mex_get_local_function_table)(void)
LIBMWMEX_API_EXTERN_C int mexEvalString(const char *str)
Parse and execute MATLAB syntax in string.
LIBMWMEX_API_EXTERN_C mxArray * mexEvalStringWithTrap(const char *str)
Parse and execute MATLAB syntax in string.
fn_mex_enter_mex_library fn_mex_exit_mex_library
struct mexGlobalTableEntry_Tag * mexGlobalTable
MEXFUNCTION_LINKAGE void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
mexFunction is the user-defined C routine that is called upon invocation of a MEX-function.
LIBMWMEX_API_EXTERN_C bool mexIsGlobal(const mxArray *pa)
This function is deprecated and always return false.
struct _mex_information * mex_information
#define mexCallMATLABWithTrap
mexLocalFunctionTable(* fn_mex_set_local_function_table)(mexLocalFunctionTable)
struct impl_info_tag * MEX_impl_info
LIBMWMEX_API_EXTERN_C void mexPrintAssertion(const char *test, const char *fname, int linenum, const char *message)
Print an assertion-style error message and return control to the MATLAB command line.
struct mexFunctionTableEntry_tag * mexFunctionTable
LIBMWMEX_API_EXTERN_C bool mexIsLocked(void)
Return true if the MEX-function is currently locked, false otherwise.
mex_information(* fn_mex_file)(void)
LIBMWMEX_API_EXTERN_C int mexPutVariable(const char *workspace, const char *name, const mxArray *parray)
Place a copy of the array value into the specified workspace with the specified name.