source: issm/trunk-jpl/src/wrappers/StringToEnum/StringToEnum.js@ 19768

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

CHG: new EnumToString and StringToEnum javascript modules. New array operations.
Finished translating setflowequation javascript routine. Finished parameterization file
SquareShelfConstrained.js. Starting solve.js routine.

File size: 429 bytes
Line 
1function StringToEnum(string){
2/*StringToEnum
3 usage: var enum = StringToEnum(string);
4*/
5
6 var penum= Module._malloc(4);
7
8 //Declare StringToEnum module:
9 StringToEnumModule = Module.cwrap('StringToEnumModule','number',['number','string']);
10
11 //Call StringToEnum module:
12 StringToEnumModule(penum, string);
13
14 enumout= Module.getValue(penum,'double');
15
16 /*Free ressources: */
17 Module._free(penum);
18
19 return enumout;
20}
Note: See TracBrowser for help on using the repository browser.