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.

110 lines
4.2 KiB

  1. /**
  2. * @file rubyautodoc.swg
  3. * @author gga
  4. * @date Wed May 2 16:41:59 2007
  5. *
  6. * @brief This file implements autodoc typemaps for some common
  7. * ruby methods.
  8. *
  9. *
  10. */
  11. %define AUTODOC(func, str)
  12. %feature("autodoc", str) func;
  13. %enddef
  14. AUTODOC(to_i, "Convert $class to an Integer");
  15. AUTODOC(to_f, "Convert $class to a Float");
  16. AUTODOC(coerce, "Coerce class to a number");
  17. AUTODOC(to_a, "Convert $class to an Array");
  18. AUTODOC(to_s, "Convert class to a String representation");
  19. AUTODOC(inspect, "Inspect class and its contents");
  20. AUTODOC(at, "Return element at a certain index");
  21. AUTODOC(__getitem__, "Element accessor/slicing");
  22. AUTODOC(__setitem__, "Element setter/slicing");
  23. AUTODOC(slice, "Return a slice (portion of) the $class");
  24. AUTODOC(push, "Add an element at the end of the $class");
  25. AUTODOC(pop, "Remove and return element at the end of the $class");
  26. AUTODOC(shift, "Remove and return element at the beginning of the $class");
  27. AUTODOC(unshift, "Add one or more elements at the beginning of the $class");
  28. AUTODOC(first, "Return the first element in $class");
  29. AUTODOC(last, "Return the last element in $class");
  30. //
  31. // Common Object methods
  32. //
  33. AUTODOC(hash, "Hashing function for class");
  34. AUTODOC(dup, "Create a duplicate of the class and unfreeze it if needed");
  35. AUTODOC(clone, "Create a duplicate of the class");
  36. //
  37. // Container methods
  38. //
  39. AUTODOC(empty, "Check if $class is empty");
  40. AUTODOC(size, "Size or Length of the $class");
  41. AUTODOC(insert, "Insert one or more new elements in the $class");
  42. //
  43. // Iterator methods (block)
  44. //
  45. AUTODOC(each, "Iterate thru each element in the $class. A block must be provided");
  46. AUTODOC(find, "Find an element in the class");
  47. AUTODOC(each_key, "Iterate thru each key element in the $class. A block must be provided");
  48. AUTODOC(each_value, "Iterate thru each key element in the $class. A block must be provided");
  49. AUTODOC(reject, "Iterate thru each element in the $class and reject those that fail a condition returning a new $class. A block must be provided");
  50. AUTODOC(reject_bang, "Iterate thru each element in the $class and reject those that fail a condition. A block must be provided. $class is modified in place");
  51. AUTODOC(select, "Iterate thru each element in the $class and select those that match a condition. A block must be provided");
  52. AUTODOC(delete_at, "Delete an element at a certain index");
  53. AUTODOC(__delete__, "Delete a matching element");
  54. //
  55. // Hash methods
  56. //
  57. AUTODOC(keys, "Return an Array of key elements");
  58. AUTODOC(values, "Return an Array of value elements");
  59. AUTODOC(values_at, "Return an Array of value elements matching the conditions");
  60. //
  61. // Operators
  62. //
  63. #ifdef __cplusplus
  64. AUTODOC(operator==, "Equality comparison operator");
  65. AUTODOC(operator<=, "Lower or equal comparison operator");
  66. AUTODOC(operator>=, "Higher or equal comparison operator");
  67. AUTODOC(operator<, "Lower than comparison operator");
  68. AUTODOC(operator>, "Higher than comparison operator");
  69. AUTODOC(operator<<, "Left shifting or appending operator");
  70. AUTODOC(operator>>, "Right shifting operator or extracting operator");
  71. AUTODOC(operator+, "Add operator");
  72. AUTODOC(operator-, "Substraction operator");
  73. AUTODOC(operator+(), "Positive operator");
  74. AUTODOC(operator-(), "Negation operator");
  75. AUTODOC(operator&, "AND operator");
  76. AUTODOC(operator|, "OR operator");
  77. AUTODOC(operator^, "XOR operator");
  78. AUTODOC(operator~, "Invert operator");
  79. #endif
  80. AUTODOC(__eq__, "Equality comparison operator");
  81. AUTODOC(__le__, "Lower or equal comparison operator");
  82. AUTODOC(__ge__, "Higher or equal comparison operator");
  83. AUTODOC(__lt__, "Lower than comparison operator");
  84. AUTODOC(__gt__, "Higher than comparison operator");
  85. AUTODOC(__lshift__, "Left shifting or appending operator");
  86. AUTODOC(__rshift__, "Right shifting operator or extracting operator");
  87. AUTODOC(__add___, "Add operator");
  88. AUTODOC(__sub__, "Substraction operator");
  89. AUTODOC(__pos__, "Positive operator");
  90. AUTODOC(__neg__, "Negation operator");
  91. AUTODOC(__and__, "AND operator");
  92. AUTODOC(__or__, "OR operator");
  93. AUTODOC(__xor__, "XOR operator");
  94. AUTODOC(__negate__, "Invert operator");
  95. AUTODOC(__pow__, "Exponential operator");
  96. AUTODOC(__divmod__, "Modulo of division");
  97. AUTODOC(__cmp__, "Comparison operator. Returns < 0 for less than, 0 for equal or > 1 for higher than.");