PageRenderTime 24ms CodeModel.GetById 18ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/xml/gnarly.i

#
Swig | 63 lines | 48 code | 14 blank | 1 comment | 0 complexity | 82e43e237cda2badf35cc2105f0465c8 MD5 | raw file
 1/* File : check.i */
 2%module my_check
 3
 4enum color { RED=10, BLUE, GREEN };
 5
 6class Foo {
 7 public:
 8  Foo() { }
 9  enum speed { IMPULSE, WARP, LUDICROUS };
10  void enum_test(speed s);
11};
12
13void enum_test(color c, Foo::speed s);
14
15
16
17%typemap(out) int * {
18    WHATEVER  MAKES YOU HAPPY AS RESULT
19}
20
21%typemap(in) int * {
22    WHATEVER  MAKES YOU HAPPY AS PARAMETER
23}
24
25%pragma(xml) DEBUG="false";
26
27extern  int *  my_gcd(const char * x, int * y[], int * r, int (*op)(int,int)) const;
28extern double my_foo;
29void my_void();
30my_empty();
31
32const double my_dutch = 1.0;
33
34union my_union
35{
36    int my_iii;
37    char my_ccc;
38};
39
40struct my_struct
41{
42public:
43    virtual ~my_struct();
44  int my_foo();
45protected:
46  int my_bar;
47  double  x, y;   
48  virtual double area() = 0;
49  static  int nshapes;
50};
51
52class my_class : public my_struct, public my_union
53{
54public:
55    my_class( char c );
56private:
57    ~my_class();
58    virtual const int *  my_func( my_class , char * * x, int y[], const int & r) const;
59    double my_foo[128];
60    const my_int i;
61};
62
63typedef int my_int;