supertux
class.hpp
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 
17 #ifndef CLASS_HEADER
18 #define CLASS_HEADER
19 
20 #include <map>
21 #include <string>
22 #include <vector>
23 
24 struct Constant
25 {
26  std::string type {};
27  std::string name {};
28  std::string initializer {};
29  std::string description {};
30 };
31 
32 struct Variable
33 {
34  std::string type {};
35  std::string name {};
36  std::string description {};
37 };
38 
39 struct Parameter
40 {
41  std::string type {};
42  std::string name {};
43  std::string description {};
44 };
45 
46 struct Function
47 {
48  std::string type {};
49  std::string name {};
50  std::string description {};
51  std::vector<Parameter> parameters {};
52 
53  bool deprecated {};
54  std::string deprecation_msg {};
55 };
56 
57 struct Class
58 {
59  std::string name {};
60  std::string summary {};
61  std::string instances {};
62  std::vector<Constant> constants {};
63  std::vector<Variable> variables {};
64  std::vector<Function> functions {};
65 
66  typedef std::map<int, std::string> BaseClasses;
67  BaseClasses base_classes {};
68  std::vector<std::string> derived_classes {};
69 };
70 
71 #endif
Definition: class.hpp:57
Definition: class.hpp:24
Definition: class.hpp:46
Definition: class.hpp:39
Definition: class.hpp:32