Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.6 KiB

  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