summaryrefslogtreecommitdiff
path: root/share/swig/2.0.11/tcl/tclopers.swg
diff options
context:
space:
mode:
Diffstat (limited to 'share/swig/2.0.11/tcl/tclopers.swg')
-rw-r--r--share/swig/2.0.11/tcl/tclopers.swg43
1 files changed, 43 insertions, 0 deletions
diff --git a/share/swig/2.0.11/tcl/tclopers.swg b/share/swig/2.0.11/tcl/tclopers.swg
new file mode 100644
index 0000000..f113ccd
--- /dev/null
+++ b/share/swig/2.0.11/tcl/tclopers.swg
@@ -0,0 +1,43 @@
+/* -----------------------------------------------------------------------------
+ * tclopers.swg
+ *
+ * C++ overloaded operators.
+ *
+ * These declarations define how SWIG is going to rename C++
+ * overloaded operators in Tcl. Since Tcl allows identifiers
+ * to be essentially any valid string, we'll just use the
+ * normal operator names.
+ * ----------------------------------------------------------------------------- */
+
+
+#ifdef __cplusplus
+%rename("+") *::operator+;
+//%rename("u+") *::operator+(); // Unary +
+//%rename("u+") *::operator+() const; // Unary +
+%rename("-") *::operator-;
+//%rename("u-") *::operator-(); // Unary -
+//%rename("u-") *::operator-() const; // Unary -
+%rename("*") *::operator*;
+%rename("/") *::operator/;
+%rename("<<") *::operator<<;
+%rename(">>") *::operator>>;
+%rename("&") *::operator&;
+%rename("|") *::operator|;
+%rename("^") *::operator^;
+%rename("%") *::operator%;
+%rename("=") *::operator=;
+
+/* Ignored operators */
+%ignoreoperator(NOTEQUAL) operator!=;
+%ignoreoperator(PLUSEQ) operator+=;
+%ignoreoperator(MINUSEQ) operator-=;
+%ignoreoperator(MULEQ) operator*=;
+%ignoreoperator(DIVEQ) operator/=;
+%ignoreoperator(MODEQ) operator%=;
+%ignoreoperator(LSHIFTEQ) operator<<=;
+%ignoreoperator(RSHIFTEQ) operator>>=;
+%ignoreoperator(ANDEQ) operator&=;
+%ignoreoperator(OREQ) operator|=;
+%ignoreoperator(XOREQ) operator^=;
+
+#endif