summaryrefslogtreecommitdiff
path: root/Examples/ruby/template/example.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/ruby/template/example.i')
-rw-r--r--Examples/ruby/template/example.i21
1 files changed, 21 insertions, 0 deletions
diff --git a/Examples/ruby/template/example.i b/Examples/ruby/template/example.i
new file mode 100644
index 0000000..d5ddf7a
--- /dev/null
+++ b/Examples/ruby/template/example.i
@@ -0,0 +1,21 @@
+/* File : example.i */
+%module example
+
+%{
+#ifdef max
+#undef max
+#endif
+
+#include "example.h"
+%}
+
+/* Let's just grab the original header file here */
+%include "example.h"
+
+/* Now instantiate some specific template declarations */
+
+%template(maxint) max<int>;
+%template(maxdouble) max<double>;
+%template(Vecint) vector<int>;
+%template(Vecdouble) vector<double>;
+