~ubuntu-branches/ubuntu/maverick/swig1.3/maverick

« back to all changes in this revision

Viewing changes to Examples/test-suite/using_pointers.i

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:16:04 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205011604-ygx904it6413k3go
Tags: 1.3.27-1ubuntu1
Resynchronise with Debian again, for the new subversion packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%module using_pointers
2
2
 
 
3
#ifdef SWIGCSHARP
 
4
%csmethodmodifiers x "public new"
 
5
#endif
 
6
 
3
7
%inline %{
4
8
  class Foo {
5
9
  public:
6
10
    int x;
7
11
    virtual ~Foo() { }
8
12
    virtual Foo* blah() { return this; }
 
13
    virtual Foo* exception_spec(int what_to_throw) throw (int, const char *) {
 
14
      int num = 10;
 
15
      const char *str = "exception message";
 
16
      if (what_to_throw == 1) throw num;
 
17
      else if (what_to_throw == 2) throw str;
 
18
      return 0;
 
19
    }
9
20
  };
10
21
 
11
22
  class FooBar : public Foo {
12
23
  public:
13
24
    using Foo::blah;
14
25
    using Foo::x;
 
26
    using Foo::exception_spec;
15
27
  };
16
28
 
17
29
%}