class.hpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // SuperTux - Scripting reference generator
  2. // Copyright (C) 2023 Vankata453
  3. //
  4. // This program is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. #ifndef CLASS_HEADER
  17. #define CLASS_HEADER
  18. #include <map>
  19. #include <string>
  20. #include <vector>
  21. struct Constant
  22. {
  23. std::string type {};
  24. std::string name {};
  25. std::string initializer {};
  26. std::string description {};
  27. };
  28. struct Variable
  29. {
  30. std::string type {};
  31. std::string name {};
  32. std::string description {};
  33. };
  34. struct Parameter
  35. {
  36. std::string type {};
  37. std::string name {};
  38. std::string description {};
  39. };
  40. struct Function
  41. {
  42. std::string type {};
  43. std::string name {};
  44. std::string description {};
  45. std::vector<Parameter> parameters {};
  46. bool deprecated {};
  47. std::string deprecation_msg {};
  48. };
  49. struct Class
  50. {
  51. std::string name {};
  52. std::string summary {};
  53. std::string instances {};
  54. std::vector<Constant> constants {};
  55. std::vector<Variable> variables {};
  56. std::vector<Function> functions {};
  57. typedef std::map<int, std::string> BaseClasses;
  58. BaseClasses base_classes {};
  59. std::vector<std::string> derived_classes {};
  60. };
  61. #endif