blob: 63471bbc88cc079eafffb47e97740b34e1c14cfc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
%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> >;
}
|