Doxygen
Loading...
Searching...
No Matches
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
21/** @file
22 * @brief This file contains a number of basic enums and types.
23 */
24
25/** Protection level of members */
27
28/** Virtualness of a member. */
29enum class Specifier { Normal, Virtual, Pure } ;
30
31/** Kind of method */
33
34/** Type of member relation */
36
37/** Kind of member relationship */
39
40/** Language as given by extension */
41enum class SrcLangExt
42{
43 Unknown = 0x00000,
44 IDL = 0x00008,
45 Java = 0x00010,
46 CSharp = 0x00020,
47 D = 0x00040,
48 PHP = 0x00080,
49 ObjC = 0x00100,
50 Cpp = 0x00200,
51 JS = 0x00400,
52 Python = 0x00800,
53 Fortran = 0x01000,
54 VHDL = 0x02000,
55 XML = 0x04000,
56 //Tcl = 0x08000, // no longer supported
57 Markdown = 0x10000,
58 SQL = 0x20000,
59 Slice = 0x40000,
60 Lex = 0x80000
61};
62
63/** Grouping info */
65{
66 /** Grouping priority */
68 {
70 GROUPING_AUTO_WEAK = GROUPING_LOWEST, //!< membership in group was defined via \@weakgroup
71 GROUPING_AUTO_ADD, //!< membership in group was defined via \@add[to]group
72 GROUPING_AUTO_DEF, //!< membership in group was defined via \@defgroup
74 GROUPING_INGROUP, //!< membership in group was defined by \@ingroup
76 };
77
78 static const char *getGroupPriName( GroupPri_t priority )
79 {
80 switch( priority )
81 {
83 return "@weakgroup";
85 return "@addtogroup";
87 return "@defgroup";
89 return "@ingroup";
90 }
91 return "???";
92 }
93
94 Grouping( const QCString &gn, GroupPri_t p ) : groupname(gn), pri(p) {}
95 QCString groupname; //!< name of the group
96 GroupPri_t pri; //!< priority of this definition
97
98};
99
100// enum name category to-public to-protected html-label xml-label
101#define ML_TYPES \
102 ML_TYPE(PubMethods, Public, Invalid, Invalid, "pub-methods", "public-func" ) \
103 ML_TYPE(ProMethods, Protected, PubMethods, Invalid, "pro-methods", "protected-func" ) \
104 ML_TYPE(PacMethods, Package, Invalid, Invalid, "pac-methods", "package-func" ) \
105 ML_TYPE(PriMethods, Private, PubMethods, ProMethods, "pri-methods", "private-func" ) \
106 ML_TYPE(PubStaticMethods, Public, Invalid, Invalid, "pub-static-methods", "public-static-func" ) \
107 ML_TYPE(ProStaticMethods, Protected, PubStaticMethods, Invalid, "pro-static-methods", "protected-static-func" ) \
108 ML_TYPE(PacStaticMethods, Package, Invalid, Invalid, "pac-static-methods", "package-static-func" ) \
109 ML_TYPE(PriStaticMethods, Private, PubStaticMethods, ProStaticMethods, "pri-static-methods", "private-static-func" ) \
110 ML_TYPE(PubSlots, Public, Invalid, Invalid, "pub-slots", "public-slot" ) \
111 ML_TYPE(ProSlots, Protected, PubSlots, Invalid, "pro-slots", "protected-slot" ) \
112 ML_TYPE(PriSlots, Private, PubSlots, ProSlots, "pri-slots", "private-slot" ) \
113 ML_TYPE(PubAttribs, Public, Invalid, Invalid, "pub-attribs", "public-attrib" ) \
114 ML_TYPE(ProAttribs, Protected, PubAttribs, Invalid, "pro-attribs", "protected-attrib" ) \
115 ML_TYPE(PacAttribs, Package, Invalid, Invalid, "pac-attribs", "package-attrib" ) \
116 ML_TYPE(PriAttribs, Private, PubAttribs, ProAttribs, "pri-attribs", "private-attrib" ) \
117 ML_TYPE(PubStaticAttribs, Public, Invalid, Invalid, "pub-static-attribs", "public-static-attrib" ) \
118 ML_TYPE(ProStaticAttribs, Protected, PubStaticAttribs, Invalid, "pro-static-attribs", "protected-static-attrib" ) \
119 ML_TYPE(PacStaticAttribs, Package, Invalid, Invalid, "pac-static-attribs", "package-static-attrib" ) \
120 ML_TYPE(PriStaticAttribs, Private, PubStaticAttribs, ProStaticAttribs, "pri-static-attribs", "private-static-attrib" ) \
121 ML_TYPE(PubTypes, Public, Invalid, Invalid, "pub-types", "public-type" ) \
122 ML_TYPE(ProTypes, Protected, PubTypes, Invalid, "pro-types", "protected-type" ) \
123 ML_TYPE(PacTypes, Package, Invalid, Invalid, "pac-types", "package-type" ) \
124 ML_TYPE(PriTypes, Private, PubTypes, ProTypes, "pri-types", "private-type" ) \
125 ML_TYPE(Related, OnlyPublic, Invalid, Invalid, "related", "related" ) \
126 ML_TYPE(Signals, OnlyPublic, Invalid, Invalid, "signals", "signal" ) \
127 ML_TYPE(Friends, OnlyPublic, Invalid, Invalid, "friends", "friend" ) \
128 ML_TYPE(DcopMethods, OnlyPublic, Invalid, Invalid, "dcop-methods", "dcop-func" ) \
129 ML_TYPE(Properties, OnlyPublic, Invalid, Invalid, "properties", "property" ) \
130 ML_TYPE(Events, OnlyPublic, Invalid, Invalid, "events", "event" ) \
131 ML_TYPE(AllMembersList, OnlyPublic, Invalid, Invalid, "", "" ) \
132 ML_TYPE(EnumFields, OnlyPublic, Invalid, Invalid, "enum-fields", "" ) \
133 ML_TYPE(MemberGroup, OnlyPublic, Invalid, Invalid, "", "" ) \
134 ML_TYPE(Interfaces, OnlyPublic, Invalid, Invalid, "interfaces", "interfaces" ) \
135 ML_TYPE(Services, OnlyPublic, Invalid, Invalid, "services", "services" ) \
136 ML_TYPE(DecDefineMembers, Declaration, Invalid, Invalid, "define-members", "define" ) \
137 ML_TYPE(DecProtoMembers, Declaration, Invalid, Invalid, "proto-members", "prototype" ) \
138 ML_TYPE(DecTypedefMembers, Declaration, Invalid, Invalid, "typedef-members", "typedef" ) \
139 ML_TYPE(DecEnumMembers, Declaration, Invalid, Invalid, "enum-members", "enum" ) \
140 ML_TYPE(DecFuncMembers, Declaration, Invalid, Invalid, "func-members", "func" ) \
141 ML_TYPE(DecVarMembers, Declaration, Invalid, Invalid, "var-members", "var" ) \
142 ML_TYPE(DecEnumValMembers, Declaration, Invalid, Invalid, "enumval-members", "" ) \
143 ML_TYPE(DecPubSlotMembers, Declaration, Invalid, Invalid, "pub-slot-members", "" ) \
144 ML_TYPE(DecProSlotMembers, Declaration, Invalid, Invalid, "pro-slot-members", "" ) \
145 ML_TYPE(DecPriSlotMembers, Declaration, Invalid, Invalid, "pri-slot-members", "" ) \
146 ML_TYPE(DecSignalMembers, Declaration, Invalid, Invalid, "signal-members", "" ) \
147 ML_TYPE(DecEventMembers, Declaration, Invalid, Invalid, "event-members", "" ) \
148 ML_TYPE(DecFriendMembers, Declaration, Invalid, Invalid, "friend-members", "" ) \
149 ML_TYPE(DecPropMembers, Declaration, Invalid, Invalid, "prop-members", "" ) \
150 ML_TYPE(DecSequenceMembers, Declaration, Invalid, Invalid, "sequence-members", "sequence" ) \
151 ML_TYPE(DecDictionaryMembers,Declaration, Invalid, Invalid, "dictionary-members", "dictionary" ) \
152 ML_TYPE(TypedefMembers, Detailed, Invalid, Invalid, "", "" ) \
153 ML_TYPE(EnumMembers, Detailed, Invalid, Invalid, "", "" ) \
154 ML_TYPE(EnumValMembers, Detailed, Invalid, Invalid, "", "" ) \
155 ML_TYPE(FunctionMembers, Detailed, Invalid, Invalid, "", "" ) \
156 ML_TYPE(RelatedMembers, Detailed, Invalid, Invalid, "", "" ) \
157 ML_TYPE(VariableMembers, Detailed, Invalid, Invalid, "", "" ) \
158 ML_TYPE(PropertyMembers, Detailed, Invalid, Invalid, "", "" ) \
159 ML_TYPE(EventMembers, Detailed, Invalid, Invalid, "", "" ) \
160 ML_TYPE(Constructors, Detailed, Invalid, Invalid, "", "" ) \
161 ML_TYPE(InterfaceMembers, Detailed, Invalid, Invalid, "interface-members", "" ) \
162 ML_TYPE(ServiceMembers, Detailed, Invalid, Invalid, "service-members", "" ) \
163 ML_TYPE(DocDefineMembers, Documentation,Invalid, Invalid, "", "" ) \
164 ML_TYPE(DocProtoMembers, Documentation,Invalid, Invalid, "", "" ) \
165 ML_TYPE(DocTypedefMembers, Documentation,Invalid, Invalid, "", "" ) \
166 ML_TYPE(DocEnumMembers, Documentation,Invalid, Invalid, "", "" ) \
167 ML_TYPE(DocFuncMembers, Documentation,Invalid, Invalid, "", "" ) \
168 ML_TYPE(DocVarMembers, Documentation,Invalid, Invalid, "", "" ) \
169 ML_TYPE(DocEnumValMembers, Documentation,Invalid, Invalid, "", "" ) \
170 ML_TYPE(DocPubSlotMembers, Documentation,Invalid, Invalid, "", "" ) \
171 ML_TYPE(DocProSlotMembers, Documentation,Invalid, Invalid, "", "" ) \
172 ML_TYPE(DocPriSlotMembers, Documentation,Invalid, Invalid, "", "" ) \
173 ML_TYPE(DocSignalMembers, Documentation,Invalid, Invalid, "", "" ) \
174 ML_TYPE(DocEventMembers, Documentation,Invalid, Invalid, "", "" ) \
175 ML_TYPE(DocFriendMembers, Documentation,Invalid, Invalid, "", "" ) \
176 ML_TYPE(DocPropMembers, Documentation,Invalid, Invalid, "", "" ) \
177 ML_TYPE(DocSequenceMembers, Documentation,Invalid, Invalid, "", "" ) \
178 ML_TYPE(DocDictionaryMembers,Documentation,Invalid, Invalid, "", "" ) \
179
180/** Wrapper class for the MemberListType type. Can be set only during construction.
181 * Packs the type together with category flags.
182 */
184{
186 {
187 Public = (1<<16),
188 Protected = (1<<17),
189 Package = (1<<18),
190 Private = (1<<19),
191 OnlyPublic = (1<<20),
192 Detailed = (1<<21),
193 Declaration = (1<<22),
194 Documentation = (1<<23),
195 TypeMask = 0x0000FFFF,
196 CategoryMask = 0xFFFF0000
197 };
198
200 {
202#define ML_TYPE(x,bits,to_pub,to_prot,label,xml_str) \
203 x##_,
205#undef ML_TYPE
206 };
207
208 public:
210 constexpr bool isInvalid() const { return m_type==Invalid_; }
211#define ML_TYPE(x,bits,to_pub,to_prot,label,xml_str) \
212 static MemberListType x() { return MemberListType(static_cast<int>(x##_)|static_cast<int>(bits)); } \
213 bool is##x() const { return (m_type&TypeMask)==x##_; }
215#undef ML_TYPE
216 constexpr bool isPublic() const { return (m_type & Public)!=0; }
217 constexpr bool isOnlyPublic() const { return (m_type & OnlyPublic)!=0; }
218 constexpr bool isProtected() const { return (m_type & Protected)!=0; }
219 constexpr bool isPackage() const { return (m_type & Package)!=0; }
220 constexpr bool isPrivate() const { return (m_type & Private)!=0; }
221 constexpr bool isDetailed() const { return (m_type & Detailed)!=0; }
222 constexpr bool isDeclaration() const { return (m_type & Declaration)!=0; }
223 constexpr bool isDocumentation() const { return (m_type & Documentation)!=0; }
224 std::string to_string() const
225 {
226 switch (type())
227 {
228 case Invalid_: return "[Invalid]";
229#define ML_TYPE(x,bits,to_pub,to_prot,label,xml_str) \
230 case x##_ : return "["+std::string(#x)+bits_to_string()+"]";
232#undef ML_TYPE
233 }
234 return "[unknown]";
235 }
236 int to_int() const
237 {
238 return m_type!=Invalid_ ? m_type&TypeMask : -1;
239 }
240 constexpr const char *toLabel() const
241 {
242 switch (type())
243 {
244 case Invalid_: return "";
245#define ML_TYPE(x,bits,to_pub,to_prot,label,xml_str) \
246 case x##_ : return label;
248#undef ML_TYPE
249 }
250 return "";
251 }
252 constexpr const char *toXML() const
253 {
254 switch (type())
255 {
256 case Invalid_: return "";
257#define ML_TYPE(x,bits,to_pub,to_prot,label,xml_str) \
258 case x##_ : return xml_str;
260#undef ML_TYPE
261 }
262 return "";
263 }
265 {
266 switch (type())
267 {
268 case Invalid_: return Invalid();
269#define ML_TYPE(x,bits,to_pub,to_prot,label,xml_str) \
270 case x##_ : return to_pub();
272#undef ML_TYPE
273 }
274 return Invalid();
275 }
277 {
278 switch (type())
279 {
280 case Invalid_: return Invalid();
281#define ML_TYPE(x,bits,to_pub,to_prot,label,xml_str) \
282 case x##_ : return to_prot();
284#undef ML_TYPE
285 }
286 return Invalid();
287 }
288 friend inline bool operator==(const MemberListType &t1,const MemberListType &t2) { return t1.m_type==t2.m_type; }
289 friend inline bool operator!=(const MemberListType &t1,const MemberListType &t2) { return !(operator==(t1,t2)); }
290
291 private:
292 explicit MemberListType(int t) : m_type(t) {}
293 std::string bits_to_string() const
294 {
295 std::string result;
296 if (m_type&Public) result+=",Public";
297 if (m_type&Protected) result+=",Protected";
298 if (m_type&Package) result+=",Package";
299 if (m_type&Private) result+=",Private";
300 if (m_type&OnlyPublic) result+=",OnlyPublic";
301 if (m_type&Detailed) result+=",Detailed";
302 if (m_type&Documentation) result+=",Documentation";
303 return result;
304 }
305 constexpr TypeName type() const { return static_cast<TypeName>(m_type & TypeMask); }
306 int m_type = static_cast<int>(Invalid_);
307};
308
317
352
353constexpr const char *codeSymbolType2Str(CodeSymbolType type)
354{
355 switch (type)
356 {
357 case CodeSymbolType::Class: return "class";
358 case CodeSymbolType::Struct: return "struct";
359 case CodeSymbolType::Union: return "union";
360 case CodeSymbolType::Interface: return "interface";
361 case CodeSymbolType::Protocol: return "protocol";
362 case CodeSymbolType::Category: return "category";
363 case CodeSymbolType::Exception: return "exception";
364 case CodeSymbolType::Service: return "service";
365 case CodeSymbolType::Singleton: return "singleton";
366 case CodeSymbolType::Concept: return "concept";
367 case CodeSymbolType::Namespace: return "namespace";
368 case CodeSymbolType::Package: return "package";
369 case CodeSymbolType::Define: return "define";
370 case CodeSymbolType::Function: return "function";
371 case CodeSymbolType::Variable: return "variable";
372 case CodeSymbolType::Typedef: return "typedef";
373 case CodeSymbolType::EnumValue: return "enumvalue";
374 case CodeSymbolType::Enumeration: return "enumeration";
375 case CodeSymbolType::Signal: return "signal";
376 case CodeSymbolType::Slot: return "slot";
377 case CodeSymbolType::Friend: return "friend";
378 case CodeSymbolType::DCOP: return "dcop";
379 case CodeSymbolType::Property: return "property";
380 case CodeSymbolType::Event: return "event";
381 case CodeSymbolType::Sequence: return "sequence";
382 case CodeSymbolType::Dictionary: return "dictionary";
383 default:
384 return nullptr;
385 }
386}
387
388
408
415
416
418{
419 public:
420 enum Type {
421 None = 0, // initial value
422 Html = 0, // index / also to be used as bit position in mask (1 << Html)
423 Latex = 1, // ...
424 Xml = 2, // ...
425 Docbook = 3, // ...
426 numTocTypes = 4 // number of enum values
427 };
428 LocalToc() : m_mask(None) { memset(m_level,0,sizeof(m_level)); }
429
430 // setters
431 void enableHtml(int level)
432 {
433 m_mask|=(1<<Html);
434 m_level[Html]=level;
435 }
436 void enableLatex(int level)
437 {
438 m_mask|=(1<<Latex);
439 m_level[Latex]=level;
440 }
441 void enableXml(int level)
442 {
443 m_mask|=(1<<Xml);
444 m_level[Xml]=level;
445 }
446 void enableDocbook(int level)
447 {
448 m_mask|=(1<<Docbook);
449 m_level[Docbook]=level;
450 }
451
452 // getters
453 bool isHtmlEnabled() const { return (m_mask & (1<<Html))!=0; }
454 bool isLatexEnabled() const { return (m_mask & (1<<Latex))!=0; }
455 bool isXmlEnabled() const { return (m_mask & (1<<Xml))!=0; }
456 bool isDocbookEnabled() const { return (m_mask & (1<<Docbook))!=0; }
457 bool nothingEnabled() const { return m_mask == None; }
458 int htmlLevel() const { return m_level[Html]; }
459 int latexLevel() const { return m_level[Latex]; }
460 int xmlLevel() const { return m_level[Xml]; }
461 int docbookLevel() const { return m_level[Docbook]; }
462 int mask() const { return m_mask; }
463
464 private:
467};
468
469//---------------------------------------------------------------------------------------
470
471
472#define TYPE_SPECIFIERS \
473/* 0 */ TSPEC(Template) TSPEC(Generic) TSPEC(Ref) TSPEC(Value) TSPEC(Interface) \
474/* 5 */ TSPEC(Struct) TSPEC(Union) TSPEC(Exception) TSPEC(Protocol) TSPEC(Category) \
475/* 10 */ TSPEC(SealedClass) TSPEC(AbstractClass) TSPEC(Enum) TSPEC(Service) TSPEC(Singleton) \
476/* 15 */ TSPEC(ForwardDecl) TSPEC(Local) TSPEC(EnumStruct) TSPEC(ConstExpr) TSPEC(PrivateGettable) \
477/* 20 */ TSPEC(ProtectedGettable) TSPEC(PrivateSettable) TSPEC(ProtectedSettable) TSPEC(Inline) TSPEC(Explicit) \
478/* 25 */ TSPEC(Mutable) TSPEC(Settable) TSPEC(Gettable) TSPEC(Readable) TSPEC(Writable) \
479/* 30 */ TSPEC(Final) TSPEC(Abstract) TSPEC(Addable) TSPEC(Removable) TSPEC(Raisable) \
480/* 35 */ TSPEC(Override) TSPEC(New) TSPEC(Sealed) TSPEC(Initonly) TSPEC(Optional) \
481/* 40 */ TSPEC(Required) TSPEC(NonAtomic) TSPEC(Copy) TSPEC(Retain) TSPEC(Assign) \
482/* 45 */ TSPEC(Strong) TSPEC(Weak) TSPEC(Unretained) TSPEC(Alias) TSPEC(ConstExp) \
483/* 50 */ TSPEC(Default) TSPEC(Delete) TSPEC(NoExcept) TSPEC(Attribute) TSPEC(Property) \
484/* 55 */ TSPEC(Readonly) TSPEC(Bound) TSPEC(Constrained) TSPEC(Transient) TSPEC(MaybeVoid) \
485/* 60 */ TSPEC(MaybeDefault) TSPEC(MaybeAmbiguous) TSPEC(Published) TSPEC(ConstEval) TSPEC(ConstInit) \
486/* 65 */ TSPEC(NoDiscard)
487
488/** Wrapper class for a number of boolean properties.
489 * The properties are packed together, and initialized to false.
490 */
492{
493 public:
495
496 void reset() { std::memset(this, 0, sizeof(*this)); }
497
498 void merge(const TypeSpecifier &other)
499 {
500#define TSPEC(x) m_is##x = m_is##x || other.is##x();
502#undef TSPEC
503 }
504
505 friend inline bool operator==(const TypeSpecifier &t1,const TypeSpecifier &t2)
506 {
507 bool eq = true;
508#define TSPEC(x) eq = eq && (t1.m_is##x == t2.m_is##x);
510#undef TSPEC
511 return eq;
512 }
513
514 friend inline bool operator!=(const TypeSpecifier &t1,const TypeSpecifier &t2)
515 {
516 return !(operator==(t1,t2));
517 }
518
519
520 std::string to_string() const
521 {
522 std::string result="[";
523 bool first=true;
524#define TSPEC(x) \
525 if (m_is##x) { \
526 if (!first) result+=","; \
527 result+=#x; first=false; \
528 }
530#undef TSPEC
531 result+="]";
532 return result;
533 }
534
535 // generate getter and setter for each property
536#define TSPEC(x) \
537 public: \
538 TypeSpecifier &set##x(bool b) { m_is##x = b; return *this; } \
539 bool is##x() const { return m_is##x; } \
540 private: \
541 bool m_is##x : 1;
543#undef TSPEC
544
545};
546
578
579
580// Type Categories (or'ed)
581#define ENTRY_TYPES \
582 ETYPE(Empty, None) \
583 ETYPE(Class, Compound|Scope) \
584 ETYPE(Namespace, Scope) \
585 ETYPE(Concept, None) \
586 ETYPE(ClassDoc, CompoundDoc|Doc) \
587 ETYPE(StructDoc, CompoundDoc|Doc) \
588 ETYPE(UnionDoc, CompoundDoc|Doc) \
589 ETYPE(ExceptionDoc, CompoundDoc|Doc) \
590 ETYPE(InterfaceDoc, CompoundDoc|Doc) \
591 ETYPE(ProtocolDoc, CompoundDoc|Doc) \
592 ETYPE(CategoryDoc, CompoundDoc|Doc) \
593 ETYPE(ServiceDoc, CompoundDoc|Doc) \
594 ETYPE(SingletonDoc, CompoundDoc|Doc) \
595 ETYPE(Source, File) \
596 ETYPE(Header, File) \
597 ETYPE(ModuleDoc, Doc) \
598 ETYPE(ConceptDoc, Doc) \
599 ETYPE(NamespaceDoc, Doc) \
600 ETYPE(EnumDoc, Doc) \
601 ETYPE(PageDoc, Doc) \
602 ETYPE(MemberDoc, Doc) \
603 ETYPE(OverloadDoc, Doc) \
604 ETYPE(Example, Doc) \
605 ETYPE(VariableDoc, Doc) \
606 ETYPE(FileDoc, Doc) \
607 ETYPE(DefineDoc, Doc) \
608 ETYPE(GroupDoc, Doc) \
609 ETYPE(MainpageDoc, Doc) \
610 ETYPE(MemberGrp, Doc) \
611 ETYPE(PackageDoc, Doc) \
612 ETYPE(DirDoc, Doc) \
613 ETYPE(Variable, None) \
614 ETYPE(Function, None) \
615 ETYPE(Typedef, None) \
616 ETYPE(Include, None) \
617 ETYPE(Enum, None) \
618 ETYPE(Define, None) \
619 ETYPE(UsingDir, None) \
620 ETYPE(UsingDecl, None) \
621 ETYPE(Package, None) \
622 ETYPE(ObjcImpl, None) \
623 ETYPE(ExportedInterface, None) \
624 ETYPE(IncludedService, None) \
625 ETYPE(ExampleLineno, None) \
626
627/** Wrapper class for the Entry type. Can be set only during construction.
628 * Packs the type together with category flags.
629 */
631{
632 public:
633#define ETYPE(x,bits) \
634 static EntryType make##x() { return EntryType(static_cast<int>(x)|static_cast<int>(bits)); } \
635 bool is##x() const { return (m_type&TypeMask)==x; }
637#undef ETYPE
638 bool isCompound() const { return (m_type & Compound)!=0; }
639 bool isScope() const { return (m_type & Scope)!=0; }
640 bool isFile() const { return (m_type & File)!=0; }
641 bool isCompoundDoc() const { return (m_type & CompoundDoc)!=0; }
642 bool isDoc() const { return (m_type & Doc)!=0; }
643 std::string to_string() const
644 {
645 switch (type())
646 {
647#define ETYPE(x,bits) \
648 case x : return "["+std::string(#x)+bits_to_string()+"]";
650#undef ETYPE
651 }
652 return "[unknown]";
653 }
654 friend inline bool operator==(const EntryType &t1,const EntryType &t2) { return t1.m_type==t2.m_type; }
655 friend inline bool operator!=(const EntryType &t1,const EntryType &t2) { return !(operator==(t1,t2)); }
656
657 private:
659 {
660#define ETYPE(x,bits) \
661 x,
663#undef ETYPE
664 };
665
667 {
668 None = 0,
669 Compound = (1<<16),
670 Scope = (1<<17),
671 File = (1<<18),
672 CompoundDoc = (1<<19),
673 Doc = (1<<20),
674 TypeMask = 0x0000FFFF,
675 CategoryMask = 0xFFFF0000
676 };
677 explicit EntryType(int t) : m_type(t) {}
678 std::string bits_to_string() const
679 {
680 std::string result;
681 if (m_type&Compound) result+=",Compound";
682 if (m_type&Scope) result+=",Scope";
683 if (m_type&File) result+=",File";
684 if (m_type&CompoundDoc) result+=",CompoundDoc";
685 return result;
686 }
687 TypeName type() const { return static_cast<TypeName>(m_type & TypeMask); }
688 unsigned int m_type = Empty;
689};
690
691
692#endif
bool isDoc() const
Definition types.h:642
unsigned int m_type
Definition types.h:688
ENTRY_TYPES bool isCompound() const
Definition types.h:638
TypeName
Definition types.h:659
@ ENTRY_TYPES
Definition types.h:662
EntryType(int t)
Definition types.h:677
bool isFile() const
Definition types.h:640
std::string to_string() const
Definition types.h:643
friend bool operator!=(const EntryType &t1, const EntryType &t2)
Definition types.h:655
TypeName type() const
Definition types.h:687
CategoryBits
Definition types.h:667
@ None
Definition types.h:668
@ Scope
Definition types.h:670
@ File
Definition types.h:671
@ CategoryMask
Definition types.h:675
@ Compound
Definition types.h:669
@ TypeMask
Definition types.h:674
@ Doc
Definition types.h:673
@ CompoundDoc
Definition types.h:672
friend bool operator==(const EntryType &t1, const EntryType &t2)
Definition types.h:654
std::string bits_to_string() const
Definition types.h:678
bool isScope() const
Definition types.h:639
bool isCompoundDoc() const
Definition types.h:641
bool isHtmlEnabled() const
Definition types.h:453
void enableXml(int level)
Definition types.h:441
bool isXmlEnabled() const
Definition types.h:455
int mask() const
Definition types.h:462
int docbookLevel() const
Definition types.h:461
@ Xml
Definition types.h:424
@ None
Definition types.h:421
@ Html
Definition types.h:422
@ Docbook
Definition types.h:425
@ Latex
Definition types.h:423
@ numTocTypes
Definition types.h:426
void enableLatex(int level)
Definition types.h:436
int latexLevel() const
Definition types.h:459
int m_level[numTocTypes]
Definition types.h:466
LocalToc()
Definition types.h:428
int htmlLevel() const
Definition types.h:458
int m_mask
Definition types.h:465
void enableDocbook(int level)
Definition types.h:446
int xmlLevel() const
Definition types.h:460
void enableHtml(int level)
Definition types.h:431
bool nothingEnabled() const
Definition types.h:457
bool isDocbookEnabled() const
Definition types.h:456
bool isLatexEnabled() const
Definition types.h:454
constexpr bool isProtected() const
Definition types.h:218
constexpr bool isOnlyPublic() const
Definition types.h:217
int to_int() const
Definition types.h:236
MemberListType toProtected() const
Definition types.h:276
constexpr bool isDetailed() const
Definition types.h:221
MemberListType toPublic() const
Definition types.h:264
static MemberListType Invalid()
Definition types.h:209
friend bool operator==(const MemberListType &t1, const MemberListType &t2)
Definition types.h:288
constexpr const char * toXML() const
Definition types.h:252
friend bool operator!=(const MemberListType &t1, const MemberListType &t2)
Definition types.h:289
constexpr const char * toLabel() const
Definition types.h:240
MemberListType(int t)
Definition types.h:292
constexpr bool isPrivate() const
Definition types.h:220
ML_TYPES constexpr bool isPublic() const
Definition types.h:216
constexpr bool isPackage() const
Definition types.h:219
constexpr bool isInvalid() const
Definition types.h:210
std::string to_string() const
Definition types.h:224
constexpr bool isDocumentation() const
Definition types.h:223
constexpr bool isDeclaration() const
Definition types.h:222
std::string bits_to_string() const
Definition types.h:293
constexpr TypeName type() const
Definition types.h:305
std::string to_string() const
Definition types.h:520
TypeSpecifier()
Definition types.h:494
friend bool operator==(const TypeSpecifier &t1, const TypeSpecifier &t2)
Definition types.h:505
friend bool operator!=(const TypeSpecifier &t1, const TypeSpecifier &t2)
Definition types.h:514
void merge(const TypeSpecifier &other)
Definition types.h:498
void reset()
Definition types.h:496
QCString groupname
name of the group
Definition types.h:95
GroupPri_t
Grouping priority.
Definition types.h:68
@ GROUPING_LOWEST
Definition types.h:69
@ GROUPING_AUTO_ADD
membership in group was defined via @add[to]group
Definition types.h:71
@ GROUPING_INGROUP
membership in group was defined by @ingroup
Definition types.h:74
@ GROUPING_AUTO_WEAK
membership in group was defined via @weakgroup
Definition types.h:70
@ GROUPING_AUTO_HIGHEST
Definition types.h:73
@ GROUPING_AUTO_DEF
membership in group was defined via @defgroup
Definition types.h:72
@ GROUPING_HIGHEST
Definition types.h:75
Grouping(const QCString &gn, GroupPri_t p)
Definition types.h:94
static const char * getGroupPriName(GroupPri_t priority)
Definition types.h:78
GroupPri_t pri
priority of this definition
Definition types.h:96
MethodTypes
Kind of method.
Definition types.h:32
@ Property
Definition types.h:32
constexpr const char * codeSymbolType2Str(CodeSymbolType type)
Definition types.h:353
#define TYPE_SPECIFIERS
Definition types.h:472
CodeSymbolType
Definition types.h:319
MemberType
Definition types.h:390
@ Enumeration
Definition types.h:395
@ EnumValue
Definition types.h:396
@ Dictionary
Definition types.h:406
@ Interface
Definition types.h:403
@ Sequence
Definition types.h:405
@ Variable
Definition types.h:393
@ Property
Definition types.h:401
@ Typedef
Definition types.h:394
@ Function
Definition types.h:392
@ Service
Definition types.h:404
MemberListContainer
Definition types.h:310
Protection
Protection level of members.
Definition types.h:26
@ Package
Definition types.h:26
@ Public
Definition types.h:26
@ Private
Definition types.h:26
@ Protected
Definition types.h:26
SrcLangExt
Language as given by extension.
Definition types.h:42
@ Markdown
Definition types.h:57
@ CSharp
Definition types.h:46
@ Fortran
Definition types.h:53
@ Unknown
Definition types.h:43
@ Python
Definition types.h:52
@ Slice
Definition types.h:59
Relationship
Kind of member relationship.
Definition types.h:38
RelatesType
Type of member relation.
Definition types.h:35
@ MemberOf
Definition types.h:35
@ Duplicate
Definition types.h:35
Specifier
Virtualness of a member.
Definition types.h:29
@ Virtual
Definition types.h:29
@ Normal
Definition types.h:29
@ Pure
Definition types.h:29
VhdlSpecifier
Definition types.h:548
@ INSTANTIATION
Definition types.h:569
@ MISCELLANEOUS
Definition types.h:575
@ SHAREDVARIABLE
Definition types.h:572
FortranFormat
Definition types.h:410