swig/Examples/test-suite/valuewrapper_base.i
Dave Beazley 12a43edc2d The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2002-11-30 22:01:28 +00:00

28 lines
538 B
OpenEdge ABL

%module valuewrapper_base
%inline
%{
namespace oss
{
enum Polarization { UnaryPolarization, BinaryPolarization };
struct Base
{
};
template <Polarization P>
struct Interface : Base
{
Interface(const Base& b) { };
};
template <class Result>
Result make() { return Result(*new Base()); }
}
%}
namespace oss
{
// Interface
%template(Interface_BP) Interface<BinaryPolarization>;
%template(make_Interface_BP) make<Interface<BinaryPolarization> >;
}