Create javainterfacecode and csinterfacecode typemaps
The interface feature is no longer hard coded and can be controlled by a user via these new typemaps.
This commit is contained in:
parent
66344adf9e
commit
e7bb3afa0c
5 changed files with 136 additions and 50 deletions
|
|
@ -1,5 +1,5 @@
|
|||
%define DECLARE_INTERFACE_(INTERFACE, IMPL, CTYPE...)
|
||||
%feature("interface", name = "INTERFACE", cptr = #INTERFACE ## "_SWIGInterfaceUpcast") CTYPE;
|
||||
%feature("interface", name="INTERFACE") CTYPE;
|
||||
%typemap(jtype, nopgcpp="1") CTYPE, CTYPE *, CTYPE *const&, CTYPE [], CTYPE & "long"
|
||||
%typemap(jstype) CTYPE, CTYPE *, CTYPE *const&, CTYPE [], CTYPE & "INTERFACE"
|
||||
%typemap(javain) CTYPE, CTYPE & "$javainput." ## #INTERFACE ## "_SWIGInterfaceUpcast()"
|
||||
|
|
@ -21,6 +21,11 @@
|
|||
%{ $input = 0;
|
||||
*(($&1_ltype*)&$input) = &$1;
|
||||
%}
|
||||
%typemap(javainterfacecode, declaration=" long $interfacename_SWIGInterfaceUpcast();\n", cptrmethod="$interfacename_SWIGInterfaceUpcast") CTYPE %{
|
||||
public long $interfacename_SWIGInterfaceUpcast() {
|
||||
return $imclassname.$javaclazzname$interfacename_SWIGInterfaceUpcast(swigCPtr);
|
||||
}
|
||||
%}
|
||||
SWIG_JAVABODY_PROXY(public, protected, CTYPE)
|
||||
%enddef
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue