51 #if ! defined (octave_mexproto_h)
52 #define octave_mexproto_h 1
54 #include "octave-config.h"
56 #if defined (__cplusplus)
64 #define MXARRAY_TYPEDEFS_ONLY
66 #undef MXARRAY_TYPEDEFS_ONLY
91 extern OCTINTERP_API
int mexPrintf (
const char *fmt, ...);
103 extern OCTINTERP_API
int mexSet (
double handle,
const char *
property,
109 extern OCTINTERP_API
void mexLock (
void);
110 extern OCTINTERP_API
void mexUnlock (
void);
115 extern OCTINTERP_API
int mexAtExit (
void (*
f) (
void));
118 extern OCTINTERP_API
bool mxIsFinite (
double v);
119 extern OCTINTERP_API
bool mxIsInf (
double v);
120 extern OCTINTERP_API
bool mxIsNaN (
double v);
123 extern OCTINTERP_API
double mxGetEps (
void);
124 extern OCTINTERP_API
double mxGetInf (
void);
125 extern OCTINTERP_API
double mxGetNaN (
void);
128 extern OCTINTERP_API
void *
mxCalloc (
size_t n,
size_t size);
129 extern OCTINTERP_API
void *
mxMalloc (
size_t n);
130 extern OCTINTERP_API
void *
mxRealloc (
void *ptr,
size_t size);
131 extern OCTINTERP_API
void mxFree (
void *ptr);
250 const char *property_name);
252 const char *property_name,
253 const mxArray *property_value);
280 const char *key,
mxArray *val);
301 #if defined (MEX_DEBUG)
303 # define mxAssert(expr, msg) \
311 "Assertion failed: %s, at line %d of file \"%s\".\n%s\n", \
312 #expr, __LINE__, __FILE__, msg); \
316 "Assertion failed: %s, at line %d of file \"%s\".\n", \
317 #expr, __LINE__, __FILE__); \
322 # define mxAssertS(expr, msg) \
330 "Assertion failed at line %d of file \"%s\".\n%s\n", \
331 __LINE__, __FILE__, msg); \
335 "Assertion failed at line %d of file \"%s\".\n", \
336 __LINE__, __FILE__); \
342 # define mxAssert(expr, msg)
343 # define mxAssertS(expr, msg)
346 #if defined (__cplusplus)
F77_RET_T const F77_INT const F77_INT const F77_INT const F77_DBLE const F77_DBLE F77_INT & M
F77_RET_T const F77_INT & N
F77_RET_T const F77_DBLE const F77_DBLE * f
OCTINTERP_API double mxGetNaN(void)
OCTINTERP_API bool mxIsStruct(const mxArray *ptr)
OCTINTERP_API bool mxIsScalar(const mxArray *ptr)
OCTINTERP_API mwSize mxGetNumberOfDimensions(const mxArray *ptr)
OCTINTERP_API mxArray * mexEvalStringWithTrap(const char *s)
OCTINTERP_API double mxGetScalar(const mxArray *ptr)
OCTINTERP_API int mxGetNumberOfFields(const mxArray *ptr)
OCTINTERP_API double * mxGetPr(const mxArray *ptr)
OCTINTERP_API mxArray * mxCreateStructMatrix(mwSize rows, mwSize cols, int num_keys, const char **keys)
OCTINTERP_API mxLogical * mxGetLogicals(const mxArray *ptr)
OCTINTERP_API void * mxMalloc(size_t n)
OCTINTERP_API bool mxIsSparse(const mxArray *ptr)
OCTINTERP_API const mxArray * mexGetVariablePtr(const char *space, const char *name)
OCTINTERP_API bool mxIsLogicalScalarTrue(const mxArray *ptr)
OCTINTERP_API void mxSetData(mxArray *ptr, void *data)
OCTINTERP_API mxArray * mxGetFieldByNumber(const mxArray *ptr, mwIndex index, int key_num)
OCTINTERP_API bool mxIsUint16(const mxArray *ptr)
OCTINTERP_API size_t mxGetElementSize(const mxArray *ptr)
OCTINTERP_API size_t mxGetNumberOfElements(const mxArray *ptr)
OCTINTERP_API mxArray * mxCreateSparse(mwSize m, mwSize n, mwSize nzmax, mxComplexity flag)
OCTINTERP_API mxArray * mexGetVariable(const char *space, const char *name)
OCTINTERP_API void mxSetNzmax(mxArray *ptr, mwSize nzmax)
OCTINTERP_API mxArray * mxCreateUninitNumericArray(mwSize ndims, const mwSize *dims, mxClassID class_id, mxComplexity flag)
OCTINTERP_API mwIndex * mxGetJc(const mxArray *ptr)
OCTINTERP_API bool mxIsComplex(const mxArray *ptr)
OCTINTERP_API bool mxIsLogicalScalar(const mxArray *ptr)
OCTINTERP_API bool mxIsInf(double v)
OCTINTERP_API mxArray * mxDuplicateArray(const mxArray *v)
OCTINTERP_API mwSize mxGetNzmax(const mxArray *ptr)
OCTINTERP_API const char * mxGetClassName(const mxArray *ptr)
OCTINTERP_API mwIndex * mxGetIr(const mxArray *ptr)
OCTINTERP_API void mexWarnMsgTxt(const char *s)
OCTINTERP_API bool mxIsUint64(const mxArray *ptr)
OCTINTERP_API mwIndex mxCalcSingleSubscript(const mxArray *ptr, mwSize nsubs, mwIndex *subs)
OCTINTERP_API bool mxIsClass(const mxArray *ptr, const char *name)
OCTINTERP_API int mexPrintf(const char *fmt,...)
OCTINTERP_API mxArray * mxCreateStructArray(mwSize ndims, const mwSize *dims, int num_keys, const char **keys)
OCTINTERP_API void mexSetTrapFlag(int flag)
OCTINTERP_API mxArray * mxCreateCellArray(mwSize ndims, const mwSize *dims)
OCTINTERP_API int mexIsLocked(void)
OCTINTERP_API mxArray * mxCreateNumericArray(mwSize ndims, const mwSize *dims, mxClassID class_id, mxComplexity flag)
OCTINTERP_API mxArray * mxCreateLogicalArray(mwSize ndims, const mwSize *dims)
OCTINTERP_API mxArray * mxCreateDoubleMatrix(mwSize nr, mwSize nc, mxComplexity flag)
OCTINTERP_API double * mxGetPi(const mxArray *ptr)
OCTINTERP_API mxArray * mxCreateSparseLogicalMatrix(mwSize m, mwSize n, mwSize nzmax)
OCTINTERP_API mxArray * mxCreateDoubleScalar(double val)
OCTINTERP_API bool mxIsInt16(const mxArray *ptr)
OCTINTERP_API bool mxIsDouble(const mxArray *ptr)
OCTINTERP_API void mxDestroyArray(mxArray *v)
OCTINTERP_API void mxSetFieldByNumber(mxArray *ptr, mwIndex index, int key_num, mxArray *val)
OCTINTERP_API double mxGetInf(void)
OCTINTERP_API mxArray * mxCreateUninitNumericMatrix(mwSize m, mwSize n, mxClassID class_id, mxComplexity flag)
OCTINTERP_API bool mxIsEmpty(const mxArray *ptr)
OCTINTERP_API mxArray * mxGetCell(const mxArray *ptr, mwIndex idx)
OCTINTERP_API void mxSetField(mxArray *ptr, mwIndex index, const char *key, mxArray *val)
OCTINTERP_API bool mxIsFinite(double v)
OCTINTERP_API void * mxCalloc(size_t n, size_t size)
OCTINTERP_API mxArray * mxCreateString(const char *str)
OCTINTERP_API mxArray * mxGetField(const mxArray *ptr, mwIndex index, const char *key)
OCTINTERP_API bool mxIsNaN(double v)
OCTINTERP_API bool mxIsInt8(const mxArray *ptr)
OCTINTERP_API void mxFree(void *ptr)
OCTINTERP_API int mexPutVariable(const char *space, const char *name, const mxArray *ptr)
OCTINTERP_API char * mxArrayToString(const mxArray *ptr)
OCTINTERP_API mxArray * mexCallMATLABWithTrap(int nargout, mxArray *argout[], int nargin, mxArray *argin[], const char *fname)
OCTINTERP_API size_t mxGetN(const mxArray *ptr)
OCTINTERP_API void mxSetPr(mxArray *ptr, double *pr)
OCTINTERP_API mxArray * mxCreateLogicalScalar(mxLogical val)
OCTINTERP_API double mxGetEps(void)
OCTINTERP_API void mxSetImagData(mxArray *ptr, void *pi)
OCTINTERP_API mxArray * mxCreateCharMatrixFromStrings(mwSize m, const char **str)
OCTINTERP_API mxArray * mxCreateNumericMatrix(mwSize m, mwSize n, mxClassID class_id, mxComplexity flag)
OCTINTERP_API int mexEvalString(const char *s)
OCTINTERP_API mxArray * mxGetProperty(const mxArray *ptr, mwIndex idx, const char *property_name)
OCTINTERP_API mxChar * mxGetChars(const mxArray *ptr)
OCTINTERP_API void * mxGetData(const mxArray *ptr)
OCTINTERP_API void mexWarnMsgIdAndTxt(const char *id, const char *s,...)
OCTINTERP_API mxClassID mxGetClassID(const mxArray *ptr)
OCTINTERP_API void mexMakeMemoryPersistent(void *ptr)
OCTINTERP_API void mxSetIr(mxArray *ptr, mwIndex *ir)
OCTINTERP_API void mexErrMsgIdAndTxt(const char *id, const char *s,...)
OCTINTERP_API int mxSetDimensions(mxArray *ptr, const mwSize *dims, mwSize ndims)
OCTINTERP_API int mexSet(double handle, const char *property, mxArray *val)
OCTINTERP_API bool mxIsCell(const mxArray *ptr)
OCTINTERP_API void mxRemoveField(mxArray *ptr, int key_num)
OCTINTERP_API void mexMakeArrayPersistent(mxArray *ptr)
OCTINTERP_API size_t mxGetM(const mxArray *ptr)
OCTINTERP_API void mexUnlock(void)
OCTINTERP_API void * mxRealloc(void *ptr, size_t size)
OCTINTERP_API int mexIsGlobal(const mxArray *ptr)
OCTINTERP_API mxArray * mxCreateCellMatrix(mwSize m, mwSize n)
OCTINTERP_API mxArray * mxCreateCharArray(mwSize ndims, const mwSize *dims)
OCTINTERP_API void mxSetPi(mxArray *ptr, double *pi)
OCTINTERP_API void mexErrMsgTxt(const char *s)
OCTINTERP_API int mexCallMATLAB(int nargout, mxArray *argout[], int nargin, mxArray *argin[], const char *fname)
OCTINTERP_API bool mxIsUint8(const mxArray *ptr)
OCTINTERP_API bool mxIsUint32(const mxArray *ptr)
OCTINTERP_API const mxArray * mexGet(double handle, const char *property)
OCTINTERP_API const mwSize * mxGetDimensions(const mxArray *ptr)
OCTINTERP_API bool mxIsFromGlobalWS(const mxArray *ptr)
OCTINTERP_API void mxSetClassName(mxArray *ptr, const char *name)
OCTINTERP_API const char * mexFunctionName(void)
OCTINTERP_API int mexAtExit(void(*f)(void))
OCTINTERP_API bool mxIsNumeric(const mxArray *ptr)
OCTINTERP_API const char * mxGetFieldNameByNumber(const mxArray *ptr, int key_num)
OCTINTERP_API bool mxIsFunctionHandle(const mxArray *ptr)
OCTINTERP_API void * mxGetImagData(const mxArray *ptr)
OCTINTERP_API int mxGetString(const mxArray *ptr, char *buf, mwSize buflen)
OCTINTERP_API int mxAddField(mxArray *ptr, const char *key)
OCTINTERP_API void mxSetN(mxArray *ptr, mwSize N)
OCTINTERP_API void mxSetM(mxArray *ptr, mwSize M)
OCTINTERP_API bool mxIsLogical(const mxArray *ptr)
OCTINTERP_API bool mxIsSingle(const mxArray *ptr)
OCTINTERP_API void mxSetCell(mxArray *ptr, mwIndex idx, mxArray *val)
OCTINTERP_API bool mxIsInt32(const mxArray *ptr)
OCTINTERP_API int mxGetFieldNumber(const mxArray *ptr, const char *key)
OCTINTERP_API void mexLock(void)
OCTINTERP_API bool mxIsChar(const mxArray *ptr)
OCTINTERP_API void mxSetJc(mxArray *ptr, mwIndex *jc)
OCTINTERP_API bool mxIsInt64(const mxArray *ptr)
OCTINTERP_API mxArray * mxCreateLogicalMatrix(mwSize m, mwSize n)
OCTINTERP_API void mxSetProperty(mxArray *ptr, mwIndex idx, const char *property_name, const mxArray *property_value)