summaryrefslogtreecommitdiff
path: root/Examples/test-suite/ignore_template_constructor.i
diff options
context:
space:
mode:
authorMarcelo Matus <mmatus@acms.arizona.edu>2006-02-08 23:00:02 +0000
committerMarcelo Matus <mmatus@acms.arizona.edu>2006-02-08 23:00:02 +0000
commita48ccb50a65448acc9bdfd9062a1086cb632ca2e (patch)
tree96f3cbafefc84a4c45113b1dc1ee1e73b3a3e54a /Examples/test-suite/ignore_template_constructor.i
parenta8d68771aeea3b8ae27a23eb156bf15d742fe6ae (diff)
downloadswig-a48ccb50a65448acc9bdfd9062a1086cb632ca2e.tar.gz
well, %rename is working, but not all the languages declare std::vector in the same way
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8753 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/test-suite/ignore_template_constructor.i')
-rw-r--r--Examples/test-suite/ignore_template_constructor.i23
1 files changed, 22 insertions, 1 deletions
diff --git a/Examples/test-suite/ignore_template_constructor.i b/Examples/test-suite/ignore_template_constructor.i
index 5971f091f..66b44f727 100644
--- a/Examples/test-suite/ignore_template_constructor.i
+++ b/Examples/test-suite/ignore_template_constructor.i
@@ -1,18 +1,39 @@
%module ignore_template_constructor
%include std_vector.i
+#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGPYTHON) || defined(SWIGPERL)
+#define SWIG_GOOD_VECTOR
%ignore std::vector<Flow>::vector(size_type);
%ignore std::vector<Flow>::resize(size_type);
+#endif
+#if defined(SWIGTCL) || defined(SWIGPERL)
+#define SWIG_GOOD_VECTOR
+/* here, for languages with bad declaration */
+%ignore std::vector<Flow>::vector(unsigned int);
+%ignore std::vector<Flow>::resize(unsigned int);
+#endif
+#if defined(SWIG_GOOD_VECTOR)
%inline %{
+class Flow {
+ Flow() {}
+public:
+ Flow(double d) {}
+};
+%}
+#else
+/* here, for languages with bad typemaps */
+%inline %{
class Flow {
- Flow() {}
public:
+ Flow() {}
Flow(double d) {}
};
%}
+#endif
+
%template(VectFlow) std::vector<Flow>;