adds "callback" and "extend" examples
This commit is contained in:
parent
34c374d7ae
commit
73e2de7538
14 changed files with 312 additions and 1 deletions
20
Examples/perl5/extend/example.i
Normal file
20
Examples/perl5/extend/example.i
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* File : example.i */
|
||||
%module(directors="1") example
|
||||
%{
|
||||
#include "example.h"
|
||||
%}
|
||||
|
||||
%include "std_vector.i"
|
||||
%include "std_string.i"
|
||||
|
||||
/* turn on director wrapping for Manager */
|
||||
%feature("director") Employee;
|
||||
%feature("director") Manager;
|
||||
|
||||
/* EmployeeList::addEmployee(Employee *p) gives ownership of the
|
||||
* employee to the EmployeeList object. The wrapper code should
|
||||
* understand this. */
|
||||
%apply SWIGTYPE *DISOWN { Employee *p };
|
||||
|
||||
%include "example.h"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue