doxygen
types.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2015 by Dimitri van Heesch.
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation under the terms of the GNU General Public License is hereby
7  * granted. No representations are made about the suitability of this software
8  * for any purpose. It is provided "as is" without express or implied warranty.
9  * See the GNU General Public License for more details.
10  *
11  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  */
15 
16 #ifndef TYPES_H
17 #define TYPES_H
18 
19 #include "qcstring.h"
20 
26 enum Protection { Public, Protected, Private, Package } ;
27 
29 enum Specifier { Normal, Virtual, Pure } ;
30 
32 enum MethodTypes { Method, Signal, Slot, DCOP, Property, Event };
33 
35 enum RelatesType { Simple, Duplicate, MemberOf };
36 
38 enum Relationship { Member, Related, Foreign };
39 
42 {
43  SrcLangExt_Unknown = 0x00000,
44  SrcLangExt_IDL = 0x00008,
45  SrcLangExt_Java = 0x00010,
46  SrcLangExt_CSharp = 0x00020,
47  SrcLangExt_D = 0x00040,
48  SrcLangExt_PHP = 0x00080,
49  SrcLangExt_ObjC = 0x00100,
50  SrcLangExt_Cpp = 0x00200,
51  SrcLangExt_JS = 0x00400,
52  SrcLangExt_Python = 0x00800,
53  SrcLangExt_Fortran = 0x01000,
54  SrcLangExt_VHDL = 0x02000,
55  SrcLangExt_XML = 0x04000,
56  //SrcLangExt_Tcl = 0x08000, // no longer supported
57  SrcLangExt_Markdown = 0x10000,
58  SrcLangExt_SQL = 0x20000,
59  SrcLangExt_Slice = 0x40000,
60  SrcLangExt_Lex = 0x80000
61 };
62 
64 struct Grouping
65 {
68  {
69  GROUPING_LOWEST,
70  GROUPING_AUTO_WEAK = GROUPING_LOWEST,
73  GROUPING_AUTO_HIGHEST = GROUPING_AUTO_DEF,
75  GROUPING_HIGHEST = GROUPING_INGROUP
76  };
77 
78  static const char *getGroupPriName( GroupPri_t priority )
79  {
80  switch( priority )
81  {
82  case GROUPING_AUTO_WEAK:
83  return "@weakgroup";
84  case GROUPING_AUTO_ADD:
85  return "@addtogroup";
86  case GROUPING_AUTO_DEF:
87  return "@defgroup";
88  case GROUPING_INGROUP:
89  return "@ingroup";
90  }
91  return "???";
92  }
93 
94  Grouping( const QCString &gn, GroupPri_t p ) : groupname(gn), pri(p) {}
97 
98 };
99 
100 enum MemberListType
101 {
102  MemberListType_privateLists = 0x0800,
103  MemberListType_detailedLists = 0x1000,
104  MemberListType_declarationLists = 0x2000,
105  MemberListType_documentationLists = 0x4000,
106 
107  MemberListType_pubMethods = 0,
108  MemberListType_proMethods = 1,
109  MemberListType_pacMethods = 2,
110  MemberListType_priMethods = 3 + MemberListType_privateLists,
111  MemberListType_pubStaticMethods = 4,
112  MemberListType_proStaticMethods = 5,
113  MemberListType_pacStaticMethods = 6,
114  MemberListType_priStaticMethods = 7 + MemberListType_privateLists,
115  MemberListType_pubSlots = 8,
116  MemberListType_proSlots = 9,
117  MemberListType_priSlots = 10 + MemberListType_privateLists,
118  MemberListType_pubAttribs = 11,
119  MemberListType_proAttribs = 12,
120  MemberListType_pacAttribs = 13,
121  MemberListType_priAttribs = 14 + MemberListType_privateLists,
122  MemberListType_pubStaticAttribs = 15,
123  MemberListType_proStaticAttribs = 16,
124  MemberListType_pacStaticAttribs = 17,
125  MemberListType_priStaticAttribs = 18 + MemberListType_privateLists,
126  MemberListType_pubTypes = 19,
127  MemberListType_proTypes = 20,
128  MemberListType_pacTypes = 21,
129  MemberListType_priTypes = 22 + MemberListType_privateLists,
130  MemberListType_related = 23,
131  MemberListType_signals = 24,
132  MemberListType_friends = 25,
133  MemberListType_dcopMethods = 26,
134  MemberListType_properties = 27,
135  MemberListType_events = 28,
136 
137  MemberListType_typedefMembers = 29 + MemberListType_detailedLists,
138  MemberListType_enumMembers = 30 + MemberListType_detailedLists,
139  MemberListType_enumValMembers = 31 + MemberListType_detailedLists,
140  MemberListType_functionMembers = 32 + MemberListType_detailedLists,
141  MemberListType_relatedMembers = 33 + MemberListType_detailedLists,
142  MemberListType_variableMembers = 34 + MemberListType_detailedLists,
143  MemberListType_propertyMembers = 35 + MemberListType_detailedLists,
144  MemberListType_eventMembers = 36 + MemberListType_detailedLists,
145  MemberListType_constructors = 37 + MemberListType_detailedLists,
146 
147  MemberListType_allMembersList = 38,
148 
149  MemberListType_decDefineMembers = 39 + MemberListType_declarationLists,
150  MemberListType_decProtoMembers = 40 + MemberListType_declarationLists,
151  MemberListType_decTypedefMembers = 41 + MemberListType_declarationLists,
152  MemberListType_decEnumMembers = 42 + MemberListType_declarationLists,
153  MemberListType_decFuncMembers = 43 + MemberListType_declarationLists,
154  MemberListType_decVarMembers = 44 + MemberListType_declarationLists,
155  MemberListType_decEnumValMembers = 45 + MemberListType_declarationLists,
156  MemberListType_decPubSlotMembers = 46 + MemberListType_declarationLists,
157  MemberListType_decProSlotMembers = 47 + MemberListType_declarationLists,
158  MemberListType_decPriSlotMembers = 48 + MemberListType_declarationLists,
159  MemberListType_decSignalMembers = 49 + MemberListType_declarationLists,
160  MemberListType_decEventMembers = 50 + MemberListType_declarationLists,
161  MemberListType_decFriendMembers = 51 + MemberListType_declarationLists,
162  MemberListType_decPropMembers = 52 + MemberListType_declarationLists,
163 
164  MemberListType_docDefineMembers = 53 + MemberListType_documentationLists,
165  MemberListType_docProtoMembers = 54 + MemberListType_documentationLists,
166  MemberListType_docTypedefMembers = 55 + MemberListType_documentationLists,
167  MemberListType_docEnumMembers = 56 + MemberListType_documentationLists,
168  MemberListType_docFuncMembers = 57 + MemberListType_documentationLists,
169  MemberListType_docVarMembers = 58 + MemberListType_documentationLists,
170  MemberListType_docEnumValMembers = 59 + MemberListType_documentationLists,
171  MemberListType_docPubSlotMembers = 60 + MemberListType_documentationLists,
172  MemberListType_docProSlotMembers = 61 + MemberListType_documentationLists,
173  MemberListType_docPriSlotMembers = 62 + MemberListType_documentationLists,
174  MemberListType_docSignalMembers = 63 + MemberListType_documentationLists,
175  MemberListType_docEventMembers = 64 + MemberListType_documentationLists,
176  MemberListType_docFriendMembers = 65 + MemberListType_documentationLists,
177  MemberListType_docPropMembers = 66 + MemberListType_documentationLists,
178 
179  MemberListType_redefinedBy = 67,
180  MemberListType_enumFields = 68,
181  MemberListType_memberGroup = 69,
182 
183  // this one is for the summary section on the class page
184  MemberListType_interfaces = 70,
185  // this one is for the detailed section on the class page
186  MemberListType_interfaceMembers = 71 + MemberListType_detailedLists,
187  MemberListType_services = 72,
188  MemberListType_serviceMembers = 73 + MemberListType_detailedLists,
189 
190  MemberListType_decSequenceMembers = 74 + MemberListType_declarationLists,
191  MemberListType_docSequenceMembers = 75 + MemberListType_documentationLists,
192  MemberListType_decDictionaryMembers = 76 + MemberListType_declarationLists,
193  MemberListType_docDictionaryMembers = 77 + MemberListType_documentationLists
194 };
195 
196 enum class MemberListContainer
197 {
198  File,
199  Namespace,
200  Group,
201  Class
202 };
203 
204 enum class CodeSymbolType
205 {
206  Default,
207  // Class types
208  Class,
209  Struct,
210  Union,
211  Interface,
212  Protocol,
213  Category,
214  Exception,
215  Service,
216  Singleton,
217  // Other container types
218  Concept,
219  Namespace,
220  Package,
221  // Member types
222  Define,
223  Function,
224  Variable,
225  Typedef,
226  EnumValue,
227  Enumeration,
228  Signal,
229  Slot,
230  Friend,
231  DCOP,
232  Property,
233  Event,
234  Sequence,
235  Dictionary
236 };
237 
238 constexpr const char *codeSymbolType2Str(CodeSymbolType type)
239 {
240  switch (type)
241  {
242  case CodeSymbolType::Class: return "class";
243  case CodeSymbolType::Struct: return "struct";
244  case CodeSymbolType::Union: return "union";
245  case CodeSymbolType::Interface: return "interface";
246  case CodeSymbolType::Protocol: return "protocol";
247  case CodeSymbolType::Category: return "category";
248  case CodeSymbolType::Exception: return "exception";
249  case CodeSymbolType::Service: return "service";
250  case CodeSymbolType::Singleton: return "singleton";
251  case CodeSymbolType::Concept: return "concept";
252  case CodeSymbolType::Namespace: return "namespace";
253  case CodeSymbolType::Package: return "package";
254  case CodeSymbolType::Define: return "define";
255  case CodeSymbolType::Function: return "function";
256  case CodeSymbolType::Variable: return "variable";
257  case CodeSymbolType::Typedef: return "typedef";
258  case CodeSymbolType::EnumValue: return "enumvalue";
259  case CodeSymbolType::Enumeration: return "enumeration";
260  case CodeSymbolType::Signal: return "signal";
261  case CodeSymbolType::Slot: return "slot";
262  case CodeSymbolType::Friend: return "friend";
263  case CodeSymbolType::DCOP: return "dcop";
264  case CodeSymbolType::Property: return "property";
265  case CodeSymbolType::Event: return "event";
266  case CodeSymbolType::Sequence: return "sequence";
267  case CodeSymbolType::Dictionary: return "dictionary";
268  default:
269  return 0;
270  }
271 }
272 
273 
274 enum MemberType
275 {
276  MemberType_Define,
277  MemberType_Function,
278  MemberType_Variable,
279  MemberType_Typedef,
280  MemberType_Enumeration,
281  MemberType_EnumValue,
282  MemberType_Signal,
283  MemberType_Slot,
284  MemberType_Friend,
285  MemberType_DCOP,
286  MemberType_Property,
287  MemberType_Event,
288  MemberType_Interface,
289  MemberType_Service,
290  MemberType_Sequence,
291  MemberType_Dictionary
292 };
293 
294 enum FortranFormat
295 {
296  FortranFormat_Unknown,
297  FortranFormat_Free,
298  FortranFormat_Fixed
299 };
300 
301 class LocalToc
302 {
303  public:
304  enum Type {
305  None = 0, // initial value
306  Html = 0, // index / also to be used as bit position in mask (1 << Html)
307  Latex = 1, // ...
308  Xml = 2, // ...
309  Docbook = 3, // ...
310  numTocTypes = 4 // number of enum values
311  };
312  LocalToc() : m_mask(None) { memset(m_level,0,sizeof(m_level)); }
313 
314  // setters
315  void enableHtml(int level)
316  {
317  m_mask|=(1<<Html);
318  m_level[Html]=level;
319  }
320  void enableLatex(int level)
321  {
322  m_mask|=(1<<Latex);
323  m_level[Latex]=level;
324  }
325  void enableXml(int level)
326  {
327  m_mask|=(1<<Xml);
328  m_level[Xml]=level;
329  }
330  void enableDocbook(int level)
331  {
332  m_mask|=(1<<Docbook);
333  m_level[Docbook]=level;
334  }
335 
336  // getters
337  bool isHtmlEnabled() const { return (m_mask & (1<<Html))!=0; }
338  bool isLatexEnabled() const { return (m_mask & (1<<Latex))!=0; }
339  bool isXmlEnabled() const { return (m_mask & (1<<Xml))!=0; }
340  bool isDocbookEnabled() const { return (m_mask & (1<<Docbook))!=0; }
341  bool nothingEnabled() const { return m_mask == None; }
342  int htmlLevel() const { return m_level[Html]; }
343  int latexLevel() const { return m_level[Latex]; }
344  int xmlLevel() const { return m_level[Xml]; }
345  int docbookLevel() const { return m_level[Docbook]; }
346  int mask() const { return m_mask; }
347 
348  private:
349  int m_mask;
350  int m_level[numTocTypes];
351 };
352 
353 #endif
Grouping info.
Definition: types.h:64
membership in group was defined via @weakgroup
Definition: types.h:70
membership in group was defined via @defgroup
Definition: types.h:72
GroupPri_t
Grouping priority.
Definition: types.h:67
GroupPri_t pri
priority of this definition
Definition: types.h:96
SrcLangExt
Language as given by extension.
Definition: types.h:41
Relationship
Kind of member relationship.
Definition: types.h:38
Definition: types.h:301
membership in group was defined by @ingroup
Definition: types.h:74
A class representing a macro definition.
Definition: define.h:30
Specifier
Virtualness of a member.
Definition: types.h:29
QCString groupname
name of the group
Definition: types.h:95
MethodTypes
Kind of method.
Definition: types.h:32
Protection
Protection level of members.
Definition: types.h:26
RelatesType
Type of member relation.
Definition: types.h:35
This is an alternative implementation of QCString.
Definition: qcstring.h:108
membership in group was defined via @add[to]group
Definition: types.h:71