PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/valuewrapper_base.i

#
Swig | 28 lines | 24 code | 4 blank | 0 comment | 0 complexity | 52dbf0a5d36f3ecf542c6c4ecb62f298 MD5 | raw file
 1%module valuewrapper_base
 2%inline 
 3%{ 
 4  namespace oss 
 5  { 
 6    enum Polarization { UnaryPolarization, BinaryPolarization }; 
 7 
 8    struct Base 
 9    { 
10    };    
11 
12    template <Polarization P> 
13    struct Interface_ : Base 
14    { 
15      Interface_(const Base& b) { }; 
16    }; 
17    
18    template <class Result> 
19    Result make() { return Result(*new Base()); }
20  } 
21%} 
22 
23namespace oss 
24{ 
25  // Interface 
26  %template(Interface_BP) Interface_<BinaryPolarization>; 
27  %template(make_Interface_BP) make<Interface_<BinaryPolarization> >; 
28}