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.

89 lines
3.0 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. * enums.swg
  6. *
  7. * Include this file in order for C/C++ enums to be wrapped by proper C# enums.
  8. * Note that the PINVOKE layer handles the enum as an int.
  9. * ----------------------------------------------------------------------------- */
  10. // const enum SWIGTYPE & typemaps
  11. %typemap(ctype) const enum SWIGTYPE & "int"
  12. %typemap(imtype) const enum SWIGTYPE & "int"
  13. %typemap(cstype) const enum SWIGTYPE & "$*csclassname"
  14. %typemap(in) const enum SWIGTYPE & ($*1_ltype temp)
  15. %{ temp = ($*1_ltype)$input;
  16. $1 = &temp; %}
  17. %typemap(out) const enum SWIGTYPE & %{ $result = *$1; %}
  18. %typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const enum SWIGTYPE &
  19. %{ static $*1_ltype temp = ($*1_ltype)$input;
  20. $result = &temp; %}
  21. %typemap(directorin) const enum SWIGTYPE & "$input = $1_name;"
  22. %typemap(csdirectorin) const enum SWIGTYPE & "($*csclassname)$iminput"
  23. %typemap(csdirectorout) const enum SWIGTYPE & "(int)$cscall"
  24. %typecheck(SWIG_TYPECHECK_POINTER) const enum SWIGTYPE & ""
  25. %typemap(throws, canthrow=1) const enum SWIGTYPE &
  26. %{ (void)$1;
  27. SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
  28. return $null; %}
  29. %typemap(csin) const enum SWIGTYPE & "(int)$csinput"
  30. %typemap(csout, excode=SWIGEXCODE) const enum SWIGTYPE & {
  31. $*csclassname ret = ($*csclassname)$imcall;$excode
  32. return ret;
  33. }
  34. %typemap(csvarout, excode=SWIGEXCODE2) const enum SWIGTYPE & %{
  35. get {
  36. $*csclassname ret = ($*csclassname)$imcall;$excode
  37. return ret;
  38. } %}
  39. // enum SWIGTYPE typemaps
  40. %typemap(ctype) enum SWIGTYPE "int"
  41. %typemap(imtype) enum SWIGTYPE "int"
  42. %typemap(cstype) enum SWIGTYPE "$csclassname"
  43. %typemap(in) enum SWIGTYPE %{ $1 = ($1_ltype)$input; %}
  44. %typemap(out) enum SWIGTYPE %{ $result = $1; %}
  45. %typemap(directorout) enum SWIGTYPE %{ $result = ($1_ltype)$input; %}
  46. %typemap(directorin) enum SWIGTYPE "$input = $1;"
  47. %typemap(csdirectorin) enum SWIGTYPE "($csclassname)$iminput"
  48. %typemap(csdirectorout) enum SWIGTYPE "(int)$cscall"
  49. %typecheck(SWIG_TYPECHECK_POINTER) enum SWIGTYPE ""
  50. %typemap(throws, canthrow=1) enum SWIGTYPE
  51. %{ (void)$1;
  52. SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
  53. return $null; %}
  54. %typemap(csin) enum SWIGTYPE "(int)$csinput"
  55. %typemap(csout, excode=SWIGEXCODE) enum SWIGTYPE {
  56. $csclassname ret = ($csclassname)$imcall;$excode
  57. return ret;
  58. }
  59. %typemap(csvarout, excode=SWIGEXCODE2) enum SWIGTYPE %{
  60. get {
  61. $csclassname ret = ($csclassname)$imcall;$excode
  62. return ret;
  63. } %}
  64. %typemap(csbase) enum SWIGTYPE ""
  65. %typemap(csclassmodifiers) enum SWIGTYPE "public enum"
  66. %typemap(cscode) enum SWIGTYPE ""
  67. %typemap(csimports) enum SWIGTYPE ""
  68. %typemap(csinterfaces) enum SWIGTYPE ""
  69. %typemap(csbody) enum SWIGTYPE ""
  70. %csenum(proper);