summaryrefslogtreecommitdiff
path: root/Examples/test-suite/java_director_assumeoverride.i
blob: cddebb4d7faac32ab99bc29147a48495daad3eb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
%module(directors="1") java_director_assumeoverride

%{
class OverrideMe {
public:
  virtual ~OverrideMe() {}
  virtual void func() {};
};

#include "java_director_assumeoverride_wrap.h"
bool isFuncOverridden(OverrideMe* f) {
  SwigDirector_OverrideMe* director = dynamic_cast<SwigDirector_OverrideMe*>(f);
  if (!director) {
    return false;
  }
  return director->swig_overrides(0);
}

%}

%feature("director", assumeoverride=1) OverrideMe;

class OverrideMe {
public:
  virtual ~OverrideMe();
  virtual void func();
};

bool isFuncOverridden(OverrideMe* f);