git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
28 lines
538 B
OpenEdge ABL
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> >;
|
|
}
|