00001 /* 00002 * mex_api_extras.h: mex header file 00003 * 00004 * function templates for routines/APIs that are NOT in the standard 00005 * matlab API, but that are needed to make mex operable from non-matlab 00006 * environments, like the shell. 00007 * 00008 * 00009 * These routines are distinct from the rest of mexhead.h because 00010 * the underlying functional definitions must change depending on the 00011 * environment (ie, call from matlab or not); the other mextools 00012 * utilities do not. 00013 * Because of this, their definitions are in the mex2c directory. These 00014 * are just the declarations. 00015 * The declarations must appear here because they must be loaded with 00016 * mexhead.h. This is because mexhead.h is the only include file, 00017 * beyond mex.h, that I can be assured an ordinary mex2c-enabled 00018 * function will load. In short: 00019 * declarations in mexhead.h (it's the only non-mex.h required #include) 00020 * definitions in libmex2X.c (it's the only platform-specific library) 00021 * 00022 * Michael Turmon, 2002 00023 * 00024 */ 00025 00026 #ifndef _mex_api_extras_h_ 00027 #define _mex_api_extras_h_ 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 /* 00034 * DISPATCHER 00035 */ 00036 00037 char * 00038 mxt_mexDispatcher(mexfn_t *mexfn, 00039 const char *progname, 00040 int verbosity, 00041 int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs); 00042 00043 /* 00044 * RANGE-SETTING TEMPLATES 00045 */ 00046 00047 extern 00048 void 00049 setrange(mxArray *pm, double datamin, double datamax); 00050 00051 extern 00052 void 00053 getrange(const mxArray *pm, double *datamin, double *datamax); 00054 00055 #ifdef __cplusplus 00056 } /* extern "C" */ 00057 #endif 00058 00059 #endif /* _mex_api_extras_h_ */ 00060