PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

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

#
Swig | 29 lines | 20 code | 5 blank | 4 comment | 0 complexity | 2bc2aa4d0ef706e2b082bd43c7ddef7e MD5 | raw file
 1/* Swig 1.3.6 does not understand initialization of static class
 2   constants like this.  SF Bug #445221, reported by Krzysztof
 3   Kozminski <kozminski@users.sf.net>. 
 4*/
 5
 6%module static_const_member
 7
 8#if SWIGJAVA
 9%javaconst(1) EN;
10%javaconst(1) CHARTEST;
11#elif SWIGCSHARP
12%csconst(1) EN;
13%csconst(1) CHARTEST;
14#elif SWIGD
15%dmanifestconst EN;
16%dmanifestconst CHARTEST;
17#endif
18
19%inline %{
20  
21class X {
22public:
23  static const int PN = 0;
24  static const int CN = 1;
25  static const int EN = 2;
26  static const char CHARTEST = 'A';
27};
28
29%}