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

# · Swig · 37 lines · 23 code · 14 blank · 0 comment · 0 complexity · 1da02b262104ad791b91426452cfe020 MD5 · raw file

  1. %module template_typedef_import
  2. %{
  3. #include "template_typedef_cplx2.h"
  4. %}
  5. %import "template_typedef_cplx2.h"
  6. %inline %{
  7. typedef vfncs::ArithUnaryFunction<double, double> RFunction;
  8. typedef vfncs::ArithUnaryFunction<Complex, Complex> CFunction;
  9. int my_func_r(RFunction* hello)
  10. {
  11. return 0;
  12. }
  13. int my_func_c(CFunction* hello)
  14. {
  15. return 1;
  16. }
  17. struct Sin : RFunction
  18. {
  19. };
  20. struct CSin : CFunction
  21. {
  22. };
  23. %}