PageRenderTime 44ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Swig | 30 lines | 21 code | 9 blank | 0 comment | 0 complexity | 174e582cc2a84f1920efd1564c10213b MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  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. }