mirror of
https://github.com/nillerusr/source-engine.git
synced 2024-12-27 00:26:50 +00:00
47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
|
/* -----------------------------------------------------------------------------
|
||
|
* See the LICENSE file for information on copyright, usage and redistribution
|
||
|
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
|
||
|
*
|
||
|
* 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
|