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

# · Swig · 30 lines · 21 code · 9 blank · 0 comment · 0 complexity · 174e582cc2a84f1920efd1564c10213b MD5 · raw file

  1. // Submitted by Marcelo Matus
  2. %module template_ns_inherit
  3. %inline %{
  4. namespace hello {
  5. typedef double Double;
  6. }
  7. namespace hello
  8. {
  9. template <class ArgType, class ResType>
  10. class VUnaryFunction
  11. {};
  12. template <class ArgType, class ResType>
  13. class UnaryFunction : public VUnaryFunction<ArgType, ResType>
  14. {};
  15. }
  16. %}
  17. namespace hello
  18. {
  19. %template(VUnaryFunction_id) VUnaryFunction<int, Double>;
  20. %template(UnaryFunction_id) UnaryFunction<int, Double>;
  21. }