1/* ----------------------------------------------------------------------------- 2 * See the LICENSE file for information on copyright, usage and redistribution 3 * of SWIG, and the README file for authors - http://www.swig.org/release.html. 4 * 5 * tclopers.swg 6 * 7 * C++ overloaded operators. 8 * 9 * These declarations define how SWIG is going to rename C++ 10 * overloaded operators in Tcl. Since Tcl allows identifiers 11 * to be essentially any valid string, we'll just use the 12 * normal operator names. 13 * ----------------------------------------------------------------------------- */ 14 15 16#ifdef __cplusplus 17%rename("+") *::operator+; 18//%rename("u+") *::operator+(); // Unary + 19//%rename("u+") *::operator+() const; // Unary + 20%rename("-") *::operator-; 21//%rename("u-") *::operator-(); // Unary - 22//%rename("u-") *::operator-() const; // Unary - 23%rename("*") *::operator*; 24%rename("/") *::operator/; 25%rename("<<") *::operator<<; 26%rename(">>") *::operator>>; 27%rename("&") *::operator&; 28%rename("|") *::operator|; 29%rename("^") *::operator^; 30%rename("%") *::operator%; 31%rename("=") *::operator=; 32 33/* Ignored operators */ 34%ignoreoperator(NOTEQUAL) operator!=; 35%ignoreoperator(PLUSEQ) operator+=; 36%ignoreoperator(MINUSEQ) operator-=; 37%ignoreoperator(MULEQ) operator*=; 38%ignoreoperator(DIVEQ) operator/=; 39%ignoreoperator(MODEQ) operator%=; 40%ignoreoperator(LSHIFTEQ) operator<<=; 41%ignoreoperator(RSHIFTEQ) operator>>=; 42%ignoreoperator(ANDEQ) operator&=; 43%ignoreoperator(OREQ) operator|=; 44%ignoreoperator(XOREQ) operator^=; 45 46#endif 47