PageRenderTime 47ms CodeModel.GetById 22ms RepoModel.GetById 1ms 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. #ifdef __cplusplus
  15. %rename("+") *::operator+;
  16. //%rename("u+") *::operator+(); // Unary +
  17. //%rename("u+") *::operator+() const; // Unary +
  18. %rename("-") *::operator-;
  19. //%rename("u-") *::operator-(); // Unary -
  20. //%rename("u-") *::operator-() const; // Unary -
  21. %rename("*") *::operator*;
  22. %rename("/") *::operator/;
  23. %rename("<<") *::operator<<;
  24. %rename(">>") *::operator>>;
  25. %rename("&") *::operator&;
  26. %rename("|") *::operator|;
  27. %rename("^") *::operator^;
  28. %rename("%") *::operator%;
  29. %rename("=") *::operator=;
  30. /* Ignored operators */
  31. %ignoreoperator(NOTEQUAL) operator!=;
  32. %ignoreoperator(PLUSEQ) operator+=;
  33. %ignoreoperator(MINUSEQ) operator-=;
  34. %ignoreoperator(MULEQ) operator*=;
  35. %ignoreoperator(DIVEQ) operator/=;
  36. %ignoreoperator(MODEQ) operator%=;
  37. %ignoreoperator(LSHIFTEQ) operator<<=;
  38. %ignoreoperator(RSHIFTEQ) operator>>=;
  39. %ignoreoperator(ANDEQ) operator&=;
  40. %ignoreoperator(OREQ) operator|=;
  41. %ignoreoperator(XOREQ) operator^=;
  42. #endif