source: issm/trunk/src/mex/EnumToString/EnumToString.cpp@ 8910

Last change on this file since 8910 was 8910, checked in by Eric.Larour, 14 years ago

Reorganized io/ directory quite a bit.
Separated Matlab io from the other Disk related io.
Renamed WriteData to WriteMatlabData and FetchData to FetchMatlabData.
Folded WriteParams and FetchParams into FetchMatlabData and WriteMatlabData.

File size: 649 bytes
RevLine 
[8223]1/*\file EnumToString.c
2 *\brief:convert enum (int) to string
3 */
4
5#include "./EnumToString.h"
6
7void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
8
9 char *name = NULL;
10 int enum_in;
11
12 /*checks on arguments on the matlab side: */
[8370]13 if(nrhs!=NRHS){
14 EnumToStringUsage(); _error_(" usage. See above");
15 }
[8223]16
17 /*Fetch inputs: */
[8910]18 FetchMatlabData(&enum_in,ENUMIN);
[8223]19
20 /*Run core function: */
21 name=EnumToStringx(enum_in);
22
23 /* output: */
[8910]24 WriteMatlabData(NAME,name);
[8223]25}
26
27void EnumToStringUsage(void)
28{
29 _printf_(true,"\n");
30 _printf_(true," usage: %sstring = EnumToString(enum);\n",__FUNCT__);
31 _printf_(true,"\n");
32}
Note: See TracBrowser for help on using the repository browser.