PageRenderTime 9ms CodeModel.GetById 7ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/li_reference.i

#
Swig | 52 lines | 50 code | 2 blank | 0 comment | 0 complexity | c939bcb71d1ec481476151a20de6fdbd MD5 | raw file
 1%module li_reference
 2
 3%include "reference.i"
 4
 5%inline %{
 6  double FrVal;
 7  double ToVal;
 8  void PDouble(double *REFERENCE, int t = 0)
 9    { ToVal = *REFERENCE; *REFERENCE = FrVal + t; }
10  void RDouble(double &REFERENCE, int t = 0)
11    { ToVal =  REFERENCE;  REFERENCE = FrVal + t; }
12  void PFloat(float *REFERENCE, int t = 0)
13    { ToVal = *REFERENCE; *REFERENCE = (float)(FrVal + t); }
14  void RFloat(float &REFERENCE, int t = 0)
15    { ToVal =  REFERENCE;  REFERENCE = (float)(FrVal + t); }
16  void PInt(int *REFERENCE, int t = 0)
17    { ToVal = *REFERENCE; *REFERENCE = (int)(FrVal + t); }
18  void RInt(int &REFERENCE, int t = 0)
19    { ToVal =  REFERENCE;  REFERENCE = (int)(FrVal + t); }
20  void PShort(short *REFERENCE, int t = 0)
21    { ToVal = *REFERENCE; *REFERENCE = (short)(FrVal + t); }
22  void RShort(short &REFERENCE, int t = 0)
23    { ToVal =  REFERENCE;  REFERENCE = (short)(FrVal + t); }
24  void PLong(long *REFERENCE, int t = 0)
25    { ToVal = *REFERENCE; *REFERENCE = (long)(FrVal + t); }
26  void RLong(long &REFERENCE, int t = 0)
27    { ToVal =  REFERENCE;  REFERENCE = (long)(FrVal + t); }
28  void PUInt(unsigned int *REFERENCE, int t = 0)
29    { ToVal = *REFERENCE; *REFERENCE = (unsigned int)(FrVal + t); }
30  void RUInt(unsigned int &REFERENCE, int t = 0)
31    { ToVal =  REFERENCE;  REFERENCE = (unsigned int)(FrVal + t); }
32  void PUShort(unsigned short *REFERENCE, int t = 0)
33    { ToVal = *REFERENCE; *REFERENCE = (unsigned short)(FrVal + t); }
34  void RUShort(unsigned short &REFERENCE, int t = 0)
35    { ToVal =  REFERENCE;  REFERENCE = (unsigned short)(FrVal + t); }
36  void PULong(unsigned long *REFERENCE, int t = 0)
37    { ToVal = *REFERENCE; *REFERENCE = (unsigned long)(FrVal + t); }
38  void RULong(unsigned long &REFERENCE, int t = 0)
39    { ToVal =  REFERENCE;  REFERENCE = (unsigned long)(FrVal + t); }
40  void PUChar(unsigned char *REFERENCE, int t = 0)
41    { ToVal = *REFERENCE; *REFERENCE = (unsigned char)(FrVal + t); }
42  void RUChar(unsigned char &REFERENCE, int t = 0)
43    { ToVal =  REFERENCE;  REFERENCE = (unsigned char)(FrVal + t); }
44  void PChar(signed char *REFERENCE, int t = 0)
45    { ToVal = *REFERENCE; *REFERENCE = (signed char)(FrVal + t); }
46  void RChar(signed char &REFERENCE, int t = 0)
47    { ToVal =  REFERENCE;  REFERENCE = (signed char)(FrVal + t); }
48  void PBool(bool *REFERENCE, int t = 0)
49    { ToVal = *REFERENCE; *REFERENCE = (FrVal + t) ? true : false; }
50  void RBool(bool &REFERENCE, int t = 0)
51    { ToVal =  REFERENCE;  REFERENCE = (FrVal + t) ? true : false; }
52%}