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

Last change on this file since 8370 was 8370, checked in by Mathieu Morlighem, 14 years ago

default output

File size: 637 bytes
Line 
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: */
13 if(nrhs!=NRHS){
14 EnumToStringUsage(); _error_(" usage. See above");
15 }
16
17 /*Fetch inputs: */
18 FetchData(&enum_in,ENUMIN);
19
20 /*Run core function: */
21 name=EnumToStringx(enum_in);
22
23 /* output: */
24 WriteData(NAME,name);
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.