PageRenderTime 20ms CodeModel.GetById 17ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-29/SWIG/Lib/tcl/tclopers.swg

#
Unknown | 46 lines | 42 code | 4 blank | 0 comment | 0 complexity | 3c510fcc537c5541a3776053bbe6c8b5 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 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