adds "callback" and "extend" examples

This commit is contained in:
Robert Stone 2013-11-12 13:03:49 -08:00
commit 73e2de7538
14 changed files with 312 additions and 1 deletions

View file

@ -0,0 +1,17 @@
/* File : example.i */
%module(directors="1") example
%{
#include "example.h"
%}
%include "std_string.i"
/* turn on director wrapping Callback */
%feature("director") Callback;
/* Caller::setCallback(Callback *cb) gives ownership of the cb to the
* Caller object. The wrapper code should understand this. */
%apply SWIGTYPE *DISOWN { Callback *cb };
%include "example.h"