Doxygen
Loading...
Searching...
No Matches
memberdef.cpp
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
17#include <stdio.h>
18#include <assert.h>
19#include <mutex>
20
21#include "md5.h"
22#include "memberdef.h"
23#include "membername.h"
24#include "doxygen.h"
25#include "util.h"
26#include "code.h"
27#include "message.h"
28#include "htmlhelp.h"
29#include "language.h"
30#include "outputlist.h"
31#include "example.h"
32#include "membergroup.h"
33#include "groupdef.h"
34#include "defargs.h"
35#include "docparser.h"
36#include "dot.h"
37#include "dotcallgraph.h"
38#include "searchindex.h"
39#include "parserintf.h"
40#include "vhdldocgen.h"
41#include "arguments.h"
42#include "memberlist.h"
43#include "namespacedef.h"
44#include "moduledef.h"
45#include "filedef.h"
46#include "config.h"
47#include "definitionimpl.h"
48#include "regex.h"
49#include "trace.h"
50
51//-----------------------------------------------------------------------------
52
53class MemberDefImpl : public DefinitionMixin<MemberDefMutable>
54{
55 public:
56 MemberDefImpl(const QCString &defFileName,int defLine,int defColumn,
57 const QCString &type,const QCString &name,const QCString &args,
58 const QCString &excp,Protection prot,Specifier virt,bool stat,
59 Relationship related,MemberType t,const ArgumentList &tal,
60 const ArgumentList &al,const QCString &metaData);
61 ~MemberDefImpl() override = default;
63
64 DefType definitionType() const override { return TypeMember; }
65 MemberDef *resolveAlias() override { return this; }
66 const MemberDef *resolveAlias() const override { return this; }
67 CodeSymbolType codeSymbolType() const override;
68 std::unique_ptr<MemberDef> deepCopy() const override;
69 void moveTo(Definition *) override;
70 QCString getOutputFileBase() const override;
71 QCString getReference() const override;
72 QCString anchor() const override;
73 QCString declaration() const override;
74 QCString definition() const override;
75 QCString typeString() const override;
76 QCString argsString() const override;
77 QCString excpString() const override;
78 QCString bitfieldString() const override;
79 QCString extraTypeChars() const override;
80 const QCString &initializer() const override;
81 int initializerLines() const override;
82 TypeSpecifier getMemberSpecifiers() const override;
83 VhdlSpecifier getVhdlSpecifiers() const override;
84 const MemberList *getSectionList(const Definition *) const override;
85 QCString displayDefinition() const override;
86 const ClassDef *getClassDef() const override;
87 ClassDef *getClassDef() override;
88 const FileDef *getFileDef() const override;
89 FileDef *getFileDef() override;
90 const NamespaceDef* getNamespaceDef() const override;
91 NamespaceDef* getNamespaceDef() override;
92 const GroupDef *getGroupDef() const override;
93 GroupDef *getGroupDef() override;
94 const ModuleDef *getModuleDef() const override;
95 ClassDef *accessorClass() const override;
96 QCString getReadAccessor() const override;
97 QCString getWriteAccessor() const override;
98 Grouping::GroupPri_t getGroupPri() const override;
99 QCString getGroupFileName() const override;
100 int getGroupStartLine() const override;
101 bool getGroupHasDocs() const override;
102 QCString qualifiedName() const override;
103 QCString objCMethodName(bool localLink,bool showStatic) const override;
104 Protection protection() const override;
105 Specifier virtualness(int count=0) const override;
106 MemberType memberType() const override;
107 QCString memberTypeName() const override;
108 bool isSignal() const override;
109 bool isSlot() const override;
110 bool isVariable() const override;
111 bool isEnumerate() const override;
112 bool isEnumValue() const override;
113 bool isTypedef() const override;
114 bool isSequence() const override;
115 bool isDictionary() const override;
116 bool isFunction() const override;
117 bool isFunctionPtr() const override;
118 bool isDefine() const override;
119 bool isFriend() const override;
120 bool isDCOP() const override;
121 bool isProperty() const override;
122 bool isEvent() const override;
123 bool isRelated() const override;
124 bool isForeign() const override;
125 bool isStatic() const override;
126 bool isInline() const override;
127 bool isExplicit() const override;
128 bool isMutable() const override;
129 bool isGettable() const override;
130 bool isPrivateGettable() const override;
131 bool isProtectedGettable() const override;
132 bool isSettable() const override;
133 bool isPrivateSettable() const override;
134 bool isProtectedSettable() const override;
135 bool isReadable() const override;
136 bool isWritable() const override;
137 bool isAddable() const override;
138 bool isRemovable() const override;
139 bool isRaisable() const override;
140 bool isFinal() const override;
141 bool isAbstract() const override;
142 bool isOverride() const override;
143 bool isInitonly() const override;
144 bool isOptional() const override;
145 bool isRequired() const override;
146 bool isNonAtomic() const override;
147 bool isCopy() const override;
148 bool isAssign() const override;
149 bool isRetain() const override;
150 bool isWeak() const override;
151 bool isStrong() const override;
152 bool isEnumStruct() const override;
153 bool isUnretained() const override;
154 bool isNew() const override;
155 bool isSealed() const override;
156 bool isImplementation() const override;
157 bool isExternal() const override;
158 bool isTypeAlias() const override;
159 bool isDefault() const override;
160 bool isDelete() const override;
161 bool isNoExcept() const override;
162 bool isAttribute() const override;
163 bool isUNOProperty() const override;
164 bool isReadonly() const override;
165 bool isBound() const override;
166 bool isConstrained() const override;
167 bool isTransient() const override;
168 bool isMaybeVoid() const override;
169 bool isMaybeDefault() const override;
170 bool isMaybeAmbiguous() const override;
171 bool isPublished() const override;
172 bool isTemplateSpecialization() const override;
173 bool isObjCMethod() const override;
174 bool isObjCProperty() const override;
175 bool isCSharpProperty() const override;
176 bool isConstructor() const override;
177 bool isDestructor() const override;
178 bool hasOneLineInitializer() const override;
179 bool hasMultiLineInitializer() const override;
180 bool isCallable() const override;
181 bool isStrongEnumValue() const override;
182 bool livesInsideEnum() const override;
183 bool isSliceLocal() const override;
184 bool isNoDiscard() const override;
185 bool isConstExpr() const override;
186 bool isConstEval() const override;
187 bool isConstInit() const override;
188 int numberOfFlowKeyWords() const override;
189 bool isFriendToHide() const override;
190 bool isNotFriend() const override;
191 bool isFunctionOrSignalSlot() const override;
192 bool isRelatedOrFriend() const override;
193 bool isLinkableInProject() const override;
194 bool isLinkable() const override;
195 bool hasDocumentation() const override;
196 bool hasUserDocumentation() const override;
197 bool isDeleted() const override;
198 bool isBriefSectionVisible() const override;
199 bool isDetailedSectionVisible(MemberListContainer container) const override;
200 bool hasDetailedDescription() const override;
201 bool isFriendClass() const override;
202 bool isDocumentedFriendClass() const override;
203 const MemberDef *reimplements() const override;
204 const MemberVector &reimplementedBy() const override;
205 bool isReimplementedBy(const ClassDef *cd) const override;
206 ClassDef *relatedAlso() const override;
207 bool hasDocumentedEnumValues() const override;
208 const MemberDef *getAnonymousEnumType() const override;
209 bool isDocsForDefinition() const override;
210 const MemberDef *getEnumScope() const override;
211 const MemberVector &enumFieldList() const override;
212 void setEnumBaseType(const QCString &type) override;
213 QCString enumBaseType() const override;
214 bool hasExamples() const override;
215 const ExampleList &getExamples() const override;
216 bool isPrototype() const override;
217 const ArgumentList &argumentList() const override;
218 const ArgumentList &declArgumentList() const override;
219 const ArgumentList &templateArguments() const override;
220 const ArgumentLists &definitionTemplateParameterLists() const override;
221 std::optional<ArgumentList> formalTemplateArguments() const override;
222 int getMemberGroupId() const override;
223 MemberGroup *getMemberGroup() const override;
224 bool fromAnonymousScope() const override;
225 MemberDef *fromAnonymousMember() const override;
226 bool hasCallGraph() const override;
227 bool hasCallerGraph() const override;
228 bool hasReferencesRelation() const override;
229 bool hasReferencedByRelation() const override;
230 bool hasEnumValues() const override;
231 bool hasInlineSource() const override;
232 QCString sourceRefName() const override;
233 const MemberDef *templateMaster() const override;
234 QCString getScopeString() const override;
235 ClassDef *getClassDefOfAnonymousType() const override;
236 bool isTypedefValCached() const override;
237 const ClassDef *getCachedTypedefVal() const override;
238 QCString getCachedTypedefTemplSpec() const override;
239 QCString getCachedResolvedTypedef() const override;
240 MemberDef *memberDefinition() const override;
241 MemberDef *memberDeclaration() const override;
242 const MemberDef *inheritsDocsFrom() const override;
243 const MemberDef *getGroupAlias() const override;
244 ClassDef *category() const override;
245 const MemberDef *categoryRelation() const override;
246 QCString displayName(bool=TRUE) const override;
247 QCString getDeclType() const override;
248 StringVector getLabels(const Definition *container) const override;
249 const ArgumentList &typeConstraints() const override;
250 QCString requiresClause() const override;
251 QCString documentation() const override;
252 QCString briefDescription(bool abbr=FALSE) const override;
253 QCString fieldType() const override;
254 bool isReference() const override;
255 QCString getDeclFileName() const override;
256 int getDeclLine() const override;
257 int getDeclColumn() const override;
258 void setMemberType(MemberType t) override;
259 void setDefinition(const QCString &d) override;
260 void setFileDef(FileDef *fd) override;
261 void setAnchor() override;
262 void setProtection(Protection p) override;
263 void setMemberSpecifiers(TypeSpecifier s) override;
264 void setVhdlSpecifiers(VhdlSpecifier s) override;
265 void mergeMemberSpecifiers(TypeSpecifier s) override;
266 void setInitializer(const QCString &i) override;
267 void setBitfields(const QCString &s) override;
268 void setMaxInitLines(int lines) override;
269 void setMemberClass(ClassDef *cd) override;
270 void setSectionList(const Definition *container,const MemberList *sl) override;
271 void setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,
272 const QCString &fileName,int startLine,bool hasDocs,
273 MemberDef *member=nullptr) override;
274 void setReadAccessor(const QCString &r) override;
275 void setWriteAccessor(const QCString &w) override;
276 void setTemplateSpecialization(bool b) override;
277 void makeRelated() override;
278 void makeForeign() override;
279 void setInheritsDocsFrom(const MemberDef *md) override;
280 void setTagInfo(const TagInfo *i) override;
281 void setArgsString(const QCString &as) override;
282 void setReimplements(MemberDef *md) override;
283 void insertReimplementedBy(MemberDef *md) override;
284 void setRelatedAlso(ClassDef *cd) override;
285 void insertEnumField(MemberDef *md) override;
286 void setEnumScope(MemberDef *md,bool livesInsideEnum=FALSE) override;
287 void setEnumClassScope(ClassDef *cd) override;
288 void setDocumentedEnumValues(bool value) override;
289 void setAnonymousEnumType(const MemberDef *md) override;
290 bool addExample(const QCString &anchor,const QCString &name,const QCString &file) override;
291 void setPrototype(bool p,const QCString &df,int line, int column) override;
292 void setExplicitExternal(bool b,const QCString &df,int line,int column) override;
293 void setDeclFile(const QCString &df,int line,int column) override;
294 void moveArgumentList(std::unique_ptr<ArgumentList> al) override;
295 void moveDeclArgumentList(std::unique_ptr<ArgumentList> al) override;
296 void setDefinitionTemplateParameterLists(const ArgumentLists &lists) override;
297 void setTypeConstraints(const ArgumentList &al) override;
298 void setType(const QCString &t) override;
299 void setAccessorType(ClassDef *cd,const QCString &t) override;
300 void setNamespace(NamespaceDef *nd) override;
301 void setMemberGroup(MemberGroup *grp) override;
302 void setMemberGroupId(int id) override;
303 void makeImplementationDetail() override;
304 void setFromAnonymousScope(bool b) override;
305 void setFromAnonymousMember(MemberDef *m) override;
306 void overrideCallGraph(bool e) override;
307 void overrideCallerGraph(bool e) override;
308 void overrideReferencedByRelation(bool e) override;
309 void overrideReferencesRelation(bool e) override;
310 void overrideEnumValues(bool e) override;
311 void overrideInlineSource(bool e) override;
312 void setTemplateMaster(MemberDef *mt) override;
313 void setFormalTemplateArguments(const ArgumentList &al) override;
314 void addListReference(Definition *d) override;
315 void setDocsForDefinition(bool b) override;
316 void setGroupAlias(const MemberDef *md) override;
317 void cacheTypedefVal(const ClassDef *val,const QCString &templSpec,const QCString &resolvedType) override;
318 void invalidateTypedefValCache() override;
319 void invalidateCachedArgumentTypes() override;
320 void setMemberDefinition(MemberDef *md) override;
321 void setMemberDeclaration(MemberDef *md) override;
322 void copyArgumentNames(const MemberDef *bmd) override;
323 void setCategory(ClassDef *) override;
324 void setCategoryRelation(const MemberDef *) override;
325 void setDocumentation(const QCString &d,const QCString &docFile,int docLine,bool stripWhiteSpace=TRUE) override;
326 void setBriefDescription(const QCString &b,const QCString &briefFile,int briefLine) override;
327 void setInbodyDocumentation(const QCString &d,const QCString &inbodyFile,int inbodyLine) override;
328 void setHidden(bool b) override;
329 void setRequiresClause(const QCString &req) override;
330 void incrementFlowKeyWordCount() override;
331 void writeDeclaration(OutputList &ol,
332 const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,const ModuleDef *mod,
333 bool inGroup, int indentLevel,const ClassDef *inheritFrom=nullptr,const QCString &inheritId=QCString()) const override;
334 void writeDocumentation(const MemberList *ml,int memCount,int memTotal,OutputList &ol,
335 const QCString &scopeName,const Definition *container,
336 bool inGroup,bool showEnumValues=FALSE,bool
337 showInline=FALSE) const override;
338 void writeMemberDocSimple(OutputList &ol,const Definition *container) const override;
339 void writeEnumDeclaration(OutputList &typeDecl,
340 const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,const ModuleDef *mod) const override;
341 void writeTagFile(TextStream &,bool useQualifiedName,bool showNamespaceMembers) const override;
342 void warnIfUndocumented() const override;
343 void warnIfUndocumentedParams() const override;
344 bool visibleInIndex() const override;
345 void detectUndocumentedParams(bool hasParamCommand,bool hasReturnCommand) const override;
346 std::unique_ptr<MemberDef> createTemplateInstanceMember(const ArgumentList &formalArgs,
347 const std::unique_ptr<ArgumentList> &actualArgs) const override;
348 void findSectionsInDocumentation() override;
349 void writeLink(OutputList &ol,
350 const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,const ModuleDef *mod,
351 bool onlyText=FALSE) const override;
352 void resolveUnnamedParameters(const MemberDef *md) override;
353 void addQualifiers(const StringVector &qualifiers) override;
354 StringVector getQualifiers() const override;
355 ClassDefMutable *getClassDefMutable() override;
356 void setModuleDef(ModuleDef *mod) override;
357
358 private:
362 void _writeGroupInclude(OutputList &ol,bool inGroup) const;
363 void _writeMultiLineInitializer(OutputList &ol,const QCString &scopeName) const;
364 void _writeCallGraph(OutputList &ol) const;
365 void _writeCallerGraph(OutputList &ol) const;
366 void _writeReimplements(OutputList &ol) const;
367 bool _isReimplements() const;
368 void _writeReimplementedBy(OutputList &ol) const;
369 size_t _countReimplementedBy() const;
370 void _writeExamples(OutputList &ol) const;
371 void _writeTypeConstraints(OutputList &ol) const;
372 void _writeEnumValues(OutputList &ol,const Definition *container,
373 const QCString &cfname,const QCString &ciname,
374 const QCString &cname) const;
375 void _writeCategoryRelation(OutputList &ol) const;
376 void _writeTagData(const DefType) const;
377 void _writeTemplatePrefix(OutputList &ol, const Definition *def,
378 const ArgumentList &al, bool writeReqClause=true) const;
379 bool _hasVisibleCallGraph() const;
380 bool _hasVisibleCallerGraph() const;
381 bool _isAnonymousBitField() const;
382
383
384 void init(Definition *def,const QCString &t,const QCString &a,const QCString &e,
385 Protection p,Specifier v,bool s,Relationship r,
386 MemberType mt,const ArgumentList &tal,
387 const ArgumentList &al,const QCString &meta
388 );
389
390 uint8_t m_isLinkableCached; // 0 = not cached, 1=FALSE, 2=TRUE
391 uint8_t m_isConstructorCached; // 0 = not cached, 1=FALSE, 2=TRUE
392 uint8_t m_isDestructorCached; // 1 = not cached, 1=FALSE, 2=TRUE
393
394 ClassDef *m_classDef = nullptr; // member of or related to
395 FileDef *m_fileDef = nullptr; // member of file definition
396 NamespaceDef *m_nspace = nullptr; // the namespace this member is in.
397 ModuleDef *m_moduleDef = nullptr;
398
399 const MemberDef *m_enumScope = nullptr; // the enclosing scope, if this is an enum field
400 bool m_livesInsideEnum = false;
401 const MemberDef *m_annEnumType = nullptr; // the anonymous enum that is the type of this member
402 MemberVector m_enumFields; // enumeration fields
403
404 MemberDef *m_redefines = nullptr; // the members that this member redefines
405 MemberVector m_redefinedBy; // the list of members that redefine this one
406
407 MemberDef *m_memDef = nullptr; // member definition for this declaration
408 MemberDef *m_memDec = nullptr; // member declaration for this definition
409 ClassDef *m_relatedAlso = nullptr; // points to class marked by relatedAlso
410
411 ExampleList m_examples; // a dictionary of all examples for quick access
412
413 QCString m_type; // return actual type
414 QCString m_accessorType; // return type that tell how to get to this member
415 ClassDef *m_accessorClass = nullptr; // class that this member accesses (for anonymous types)
416 QCString m_args; // function arguments/variable array specifiers
417 QCString m_def; // member definition in code (fully qualified name)
418 QCString m_anc; // HTML anchor name
419 Specifier m_virt = Specifier::Normal; // normal/virtual/pure virtual
420 Protection m_prot = Protection::Public; // protection type [Public/Protected/Private]
421 QCString m_decl; // member declaration in class
422
423 QCString m_bitfields; // struct member bitfields
424 QCString m_read; // property read accessor
425 QCString m_write; // property write accessor
426 QCString m_exception; // exceptions that can be thrown
427 QCString m_initializer; // initializer
428 QCString m_extraTypeChars; // extra type info found after the argument list
429 QCString m_enumBaseType; // base type of the enum (C++11)
430 QCString m_requiresClause; // requires clause (C++20)
431 int m_initLines = 0; // number of lines in the initializer
432
433 TypeSpecifier m_memSpec; // The specifiers present for this member
435 MemberType m_mtype = MemberType::Define; // returns the kind of member
436 int m_maxInitLines = 0; // when the initializer will be displayed
437 int m_userInitLines = 0; // result of explicit \hideinitializer or \showinitializer
438 MemberDef *m_annMemb = nullptr;
439
440 ArgumentList m_defArgList; // argument list of this member definition
441 ArgumentList m_declArgList; // argument list of this member declaration
442
443 ArgumentList m_tArgList; // template argument list of function template
444 ArgumentList m_typeConstraints; // type constraints for template parameters
445 MemberDef *m_templateMaster = nullptr;
446 std::optional<ArgumentList> m_formalTemplateArguments;
447 ArgumentLists m_defTmpArgLists; // lists of template argument lists
448 // (for template functions in nested template classes)
449
450 QCString m_metaData; // Slice metadata.
451
452 mutable ClassDef *m_cachedAnonymousType = nullptr; // if the member has an anonymous compound
453 // as its type then this is computed by
454 // getClassDefOfAnonymousType() and
455 // cached here.
456 std::map<const Definition *,const MemberList *> m_sectionMap;
457
458 const MemberDef *m_groupAlias = nullptr; // Member containing the definition
459 int m_grpId = 0; // group id
460 MemberGroup *m_memberGroup = nullptr; // group's member definition
461 GroupDef *m_group = nullptr; // group in which this member is in
463 QCString m_groupFileName; // file where this grouping was defined
464 int m_groupStartLine = 0; // line " " " " "
465 MemberDef *m_groupMember = nullptr;
466
468 const ClassDef *m_cachedTypedefValue = nullptr;
471
472 // documentation inheritance
473 const MemberDef *m_docProvider = nullptr;
474
475 // to store the output file base from tag files
477
478 // to store extra qualifiers
480
481 // objective-c
482 bool m_implOnly = false; // function found in implementation but not
483 // in the interface
484 mutable bool m_hasDocumentedParams = false; // guard to show only the first warning, acts as cache
485 mutable bool m_hasDocumentedReturnType = false; // guard to show only the first warning, acts as cache
486 bool m_isDMember = false;
487 Relationship m_related = Relationship::Member; // relationship of this to the class
488 bool m_stat = false; // is it a static function?
489 bool m_proto = false; // is it a prototype?
490 bool m_docEnumValues = false; // is an enum with documented enum values.
491
492 bool m_annScope = false; // member is part of an anonymous scope
493 mutable bool m_hasDetailedDescriptionCached = false;
495 // const member.
496 bool m_hasCallGraph = false;
497 bool m_hasCallerGraph = false;
500 bool m_hasInlineSource = false;
501 bool m_hasEnumValues = false;
502 bool m_explExt = false; // member was explicitly declared external
503 bool m_tspec = false; // member is a template specialization
504 bool m_groupHasDocs = false; // true if the entry that caused the grouping was documented
505 bool m_docsForDefinition = false; // TRUE => documentation block is put before
506 // definition.
507 // FALSE => block is put before declaration.
508 ClassDef *m_category = nullptr;
509 const MemberDef *m_categoryRelation = nullptr;
511 int m_declLine = -1;
512 int m_declColumn = -1;
514};
515
516std::unique_ptr<MemberDef> createMemberDef(const QCString &defFileName,int defLine,int defColumn,
517 const QCString &type,const QCString &name,const QCString &args,
518 const QCString &excp,Protection prot,Specifier virt,bool stat,
519 Relationship related,MemberType t,const ArgumentList &tal,
520 const ArgumentList &al,const QCString &metaData)
521{
522 return std::make_unique<MemberDefImpl>(defFileName,defLine,defColumn,type,name,args,excp,prot,virt,
523 stat,related,t,tal,al,metaData);
524}
525
526//-----------------------------------------------------------------------------
527
529{
530 public:
531 MemberDefAliasImpl(const Definition *newScope,const MemberDef *md)
532 : DefinitionAliasMixin(newScope,md), m_memberGroup(nullptr) { init(); }
533 ~MemberDefAliasImpl() override { deinit(); }
535
536 DefType definitionType() const override { return TypeMember; }
537
538 const MemberDef *getMdAlias() const { return toMemberDef(getAlias()); }
539 MemberDef *getMdAlias() { return toMemberDef(const_cast<Definition*>(getAlias())); }
540 MemberDef *resolveAlias() override { return const_cast<MemberDef*>(getMdAlias()); }
541 const MemberDef *resolveAlias() const override { return getMdAlias(); }
542
543 std::unique_ptr<MemberDef> deepCopy() const override {
545 }
546 void moveTo(Definition *) override {}
547
548 const QCString &name() const override
549 { return getMdAlias()->name(); }
551 { return getMdAlias()->codeSymbolType(); }
552 QCString getOutputFileBase() const override
553 { return getMdAlias()->getOutputFileBase(); }
554 QCString getReference() const override
555 { return getMdAlias()->getReference(); }
556 QCString anchor() const override
557 { return getMdAlias()->anchor(); }
558 QCString declaration() const override
559 { return getMdAlias()->declaration(); }
560 QCString definition() const override
561 { return getMdAlias()->definition(); }
562 QCString typeString() const override
563 { return getMdAlias()->typeString(); }
564 QCString argsString() const override
565 { return getMdAlias()->argsString(); }
566 QCString excpString() const override
567 { return getMdAlias()->excpString(); }
568 QCString bitfieldString() const override
569 { return getMdAlias()->bitfieldString(); }
570 QCString extraTypeChars() const override
571 { return getMdAlias()->extraTypeChars(); }
572 const QCString &initializer() const override
573 { return getMdAlias()->initializer(); }
574 int initializerLines() const override
575 { return getMdAlias()->initializerLines(); }
576 TypeSpecifier getMemberSpecifiers() const override
577 { return getMdAlias()->getMemberSpecifiers(); }
579 { return getMdAlias()->getVhdlSpecifiers(); }
580 const MemberList *getSectionList(const Definition *container) const override
581 { return getMdAlias()->getSectionList(container); }
582 QCString displayDefinition() const override
583 { return getMdAlias()->displayDefinition(); }
584
585 const ClassDef *getClassDef() const override
586 { return getMdAlias()->getClassDef(); }
587 ClassDef *getClassDef() override
588 { return getMdAlias()->getClassDef(); }
589
590 const FileDef *getFileDef() const override
591 { return getMdAlias()->getFileDef(); }
592 FileDef *getFileDef() override
593 { return getMdAlias()->getFileDef(); }
594
595 const ModuleDef *getModuleDef() const override
596 { return getMdAlias()->getModuleDef(); }
597
598 const NamespaceDef* getNamespaceDef() const override
599 { return getMdAlias()->getNamespaceDef(); }
600 NamespaceDef* getNamespaceDef() override
601 { return getMdAlias()->getNamespaceDef(); }
602
603 const ClassDef *accessorClass() const override
604 { return getMdAlias()->accessorClass(); }
605 QCString getReadAccessor() const override
606 { return getMdAlias()->getReadAccessor(); }
607 QCString getWriteAccessor() const override
608 { return getMdAlias()->getWriteAccessor(); }
609 const GroupDef *getGroupDef() const override
610 { return getMdAlias()->getGroupDef(); }
611 GroupDef *getGroupDef() override
612 { return getMdAlias()->getGroupDef(); }
614 { return getMdAlias()->getGroupPri(); }
615 QCString getGroupFileName() const override
616 { return getMdAlias()->getGroupFileName(); }
617 int getGroupStartLine() const override
618 { return getMdAlias()->getGroupStartLine(); }
619 bool getGroupHasDocs() const override
620 { return getMdAlias()->getGroupHasDocs(); }
621 QCString qualifiedName() const override
622 { return getMdAlias()->qualifiedName(); }
623 QCString objCMethodName(bool localLink,bool showStatic) const override
624 { return getMdAlias()->objCMethodName(localLink,showStatic); }
625 Protection protection() const override
626 { return getMdAlias()->protection(); }
627 Specifier virtualness(int /* count */) const override
628 { return getMdAlias()->virtualness(); }
629 MemberType memberType() const override
630 { return getMdAlias()->memberType(); }
631 QCString memberTypeName() const override
632 { return getMdAlias()->memberTypeName(); }
633 bool isSignal() const override
634 { return getMdAlias()->isSignal(); }
635 bool isSlot() const override
636 { return getMdAlias()->isSlot(); }
637 bool isVariable() const override
638 { return getMdAlias()->isVariable(); }
639 bool isEnumerate() const override
640 { return getMdAlias()->isEnumerate(); }
641 bool isEnumValue() const override
642 { return getMdAlias()->isEnumValue(); }
643 bool isTypedef() const override
644 { return getMdAlias()->isTypedef(); }
645 bool isSequence() const override
646 { return getMdAlias()->isSequence(); }
647 bool isDictionary() const override
648 { return getMdAlias()->isDictionary(); }
649 bool isFunction() const override
650 { return getMdAlias()->isFunction(); }
651 bool isFunctionPtr() const override
652 { return getMdAlias()->isFunctionPtr(); }
653 bool isDefine() const override
654 { return getMdAlias()->isDefine(); }
655 bool isFriend() const override
656 { return getMdAlias()->isFriend(); }
657 bool isDCOP() const override
658 { return getMdAlias()->isDCOP(); }
659 bool isProperty() const override
660 { return getMdAlias()->isProperty(); }
661 bool isEvent() const override
662 { return getMdAlias()->isEvent(); }
663 bool isRelated() const override
664 { return getMdAlias()->isRelated(); }
665 bool isForeign() const override
666 { return getMdAlias()->isForeign(); }
667 bool isStatic() const override
668 { return getMdAlias()->isStatic(); }
669 bool isInline() const override
670 { return getMdAlias()->isInline(); }
671 bool isExplicit() const override
672 { return getMdAlias()->isExplicit(); }
673 bool isMutable() const override
674 { return getMdAlias()->isMutable(); }
675 bool isGettable() const override
676 { return getMdAlias()->isGettable(); }
677 bool isPrivateGettable() const override
678 { return getMdAlias()->isPrivateGettable(); }
679 bool isProtectedGettable() const override
680 { return getMdAlias()->isProtectedGettable(); }
681 bool isSettable() const override
682 { return getMdAlias()->isSettable(); }
683 bool isPrivateSettable() const override
684 { return getMdAlias()->isPrivateSettable(); }
685 bool isProtectedSettable() const override
686 { return getMdAlias()->isProtectedSettable(); }
687 bool isReadable() const override
688 { return getMdAlias()->isReadable(); }
689 bool isWritable() const override
690 { return getMdAlias()->isWritable(); }
691 bool isAddable() const override
692 { return getMdAlias()->isAddable(); }
693 bool isRemovable() const override
694 { return getMdAlias()->isRemovable(); }
695 bool isRaisable() const override
696 { return getMdAlias()->isRaisable(); }
697 bool isFinal() const override
698 { return getMdAlias()->isFinal(); }
699 bool isAbstract() const override
700 { return getMdAlias()->isAbstract(); }
701 bool isOverride() const override
702 { return getMdAlias()->isOverride(); }
703 bool isInitonly() const override
704 { return getMdAlias()->isInitonly(); }
705 bool isOptional() const override
706 { return getMdAlias()->isOptional(); }
707 bool isRequired() const override
708 { return getMdAlias()->isRequired(); }
709 bool isNonAtomic() const override
710 { return getMdAlias()->isNonAtomic(); }
711 bool isCopy() const override
712 { return getMdAlias()->isCopy(); }
713 bool isAssign() const override
714 { return getMdAlias()->isAssign(); }
715 bool isRetain() const override
716 { return getMdAlias()->isRetain(); }
717 bool isWeak() const override
718 { return getMdAlias()->isWeak(); }
719 bool isStrong() const override
720 { return getMdAlias()->isStrong(); }
721 bool isEnumStruct() const override
722 { return getMdAlias()->isEnumStruct(); }
723 bool isUnretained() const override
724 { return getMdAlias()->isUnretained(); }
725 bool isNew() const override
726 { return getMdAlias()->isNew(); }
727 bool isSealed() const override
728 { return getMdAlias()->isSealed(); }
729 bool isImplementation() const override
730 { return getMdAlias()->isImplementation(); }
731 bool isExternal() const override
732 { return getMdAlias()->isExternal(); }
733 bool isTypeAlias() const override
734 { return getMdAlias()->isTypeAlias(); }
735 bool isDefault() const override
736 { return getMdAlias()->isDefault(); }
737 bool isDelete() const override
738 { return getMdAlias()->isDelete(); }
739 bool isNoExcept() const override
740 { return getMdAlias()->isNoExcept(); }
741 bool isAttribute() const override
742 { return getMdAlias()->isAttribute(); }
743 bool isUNOProperty() const override
744 { return getMdAlias()->isUNOProperty(); }
745 bool isReadonly() const override
746 { return getMdAlias()->isReadable(); }
747 bool isBound() const override
748 { return getMdAlias()->isBound(); }
749 bool isConstrained() const override
750 { return getMdAlias()->isConstrained(); }
751 bool isTransient() const override
752 { return getMdAlias()->isTransient(); }
753 bool isMaybeVoid() const override
754 { return getMdAlias()->isMaybeVoid(); }
755 bool isMaybeDefault() const override
756 { return getMdAlias()->isMaybeDefault(); }
757 bool isMaybeAmbiguous() const override
758 { return getMdAlias()->isMaybeAmbiguous(); }
759 bool isPublished() const override
760 { return getMdAlias()->isPublished(); }
761 bool isTemplateSpecialization() const override
762 { return getMdAlias()->isTemplateSpecialization(); }
763 bool isObjCMethod() const override
764 { return getMdAlias()->isObjCMethod(); }
765 bool isObjCProperty() const override
766 { return getMdAlias()->isObjCProperty(); }
767 bool isCSharpProperty() const override
768 { return getMdAlias()->isCSharpProperty(); }
769 bool isConstructor() const override
770 { return getMdAlias()->isConstructor(); }
771 bool isDestructor() const override
772 { return getMdAlias()->isDestructor(); }
773 bool hasOneLineInitializer() const override
774 { return getMdAlias()->hasOneLineInitializer(); }
775 bool hasMultiLineInitializer() const override
776 { return getMdAlias()->hasMultiLineInitializer(); }
777 bool isCallable() const override
778 { return getMdAlias()->isCallable(); }
779 bool isStrongEnumValue() const override
780 { return getMdAlias()->isStrongEnumValue(); }
781 bool livesInsideEnum() const override
782 { return getMdAlias()->livesInsideEnum(); }
783 bool isSliceLocal() const override
784 { return getMdAlias()->isSliceLocal(); }
785 bool isNoDiscard() const override
786 { return getMdAlias()->isNoDiscard(); }
787 bool isConstExpr() const override
788 { return getMdAlias()->isConstExpr(); }
789 bool isConstEval() const override
790 { return getMdAlias()->isConstEval(); }
791 bool isConstInit() const override
792 { return getMdAlias()->isConstInit(); }
793 int numberOfFlowKeyWords() const override
794 { return getMdAlias()->numberOfFlowKeyWords(); }
795 bool isFriendToHide() const override
796 { return getMdAlias()->isFriendToHide(); }
797 bool isNotFriend() const override
798 { return getMdAlias()->isNotFriend(); }
799 bool isFunctionOrSignalSlot() const override
800 { return getMdAlias()->isFunctionOrSignalSlot(); }
801 bool isRelatedOrFriend() const override
802 { return getMdAlias()->isRelatedOrFriend(); }
803 bool isLinkableInProject() const override
804 { return getMdAlias()->isLinkableInProject(); }
805 bool isLinkable() const override
806 { return getMdAlias()->isLinkable(); }
807 bool hasDocumentation() const override
808 { return getMdAlias()->hasDocumentation(); }
809 bool hasUserDocumentation() const override
810 { return getMdAlias()->hasUserDocumentation(); }
811 bool isDeleted() const override
812 { return getMdAlias()->isDeleted(); }
813 bool isBriefSectionVisible() const override
814 { return getMdAlias()->isBriefSectionVisible(); }
815 bool isDetailedSectionVisible(MemberListContainer container) const override
816 { return getMdAlias()->isDetailedSectionVisible(container); }
817 bool hasDetailedDescription() const override
818 { return getMdAlias()->hasDetailedDescription(); }
819 bool isFriendClass() const override
820 { return getMdAlias()->isFriendClass(); }
821 bool isDocumentedFriendClass() const override
822 { return getMdAlias()->isDocumentedFriendClass(); }
823 const MemberDef *reimplements() const override
824 { return getMdAlias()->reimplements(); }
825 const MemberVector &reimplementedBy() const override
826 { return getMdAlias()->reimplementedBy(); }
827 bool isReimplementedBy(const ClassDef *cd) const override
828 { return getMdAlias()->isReimplementedBy(cd); }
829 ClassDef *relatedAlso() const override
830 { return getMdAlias()->relatedAlso(); }
831 bool hasDocumentedEnumValues() const override
832 { return getMdAlias()->hasDocumentedEnumValues(); }
833 const MemberDef *getAnonymousEnumType() const override
834 { return getMdAlias()->getAnonymousEnumType(); }
835 bool isDocsForDefinition() const override
836 { return getMdAlias()->isDocsForDefinition(); }
837 const MemberDef *getEnumScope() const override
838 { return getMdAlias()->getEnumScope(); }
839 const MemberVector &enumFieldList() const override
840 { return getMdAlias()->enumFieldList(); }
841 QCString enumBaseType() const override
842 { return getMdAlias()->enumBaseType(); }
843 bool hasExamples() const override
844 { return getMdAlias()->hasExamples(); }
845 const ExampleList &getExamples() const override
846 { return getMdAlias()->getExamples(); }
847 bool isPrototype() const override
848 { return getMdAlias()->isPrototype(); }
849 const ArgumentList &argumentList() const override
850 { return getMdAlias()->argumentList(); }
851 const ArgumentList &declArgumentList() const override
852 { return getMdAlias()->declArgumentList(); }
853 const ArgumentList &templateArguments() const override
854 { return getMdAlias()->templateArguments(); }
857 std::optional<ArgumentList> formalTemplateArguments() const override
858 { return getMdAlias()->formalTemplateArguments(); }
859 int getMemberGroupId() const override
860 { return getMdAlias()->getMemberGroupId(); }
861 MemberGroup *getMemberGroup() const override
862 { return m_memberGroup; }
863 bool fromAnonymousScope() const override
864 { return getMdAlias()->fromAnonymousScope(); }
865 MemberDef *fromAnonymousMember() const override
866 { return getMdAlias()->fromAnonymousMember(); }
867 bool hasCallGraph() const override
868 { return getMdAlias()->hasCallGraph(); }
869 bool hasCallerGraph() const override
870 { return getMdAlias()->hasCallerGraph(); }
871 bool hasReferencesRelation() const override
872 { return getMdAlias()->hasReferencesRelation(); }
873 bool hasReferencedByRelation() const override
874 { return getMdAlias()->hasReferencedByRelation(); }
875 bool hasInlineSource() const override
876 { return getMdAlias()->hasInlineSource(); }
877 QCString sourceRefName() const override
878 { return getMdAlias()->sourceRefName(); }
879 bool hasEnumValues() const override
880 { return getMdAlias()->hasEnumValues(); }
882 { return getMdAlias()->getQualifiers(); }
883 const MemberDef *templateMaster() const override
884 { return getMdAlias()->templateMaster(); }
885 QCString getScopeString() const override
886 { return getMdAlias()->getScopeString(); }
887 ClassDef *getClassDefOfAnonymousType() const override
889 bool isTypedefValCached() const override
890 { return getMdAlias()->isTypedefValCached(); }
891 const ClassDef *getCachedTypedefVal() const override
892 { return getMdAlias()->getCachedTypedefVal(); }
893 QCString getCachedTypedefTemplSpec() const override
895 QCString getCachedResolvedTypedef() const override
896 { return getMdAlias()->getCachedResolvedTypedef(); }
897 MemberDef *memberDefinition() const override
898 { return getMdAlias()->memberDefinition(); }
899 MemberDef *memberDeclaration() const override
900 { return getMdAlias()->memberDeclaration(); }
901 const MemberDef *inheritsDocsFrom() const override
902 { return getMdAlias()->inheritsDocsFrom(); }
903 const MemberDef *getGroupAlias() const override
904 { return getMdAlias()->getGroupAlias(); }
905 ClassDef *category() const override
906 { return getMdAlias()->category(); }
907 const MemberDef *categoryRelation() const override
908 { return getMdAlias()->categoryRelation(); }
909 QCString displayName(bool b=TRUE) const override
910 { return getMdAlias()->displayName(b); }
911 QCString getDeclType() const override
912 { return getMdAlias()->getDeclType(); }
913 StringVector getLabels(const Definition *container) const override
914 { return getMdAlias()->getLabels(container); }
915 const ArgumentList &typeConstraints() const override
916 { return getMdAlias()->typeConstraints(); }
917 QCString documentation() const override
918 { return getMdAlias()->documentation(); }
919 QCString briefDescription(bool /* abbr=FALSE */) const override
920 { return getMdAlias()->briefDescription(); }
921 QCString fieldType() const override
922 { return getMdAlias()->fieldType(); }
923 bool isReference() const override
924 { return getMdAlias()->isReference(); }
925 QCString getDeclFileName() const override
926 { return getMdAlias()->getDeclFileName(); }
927 int getDeclLine() const override
928 { return getMdAlias()->getDeclLine(); }
929 int getDeclColumn() const override
930 { return getMdAlias()->getDeclColumn(); }
931 QCString requiresClause() const override
932 { return getMdAlias()->requiresClause(); }
933 bool visibleInIndex() const override
934 { return getMdAlias()->visibleInIndex(); }
935
936 void warnIfUndocumented() const override {}
937 void warnIfUndocumentedParams() const override {}
938 void detectUndocumentedParams(bool /* hasParamCommand */,bool /* hasReturnCommand */) const override {}
939 void setMemberGroup(MemberGroup *grp) override { m_memberGroup = grp; }
940 std::unique_ptr<MemberDef> createTemplateInstanceMember(const ArgumentList &formalArgs,
941 const std::unique_ptr<ArgumentList> &actualArgs) const override
942 { return getMdAlias()->createTemplateInstanceMember(formalArgs,actualArgs); }
943
944 void writeDeclaration(OutputList &ol,
945 const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,const ModuleDef *mod,
946 bool inGroup, int indentLevel, const ClassDef *inheritFrom=nullptr,const QCString &inheritId=QCString()) const override
947 {
948 getMdAlias()->writeDeclaration(ol,cd,nd,fd,gd,mod,inGroup,indentLevel,inheritFrom,inheritId);
949 }
950 void writeEnumDeclaration(OutputList &typeDecl,
951 const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,const ModuleDef *mod) const override
952 {
953 getMdAlias()->writeEnumDeclaration(typeDecl,cd,nd,fd,gd,mod);
954 }
955 void writeLink(OutputList &ol,
956 const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,const ModuleDef *mod,
957 bool onlyText=FALSE) const override
958 {
959 getMdAlias()->writeLink(ol,cd,nd,fd,gd,mod,onlyText);
960 }
961 private:
962 MemberGroup *m_memberGroup; // group's member definition
963};
964
965
966std::unique_ptr<MemberDef> createMemberDefAlias(const Definition *newScope,const MemberDef *aliasMd)
967{
968 auto amd = std::make_unique<MemberDefAliasImpl>(newScope,aliasMd);
969 //printf("amd: name=%s displayName=%s\n",qPrint(amd->name()),qPrint(amd->displayName()));
970 return amd;
971}
972
973//-----------------------------------------------------------------------------
974
975static QCString addTemplateNames(const QCString &s,const QCString &n,const QCString &t)
976{
977 QCString result;
978 QCString clRealName=n;
979 int p=0,i=0;
980 if ((i=clRealName.find('<'))!=-1)
981 {
982 clRealName=clRealName.left(i); // strip template specialization
983 }
984 if ((i=clRealName.findRev("::"))!=-1)
985 {
986 clRealName=clRealName.right(clRealName.length()-i-2);
987 }
988 while ((i=s.find(clRealName,p))!=-1)
989 {
990 result+=s.mid(p,i-p);
991 size_t j=clRealName.length()+i;
992 if (s.length()==j || (s.at(j)!='<' && !isId(s.at(j))))
993 { // add template names
994 //printf("Adding %s+%s\n",qPrint(clRealName),qPrint(t));
995 result+=clRealName+t;
996 }
997 else
998 { // template names already present
999 //printf("Adding %s\n",qPrint(clRealName));
1000 result+=clRealName;
1001 }
1002 p=i+static_cast<int>(clRealName.length());
1003 }
1004 result+=s.right(s.length()-p);
1005 //printf("addTemplateNames(%s,%s,%s)=%s\n",qPrint(s),qPrint(n),qPrint(t),qPrint(result));
1006 return result;
1007}
1008
1009// ol.startMemberDocName has already been done before this is called.
1010// when this function returns TRUE, ol.endParameterList will be called.
1011//
1012// typical sequence:
1013// ol.startMemberDoc
1014// ol.startMemberDocName
1015// --- enter writeDefArgumentList
1016// ol.endMemberDocName
1017// ol.startParameterList
1018// ...
1019// ol.startParameterType(first=TRUE)
1020// ol.endParameterType
1021// ol.startParameterName
1022// ol.endParameterName
1023// ol.startParameterExtra
1024// ol.startParameterDefVal [optional]
1025// ol.endParameterDefVal [optional]
1026// ol.endParameterExtra(last==FALSE)
1027// ...
1028// ol.startParameterType(first=FALSE)
1029// ol.endParameterType
1030// ol.startParameterName
1031// ol.endParameterName
1032// ol.startParameterExtra
1033// ol.endParameterExtra(last==TRUE)
1034// ...
1035// --- leave writeDefArgumentList with return value TRUE
1036// ol.endParameterList
1037// ol.endMemberDoc(hasArgs=TRUE)
1038//
1039// For an empty list the function should return FALSE, the sequence is
1040// ol.startMemberDoc
1041// ol.startMemberDocName
1042// --- enter writeDefArgumentList
1043// --- leave writeDefArgumentList with return value FALSE
1044// ol.endMemberDocName
1045// ol.endMemberDoc(hasArgs=FALSE);
1046//
1047
1048static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const MemberDef *md)
1049{
1050 const ArgumentList &defArgList=(md->isDocsForDefinition()) ?
1051 md->argumentList() : md->declArgumentList();
1052 //printf("writeDefArgumentList '%s' isDocsForDefinition()=%d hasParameters()=%d (%s)\n",
1053 // qPrint(md->name()),md->isDocsForDefinition(),defArgList.hasParameters(),qPrint(argListToString(defArgList)));
1054 if (!defArgList.hasParameters() || md->isProperty() || md->isTypedef())
1055 {
1056 return FALSE; // member has no function like argument list
1057 }
1058
1059 if (!md->isDefine()) ol.docify(" ");
1060
1061 //printf("writeDefArgList(%d)\n",defArgList->count());
1062 ol.endMemberDocName();
1064 //printf("===> name=%s isDefine=%d\n",qPrint(md->name()),md->isDefine());
1065
1066 QCString cName;
1067 if (scope)
1068 {
1069 cName=scope->name();
1070 int il=cName.find('<');
1071 int ir=cName.findRev('>');
1072 if (il!=-1 && ir!=-1 && ir>il)
1073 {
1074 cName=cName.mid(il,ir-il+1);
1075 //printf("1. cName=%s\n",qPrint(cName));
1076 }
1077 else if (scope->definitionType()==Definition::TypeClass)
1078 {
1079 cName=tempArgListToString((toClassDef(scope))->templateArguments(),
1080 scope->getLanguage());
1081 //printf("2. cName=%s\n",qPrint(cName));
1082 }
1083 else // no template specifier
1084 {
1085 cName.clear();
1086 }
1087 }
1088 //printf("~~~ %s cName=%s\n",qPrint(md->name()),qPrint(cName));
1089
1091
1092 bool first=TRUE;
1093 bool paramTypeStarted=FALSE;
1094 bool isDefine = md->isDefine();
1095 auto alIt = defArgList.begin();
1096 while (alIt!=defArgList.end())
1097 {
1098 Argument a = *alIt;
1099 if (isDefine || first)
1100 {
1101 ol.startParameterType(first,QCString());
1102 paramTypeStarted=true;
1103 if (isDefine)
1104 {
1105 ol.endParameterType();
1107 }
1108 }
1109
1110 if (!a.attrib.isEmpty() && !md->isObjCMethod()) // argument has an IDL attribute
1111 {
1112 ol.docify(a.attrib+" ");
1113 }
1114
1115 QCString atype = a.type;
1116 if (sep!="::") { atype=substitute(atype,"::",sep); }
1117
1118 int funcPtrPos=-1;
1119 {
1120 if (md->isObjCMethod()) { atype.prepend("("); atype.append(")"); }
1121 if (atype!="...")
1122 {
1123 if (!cName.isEmpty() && scope && scope!=Doxygen::globalScope)
1124 {
1125 atype=addTemplateNames(atype,scope->name(),cName);
1126 }
1127 funcPtrPos = atype.find("*)(");
1128 if (funcPtrPos!=-1) funcPtrPos++;
1129 linkifyText(TextGeneratorOLImpl(ol),scope,md->getBodyDef(),md,
1130 funcPtrPos==-1 ? atype : atype.left(funcPtrPos));
1131 }
1132 }
1133
1134 if (!isDefine)
1135 {
1136 if (paramTypeStarted)
1137 {
1138 ol.endParameterType();
1139 paramTypeStarted=FALSE;
1140 }
1141 ol.startParameterName(defArgList.size()<2);
1142 }
1143 else
1144 {
1145 ol.endParameterName();
1146 }
1147
1148 if (atype=="...")
1149 {
1150 ol.docify(atype);
1151 }
1152 else if (!a.name.isEmpty()) // argument has a name
1153 {
1154 ol.docify(a.name);
1155 }
1156 if (!isDefine)
1157 {
1158 if (funcPtrPos!=-1)
1159 {
1161 }
1162 ol.endParameterName();
1163 }
1165 if (funcPtrPos!=-1)
1166 {
1167 linkifyText(TextGeneratorOLImpl(ol),scope,md->getBodyDef(),md,
1168 atype.mid(funcPtrPos));
1169 }
1170 if (!a.array.isEmpty())
1171 {
1172 ol.docify(a.array);
1173 }
1174 if (!a.defval.isEmpty()) // write the default value
1175 {
1176 QCString n=a.defval;
1177 if (scope && scope!=Doxygen::globalScope && !cName.isEmpty())
1178 {
1179 n=addTemplateNames(n,scope->name(),cName);
1180 }
1181 ol.startParameterDefVal(" = ");
1183 ol.endParameterDefVal();
1184 }
1185 ++alIt;
1186 if (alIt!=defArgList.end())
1187 {
1188 a = *alIt;
1189 if (!md->isObjCMethod()) ol.docify(", "); // there are more arguments
1190 if (!isDefine)
1191 {
1192 QCString key;
1193 if (md->isObjCMethod() && a.attrib.length()>=2)
1194 {
1195 //printf("Found parameter keyword %s\n",a.qPrint(attrib));
1196 // strip [ and ]
1197 key=a.attrib.mid(1,a.attrib.length()-2);
1198 if (key!=",") key+=":"; // for normal keywords add colon
1199 }
1200 ol.endParameterExtra(false,false,!md->isObjCMethod());
1201 if (paramTypeStarted)
1202 {
1203 ol.endParameterType();
1204 }
1205 ol.startParameterType(FALSE,key);
1206 paramTypeStarted=TRUE;
1207 }
1208 else // isDefine
1209 {
1210 ol.endParameterExtra(false,false,true);
1211 }
1212 }
1213 first=FALSE;
1214 }
1215 if (first)
1216 {
1217 ol.startParameterName(defArgList.size()<2);
1218 ol.endParameterName();
1220 }
1221 ol.endParameterExtra(TRUE,defArgList.size()<2,!md->isObjCMethod());
1222 if (!md->extraTypeChars().isEmpty())
1223 {
1224 ol.docify(md->extraTypeChars());
1225 }
1226 if (defArgList.constSpecifier())
1227 {
1228 ol.docify(" const");
1229 }
1230 if (defArgList.volatileSpecifier())
1231 {
1232 ol.docify(" volatile");
1233 }
1234 if (defArgList.refQualifier()==RefQualifierType::LValue)
1235 {
1236 ol.docify(" &");
1237 }
1238 else if (defArgList.refQualifier()==RefQualifierType::RValue)
1239 {
1240 ol.docify(" &&");
1241 }
1242 if (!defArgList.trailingReturnType().isEmpty())
1243 {
1245 scope, // scope
1246 md->getBodyDef(), // fileScope
1247 md, // self
1248 defArgList.trailingReturnType(), // text
1249 FALSE // autoBreak
1250 );
1251
1252 }
1253 return TRUE;
1254}
1255
1257 OutputList &ol, const ClassDef *cd, const MemberDef *md, QCString const& exception)
1258{
1259 // this is ordinary exception spec - there must be a '('
1260 //printf("exception='%s'\n",qPrint(exception));
1261 int index = exception.find('(');
1262 if (index!=-1)
1263 {
1264 ol.exceptionEntry(exception.left(index),false);
1265 ++index; // paren in second column so skip it here
1266 for (int comma = exception.find(',', index); comma!=-1; )
1267 {
1268 ++comma; // include comma
1270 exception.mid(index,comma-index));
1271 ol.exceptionEntry(QCString(),false);
1272 index=comma;
1273 comma = exception.find(',', index);
1274 }
1275 int close = exception.find(')', index);
1276 if (close!=-1)
1277 {
1278 QCString type=removeRedundantWhiteSpace(exception.mid(index,close-index));
1279 linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md,type);
1280 ol.exceptionEntry(QCString(),true);
1281 }
1282 else
1283 {
1284 warn(md->getDefFileName(),md->getDefLine(),
1285 "missing ) in exception list on member %s",qPrint(md->name()));
1286 }
1287 }
1288 else // Java Exception
1289 {
1290 ol.docify(" ");
1291 linkifyText(TextGeneratorOLImpl(ol),cd,md->getBodyDef(),md,exception);
1292 }
1293}
1294
1295static void writeExceptionList(OutputList &ol, const ClassDef *cd, const MemberDef *md)
1296{
1297 QCString exception(QCString(md->excpString()).stripWhiteSpace());
1298 if ('{'==exception.at(0))
1299 {
1300 // this is an UNO IDL attribute - need special handling
1301 int index = exception.find(';');
1302 int oldIndex = 1;
1303 while (-1 != index) // there should be no more than 2 (set / get)
1304 {
1305 // omit '{' and ';' -> "set raises (...)"
1306 writeExceptionListImpl(ol,cd,md,exception.mid(oldIndex,index-oldIndex));
1307 oldIndex=index+1;
1308 index = exception.find(';',oldIndex);
1309 }
1310 // the rest is now just '}' - omit that
1311 }
1312 else
1313 {
1314 writeExceptionListImpl(ol,cd,md,exception);
1315 }
1316}
1317
1318//-----------------------------------------------------------------------------
1319//-----------------------------------------------------------------------------
1320//-----------------------------------------------------------------------------
1321
1323 const QCString &t,const QCString &a,const QCString &e,
1324 Protection p,Specifier v,bool s,Relationship r,
1325 MemberType mt,const ArgumentList &tal,
1326 const ArgumentList &al,const QCString &meta
1327 )
1328{
1329 m_classDef=nullptr;
1330 m_fileDef=nullptr;
1331 m_moduleDef=nullptr;
1332 m_redefines=nullptr;
1333 m_relatedAlso=nullptr;
1334 m_accessorClass=nullptr;
1335 m_nspace=nullptr;
1336 m_memDef=nullptr;
1337 m_memDec=nullptr;
1338 m_group=nullptr;
1339 m_grpId=-1;
1340 m_enumScope=nullptr;
1342 m_hasCallGraph = Config_getBool(CALL_GRAPH);
1343 m_hasCallerGraph = Config_getBool(CALLER_GRAPH);
1344 m_hasReferencedByRelation = Config_getBool(REFERENCED_BY_RELATION);
1345 m_hasReferencesRelation = Config_getBool(REFERENCES_RELATION);
1346 m_hasEnumValues = Config_getBool(SHOW_ENUM_VALUES);
1347 m_hasInlineSource = Config_getBool(INLINE_SOURCES);
1348 m_initLines=0;
1349 m_type=t;
1350 if (mt==MemberType::Typedef) m_type.stripPrefix("typedef ");
1351 // type.stripPrefix("struct ");
1352 // type.stripPrefix("class " );
1353 // type.stripPrefix("union " );
1355 m_args=a;
1357 if (m_type.isEmpty()) m_decl=d->name()+m_args; else m_decl=m_type+" "+d->name()+m_args;
1358
1359 m_memberGroup=nullptr;
1360 m_virt=v;
1361 m_prot=p;
1362 m_related=r;
1363 m_stat=s;
1364 m_mtype=mt;
1365 m_exception=e;
1366 m_proto=FALSE;
1368 m_memSpec=TypeSpecifier();
1370 m_annMemb=nullptr;
1371 m_annEnumType=nullptr;
1372 m_groupAlias=nullptr;
1374 m_tspec=FALSE;
1375 m_cachedAnonymousType=nullptr;
1376 m_maxInitLines=Config_getInt(MAX_INITIALIZER_LINES);
1377 m_userInitLines=-1;
1379 // copy function template arguments (if any)
1380 m_tArgList = tal;
1381 //printf("new member al=%p\n",al);
1382 // copy function definition arguments (if any)
1383 m_defArgList = al;
1384 // convert function declaration arguments (if any)
1385 if (!m_args.isEmpty())
1386 {
1388 //printf("setDeclArgList %s to %s const=%d\n",qPrint(args),
1389 // qPrint(argListToString(declArgList)),declArgList->constSpecifier);
1390 }
1391 m_metaData = meta;
1392 m_templateMaster = nullptr;
1395 m_cachedTypedefValue = nullptr;
1397 m_groupMember = nullptr;
1400 m_docProvider = nullptr;
1402}
1403
1404
1405//-----------------------------------------------------------------------------
1406//-----------------------------------------------------------------------------
1407//-----------------------------------------------------------------------------
1408
1409/*! Creates a new member definition.
1410 *
1411 * \param df File containing the definition of this member.
1412 * \param dl Line at which the member definition was found.
1413 * \param dc Column at which the member definition was found.
1414 * \param t A string representing the type of the member.
1415 * \param na A string representing the name of the member.
1416 * \param a A string representing the arguments of the member.
1417 * \param e A string representing the throw clause of the members.
1418 * \param p The protection context of the member, possible values are:
1419 * \c Public, \c Protected, \c Private.
1420 * \param v The degree of 'virtualness' of the member, possible values are:
1421 * \c Normal, \c Virtual, \c Pure.
1422 * \param s A boolean that is true iff the member is static.
1423 * \param r The relationship between the class and the member.
1424 * \param mt The kind of member. See #MemberType for a list of
1425 * all types.
1426 * \param tal The template arguments of this member.
1427 * \param al The arguments of this member. This is a structured form of
1428 * the string past as argument \a a.
1429 * \param meta Slice metadata.
1430 */
1431
1433 const QCString &t,const QCString &na,const QCString &a,const QCString &e,
1435 const ArgumentList &tal,const ArgumentList &al,const QCString &meta
1437{
1438 //printf("MemberDefImpl::MemberDef(%s)\n",qPrint(na));
1439 init(this,t,a,e,p,v,s,r,mt,tal,al,meta);
1443}
1444
1445std::unique_ptr<MemberDef> MemberDefImpl::deepCopy() const
1446{
1447 std::unique_ptr<MemberDefImpl> result(new MemberDefImpl(
1450 // first copy base members
1451 result->DefinitionMixin<MemberDefMutable>::operator=(*this);
1452 // then copy other members
1453 result->m_typeConstraints = m_typeConstraints ;
1454 result->m_declArgList = m_declArgList ;
1455 result->m_classDef = m_classDef ;
1456 result->m_fileDef = m_fileDef ;
1457 result->m_moduleDef = m_moduleDef ;
1458 result->m_nspace = m_nspace ;
1459 result->m_enumScope = m_enumScope ;
1460 result->m_livesInsideEnum = m_livesInsideEnum ;
1461 result->m_annEnumType = m_annEnumType ;
1462 result->m_enumFields = m_enumFields ;
1463 result->m_redefines = m_redefines ;
1464 result->m_redefinedBy = m_redefinedBy ;
1465 result->m_memDef = m_memDef ;
1466 result->m_memDec = m_memDec ;
1467 result->m_relatedAlso = m_relatedAlso ;
1468 result->m_examples = m_examples ;
1469 result->m_accessorType = m_accessorType ;
1470 result->m_accessorClass = m_accessorClass ;
1471 result->m_def = m_def ;
1472 result->m_anc = m_anc ;
1473 result->m_decl = m_decl ;
1474 result->m_bitfields = m_bitfields ;
1475 result->m_read = m_read ;
1476 result->m_write = m_write ;
1477 result->m_exception = m_exception ;
1478 result->m_initializer = m_initializer ;
1479 result->m_extraTypeChars = m_extraTypeChars ;
1480 result->m_enumBaseType = m_enumBaseType ;
1481 result->m_requiresClause = m_requiresClause ;
1482 result->m_initLines = m_initLines ;
1483 result->m_memSpec = m_memSpec ;
1484 result->m_vhdlSpec = m_vhdlSpec ;
1485 result->m_maxInitLines = m_maxInitLines ;
1486 result->m_userInitLines = m_userInitLines ;
1487 result->m_annMemb = m_annMemb ;
1488 result->m_defArgList = m_defArgList ;
1489 result->m_declArgList = m_declArgList ;
1490 result->m_tArgList = m_tArgList ;
1491 result->m_typeConstraints = m_typeConstraints ;
1492 result->m_templateMaster = m_templateMaster ;
1493 result->m_formalTemplateArguments = m_formalTemplateArguments ;
1494 result->m_defTmpArgLists = m_defTmpArgLists ;
1495 result->m_cachedAnonymousType = m_cachedAnonymousType ;
1496 result->m_sectionMap = m_sectionMap ;
1497 result->m_groupAlias = m_groupAlias ;
1498 result->m_grpId = m_grpId ;
1499 result->m_memberGroup = m_memberGroup ;
1500 result->m_group = m_group ;
1501 result->m_grouppri = m_grouppri ;
1502 result->m_groupFileName = m_groupFileName ;
1503 result->m_groupStartLine = m_groupStartLine ;
1504 result->m_groupMember = m_groupMember ;
1505 result->m_isTypedefValCached = m_isTypedefValCached ;
1506 result->m_cachedTypedefValue = m_cachedTypedefValue ;
1507 result->m_cachedTypedefTemplSpec = m_cachedTypedefTemplSpec ;
1508 result->m_cachedResolvedType = m_cachedResolvedType ;
1509 result->m_docProvider = m_docProvider ;
1510 result->m_explicitOutputFileBase = m_explicitOutputFileBase ;
1511 result->m_qualifiers = m_qualifiers ;
1512 result->m_implOnly = m_implOnly ;
1513 result->m_hasDocumentedParams = m_hasDocumentedParams ;
1514 result->m_hasDocumentedReturnType = m_hasDocumentedReturnType ;
1515 result->m_isDMember = m_isDMember ;
1516 result->m_proto = m_proto ;
1517 result->m_docEnumValues = m_docEnumValues ;
1518 result->m_annScope = m_annScope ;
1519 result->m_hasDetailedDescriptionCached = m_hasDetailedDescriptionCached ;
1520 result->m_detailedDescriptionCachedValue = m_detailedDescriptionCachedValue ;
1521 result->m_hasCallGraph = m_hasCallGraph ;
1522 result->m_hasCallerGraph = m_hasCallerGraph ;
1523 result->m_hasReferencedByRelation = m_hasReferencedByRelation ;
1524 result->m_hasReferencesRelation = m_hasReferencesRelation ;
1525 result->m_hasEnumValues = m_hasEnumValues ;
1526 result->m_hasInlineSource = m_hasInlineSource ;
1527 result->m_explExt = m_explExt ;
1528 result->m_tspec = m_tspec ;
1529 result->m_groupHasDocs = m_groupHasDocs ;
1530 result->m_docsForDefinition = m_docsForDefinition ;
1531 result->m_category = m_category ;
1532 result->m_categoryRelation = m_categoryRelation ;
1533 result->m_declFileName = m_declFileName ;
1534 result->m_declLine = m_declLine ;
1535 result->m_declColumn = m_declColumn ;
1536 result->m_numberOfFlowKW = m_numberOfFlowKW ;
1537 result->setDefinitionTemplateParameterLists(m_defTmpArgLists);
1538
1539 result->m_isLinkableCached = 0;
1540 result->m_isConstructorCached = 0;
1541 result->m_isDestructorCached = 0;
1542 return result;
1543}
1544
1546{
1547 setOuterScope(scope);
1549 {
1550 m_classDef = toClassDef(scope);
1551 }
1552 else if (scope->definitionType()==Definition::TypeFile)
1553 {
1554 m_fileDef = toFileDef(scope);
1555 }
1556 else if (scope->definitionType()==Definition::TypeModule)
1557 {
1558 m_moduleDef = toModuleDef(scope);
1559 }
1560 else if (scope->definitionType()==Definition::TypeNamespace)
1561 {
1562 m_nspace = toNamespaceDef(scope);
1563 }
1566}
1567
1568
1573
1575{
1576 if (m_templateMaster)
1577 {
1578 MemberDefMutable *mdm = toMemberDefMutable(m_templateMaster);
1579 if (mdm)
1580 {
1581 mdm->insertReimplementedBy(md);
1582 }
1583 }
1584 if (!m_redefinedBy.contains(md))
1585 {
1586 m_redefinedBy.inSort(md);
1587 }
1588}
1589
1591{
1592 return m_redefines;
1593}
1594
1596{
1597 return m_redefinedBy;
1598}
1599
1601{
1602 if (cd)
1603 {
1604 for (const auto &md : m_redefinedBy)
1605 {
1606 const ClassDef *mcd = md->getClassDef();
1607 if (mcd)
1608 {
1609 if (cd==mcd || cd->isBaseClass(mcd,TRUE))
1610 {
1611 return TRUE;
1612 }
1613 }
1614 }
1615 }
1616 return FALSE;
1617}
1618
1620{
1621 m_enumFields.push_back(md);
1622}
1623
1624bool MemberDefImpl::addExample(const QCString &anchor,const QCString &nameStr, const QCString &file)
1625{
1626 //printf("%s::addExample(%s,%s,%s)\n",qPrint(name()),anchor,nameStr,file);
1627 return m_examples.inSort(Example(anchor,nameStr,file));
1628}
1629
1631{
1632 return !m_examples.empty();
1633}
1634
1636{
1637 QCString n = name();
1638 QCString s = getScopeString();
1639
1640 if (!s.isEmpty())
1641 {
1642 n.prepend(s+"::");
1643 }
1644 else if (isStatic() && getFileDef())
1645 {
1646 n.prepend(getFileDef()->name()+":");
1647 }
1648 if (isCallable())
1649 {
1650 n.append(argsString());
1651 }
1652 return n;
1653}
1654
1656{
1657 bool separateMemberPages = Config_getBool(SEPARATE_MEMBER_PAGES);
1658 bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
1659 QCString baseName;
1660
1661 //printf("Member: %s: templateMaster=%p group=%p classDef=%p nspace=%p fileDef=%p\n",
1662 // qPrint(name()),m_templateMaster,m_group,m_classDef,
1663 // m_nspace,m_fileDef);
1664 const NamespaceDef *nspace = getNamespaceDef();
1665 const FileDef *fileDef = getFileDef();
1666 const ClassDef *classDef = getClassDef();
1667 const ModuleDef *moduleDef = getModuleDef();
1668 const GroupDef *groupDef = getGroupDef();
1669 if (!m_explicitOutputFileBase.isEmpty())
1670 {
1672 }
1673 else if (templateMaster())
1674 {
1676 }
1677 else if (groupDef)
1678 {
1679 baseName=groupDef->getOutputFileBase();
1680 }
1681 else if (classDef)
1682 {
1683 baseName=classDef->getOutputFileBase();
1684 if (inlineSimpleClasses && classDef->isSimple())
1685 {
1686 return baseName;
1687 }
1688 }
1689 else if (nspace && (nspace->isLinkable() || nspace->isAnonymous()))
1690 {
1691 baseName=nspace->getOutputFileBase();
1692 }
1693 else if (fileDef)
1694 {
1695 baseName=fileDef->getOutputFileBase();
1696 }
1697 else if (moduleDef)
1698 {
1699 baseName=moduleDef->getOutputFileBase();
1700 }
1701
1702 if (baseName.isEmpty())
1703 {
1705 "Internal inconsistency: member %s does not belong to any"
1706 " container!",qPrint(name())
1707 );
1708 return "dummy";
1709 }
1710 else if (separateMemberPages && hasDetailedDescription())
1711 {
1712 if (getEnumScope()) // enum value, which is part of enum's documentation
1713 {
1714 baseName+="_"+getEnumScope()->anchor();
1715 }
1716 else
1717 {
1718 baseName+="_"+anchor();
1719 }
1720 }
1721 return baseName;
1722}
1723
1725{
1726 QCString ref = DefinitionMixin::getReference();
1727 if (!ref.isEmpty())
1728 {
1729 return ref;
1730 }
1731 const NamespaceDef *nspace = getNamespaceDef();
1732 const FileDef *fileDef = getFileDef();
1733 const ClassDef *classDef = getClassDef();
1734 const ModuleDef *moduleDef = getModuleDef();
1735 const GroupDef *groupDef = getGroupDef();
1736 if (templateMaster())
1737 {
1738 return templateMaster()->getReference();
1739 }
1740 else if (groupDef)
1741 {
1742 return groupDef->getReference();
1743 }
1744 else if (classDef)
1745 {
1746 return classDef->getReference();
1747 }
1748 else if (nspace)
1749 {
1750 return nspace->getReference();
1751 }
1752 else if (moduleDef)
1753 {
1754 return moduleDef->getReference();
1755 }
1756 else if (fileDef)
1757 {
1758 return fileDef->getReference();
1759 }
1760 return "";
1761}
1762
1764{
1765 QCString result=m_anc;
1766 if (m_groupAlias) return m_groupAlias->anchor();
1767 if (m_templateMaster) return m_templateMaster->anchor();
1768 if (m_enumScope && m_enumScope!=this) // avoid recursion for C#'s public enum E { E, F }
1769 {
1770 result.prepend(m_enumScope->anchor());
1771 }
1772 if (getGroupDef())
1773 {
1774 if (m_groupMember)
1775 {
1776 result=m_groupMember->anchor();
1777 }
1778 else if (getReference().isEmpty())
1779 {
1780 result.prepend("g");
1781 }
1782 }
1783 return result;
1784}
1785
1787{
1788 AUTO_TRACE("name={}",qualifiedName());
1789 bool extractStatic = Config_getBool(EXTRACT_STATIC);
1790 bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
1791 m_isLinkableCached = 2; // linkable
1792 //printf("MemberDefImpl::isLinkableInProject(name=%s)\n",qPrint(name()));
1793 if (isHidden())
1794 {
1795 AUTO_TRACE_ADD("is hidden");
1797 return;
1798 }
1799 if (templateMaster())
1800 {
1801 AUTO_TRACE_ADD("has master template");
1803 return;
1804 }
1805 if (isAnonymous())
1806 {
1807 AUTO_TRACE_ADD("name invalid");
1808 m_isLinkableCached = 1; // not a valid or a dummy name
1809 return;
1810 }
1811 if (!hasDocumentation() || isReference())
1812 {
1813 AUTO_TRACE_ADD("no docs or reference");
1814 m_isLinkableCached = 1; // no documentation
1815 return;
1816 }
1817 const GroupDef *groupDef = getGroupDef();
1818 const ModuleDef *moduleDef = getModuleDef();
1819 const ClassDef *classDef = getClassDef();
1820 if (groupDef && !groupDef->isLinkableInProject())
1821 {
1822 AUTO_TRACE_ADD("in not linkable group");
1823 m_isLinkableCached = 1; // group but group not linkable
1824 return;
1825 }
1826 if (!groupDef && classDef && !classDef->isLinkableInProject())
1827 {
1828 AUTO_TRACE_ADD("in not linkable class");
1829 m_isLinkableCached = 1; // in class but class not linkable
1830 return;
1831 }
1832 if (!groupDef && moduleDef && !moduleDef->isLinkableInProject())
1833 {
1834 AUTO_TRACE_ADD("in not linkable module");
1835 m_isLinkableCached = 1; // in module but module not linkable
1836 return;
1837 }
1838 const NamespaceDef *nspace = getNamespaceDef();
1839 const FileDef *fileDef = getFileDef();
1840 if (!groupDef && nspace /*&& m_related==Relationship::Member*/ && !nspace->isLinkableInProject()
1841 && (fileDef==nullptr || !fileDef->isLinkableInProject()))
1842 {
1843 AUTO_TRACE_ADD("in not linkable namespace");
1844 m_isLinkableCached = 1; // in namespace but namespace not linkable
1845 return;
1846 }
1847 if (!groupDef && !nspace &&
1848 /*m_related==Relationship::Member &&*/ !classDef &&
1849 fileDef && !fileDef->isLinkableInProject())
1850 {
1851 AUTO_TRACE_ADD("in not linkable file");
1852 m_isLinkableCached = 1; // in file (and not in namespace) but file not linkable
1853 return;
1854 }
1856 !(m_prot==Protection::Private && (m_virt!=Specifier::Normal || isOverride() || isFinal()) && extractPrivateVirtual))
1857 {
1858 AUTO_TRACE_ADD("private and invisible");
1859 m_isLinkableCached = 1; // hidden due to protection
1860 return;
1861 }
1862 if (m_stat && classDef==nullptr && !extractStatic)
1863 {
1864 AUTO_TRACE_ADD("static and invisible");
1865 m_isLinkableCached = 1; // hidden due to staticness
1866 return;
1867 }
1868 AUTO_TRACE_ADD("linkable");
1869 return; // linkable!
1870}
1871
1877
1883
1889
1895
1897{
1898 if (m_isLinkableCached==0)
1899 {
1900 MemberDefImpl *that = const_cast<MemberDefImpl*>(this);
1902 }
1904 return m_isLinkableCached==2;
1905}
1906
1908{
1909 if (m_templateMaster)
1910 {
1911 return m_templateMaster->isLinkable();
1912 }
1913 else
1914 {
1915 return isLinkableInProject() || isReference();
1916 }
1917}
1918
1919
1924
1926 const ClassDef *,const NamespaceDef *,const FileDef *fd,const GroupDef *gd,const ModuleDef *mod,
1927 bool onlyText) const
1928{
1929 SrcLangExt lang = getLanguage();
1930 bool hideScopeNames = Config_getBool(HIDE_SCOPE_NAMES);
1931 QCString sep = getLanguageSpecificSeparator(lang,TRUE);
1932 QCString n = name();
1933 const ClassDef *classDef = getClassDef();
1934 const ModuleDef *moduleDef = getModuleDef();
1935 const NamespaceDef *nspace = getNamespaceDef();
1936 if (!hideScopeNames)
1937 {
1938 if (m_enumScope && m_livesInsideEnum && getGroupDef()!=nullptr)
1939 {
1940 n.prepend(m_enumScope->displayName()+sep);
1941 }
1942 if (classDef && gd && !isRelated())
1943 {
1944 n.prepend(classDef->displayName()+sep);
1945 }
1946 else if (nspace && (gd || fd || moduleDef))
1947 {
1948 n.prepend(nspace->displayName()+sep);
1949 }
1950 }
1951
1952 if (isObjCMethod())
1953 {
1954 if (isStatic()) ol.docify("+ "); else ol.docify("- ");
1955 }
1956 if (!onlyText && (isLinkable() || hasDetailedDescription())) // write link
1957 {
1958 if (m_mtype==MemberType::EnumValue && getGroupDef()==nullptr && // enum value is not grouped
1959 getEnumScope() && getEnumScope()->getGroupDef()) // but its container is
1960 {
1961 const GroupDef *enumValGroup = getEnumScope()->getGroupDef();
1962 ol.writeObjectLink(enumValGroup->getReference(),
1963 enumValGroup->getOutputFileBase(),
1964 anchor(),n);
1965 }
1966 else
1967 {
1969 }
1970 }
1971 else // write only text
1972 {
1973 ol.startBold();
1974 ol.docify(n);
1975 ol.endBold();
1976 }
1977}
1978
1980
1981/*! If this member has an anonymous class/struct/union as its type, then
1982 * this method will return the ClassDef that describes this return type.
1983 */
1985{
1986 std::lock_guard<std::mutex> lock(g_cachedAnonymousTypeMutex);
1987 //printf("%s:getClassDefOfAnonymousType() cache=%s\n",qPrint(name()),
1988 // m_cachedAnonymousType?qPrint(m_cachedAnonymousType->name()):"<empty>");
1990
1991 QCString cname;
1992 if (getClassDef()!=nullptr)
1993 {
1994 cname=getClassDef()->name();
1995 }
1996 else if (getNamespaceDef()!=nullptr)
1997 {
1998 cname=getNamespaceDef()->name();
1999 }
2000 QCString ltype(m_type);
2001 // strip 'friend' keyword from ltype
2002 ltype.stripPrefix("friend ");
2003
2004 // search for the last anonymous scope in the member type
2005 ClassDef *annoClassDef=nullptr;
2006
2007 // match expression if it contains at least one @1 marker, e.g.
2008 // 'struct A::@1::@2::B' matches 'A::@1::@2::B' but 'struct A::B' does not match.
2009 std::string stype = ltype.str();
2010 static const reg::Ex r(R"([\w@:]*@\d+[\w@:]*)");
2011 reg::Match match;
2012 if (reg::search(stype,match,r)) // found anonymous scope in type
2013 {
2014 QCString annName = match.str();
2015
2016 // if inside a class or namespace try to prepend the scope name
2017 if (!cname.isEmpty() && annName.left(cname.length()+2)!=cname+"::")
2018 {
2019 QCString ts=stripAnonymousNamespaceScope(cname+"::"+annName);
2020 annoClassDef=getClass(ts);
2021 }
2022 // if not found yet, try without scope name
2023 if (annoClassDef==nullptr)
2024 {
2025 QCString ts=stripAnonymousNamespaceScope(annName);
2026 annoClassDef=getClass(ts);
2027 }
2028 }
2029 m_cachedAnonymousType = annoClassDef;
2030 return annoClassDef;
2031}
2032
2033/*! This methods returns TRUE iff the brief section (also known as
2034 * declaration section) is visible in the documentation.
2035 */
2037{
2038 bool extractStatic = Config_getBool(EXTRACT_STATIC);
2039 bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
2040 bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
2041 bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC);
2042 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
2043 bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
2044
2045 //printf("Member %s grpId=%d docs=%s file=%s args=%s\n",
2046 // qPrint(name()),
2047 // 0,"", //grpId,grpId==-1?"<none>":Doxygen::memberDocDict[grpId]->data(),
2048 // "", //qPrint(getFileDef()->name()),
2049 // argsString());
2050
2051 bool hasDocs = hasDocumentation();
2052
2053 // only include static members with file/namespace scope if
2054 // explicitly enabled in the config file
2055 bool visibleIfStatic = !(getClassDef()==nullptr &&
2056 isStatic() &&
2057 !extractStatic
2058 );
2059
2060 // only include members is the are documented or
2061 // HIDE_UNDOC_MEMBERS is NO in the config file
2062 bool visibleIfDocumented = (!hideUndocMembers ||
2063 hasDocs ||
2065 );
2066
2067 // hide members with no detailed description and brief descriptions
2068 // explicitly disabled.
2069 bool visibleIfEnabled = !(hideUndocMembers &&
2070 documentation().isEmpty() &&
2071 !briefMemberDesc &&
2072 !repeatBrief
2073 );
2074
2075 // Hide friend (class|struct|union) declarations if HIDE_FRIEND_COMPOUNDS is true
2076 bool visibleIfFriendCompound = !(hideFriendCompounds &&
2077 isFriend() /*&&
2078 (m_type=="friend class" ||
2079 m_type=="friend struct" ||
2080 m_type=="friend union"
2081 )*/
2082 );
2083
2084 // only include members that are non-private unless EXTRACT_PRIVATE is
2085 // set to YES or the member is part of a group. And as a special case,
2086 // private *documented* virtual members are shown if EXTRACT_PRIV_VIRTUAL
2087 // is set to YES
2088 bool visibleIfPrivate = (protectionLevelVisible(protection()) ||
2091 (m_virt!=Specifier::Normal || isOverride() || isFinal()) && extractPrivateVirtual && hasDocs)
2092 );
2093
2094 // hide member if it overrides a member in a superclass and has no
2095 // documentation of its own
2096 //bool visibleIfDocVirtual = !reimplements() ||
2097 // !Config_getBool(INHERIT_DOCS) ||
2098 // hasDocs;
2099
2100 // true if this member is a constructor or destructor
2101 bool cOrDTor = isConstructor() || isDestructor();
2102
2103 // hide default constructors or destructors (no args) without
2104 // documentation
2105 bool visibleIfNotDefaultCDTor = !(cOrDTor &&
2106 (m_defArgList.empty() ||
2107 m_defArgList.front().type == "void"
2108 ) &&
2109 !hasDocs
2110 );
2111
2112
2113 //printf("visibleIfStatic=%d visibleIfDocumented=%d visibleIfEnabled=%d "
2114 // "visibleIfPrivate=%d visibleIfNotDefaultCDTor=%d "
2115 // "visibleIfFriendCompound=%d !annScope=%d\n",
2116 // visibleIfStatic,visibleIfDocumented,
2117 // visibleIfEnabled,visibleIfPrivate,visibleIfNotDefaultCDTor,
2118 // visibleIfFriendCompound,!m_annScope);
2119
2120 bool visible = visibleIfStatic && visibleIfDocumented &&
2121 visibleIfEnabled && visibleIfPrivate &&
2122 /*visibleIfDocVirtual &&*/ visibleIfNotDefaultCDTor &&
2123 visibleIfFriendCompound &&
2124 !m_annScope && !isHidden();
2125 //printf("MemberDefImpl::isBriefSectionVisible() %d\n",visible);
2126 return visible;
2127}
2128
2130{
2131 SrcLangExt lang = getLanguage();
2132 QCString ltype(m_type);
2133 if (lang==SrcLangExt::Cpp && isEnumerate() && isStrong())
2134 {
2135 if (isEnumStruct())
2136 {
2137 ltype+=" struct";
2138 }
2139 else
2140 {
2141 ltype+=" class";
2142 }
2143 }
2145 {
2146 ltype.prepend("typedef ");
2147 }
2148 if (isTypeAlias())
2149 {
2150 ltype="using";
2151 }
2152 // strip 'friend' keyword from ltype
2153 ltype.stripPrefix("friend ");
2154 if (ltype=="@") // rename type from enum values
2155 {
2156 ltype="";
2157 }
2158 else
2159 {
2160 if (isObjCMethod())
2161 {
2162 ltype.prepend("(");
2163 ltype.append(")");
2164 }
2165 }
2166 return ltype;
2167}
2168
2170 const ArgumentList &al, bool writeReqClause) const
2171{
2172 ol.docify("template<");
2173 for (auto it = al.begin(); it!=al.end();)
2174 {
2175 Argument a = *it;
2176 linkifyText(TextGeneratorOLImpl(ol), // out
2177 def, // scope
2178 getFileDef(), // fileScope
2179 this, // self
2180 a.type, // text
2181 FALSE // autoBreak
2182 );
2183 ol.docify(" ");
2184 ol.docify(a.name);
2185 if (a.defval.length()!=0)
2186 {
2187 ol.docify(" = ");
2188 ol.docify(a.defval);
2189 }
2190 ++it;
2191 if (it!=al.end()) ol.docify(", ");
2192 }
2193 ol.docify("> ");
2194 if (writeReqClause && !m_requiresClause.isEmpty())
2195 {
2196 ol.lineBreak();
2197 ol.docify("requires ");
2198 linkifyText(TextGeneratorOLImpl(ol), // out
2199 def, // scope
2200 getFileDef(), // fileScope
2201 this, // self
2202 m_requiresClause, // text
2203 FALSE // autoBreak
2204 );
2205 }
2206}
2207
2209{
2210 if (exception.isEmpty()) return args; // no exception, nothing to combine args
2211 int pos = args.findRev(')');
2212 int eqPos = pos!=-1 ? args.find('=',pos) : -1; // look for '=' in '(args) = something'
2213 if (eqPos==-1) return args+" "+exception; // append exception at the end
2214 return args.left(eqPos)+" "+exception+" "+args.mid(eqPos); // insert exception before =
2215}
2216
2218{
2219 return !m_bitfields.isEmpty() && name().startsWith("__pad"); // anonymous bitfield
2220}
2221
2223 const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,const ModuleDef *mod,
2224 bool inGroup, int indentLevel, const ClassDef *inheritedFrom,const QCString &inheritId) const
2225{
2226 //printf("> %s MemberDefImpl::writeDeclaration() inGroup=%d inheritId=%s\n",qPrint(qualifiedName()),inGroup,qPrint(inheritId));
2227
2228 // hide enum value, since they appear already as part of the enum, unless they
2229 // are explicitly grouped.
2230 if (!inGroup && m_mtype==MemberType::EnumValue) return;
2231
2232 const Definition *d=nullptr;
2233 ASSERT (cd!=nullptr || nd!=nullptr || fd!=nullptr || gd!=nullptr || mod!=nullptr); // member should belong to something
2234 if (cd) d=cd;
2235 else if (nd) d=nd;
2236 else if (mod) d=mod;
2237 else if (fd) d=fd;
2238 else d=gd;
2239 if (d==gd) // see bug 753608
2240 {
2241 if (getClassDef()) d = getClassDef();
2242 else if (getNamespaceDef()) d = getNamespaceDef();
2243 else if (getFileDef()) d = getFileDef();
2244 }
2245 else if (d==fd) // see issue #9850, namespace member can be shown in file scope as well
2246 {
2247 if (getNamespaceDef()) d = getNamespaceDef();
2248 }
2249 if (d==nullptr)
2250 {
2251 err("No context could be derived for member '%s'\n",qPrint(name()));
2252 return; // should not happen
2253 }
2254
2255 QCString cname = d->name();
2256 QCString cdname = d->displayName();
2257 QCString cfname = getOutputFileBase();
2258
2259 // search for the last anonymous scope in the member type
2260 ClassDef *annoClassDef=getClassDefOfAnonymousType();
2261
2263
2264 // start a new member declaration
2265 bool isAnonType = annoClassDef || m_annMemb || m_annEnumType;
2269 ol.startMemberItem(anchor(), anonType, inheritId);
2270
2271 // If there is no detailed description we need to write the anchor here.
2272 bool detailsVisible = hasDetailedDescription();
2273 bool writeAnchor = (inGroup || getGroupDef()==nullptr) && // only write anchors for member that have no details and are
2274 !detailsVisible && !m_annMemb && // rendered inside the group page or are not grouped at all
2275 inheritId.isEmpty();
2276 if (writeAnchor)
2277 {
2278 QCString doxyArgs=argsString();
2279 QCString doxyName=name();
2280 if (!cname.isEmpty())
2281 {
2283 }
2284 ol.startDoxyAnchor(cfname,cname,anchor(),doxyName,doxyArgs);
2285 ol.addLabel(cfname,anchor());
2286 }
2287
2288 if (!detailsVisible)
2289 {
2290 ol.pushGeneratorState();
2294 ol.docify("\n");
2295 ol.popGeneratorState();
2296 }
2297
2298 if (annoClassDef || m_annMemb)
2299 {
2300 for (int j=0;j<indentLevel;j++)
2301 {
2303 }
2304 }
2305
2306 // *** write template lists
2307 if (m_tArgList.hasParameters() && getLanguage()==SrcLangExt::Cpp)
2308 {
2309 if (!isAnonType) ol.startMemberTemplateParams();
2311 if (!isAnonType) ol.endMemberTemplateParams(anchor(),inheritId);
2312 }
2313
2314
2315 // *** write type
2316 QCString ltype(m_type);
2318 {
2319 ltype.prepend("typedef ");
2320 }
2321 if (isTypeAlias())
2322 {
2323 ltype="using";
2324 }
2325 // strip 'friend' keyword from ltype
2326 ltype.stripPrefix("friend ");
2327 static const reg::Ex r(R"(@\d+)");
2328 reg::Match match;
2329 std::string stype = ltype.str();
2330 bool endAnonScopeNeeded=FALSE;
2331 if (reg::search(stype,match,r)) // member has an anonymous type
2332 {
2333 int i = static_cast<int>(match.position());
2334 int l = static_cast<int>(match.length());
2335 //printf("annoClassDef=%p annMemb=%p scopeName='%s' anonymous='%s'\n",
2336 // annoClassDef,annMemb,qPrint(cname),qPrint(ltype.mid(i,l)));
2337
2338 if (annoClassDef) // type is an anonymous compound
2339 {
2340 int ir=i+l;
2341 //printf("<<<<<<<<<<<<<<\n");
2342 ol.startAnonTypeScope(indentLevel);
2343 annoClassDef->writeDeclaration(ol,m_annMemb,inGroup,indentLevel+1,inheritedFrom,inheritId);
2344 //printf(">>>>>>>>>>>>>> startMemberItem(2)\n");
2346 ol.startMemberItem(anchor(),anonType,inheritId);
2347 for (int j=0;j< indentLevel;j++)
2348 {
2350 }
2351 QCString varName=ltype.right(ltype.length()-ir).stripWhiteSpace();
2352 //printf(">>>>>> ltype='%s' varName='%s'\n",qPrint(ltype),qPrint(varName));
2353 ol.docify("}");
2354 if (varName.isEmpty() && isAnonymous())
2355 {
2356 ol.docify(";");
2357 }
2358 else if (!varName.isEmpty() && (varName.at(0)=='*' || varName.at(0)=='&'))
2359 {
2360 ol.docify(" ");
2361 ol.docify(varName);
2362 }
2363 endAnonScopeNeeded=TRUE;
2364 }
2365 else
2366 {
2367 if (getAnonymousEnumType()) // type is an anonymous enum
2368 {
2369 linkifyText(TextGeneratorOLImpl(ol), // out
2370 d, // scope
2371 getBodyDef(), // fileScope
2372 this, // self
2373 ltype.left(i), // text
2374 FALSE // autoBreak
2375 );
2376 getAnonymousEnumType()->writeEnumDeclaration(ol,cd,nd,fd,gd,mod);
2377 //ol+=*getAnonymousEnumType()->enumDecl();
2378 linkifyText(TextGeneratorOLImpl(ol),d,getFileDef(),this,ltype.right(ltype.length()-i-l),TRUE);
2379 }
2380 else
2381 {
2382 ltype = ltype.left(i) + " { ... } " + removeAnonymousScopes(ltype.right(ltype.length()-i-l));
2383 linkifyText(TextGeneratorOLImpl(ol), // out
2384 d, // scope
2385 getBodyDef(), // fileScope
2386 this, // self
2387 ltype, // text
2388 FALSE // autoBreak
2389 );
2390 }
2391 }
2392 }
2393 else if (ltype=="@") // rename type from enum values
2394 {
2395 ltype="";
2396 }
2397 else
2398 {
2399 if (isObjCMethod())
2400 {
2401 ltype.prepend("(");
2402 ltype.append(")");
2403 }
2404 linkifyText(TextGeneratorOLImpl(ol), // out
2405 d, // scope
2406 getBodyDef(), // fileScope
2407 this, // self
2408 ltype, // text
2409 FALSE // autoBreak
2410 );
2411 }
2412 bool htmlOn = ol.isEnabled(OutputType::Html);
2413 if (htmlOn && !ltype.isEmpty())
2414 {
2416 }
2417 if (!ltype.isEmpty()) ol.docify(" ");
2418 if (htmlOn)
2419 {
2421 }
2422
2423 if (m_annMemb)
2424 {
2425 ol.pushGeneratorState();
2428 ol.popGeneratorState();
2429 }
2430 else
2431 {
2432 ol.insertMemberAlign(m_tArgList.hasParameters());
2433 }
2434
2435 // *** write name
2436 if (!isAnonymous() && !_isAnonymousBitField()) // hide anonymous stuff
2437 {
2438 bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
2439 bool extractStatic = Config_getBool(EXTRACT_STATIC);
2440 MemberDefMutable *annMemb = toMemberDefMutable(m_annMemb);
2441 bool visibleIfPrivate = (protectionLevelVisible(protection()) ||
2445 extractPrivateVirtual && hasDocumentation()
2446 ));
2447 //printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d hasDocumentation=%d\n",qPrint(name()),gd,getGroupDef(),inGroup,isLinkable(),hasDocumentation());
2448 if (!name().isEmpty() && // name valid
2449 (hasDetailedDescription() || isReference()) && // has docs
2450 visibleIfPrivate &&
2451 !(isStatic() && getClassDef()==nullptr && !extractStatic) // hidden due to static-ness
2452 )
2453 {
2454 if (annMemb)
2455 {
2456 //printf("anchor=%s ann_anchor=%s\n",anchor(),annMemb->anchor());
2457 annMemb->writeLink(ol,
2458 annMemb->getClassDef(),
2459 annMemb->getNamespaceDef(),
2460 annMemb->getFileDef(),
2461 annMemb->getGroupDef(),
2462 annMemb->getModuleDef());
2463 }
2464 else
2465 {
2466 //printf("writeLink %s->%d\n",qPrint(name),hasDocumentation());
2467 const ClassDef *rcd = cd;
2468 if (isReference() && getClassDef()) rcd = getClassDef();
2469 writeLink(ol,rcd,nd,fd,gd,mod);
2470 }
2471 }
2472 else if (isDocumentedFriendClass())
2473 // if the member is an undocumented friend declaration for some class,
2474 // then maybe we can link to the class
2475 {
2476 writeLink(ol,getClass(name()),nullptr,nullptr,nullptr,nullptr);
2477 }
2478 else
2479 // there is a brief member description and brief member
2480 // descriptions are enabled or there is no detailed description.
2481 {
2482 const ClassDef *rcd = cd;
2483 if (isReference() && getClassDef()) rcd = getClassDef();
2484 writeLink(ol,rcd,nd,fd,gd,mod,TRUE);
2485 }
2486 }
2487
2488 // *** write arguments
2489 if (!argsString().isEmpty() && !isObjCMethod())
2490 {
2491 if (!isDefine() && !isTypedef()) ol.writeString(" ");
2492 linkifyText(TextGeneratorOLImpl(ol), // out
2493 d, // scope
2494 getBodyDef(), // fileScope
2495 this, // self
2496 isDefine() ?
2497 substitute(argsString(),",",", ") :
2498 isTypedef() ?
2499 substitute(argsString(),")(",") (") :
2501 m_annMemb!=nullptr, // autoBreak
2502 TRUE, // external
2503 FALSE, // keepSpaces
2504 indentLevel
2505 );
2506 }
2507
2508 // *** write bitfields
2509 if (!m_bitfields.isEmpty()) // add bitfields
2510 {
2511 linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),this,m_bitfields);
2512 }
2513 else if (hasOneLineInitializer()
2514 //!init.isEmpty() && initLines==0 && // one line initializer
2515 //((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
2516 ) // add initializer
2517 {
2518 if (isTypeAlias()) // using statement
2519 {
2520 ol.writeString(" = ");
2521 linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),this,m_initializer.simplifyWhiteSpace());
2522 }
2523 else if (!isDefine())
2524 {
2525 //ol.writeString(" = ");
2526 ol.writeString(" ");
2527 linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),this,m_initializer.simplifyWhiteSpace());
2528 }
2529 else
2530 {
2532 linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),this,m_initializer);
2533 }
2534 }
2535
2536
2538 {
2539 ol.startTypewriter();
2540 ol.docify(" [implementation]");
2541 ol.endTypewriter();
2542 }
2543
2544 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
2545
2546 if (isProperty() && (isSettable() || isGettable() ||
2549 {
2550 ol.writeLatexSpacing();
2551 ol.startTypewriter();
2552 ol.docify(" [");
2553 StringVector sl;
2554
2555 if (isGettable()) sl.emplace_back("get");
2556 if (isProtectedGettable()) sl.emplace_back("protected get");
2557 if (isSettable()) sl.emplace_back("set");
2558 if (isProtectedSettable()) sl.emplace_back("protected set");
2559 if (extractPrivate)
2560 {
2561 if (isPrivateGettable()) sl.emplace_back("private get");
2562 if (isPrivateSettable()) sl.emplace_back("private set");
2563 }
2564 bool first=true;
2565 for (const auto &s : sl)
2566 {
2567 if (!first)
2568 {
2569 ol.docify(", ");
2570 }
2571 first=false;
2572 ol.docify(s.c_str());
2573 }
2574 ol.docify("]");
2575 ol.endTypewriter();
2576 }
2577
2578 if (isEvent() && (isAddable() || isRemovable() || isRaisable()))
2579 {
2580 ol.writeLatexSpacing();
2581 ol.startTypewriter();
2582 ol.docify(" [");
2583 StringVector sl;
2584 if (isAddable()) sl.emplace_back("add");
2585 if (isRemovable()) sl.emplace_back("remove");
2586 if (isRaisable()) sl.emplace_back("raise");
2587 bool first=true;
2588 for (const auto &s : sl)
2589 {
2590 if (!first)
2591 {
2592 ol.docify(", ");
2593 }
2594 first=false;
2595 ol.docify(s.c_str());
2596 }
2597 ol.docify("]");
2598 ol.endTypewriter();
2599 }
2600
2601 if (writeAnchor)
2602 {
2603 ol.endDoxyAnchor(cfname,anchor());
2604 }
2605
2606 //printf("endMember %s annoClassDef=%p annEnumType=%p\n",
2607 // qPrint(name()),annoClassDef,annEnumType);
2608 ol.endMemberItem(anonType);
2609 if (endAnonScopeNeeded)
2610 {
2611 ol.endAnonTypeScope(indentLevel);
2612 }
2613
2614 // write brief description
2615 if (!briefDescription().isEmpty() &&
2616 Config_getBool(BRIEF_MEMBER_DESC)
2617 )
2618 {
2619 auto parser { createDocParser() };
2620 auto ast { validatingParseDoc(*parser.get(),
2621 briefFile(),briefLine(),
2624 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
2625 if (!ast->isEmpty())
2626 {
2627 ol.startMemberDescription(anchor(),inheritId);
2628 ol.writeDoc(ast.get(),getOuterScope()?getOuterScope():d,this);
2629 if (detailsVisible) // add More.. link only when both brief and details are visible
2630 {
2631 if (!isAnonymous()) // hide anonymous stuff
2632 {
2633 ol.pushGeneratorState();
2635 ol.docify(" ");
2636 MemberDefMutable *annMemb = toMemberDefMutable(m_annMemb);
2637 if (annMemb)
2638 {
2639 ol.startTextLink(annMemb->getOutputFileBase(),annMemb->anchor());
2641 ol.endTextLink();
2642 }
2643 ol.popGeneratorState();
2644 }
2645 }
2646 // for RTF we need to add an extra empty paragraph
2647 ol.pushGeneratorState();
2649 ol.startParagraph();
2650 ol.endParagraph();
2651 ol.popGeneratorState();
2653 }
2654 }
2655
2656 ol.endMemberDeclaration(anchor(),inheritId);
2657
2659 //printf("< %s MemberDefImpl::writeDeclaration() inGroup=%d\n",qPrint(qualifiedName()),inGroup);
2660}
2661
2663
2665{
2666 std::lock_guard<std::mutex> lock(g_hasDetailedDescriptionMutex);
2667 //printf(">hasDetailedDescription(cached=%d)\n",m_hasDetailedDescriptionCached);
2669 {
2670 bool extractAll = Config_getBool(EXTRACT_ALL);
2671 bool alwaysDetailedSec = Config_getBool(ALWAYS_DETAILED_SEC);
2672 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
2673 bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC);
2674 bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
2675 bool extractStatic = Config_getBool(EXTRACT_STATIC);
2676 bool extractPrivateVirtual = Config_getBool(EXTRACT_PRIV_VIRTUAL);
2677 bool inlineSources = hasInlineSource();
2678
2679 // the member has detailed documentation because the user added some comments
2680 bool docFilter =
2681 // extract all is enabled
2682 extractAll ||
2683 // has detailed docs
2684 !documentation().isEmpty() ||
2685 // has inbody docs
2687 // is an enum with values that are documented
2689 // is documented enum value
2690 (m_mtype==MemberType::EnumValue && !briefDescription().isEmpty()) ||
2691 // has brief description that is part of the detailed description
2692 (!briefDescription().isEmpty() && // has brief docs
2693 (alwaysDetailedSec && // they are visible in
2694 (repeatBrief || // detailed section or
2695 !briefMemberDesc // they are explicitly not
2696 ) // shown in brief section
2697 )
2698 ) ||
2699 // has one or more documented arguments
2701 m_templateMaster->argumentList().hasDocumentation() :
2702 m_defArgList.hasDocumentation());
2703
2704 // generate function guard
2705 // ================== =======
2706 // _writeGroupInclude -> ignored in calculation
2707 // multiLineInitializer() -> hasMultiLineInitializer()
2708 // _writeReimplements -> _isReimplements()
2709 // _writeReimplementedBy -> _countReimplementedBy()>0
2710 // _writeExamples -> hasExamples()
2711 // _writeTypeConstraints -> m_typeConstraints.hasParameters()
2712 // writeSourceDef -> !getSourceFileBase().isEmpty();
2713 // writeInlineCode -> hasInlineSource() && hasSources()
2714 // writeSourceRefs -> hasReferencesRelation() && hasSourceRefs()
2715 // writeSourceReffedBy -> hasReferencedByRelation() && hasSourceReffedBy()
2716 // _writeCallGraph -> _hasVisibleCallGraph()
2717 // _writeCallerGraph -> _hasVisibleCallerGraph()
2718
2719 // the member has detailed documentation because there is some generated info
2720 bool docInfo =
2721 // has a multi-line initialization block
2723 // reimplements / reimplemented by
2725 // examples
2726 hasExamples() ||
2727 // type constraints
2728 m_typeConstraints.hasParameters() ||
2729 // has source definition
2731 // has inline sources
2732 (inlineSources && hasSources()) ||
2733 // has references
2736 // call graph
2738 // caller graph
2740
2741 if (!hideUndocMembers) // if HIDE_UNDOC_MEMBERS is NO we also show the detailed section
2742 // if there is only some generated info
2743 {
2744 docFilter = docFilter || docInfo;
2745 }
2746
2747 // this is not a global static or global statics should be extracted
2748 bool staticFilter = getClassDef()!=nullptr || !isStatic() || extractStatic;
2749
2750 // only include members that are non-private unless EXTRACT_PRIVATE is
2751 // set to YES or the member is part of a group
2752 bool privateFilter = protectionLevelVisible(protection()) || m_mtype==MemberType::Friend ||
2753 (m_prot==Protection::Private && (m_virt!=Specifier::Normal || isOverride() || isFinal()) && extractPrivateVirtual);
2754
2755 // hide friend (class|struct|union) member if HIDE_FRIEND_COMPOUNDS
2756 // is true
2757 bool friendCompoundFilter = !(Config_getBool(HIDE_FRIEND_COMPOUNDS) && isFriend());
2758
2760 (docFilter && staticFilter && privateFilter && friendCompoundFilter && !isHidden());
2761 //printf("docFilter=%d docInfo=%d staticFilter=%d privateFilter=%d friendCompoundFilter=%d !isHidden()=%d",
2762 // docFilter,docInfo,staticFilter,privateFilter,friendCompoundFilter,!isHidden());
2764 }
2765 //printf("<hasDetailedDescription(cached=%d)\n",m_hasDetailedDescriptionCached);
2767}
2768
2770{
2771 bool separateMemPages = Config_getBool(SEPARATE_MEMBER_PAGES);
2772 bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
2773 bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
2774 bool groupFilter = getGroupDef()==nullptr || container==MemberListContainer::Group || separateMemPages;
2775 bool fileFilter = getNamespaceDef()==nullptr || !getNamespaceDef()->isLinkable() || container!=MemberListContainer::File;
2776 bool simpleFilter = (hasBriefDescription() || !hideUndocMembers) && inlineSimpleStructs &&
2777 getClassDef()!=nullptr && getClassDef()->isSimple();
2778
2779 bool visible = hasDetailedDescription() && groupFilter && fileFilter &&
2780 !isReference();
2781 bool result = visible || simpleFilter;
2782 //printf("%s::isDetailedSectionVisible: %d groupFilter=%d fileFilter=%d\n",
2783 // qPrint(name()),result,groupFilter,fileFilter);
2784 return result;
2785}
2786
2788{
2789 StringVector sl;
2790 bool inlineInfo = Config_getBool(INLINE_INFO);
2791
2792 Specifier lvirt=virtualness();
2793 if ((!isObjCMethod() || isOptional() || isRequired()) &&
2795 isFriend() || isRelated() ||
2796 (isInline() && inlineInfo) ||
2797 isSignal() || isSlot() ||
2798 isStatic() || isExternal() ||
2799 isExported() ||
2800 (getClassDef() && getClassDef()!=container && container->definitionType()==TypeClass) ||
2801 TypeSpecifier(m_memSpec).setInline(false)!=TypeSpecifier()
2802 )
2803 )
2804 {
2805 // write the member specifier list
2806 //ol.writeLatexSpacing();
2807 //ol.startTypewriter();
2808 //ol.docify(" [");
2809 SrcLangExt lang = getLanguage();
2810 bool optVhdl = lang==SrcLangExt::VHDL;
2811 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
2812 if (optVhdl)
2813 {
2814 sl.push_back(theTranslator->trVhdlType(getVhdlSpecifiers(),TRUE).str());
2815 }
2816 else
2817 {
2818 if (isFriend()) sl.emplace_back("friend");
2819 else if (isRelated()) sl.emplace_back("related");
2820 else
2821 {
2822 if (isExternal()) sl.emplace_back("extern");
2823 if (inlineInfo && isInline()) sl.emplace_back("inline");
2824 if (isExplicit()) sl.emplace_back("explicit");
2825 if (isMutable()) sl.emplace_back("mutable");
2826 if (isStatic()) sl.emplace_back("static");
2827 if (isGettable()) sl.emplace_back("get");
2828 if (isProtectedGettable()) sl.emplace_back("protected get");
2829 if (isSettable()) sl.emplace_back("set");
2830 if (isProtectedSettable()) sl.emplace_back("protected set");
2831 if (extractPrivate)
2832 {
2833 if (isPrivateGettable()) sl.emplace_back("private get");
2834 if (isPrivateSettable()) sl.emplace_back("private set");
2835 }
2836 if (isNoDiscard()) sl.emplace_back("nodiscard");
2837 if (isConstExpr()) sl.emplace_back("constexpr");
2838 if (isConstEval()) sl.emplace_back("consteval");
2839 if (isConstInit()) sl.emplace_back("constinit");
2840 if (isAddable()) sl.emplace_back("add");
2841 if (!isUNOProperty() && isRemovable()) sl.emplace_back("remove");
2842 if (isRaisable()) sl.emplace_back("raise");
2843 if (isReadable()) sl.emplace_back("read");
2844 if (isWritable()) sl.emplace_back("write");
2845 if (isFinal()) sl.emplace_back("final");
2846 if (isAbstract()) sl.emplace_back("abstract");
2847 if (isOverride()) sl.emplace_back("override");
2848 if (isInitonly()) sl.emplace_back("initonly");
2849 if (isSealed()) sl.emplace_back("sealed");
2850 if (isNew()) sl.emplace_back("new");
2851 if (isOptional()) sl.emplace_back("optional");
2852 if (isRequired()) sl.emplace_back("required");
2853 if (isExported()) sl.emplace_back("export");
2854
2855 if (isNonAtomic()) sl.emplace_back("nonatomic");
2856 else if (isObjCProperty()) sl.emplace_back("atomic");
2857
2858 // mutual exclusive Objective 2.0 property attributes
2859 if (isAssign()) sl.emplace_back("assign");
2860 else if (isCopy()) sl.emplace_back("copy");
2861 else if (isRetain()) sl.emplace_back("retain");
2862 else if (isWeak()) sl.emplace_back("weak");
2863 else if (lang!=SrcLangExt::CSharp && isStrong()) sl.emplace_back("strong");
2864 else if (isUnretained()) sl.emplace_back("unsafe_unretained");
2865
2866 if (!isObjCMethod())
2867 {
2868 if (protection()==Protection::Protected) sl.emplace_back("protected");
2869 else if (protection()==Protection::Private) sl.emplace_back("private");
2870 else if (protection()==Protection::Package) sl.emplace_back("package");
2871
2872 if (lvirt==Specifier::Virtual) sl.emplace_back("virtual");
2873 else if (lvirt==Specifier::Pure) sl.emplace_back("pure virtual");
2874 if (isSignal()) sl.emplace_back("signal");
2875 if (isSlot()) sl.emplace_back("slot");
2876 if (isDefault()) sl.emplace_back("default");
2877 if (isDelete()) sl.emplace_back("delete");
2878 if (isNoExcept()) sl.emplace_back("noexcept");
2879 if (isAttribute()) sl.emplace_back("attribute");
2880 if (isUNOProperty()) sl.emplace_back("property");
2881 if (isReadonly()) sl.emplace_back("readonly");
2882 if (isBound()) sl.emplace_back("bound");
2883 if (isUNOProperty() && isRemovable()) sl.emplace_back("removable");
2884 if (isConstrained()) sl.emplace_back("constrained");
2885 if (isTransient()) sl.emplace_back("transient");
2886 if (isMaybeVoid()) sl.emplace_back("maybevoid");
2887 if (isMaybeDefault()) sl.emplace_back("maybedefault");
2888 if (isMaybeAmbiguous()) sl.emplace_back("maybeambiguous");
2889 if (isPublished()) sl.emplace_back("published"); // enum
2890 }
2892 {
2893 sl.emplace_back("implementation");
2894 }
2895 }
2896 if (getClassDef() &&
2897 container->definitionType()==TypeClass &&
2898 getClassDef()!=container &&
2899 !isRelated()
2900 )
2901 {
2902 sl.emplace_back("inherited");
2903 }
2904 }
2905 }
2906 else if (isObjCMethod() && isImplementation())
2907 {
2908 sl.emplace_back("implementation");
2909 }
2910
2911 for (const auto &sx : m_qualifiers)
2912 {
2913 bool alreadyAdded = std::find(sl.begin(), sl.end(), sx) != sl.end();
2914 if (!alreadyAdded)
2915 {
2916 sl.push_back(sx);
2917 }
2918 }
2919
2920 return sl;
2921}
2922
2924{
2925 // write call graph
2927 {
2928 DotCallGraph callGraph(this,FALSE);
2929 if (callGraph.isTooBig())
2930 {
2931 warn_uncond("Call graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
2932 qPrint(qualifiedName()), callGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
2933 }
2934 else if (!callGraph.isTrivial())
2935 {
2936 msg("Generating call graph for function %s\n",qPrint(qualifiedName()));
2938 ol.startCallGraph();
2940 ol.endCallGraph(callGraph);
2941 ol.enableAll();
2942 }
2943 }
2944}
2945
2947{
2949 {
2950 DotCallGraph callerGraph(this, TRUE);
2951 if (callerGraph.isTooBig())
2952 {
2953 warn_uncond("Caller graph for '%s' not generated, too many nodes (%d), threshold is %d. Consider increasing DOT_GRAPH_MAX_NODES.\n",
2954 qPrint(qualifiedName()), callerGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
2955 }
2956 else if (!callerGraph.isTrivial())
2957 {
2958 msg("Generating caller graph for function %s\n",qPrint(qualifiedName()));
2960 ol.startCallGraph();
2962 ol.endCallGraph(callerGraph);
2963 ol.enableAll();
2964 }
2965 }
2966}
2967
2969{
2970 const MemberDef *bmd=reimplements();
2971 const ClassDef *bcd=nullptr;
2972 if (bmd && (bcd=bmd->getClassDef()))
2973 {
2974 // write class that contains a member that is reimplemented by this one
2975 if (bcd->isLinkable())
2976 {
2977 return true;
2978 }
2979 }
2980 return false;
2981}
2983{
2984 const MemberDef *bmd=reimplements();
2985 const ClassDef *bcd=nullptr;
2986 if (bmd && (bcd=bmd->getClassDef()))
2987 {
2988 // write class that contains a member that is reimplemented by this one
2989 if (bcd->isLinkable())
2990 {
2991 ol.startParagraph();
2992 QCString reimplFromLine;
2994 {
2995 reimplFromLine = theTranslator->trReimplementedFromList(1);
2996 }
2997 else
2998 {
2999 reimplFromLine = theTranslator->trImplementedFromList(1);
3000 }
3001 int markerPos = reimplFromLine.find("@0");
3002 if (markerPos!=-1) // should always pass this.
3003 {
3004 ol.parseText(reimplFromLine.left(markerPos)); //text left from marker
3005 if (bmd->isLinkable()) // replace marker with link
3006 {
3007 //Definition *bd=bmd->group;
3008 //if (bd==0) bd=bcd;
3010 bmd->anchor(),bcd->displayName());
3011
3012 //ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
3013 // bmd->anchor(),bcd->name());
3014 if ( bmd->isLinkableInProject() )
3015 {
3016 writePageRef(ol,bmd->getOutputFileBase(),bmd->anchor());
3017 }
3018 }
3019 else
3020 {
3022 QCString(),bcd->displayName());
3023 if (bcd->isLinkableInProject()/* && !Config_getBool(PDF_HYPERLINKS)*/ )
3024 {
3025 writePageRef(ol,bcd->getOutputFileBase(),bcd->anchor());
3026 }
3027 }
3028 ol.parseText(reimplFromLine.right(
3029 reimplFromLine.length()-markerPos-2)); // text right from marker
3030
3031 }
3032 else
3033 {
3034 err("translation error: no marker in trReimplementsFromList()\n");
3035 }
3036 ol.endParagraph();
3037 }
3038 }
3039}
3040
3042{
3043 const MemberVector &bml=reimplementedBy();
3044 size_t count=0;
3045 for (const auto &bmd : bml)
3046 {
3047 const ClassDef *bcd=bmd->getClassDef();
3048 // count the members that directly inherit from md and for
3049 // which the member and class are visible in the docs.
3050 if ( bcd && bmd->isLinkable() && bcd->isLinkable() )
3051 {
3052 count++;
3053 }
3054 }
3055 return count;
3056}
3057
3059{
3060 const MemberVector &bml=reimplementedBy();
3061 size_t count = _countReimplementedBy();
3062 if (count>0)
3063 {
3064 auto replaceFunc = [&bml,&ol](size_t entryIndex)
3065 {
3066 size_t cnt=0;
3067 auto it = bml.begin();
3068 // find the entryIndex-th documented entry in the inheritance list.
3069 const MemberDef *bmd = nullptr;
3070 const ClassDef *bcd = nullptr;
3071 while (it!=bml.end())
3072 {
3073 bmd = *it;
3074 bcd = bmd->getClassDef();
3075 if ( bmd->isLinkable() && bcd->isLinkable())
3076 {
3077 if (cnt==entryIndex) break;
3078 cnt++;
3079 }
3080 ++it;
3081 }
3082
3083 if (bcd && bmd) // write link for marker
3084 {
3085 //ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
3086 // bmd->anchor(),bcd->name());
3088 bmd->anchor(),bcd->displayName());
3089
3090 if (bmd->isLinkableInProject() )
3091 {
3092 writePageRef(ol,bmd->getOutputFileBase(),bmd->anchor());
3093 }
3094 }
3095 };
3096
3097 QCString reimplInLine;
3098 if (m_virt==Specifier::Pure || (getClassDef() && getClassDef()->compoundType()==ClassDef::Interface))
3099 {
3100 reimplInLine = theTranslator->trImplementedInList(static_cast<int>(count));
3101 }
3102 else
3103 {
3104 reimplInLine = theTranslator->trReimplementedInList(static_cast<int>(count));
3105 }
3106
3107 // write the list of classes that overwrite this member
3108 ol.startParagraph();
3109 writeMarkerList(ol,
3110 reimplInLine.str(),
3111 count,
3112 replaceFunc);
3113 ol.endParagraph();
3114 }
3115}
3116
3118{
3119 if (getClassDef()) // this should be a member of a class/category
3120 {
3121 //printf("%s: category %s relation %s class=%s categoryOf=%s\n",
3122 // qPrint(name()),
3123 // m_category ? qPrint(m_category->name()) : "<none>",
3124 // m_categoryRelation ? qPrint(m_categoryRelation->name()) : "<none>",
3125 // qPrint(m_classDef->name()),
3126 // m_classDef->categoryOf() ? qPrint(m_classDef->categoryOf()->name()) : "<none>"
3127 // );
3128 QCString text;
3129 QCString ref;
3130 QCString file;
3131 QCString anc;
3132 QCString name;
3133 int i=-1;
3134 if (m_categoryRelation && m_categoryRelation->isLinkable())
3135 {
3136 if (m_category)
3137 {
3138 // this member is in a normal class and implements method categoryRelation from category
3139 // so link to method 'categoryRelation' with 'provided by category 'category' text.
3141 name = m_category->displayName();
3142 }
3143 else if (getClassDef()->categoryOf())
3144 {
3145 // this member is part of a category so link to the corresponding class member of the class we extend
3146 // so link to method 'categoryRelation' with 'extends class 'classDef->categoryOf()'
3147 text = theTranslator->trExtendsClass();
3149 }
3150 i=text.find("@0");
3151 if (i!=-1)
3152 {
3153 const MemberDef *md = m_categoryRelation;
3154 ref = md->getReference();
3155 file = md->getOutputFileBase();
3156 anc = md->anchor();
3157 }
3158 }
3159 if (i!=-1 && !name.isEmpty())
3160 {
3161 ol.startParagraph();
3162 ol.parseText(text.left(i));
3163 ol.writeObjectLink(ref,file,anc,name);
3164 ol.parseText(text.mid(i+2));
3165 ol.endParagraph();
3166 }
3167 }
3168}
3169
3171{
3172 // write the list of examples that use this member
3173 if (hasExamples())
3174 {
3175 ol.startExamples();
3176 ol.startDescForItem();
3178 ol.endDescForItem();
3179 ol.endExamples();
3180 }
3181}
3182
3184{
3185 if (m_typeConstraints.hasParameters())
3186 {
3188 }
3189}
3190
3192 const QCString &cfname,const QCString &ciname,
3193 const QCString &cname) const
3194{
3195 // For enum, we also write the documented enum values
3196 if (isEnumerate())
3197 {
3198 bool first=true;
3199 //printf("** %s: enum values=%zu\n",qPrint(name()),enumFieldList().size());
3200 bool hasInits = false;
3201 if (hasEnumValues())
3202 {
3203 for (const auto &fmd : enumFieldList())
3204 {
3205 if (fmd->isLinkable())
3206 {
3207 if (!fmd->initializer().isEmpty())
3208 {
3209 hasInits = true;
3210 break;
3211 }
3212 }
3213 }
3214 }
3215 for (const auto &fmd : enumFieldList())
3216 {
3217 //printf("Enum %p: isLinkable()=%d\n",fmd,fmd->isLinkable());
3218 if (fmd->isLinkable())
3219 {
3220 if (first)
3221 {
3223 first=false;
3224 }
3225
3226 ol.startDescTableRow();
3227 ol.addIndexItem(fmd->name(),ciname);
3228 ol.addIndexItem(ciname,fmd->name());
3229
3231 ol.startDoxyAnchor(cfname,cname,fmd->anchor(),fmd->name(),fmd->argsString());
3232 ol.addLabel(cfname,fmd->anchor());
3233 ol.docify(fmd->name());
3235 ol.writeString(" ");
3236 ol.enableAll();
3237 ol.endDoxyAnchor(cfname,fmd->anchor());
3238 ol.endDescTableTitle();
3239 if (hasInits)
3240 {
3241 ol.startDescTableInit();
3242 if (!fmd->initializer().isEmpty())
3243 {
3244 QCString initStr = fmd->initializer().stripWhiteSpace();
3245 if (initStr.startsWith("=")) initStr = initStr.mid(1).stripWhiteSpace();
3247 ol.writeString("(");
3248 ol.enableAll();
3249 ol.docify(initStr);
3251 ol.writeString(")");
3252 ol.enableAll();
3253 }
3254 ol.endDescTableInit();
3255 }
3256 ol.startDescTableData();
3257
3258 bool hasBrief = !fmd->briefDescription().isEmpty();
3259 bool hasDetails = !fmd->documentation().isEmpty();
3260
3261 if (hasBrief)
3262 {
3263 ol.generateDoc(fmd->briefFile(),fmd->briefLine(),
3264 getOuterScope()?getOuterScope():container,
3265 fmd,fmd->briefDescription(),TRUE,FALSE,
3266 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
3267 }
3268 if (hasDetails)
3269 {
3270 ol.generateDoc(fmd->docFile(),fmd->docLine(),
3271 getOuterScope()?getOuterScope():container,
3272 fmd,fmd->documentation()+"\n",TRUE,FALSE,
3273 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
3274 }
3275 ol.endDescTableData();
3276 ol.endDescTableRow();
3277 }
3278 }
3279 if (!first)
3280 {
3281 ol.endDescTable();
3282 }
3283 }
3284}
3285
3286// match from the start of the scope until the last marker
3287static const reg::Ex reAnonymous(R"([\w:@]*@\d+)");
3288
3290{
3291 QCString ldef = definition();
3292 QCString title = name();
3293 if (isEnumerate())
3294 {
3295 if (isAnonymous())
3296 {
3297 ldef = title = "anonymous enum";
3298 if (!m_enumBaseType.isEmpty())
3299 {
3300 ldef+=" : "+m_enumBaseType;
3301 }
3302 }
3303 else
3304 {
3305 ldef.prepend("enum ");
3306 if (isSliceLocal())
3307 {
3308 ldef.prepend("local ");
3309 }
3310 }
3311 }
3312 else if (isEnumValue())
3313 {
3314 if (isAnonymous())
3315 {
3316 ldef=ldef.mid(2);
3317 }
3318 }
3319
3320 std::string sdef = ldef.str();
3321 reg::Match match;
3322 if (reg::search(sdef,match,reAnonymous))
3323 {
3324 ldef = match.prefix().str() + " { ... } " + removeAnonymousScopes(match.suffix().str());
3325 }
3326
3327 const ClassDef *cd=getClassDef();
3328 if (cd && cd->isObjectiveC())
3329 {
3330 // strip scope name
3331 int ep = ldef.find("::");
3332 if (ep!=-1)
3333 {
3334 int sp=ldef.findRev(' ',ep);
3335 if (sp!=-1)
3336 {
3337 ldef=ldef.left(sp+1)+ldef.mid(ep+2);
3338 }
3339 }
3340 // strip keywords
3341 int dp = ldef.find(':');
3342 if (dp!=-1)
3343 {
3344 ldef=ldef.left(dp+1);
3345 }
3346 int l=static_cast<int>(ldef.length());
3347 //printf("start >%s<\n",qPrint(ldef));
3348 int i=l-1;
3349 while (i>=0 && (isId(ldef.at(i)) || ldef.at(i)==':')) i--;
3350 while (i>=0 && isspace(static_cast<uint8_t>(ldef.at(i)))) i--;
3351 if (i>0)
3352 {
3353 // insert branches around the type
3354 ldef = "("+ldef.left(i+1)+")"+ldef.mid(i+1);
3355 }
3356 //printf("end >%s< i=%d\n",qPrint(ldef),i);
3357 if (isStatic()) ldef.prepend("+ "); else ldef.prepend("- ");
3358 }
3359 SrcLangExt lang = getLanguage();
3360 QCString sep = getLanguageSpecificSeparator(lang,TRUE);
3361 return substitute(ldef,"::",sep);
3362}
3363
3365{
3366 // only write out the include file if this is not part of a class or file
3367 // definition
3368 bool showGroupedMembInc = Config_getBool(SHOW_GROUPED_MEMB_INC);
3369 const FileDef *fd = getFileDef();
3370 QCString nm;
3371 if (fd) nm = getFileDef()->docName();
3372 if (inGroup && fd && showGroupedMembInc && !nm.isEmpty())
3373 {
3374 ol.startParagraph();
3375 ol.startTypewriter();
3376 SrcLangExt lang = getLanguage();
3377 bool isIDLorJava = lang==SrcLangExt::IDL || lang==SrcLangExt::Java;
3378 if (isIDLorJava)
3379 {
3380 ol.docify("import ");
3381 }
3382 else
3383 {
3384 ol.docify("#include ");
3385 }
3386
3387 if (isIDLorJava) ol.docify("\""); else ol.docify("<");
3388
3389 if (fd->isLinkable())
3390 {
3391 ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),fd->anchor(),nm);
3392 }
3393 else
3394 {
3395 ol.docify(nm);
3396 }
3397
3398 if (isIDLorJava) ol.docify("\""); else ol.docify(">");
3399
3400 ol.endTypewriter();
3401 ol.endParagraph();
3402 }
3403}
3404
3406{
3407 //printf("md=%s initLines=%d init='%s'\n",qPrint(name()),initLines,qPrint(init));
3408 ol.startBold();
3411 else
3413 ol.endBold();
3414 QCString langCorrected = getDefFileExtension();
3416 if (srcLangExt == SrcLangExt::Lex)
3417 {
3418 langCorrected = ".doxygen_lex_c";
3419 srcLangExt = SrcLangExt::Cpp;
3420 }
3421 auto intf = Doxygen::parserManager->getCodeParser(langCorrected);
3422 intf->resetCodeParserState();
3423 auto &codeOL = ol.codeGenerators();
3424 codeOL.startCodeFragment("DoxyCode");
3425 intf->parseCode(codeOL,scopeName,m_initializer,srcLangExt,Config_getBool(STRIP_CODE_COMMENTS),FALSE,QCString(),getFileDef(),
3426 -1,-1,TRUE,this,FALSE,this);
3427 codeOL.endCodeFragment("DoxyCode");
3428}
3429
3430/*! Writes the "detailed documentation" section of this member to
3431 * all active output formats.
3432 */
3434 int memCount,int memTotal,
3435 OutputList &ol,
3436 const QCString &scName,
3437 const Definition *container,
3438 bool inGroup,
3439 bool /* showEnumValues */,
3440 bool showInline
3441 ) const
3442{
3443 // if this member is in a group find the real scope name.
3444 bool hasParameterList = FALSE;
3445
3446 //printf("MemberDefImpl::writeDocumentation(): name='%s' hasDocs='%d' containerType=%d inGroup=%d sectionLinkable=%d\n",
3447 // qPrint(name()),hasDocs,container->definitionType(),inGroup,hasDetailedDescription());
3448
3449 //if ( !hasDocs ) return;
3450 //if (isEnumValue() && !showEnumValues) return;
3451
3452 SrcLangExt lang = getLanguage();
3453 //printf("member=%s lang=%d\n",qPrint(name()),lang);
3454 bool optVhdl = lang==SrcLangExt::VHDL;
3455 QCString sep = getLanguageSpecificSeparator(lang,TRUE);
3456
3457 QCString scopeName = scName;
3458 QCString memAnchor = anchor();
3459 QCString ciname = container->displayName();
3460 const Definition *scopedContainer = container; // see bug 753608
3461 if (container->definitionType()==TypeGroup)
3462 {
3463 if (getClassDef()) { scopeName=getClassDef()->displayName(); scopedContainer=getClassDef(); }
3464 else if (getNamespaceDef()) { scopeName=getNamespaceDef()->displayName(); scopedContainer=getNamespaceDef(); }
3465 else if (getFileDef()) { scopeName=getFileDef()->displayName(); scopedContainer=getFileDef(); }
3466 ciname = (toGroupDef(container))->groupTitle();
3467 }
3468 else if (container->definitionType()==TypeFile && getNamespaceDef() && getNamespaceDef()->isLinkable())
3469 { // member is in a namespace, but is written as part of the file documentation
3470 // as well, so we need to make sure its anchor is unique (it is not really used).
3471 memAnchor.prepend("file_");
3472 }
3473
3474 QCString cname = container->name();
3475 QCString cfname = getOutputFileBase();
3476
3477 // get member name
3478 QCString doxyName=name();
3479 // prepend scope if there is any. TODO: make this optional for C only docs
3480 if (!scopeName.isEmpty())
3481 {
3482 doxyName.prepend(scopeName+sep);
3483 }
3484 QCString doxyArgs=argsString();
3485
3486 QCString ldef = definition();
3487 QCString title = name();
3488 //printf("member '%s' def='%s'\n",qPrint(name()),qPrint(ldef));
3489 if (isEnumerate())
3490 {
3491 if (title.at(0)=='@')
3492 {
3493 ldef = title = "anonymous enum";
3494 if (!m_enumBaseType.isEmpty())
3495 {
3496 ldef+=" : "+m_enumBaseType;
3497 }
3498 }
3499 else
3500 {
3501 if (lang==SrcLangExt::Cpp)
3502 {
3503 if (isEnumStruct()) ldef.prepend("struct ");
3504 else if (isStrong()) ldef.prepend("class ");
3505 }
3506 ldef.prepend("enum ");
3507 if (isSliceLocal())
3508 {
3509 ldef.prepend("local ");
3510 }
3511 }
3512 }
3513 else if (isEnumValue())
3514 {
3515 if (ldef.at(0)=='@')
3516 {
3517 ldef=ldef.mid(2);
3518 }
3519 }
3520 else if (isFunction() && !isObjCMethod())
3521 {
3522 title += "()";
3523 }
3524 if (lang == SrcLangExt::Slice)
3525 {
3526 // Remove the container scope from the member name.
3527 QCString prefix = scName + sep;
3528 int pos = ldef.findRev(prefix.data());
3529 if(pos != -1)
3530 {
3531 ldef.remove(pos, prefix.length());
3532 }
3533 }
3534 ldef.stripPrefix("constexpr ");
3535 ldef.stripPrefix("consteval ");
3536 ldef.stripPrefix("constinit ");
3537
3538 //----------------------------------------
3539
3540 ol.pushGeneratorState();
3541
3542 bool htmlEndLabelTable=FALSE;
3543 StringVector sl = getLabels(scopedContainer);
3544
3545 static const reg::Ex r(R"(@\d+)");
3546 reg::Match match;
3547 std::string sdef = ldef.str();
3548 if ((isVariable() || isTypedef()) && reg::search(sdef,match,r))
3549 {
3550 // find enum type and insert it in the definition
3551 bool found=false;
3552 for (const auto &vmd : *ml)
3553 {
3554 if (vmd->isEnumerate() && match.str()==vmd->name())
3555 {
3556 ol.startDoxyAnchor(cfname, cname, memAnchor, doxyName, doxyArgs);
3557 ol.startMemberDoc(ciname,name(),memAnchor,name(),memCount,memTotal,showInline);
3558 ol.addLabel(cfname, memAnchor);
3559 std::string prefix = match.prefix().str();
3560 std::string suffix = match.suffix().str();
3561 linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,prefix.c_str());
3562 vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef(),getModuleDef());
3563 linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,suffix.c_str());
3564
3565 found=true;
3566 break;
3567 }
3568 }
3569 if (!found) // anonymous compound
3570 {
3571 ClassDef *annoClassDef=getClassDefOfAnonymousType();
3572 QCString typeName;
3573 if (annoClassDef) typeName=annoClassDef->compoundTypeString();
3574 ol.startDoxyAnchor(cfname, cname, memAnchor, doxyName, doxyArgs);
3575 ol.startMemberDoc(ciname,name(),memAnchor,"["+typeName+"]",memCount,memTotal,showInline);
3576 ol.addLabel(cfname, memAnchor);
3577 // search for the last anonymous compound name in the definition
3578
3580 if (reg::search(sdef,match,reAnonymous))
3581 {
3582 std::string prefix = match.prefix().str();
3583 std::string suffix = match.suffix().str();
3584 ol.docify(prefix.c_str());
3585 ol.docify(" { ... } ");
3586 linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,removeAnonymousScopes(suffix.c_str()));
3587 }
3588 else
3589 {
3590 linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,ldef);
3591 }
3592 }
3593 }
3594 else // not an enum value or anonymous compound
3595 {
3596 ol.startDoxyAnchor(cfname, cname, memAnchor, doxyName, doxyArgs);
3597 ol.startMemberDoc(ciname,name(),memAnchor,title,memCount,memTotal,showInline);
3598 ol.addLabel(cfname, memAnchor);
3599
3600 if (!m_metaData.isEmpty() && getLanguage()==SrcLangExt::Slice)
3601 {
3603 ol.docify(m_metaData);
3605 }
3606
3607 const ClassDef *cd=getClassDef();
3608 const NamespaceDef *nd=getNamespaceDef();
3609 bool first=TRUE;
3610 if (!m_defTmpArgLists.empty() && lang==SrcLangExt::Cpp)
3611 // definition has explicit template parameter declarations
3612 {
3613 for (const ArgumentList &tal : m_defTmpArgLists)
3614 {
3615 if (!tal.empty())
3616 {
3617 if (!first) ol.docify(" ");
3619 _writeTemplatePrefix(ol,scopedContainer,tal);
3621 }
3622 }
3623 }
3624 else // definition gets it template parameters from its class
3625 // (since no definition was found)
3626 {
3627 if (cd && lang==SrcLangExt::Cpp && !isTemplateSpecialization())
3628 {
3629 for (const ArgumentList &tal : cd->getTemplateParameterLists())
3630 {
3631 if (!tal.empty())
3632 {
3633 if (!first) ol.docify(" ");
3635 _writeTemplatePrefix(ol,scopedContainer,tal,false);
3637 }
3638 }
3639 }
3640 if (m_tArgList.hasParameters() && lang==SrcLangExt::Cpp) // function template prefix
3641 {
3643 _writeTemplatePrefix(ol,scopedContainer,m_tArgList);
3645 }
3646 }
3647
3648 if (!sl.empty())
3649 {
3650 ol.pushGeneratorState();
3651 ol.disableAll();
3653 ol.writeString("<table class=\"mlabels\">\n");
3654 ol.writeString(" <tr>\n");
3655 ol.writeString(" <td class=\"mlabels-left\">\n");
3656 ol.popGeneratorState();
3657 htmlEndLabelTable=TRUE;
3658 }
3659
3661 if (cd && cd->isObjectiveC())
3662 {
3663 // strip scope name
3664 int ep = ldef.find("::");
3665 if (ep!=-1)
3666 {
3667 int sp=ldef.findRev(' ',ep);
3668 if (sp!=-1)
3669 {
3670 ldef=ldef.left(sp+1)+ldef.mid(ep+2);
3671 } else {
3672 ldef=ldef.mid(ep+2);
3673 }
3674 }
3675 // strip keywords
3676 int dp = ldef.find(':');
3677 if (dp!=-1)
3678 {
3679 ldef=ldef.left(dp+1);
3680 }
3681 int dl=static_cast<int>(ldef.length());
3682 //printf("start >%s<\n",qPrint(ldef));
3683 int i=dl-1;
3684 while (i>=0 && (isId(ldef.at(i)) || ldef.at(i)==':')) i--;
3685 while (i>=0 && isspace(static_cast<uint8_t>(ldef.at(i)))) i--;
3686 if (i>0)
3687 {
3688 // insert branches around the type
3689 ldef="("+ldef.left(i+1)+")"+ldef.mid(i+1);
3690 }
3691 //printf("end >%s< i=%d\n",qPrint(ldef),i);
3692 if (isStatic()) ldef.prepend("+ "); else ldef.prepend("- ");
3693 }
3694
3695 if (optVhdl)
3696 {
3697 hasParameterList=VhdlDocGen::writeVHDLTypeDocumentation(this,scopedContainer,ol);
3698 }
3699 else if (lang==SrcLangExt::Slice)
3700 {
3701 // Eliminate the self-reference.
3702 int pos = ldef.findRev(' ');
3703 if (pos<0) pos=0;
3704 if (pos>0)
3705 {
3706 linkifyText(TextGeneratorOLImpl(ol),
3707 scopedContainer,
3708 getBodyDef(),
3709 this,
3710 ldef.left(pos)
3711 );
3712 }
3713 ol.docify(ldef.mid(pos));
3714 const Definition *scope = cd;
3715 if (scope==nullptr) scope = nd;
3716 hasParameterList=writeDefArgumentList(ol,scope,this);
3717 }
3718 else
3719 {
3720 linkifyText(TextGeneratorOLImpl(ol),
3721 scopedContainer,
3722 getBodyDef(),
3723 this,
3724 substitute(ldef,"::",sep)
3725 );
3726 const Definition *scope = cd;
3727 if (scope==nullptr) scope = nd;
3728 hasParameterList=writeDefArgumentList(ol,scope,this);
3729 }
3730
3731 if (hasOneLineInitializer()) // add initializer
3732 {
3733 if (isTypeAlias())
3734 {
3735 ol.docify(" = ");
3736 QCString init = m_initializer.simplifyWhiteSpace();
3737 linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,init);
3738 }
3739 else if (!isDefine())
3740 {
3741 ol.docify(" ");
3742 QCString init = m_initializer.simplifyWhiteSpace();
3743 linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,init);
3744 }
3745 else
3746 {
3748 linkifyText(TextGeneratorOLImpl(ol),scopedContainer,getBodyDef(),this,m_initializer);
3749 }
3750 }
3751 if (!excpString().isEmpty()) // add exception list
3752 {
3753 writeExceptionList(ol,cd,this);
3754 hasParameterList=true; // call endParameterList below
3755 }
3756 }
3757
3758 ol.pushGeneratorState();
3760 if (!sl.empty())
3761 {
3762 ol.startLabels();
3763 size_t count=0;
3764 for (const auto &s : sl)
3765 {
3766 count++;
3767 ol.writeLabel(s.c_str(),count==sl.size());
3768 }
3769 ol.endLabels();
3770 }
3771 ol.popGeneratorState();
3772
3773 if (hasParameterList)
3774 {
3775 ol.endParameterList();
3776 ol.endMemberDoc(TRUE);
3777 }
3778 else
3779 {
3780 ol.endMemberDocName();
3781 ol.endMemberDoc(FALSE);
3782 }
3783
3784 // for HTML write the labels here
3785 ol.pushGeneratorState();
3786 ol.disableAll();
3788 if (htmlEndLabelTable)
3789 {
3790 ol.writeString(" </td>\n");
3791 ol.writeString(" <td class=\"mlabels-right\">\n");
3792 ol.startLabels();
3793 size_t count=0;
3794 for (const auto &s : sl)
3795 {
3796 count++;
3797 ol.writeLabel(s.c_str(),count==sl.size());
3798 }
3799 ol.endLabels();
3800 ol.writeString(" </td>\n");
3801 ol.writeString(" </tr>\n");
3802 ol.writeString("</table>\n");
3803 }
3804 ol.writeString("</div>");
3805 ol.popGeneratorState();
3806
3807
3808 ol.endDoxyAnchor(cfname,memAnchor);
3809 ol.startIndent();
3810
3811 _writeGroupInclude(ol,inGroup);
3812
3813 /* write multi-line initializer (if any) */
3815
3816 /* write brief description */
3817 QCString brief = briefDescription();
3818 if (!brief.isEmpty() &&
3819 (Config_getBool(REPEAT_BRIEF) ||
3820 !Config_getBool(BRIEF_MEMBER_DESC)
3821 )
3822 )
3823 {
3824 ol.startParagraph();
3826 scopedContainer,this,
3827 brief,FALSE,FALSE,
3828 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
3829 ol.endParagraph();
3830 }
3831
3832 /* write detailed description */
3833 QCString detailed = documentation();
3834 if (!detailed.isEmpty() ||
3835 !inbodyDocumentation().isEmpty())
3836 {
3837 // write vhdl inline code with or without option INLINE_SOURCE
3838 if (optVhdl && VhdlDocGen::isMisc(this))
3839 {
3840 VhdlDocGen::writeSource(this,ol,cname);
3841 return;
3842 }
3843 else
3844 {
3845 ol.generateDoc(docFile(),docLine(),scopedContainer,this,detailed+"\n",TRUE,FALSE,
3846 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
3847 }
3848
3849 if (!inbodyDocumentation().isEmpty())
3850 {
3852 scopedContainer,this,
3854 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
3855 }
3856 }
3857 else if (!brief.isEmpty() && (Config_getBool(REPEAT_BRIEF) || !Config_getBool(BRIEF_MEMBER_DESC)))
3858 {
3859 if (!inbodyDocumentation().isEmpty())
3860 {
3861 ol.generateDoc(inbodyFile(),inbodyLine(),scopedContainer,this,inbodyDocumentation()+"\n",TRUE,FALSE,
3862 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
3863 }
3864 }
3865
3866
3867 //printf("***** defArgList=%p name=%s docs=%s hasDocs=%d\n",
3868 // defArgList,
3869 // defArgList?defArgList->hasDocumentation():-1);
3870 const ArgumentList &docArgList = m_templateMaster ?
3871 m_templateMaster->argumentList() :
3873 ol.generateDoc(
3874 docFile(),docLine(),
3875 scopedContainer,
3876 this, // memberDef
3877 inlineArgListToDoc(docArgList), // docStr
3878 TRUE, // indexWords
3879 FALSE, // isExample
3880 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
3881 );
3882
3883 _writeEnumValues(ol,scopedContainer,cfname,ciname,cname);
3887 _writeExamples(ol);
3889 QCString scopeStr = getScopeString();
3890 writeSourceDef(ol);
3891 writeInlineCode(ol,scopeStr);
3892 if (hasReferencesRelation()) writeSourceRefs(ol,scopeStr);
3893 if (hasReferencedByRelation()) writeSourceReffedBy(ol,scopeStr);
3894 _writeCallGraph(ol);
3896
3897 ol.endIndent();
3898
3899 // enable LaTeX again
3900 //if (Config_getBool(EXTRACT_ALL) && !hasDocs) ol.enable(OutputType::Latex);
3901 ol.popGeneratorState();
3902
3904}
3905
3906// strip scope and field name from the type
3907// example: "struct N<K::J>::S.v.c" will become "struct v"
3909{
3911 if (ts.endsWith("::")) ts = ts.left(ts.length()-2);
3912 static const reg::Ex re1(R"(\a\w*::)"); // non-template version
3913 static const reg::Ex re2(R"(\a\w*<[^>]*>::)"); // template version
3914 reg::Match match;
3915 std::string t = ts.str();
3916 while (reg::search(t,match,re2) || reg::search(t,match,re1))
3917 {
3918 t = match.prefix().str() + match.suffix().str(); // remove the matched part
3919 }
3920 //printf("simplifyTypeForTable(%s)->%s\n",qPrint(s),t.c_str());
3921 return QCString(t);
3922}
3923
3925{
3926 QCString type = m_accessorType;
3927 if (type.isEmpty())
3928 {
3929 type = m_type;
3930 }
3931
3932 if (isTypedef() && getLanguage() != SrcLangExt::Slice) type.prepend("typedef ");
3933 return simplifyTypeForTable(type);
3934}
3935
3937{
3938 Definition *scope = getOuterScope();
3939 QCString doxyName = name();
3940 QCString doxyArgs = argsString();
3941 QCString memAnchor = anchor();
3942 QCString cfname = getOutputFileBase();
3943 QCString cname;
3944 if (scope) cname = scope->name();
3945 if (doxyName.at(0)=='@')
3946 {
3947 doxyName="__unnamed__";
3948 }
3949
3950 ClassDef *cd = m_accessorClass;
3951 //printf("===> %s::anonymous: %s\n",qPrint(name()),cd?qPrint(cd->name()):"<none>");
3952
3953 if (container && container->definitionType()==Definition::TypeClass &&
3954 !(toClassDef(container))->isJavaEnum())
3955 {
3957 ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
3958 ol.addLabel(cfname,memAnchor);
3959
3960 QCString ts = fieldType();
3961
3962 if (isFunctionPtr())
3963 ts = m_type + m_args;
3964
3965 if (cd) // cd points to an anonymous struct pointed to by this member
3966 // so we add a link to it from the type column.
3967 {
3968 int i=0;
3969 const char *prefixes[] = { "struct ","union ","class ", nullptr };
3970 const char **p = prefixes;
3971 while (*p)
3972 {
3973 int l=qstrlen(*p);
3974 if (ts.left(l)==*p)
3975 {
3976 ol.writeString(*p);
3977 i=l;
3978 }
3979 p++;
3980 }
3982 cd->getOutputFileBase(),
3983 cd->anchor(),ts.mid(i));
3984 }
3985 else // use standard auto linking
3986 {
3987 linkifyText(TextGeneratorOLImpl(ol), // out
3988 scope, // scope
3989 getBodyDef(), // fileScope
3990 this, // self
3991 ts // text
3992 );
3993 }
3994 ol.endDoxyAnchor(cfname,memAnchor);
3996 }
3997
3999 ol.docify(doxyName);
4000 if (isVariable() && !argsString().isEmpty() && !isObjCMethod() && !isFunctionPtr())
4001 {
4002 linkifyText(TextGeneratorOLImpl(ol),getOuterScope(),getBodyDef(),this,argsString());
4003 }
4004 if (!m_bitfields.isEmpty()) // add bitfields
4005 {
4006 linkifyText(TextGeneratorOLImpl(ol),getOuterScope(),getBodyDef(),this,m_bitfields);
4007 }
4008 if (hasOneLineInitializer() && !isDefine())
4009 {
4010 ol.writeString(" ");
4011 linkifyText(TextGeneratorOLImpl(ol),getOuterScope(),getBodyDef(),this,m_initializer.simplifyWhiteSpace());
4012 }
4014
4016
4017 QCString brief = briefDescription();
4018 QCString detailed = documentation();
4019
4020 /* write brief description */
4021 if (!brief.isEmpty())
4022 {
4024 getOuterScope()?getOuterScope():container,this,
4025 brief,FALSE,FALSE,
4026 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
4027 }
4028
4029 /* write detailed description */
4030 if (!detailed.isEmpty())
4031 {
4032 if (!brief.isEmpty())
4033 {
4035 ol.lineBreak();
4037 }
4039 getOuterScope()?getOuterScope():container,this,
4040 detailed+"\n",FALSE,FALSE,
4041 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
4042
4043 }
4044
4045 ol.endInlineMemberDoc();
4046}
4047
4049{
4050 switch (m_mtype)
4051 {
4052 case MemberType::Define: return "macro definition";
4053 case MemberType::Function: return "function";
4054 case MemberType::Variable: return "variable";
4055 case MemberType::Typedef: return "typedef";
4056 case MemberType::Enumeration: return "enumeration";
4057 case MemberType::EnumValue: return "enumvalue";
4058 case MemberType::Signal: return "signal";
4059 case MemberType::Slot: return "slot";
4060 case MemberType::Friend: return "friend";
4061 case MemberType::DCOP: return "dcop";
4062 case MemberType::Property: return "property";
4063 case MemberType::Event: return "event";
4064 case MemberType::Interface: return "interface";
4065 case MemberType::Service: return "service";
4066 case MemberType::Sequence: return "sequence";
4067 case MemberType::Dictionary: return "dictionary";
4068 default: return "unknown";
4069 }
4070}
4071
4073{
4074 /*
4075 * Removed bug_303020:
4076 * if (m_memberGroup) return;
4077 */
4078 const ClassDef *cd = getClassDef();
4079 const NamespaceDef *nd = getNamespaceDef();
4080 const FileDef *fd = getFileDef();
4081 const GroupDef *gd = getGroupDef();
4082 const Definition *d=nullptr;
4083 QCString t;
4084 if (cd)
4085 {
4086 t=cd->compoundTypeString();
4087 d=cd;
4088 }
4089 else if (nd)
4090 {
4091 t=nd->compoundTypeString();
4092 d=nd;
4093 }
4094 else if (gd)
4095 {
4096 t="group";
4097 d=gd;
4098 }
4099 else
4100 {
4101 t="file";
4102 d=fd;
4103 }
4104 bool extractAll = Config_getBool(EXTRACT_ALL);
4105
4106 //printf("%s:warnIfUndoc: hasUserDocs=%d isFriendClass=%d protection=%d isRef=%d isDel=%d\n",
4107 // qPrint(name()),
4108 // hasUserDocumentation(),isFriendClass(),protectionLevelVisible(m_prot),isReference(),isDeleted());
4109 if ((!hasUserDocumentation() && !extractAll) &&
4110 !isFriendClass() &&
4111 name().find('@')==-1 && d && d->name().find('@')==-1 &&
4114 !isReference() && !isDeleted()
4115 )
4116 {
4117 SrcLangExt lang = getLanguage();
4118 QCString sep = getLanguageSpecificSeparator(lang,TRUE);
4119 warn_undoc(getDefFileName(),getDefLine(),"Member %s%s (%s) of %s %s is not documented.",
4121 qPrint(substitute(d->name(),"::",sep)));
4122 }
4123 else if (!hasDetailedDescription())
4124 {
4126 }
4127
4128 // if it is an enum, we check that its members are documented
4129 if (!extractAll && isEnumerate() && Config_getBool(WARN_IF_UNDOC_ENUM_VAL))
4130 {
4131 for (const auto &fmd : enumFieldList())
4132 {
4133 if (!fmd->isLinkableInProject())
4134 {
4135 SrcLangExt lang = getLanguage();
4136 QCString sep = getLanguageSpecificSeparator(lang,TRUE);
4137 warn(fmd->getDefFileName(),fmd->getDefLine(), "Documentation for enum member '%s%s%s' is missing.",
4138 qPrint(qualifiedName()),qPrint(sep),qPrint(fmd->name()));
4139 }
4140 }
4141 }
4142}
4143
4145{
4146 bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
4147 bool extractStatic = Config_getBool(EXTRACT_STATIC);
4148 return (!isAnonymous() &&
4149 (!hideUndocMembers || hasDocumentation()) &&
4150 (!isStatic() || extractStatic) &&
4151 isLinkable()
4152 );
4153}
4154
4156{
4157 QCString ret = trailRet;
4158
4159 ret = ret.stripWhiteSpace();
4160 if (ret.startsWith("->"))
4161 {
4162 ret = ret.mid(2).stripWhiteSpace();
4163 return ret;
4164 }
4165 return trailRet;
4166}
4167
4169
4170void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturnCommand) const
4171{
4172 bool isPython = getLanguage()==SrcLangExt::Python;
4173
4174 // this function is called while parsing the documentation. A member can have multiple
4175 // documentation blocks, which could be handled by multiple threads, hence this guard.
4176 std::lock_guard<std::mutex> lock(g_detectUndocumentedParamsMutex);
4177
4178 if (!m_hasDocumentedParams && hasParamCommand)
4179 {
4180 //printf("%s:hasDocumentedParams=TRUE;\n",qPrint(name()));
4181 m_hasDocumentedParams = true;
4182 }
4183 else if (!m_hasDocumentedParams)
4184 {
4185 const ArgumentList &al = argumentList();
4186 const ArgumentList &declAl = declArgumentList();
4187 bool allDoc=TRUE; // no parameter => all parameters are documented
4188 if ( // member has parameters
4189 al.hasParameters() // with at least one parameter (that is not void)
4190 )
4191 {
4192 // see if all parameters have documentation
4193 for (auto it = al.begin(); it!=al.end() && allDoc; ++it)
4194 {
4195 Argument a = *it;
4196 if (!a.name.isEmpty() && a.type!="void" &&
4197 !(isPython && (a.name=="self" || a.name=="cls"))
4198 )
4199 {
4200 allDoc = !a.docs.isEmpty();
4201 }
4202 //printf("a->type=%s a->name=%s doc=%s\n",
4203 // qPrint(a->type),qPrint(a->name),qPrint(a->docs));
4204 }
4205 if (!allDoc && declAl.empty()) // try declaration arguments as well
4206 {
4207 allDoc=true;
4208 for (auto it = al.begin(); it!=al.end() && allDoc; ++it)
4209 {
4210 Argument a = *it;
4211 if (!a.name.isEmpty() && a.type!="void" &&
4212 !(isPython && (a.name=="self" || a.name=="cls"))
4213 )
4214 {
4215 allDoc = !a.docs.isEmpty();
4216 }
4217 //printf("a->name=%s doc=%s\n",qPrint(a->name),qPrint(a->docs));
4218 }
4219 }
4220 }
4221 if (allDoc)
4222 {
4223 //printf("%s:hasDocumentedParams=TRUE;\n",qPrint(name()));
4224 m_hasDocumentedParams = true;
4225 }
4226 }
4227
4228 //printf("Member %s hasDocumentedReturnType=%d hasReturnCommand=%d\n",
4229 // qPrint(name()),m_hasDocumentedReturnType,hasReturnCommand);
4231}
4232
4234{
4235 QCString returnType = typeString();
4236 bool isFortran = getLanguage()==SrcLangExt::Fortran;
4237 bool isFortranSubroutine = isFortran && returnType.find("subroutine")!=-1;
4238
4239 bool isVoidReturn = returnType=="void" || returnType.endsWith(" void");
4240 if (!isVoidReturn && (returnType=="auto" || returnType.endsWith(" auto")))
4241 {
4242 const ArgumentList &defArgList=isDocsForDefinition() ? argumentList() : declArgumentList();
4243 if (!defArgList.trailingReturnType().isEmpty())
4244 {
4245 QCString strippedTrailingReturn = stripTrailingReturn(defArgList.trailingReturnType());
4246 isVoidReturn = (strippedTrailingReturn=="void") || (strippedTrailingReturn.endsWith(" void"));
4247 }
4248 }
4249 if (!Config_getBool(EXTRACT_ALL) &&
4250 Config_getBool(WARN_IF_UNDOCUMENTED) &&
4251 Config_getBool(WARN_NO_PARAMDOC) &&
4252 isFunction() &&
4253 !isDeleted() &&
4254 !isReference() &&
4256 {
4258 {
4260 "parameters of member %s are not documented",
4262 }
4264 hasDocumentation() && !returnType.isEmpty() &&
4265 !( // not one of the cases where nothing is returned
4266 isVoidReturn || // void return type
4267 isFortranSubroutine || // fortran subroutine
4268 isConstructor() || // a constructor
4269 isDestructor() // or destructor
4270 )
4271 )
4272 {
4274 "return type of member %s is not documented",
4276 }
4277 }
4278 if (Config_getBool(WARN_IF_DOC_ERROR) &&
4280 (isVoidReturn || // void return type
4281 isFortranSubroutine || // fortran subroutine
4282 isConstructor() || // a constructor
4283 isDestructor())) // or destructor
4284 {
4285 warn_doc_error(docFile(),docLine(),"found documented return type for %s that does not return anything",
4287 }
4288}
4289
4291{
4292 ClassDef *fcd=nullptr;
4293 QCString baseName=name();
4294 int i=baseName.find('<');
4295 if (i!=-1) baseName=baseName.left(i);
4296 return (isFriendClass() &&
4297 (fcd=getClass(baseName)) && fcd->isLinkable());
4298}
4299
4301{
4302 return m_defArgList.isDeleted();
4303}
4304
4306{
4308 (m_mtype==MemberType::Enumeration && m_docEnumValues) || // has enum values
4309 (m_defArgList.hasDocumentation()); // has doc arguments
4310}
4311
4312
4317
4319{
4320 QCString result;
4321 if (isStrong()) result=name();
4322 else if (getClassDef()) result=getClassDef()->displayName();
4323 else if (getNamespaceDef()) result=getNamespaceDef()->displayName();
4324 return result;
4325}
4326
4328{
4329 QCString memAnchor = name();
4330 if (!m_args.isEmpty()) memAnchor+=m_args;
4331 if (m_memSpec.isAlias()) // this is for backward compatibility
4332 {
4333 memAnchor.prepend(" = "+m_initializer);
4334 }
4335 memAnchor.prepend(definition()); // actually the method name is now included
4336 // twice, which is silly, but we keep it this way for backward
4337 // compatibility.
4338
4339
4340 // include number of template arguments as well,
4341 // to distinguish between two template
4342 // specializations that only differ in the template parameters.
4343 if (m_tArgList.hasParameters())
4344 {
4345 char buf[20];
4346 qsnprintf(buf,20,"%d:",static_cast<int>(m_tArgList.size()));
4347 buf[19]='\0';
4348 memAnchor.prepend(buf);
4349 }
4350 if (!m_requiresClause.isEmpty())
4351 {
4352 memAnchor+=" "+m_requiresClause;
4353 }
4354
4355 // convert to md5 hash
4356 uint8_t md5_sig[16];
4357 char sigStr[33];
4358 MD5Buffer(memAnchor.data(),static_cast<unsigned int>(memAnchor.length()),md5_sig);
4359 MD5SigToString(md5_sig,sigStr);
4360 m_anc = QCString("a")+sigStr;
4361}
4362
4364 const QCString &fileName,int startLine,
4365 bool hasDocs,MemberDef *member)
4366{
4367 //printf("%s MemberDefImpl::setGroupDef(%s)\n",qPrint(name()),qPrint(gd->name()));
4368 m_group=gd;
4369 m_grouppri=pri;
4370 m_groupFileName=fileName;
4371 m_groupStartLine=startLine;
4372 m_groupHasDocs=hasDocs;
4373 m_groupMember=member;
4375}
4376
4391
4399
4401{
4402 m_nspace=nd;
4403 setOuterScope(nd);
4404}
4405
4407 const ArgumentList &formalArgs,const std::unique_ptr<ArgumentList> &actualArgs) const
4408{
4409 //printf(" Member %s %s %s\n",qPrint(typeString()),qPrint(name()),qPrint(argsString()));
4410 std::unique_ptr<ArgumentList> actualArgList = std::make_unique<ArgumentList>(m_defArgList);
4411 if (!m_defArgList.empty())
4412 {
4413 // replace formal arguments with actuals
4414 for (Argument &arg : *actualArgList)
4415 {
4416 arg.type = substituteTemplateArgumentsInString(arg.type,formalArgs,actualArgs.get());
4417 }
4418 actualArgList->setTrailingReturnType(
4419 substituteTemplateArgumentsInString(actualArgList->trailingReturnType(),formalArgs,actualArgs.get()));
4420 }
4421
4422 QCString methodName=name();
4423 if (methodName.startsWith("operator ")) // conversion operator
4424 {
4425 methodName=substituteTemplateArgumentsInString(methodName,formalArgs,actualArgs.get());
4426 }
4427
4428 auto imd = createMemberDef(
4430 substituteTemplateArgumentsInString(m_type,formalArgs,actualArgs.get()),
4431 methodName,
4432 substituteTemplateArgumentsInString(m_args,formalArgs,actualArgs.get()),
4435 ArgumentList(), ArgumentList(), ""
4436 );
4437 auto mmd = toMemberDefMutable(imd.get());
4438 mmd->moveArgumentList(std::move(actualArgList));
4439 mmd->setDefinition(substituteTemplateArgumentsInString(m_def,formalArgs,actualArgs.get()));
4440 mmd->setBodyDef(getBodyDef());
4441 mmd->setBodySegment(getDefLine(),getStartBodyLine(),getEndBodyLine());
4442 mmd->setFormalTemplateArguments(formalArgs);
4443
4444 // TODO: init other member variables (if needed).
4445 // TODO: reimplemented info
4446 return imd;
4447}
4448
4450{
4451 //printf("%s: init=%s, initLines=%d maxInitLines=%d userInitLines=%d\n",
4452 // qPrint(name()),qPrint(m_initializer),m_initLines,
4453 // m_maxInitLines,m_userInitLines);
4454 bool isFuncLikeMacro = m_mtype==MemberType::Define && m_defArgList.hasParameters();
4455 return !m_initializer.isEmpty() && m_initLines==0 && // one line initializer
4456 !isFuncLikeMacro &&
4457 ((m_maxInitLines>0 && m_userInitLines==-1) || m_userInitLines>0); // enabled by default or explicitly
4458}
4459
4461{
4462 //printf("initLines=%d userInitLines=%d maxInitLines=%d\n",
4463 // initLines,userInitLines,maxInitLines);
4464 bool isFuncLikeMacro = m_mtype==MemberType::Define && m_defArgList.hasParameters();
4465 return (m_initLines>0 || (!m_initializer.isEmpty() && isFuncLikeMacro)) &&
4466 ((m_initLines<m_maxInitLines && m_userInitLines==-1) // implicitly enabled
4467 || m_initLines<m_userInitLines // explicitly enabled
4468 );
4469}
4470
4472{
4474 int l=static_cast<int>(m_initializer.length());
4475 int p=l-1;
4476 while (p>=0 && isspace(static_cast<uint8_t>(m_initializer.at(p)))) p--;
4477 m_initializer=m_initializer.left(p+1);
4478 m_initLines=m_initializer.contains('\n');
4479 //printf("%s::setInitializer(%s)\n",qPrint(name()),qPrint(m_initializer));
4480}
4481
4483{
4484 bool optimizeOutputForC = Config_getBool(OPTIMIZE_OUTPUT_FOR_C);
4485 //bool hideScopeNames = Config_getBool(HIDE_SCOPE_NAMES);
4486 //bool optimizeOutputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
4487 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4488 SrcLangExt lang = getLanguage();
4489 if (!isLinkableInProject()) return;
4490 QCString memLabel;
4491 if (optimizeOutputForC)
4492 {
4493 memLabel=theTranslator->trGlobal(TRUE,TRUE);
4494 }
4495 else if (lang==SrcLangExt::Fortran)
4496 {
4498 }
4499 else
4500 {
4501 memLabel=theTranslator->trMember(TRUE,TRUE);
4502 }
4503 QCString memName = name();
4504 Definition *pd=getOuterScope();
4505 QCString pdName = pd->definitionType()==Definition::TypeClass ?
4506 (toClassDef(pd))->displayName() : pd->name();
4507 QCString sep = getLanguageSpecificSeparator(lang,TRUE);
4508 QCString memArgs;
4509 if (!isRelated()
4510 /* && commented out as a result of bug 597016
4511 (
4512 (!hideScopeNames && // there is a scope
4513 pd && pd!=Doxygen::globalScope) // and we can show it
4514 ||
4515 (pd=getClassDef()) // it's a class so we
4516 // show the scope anyway
4517 )
4518 */
4519 )
4520 {
4521 if (isObjCMethod())
4522 {
4523 memName = "[" + pd->name() + " " + name() + "]";
4524 }
4525 else
4526 {
4527 if (pd!=Doxygen::globalScope) memName.prepend(pdName+sep);
4528 memArgs = argsString();
4529 }
4530 }
4531 const RefItemVector &xrefItems = xrefListItems();
4532 if (sep!="::")
4533 {
4534 memName = substitute(memName,"::",sep);
4535 }
4536 addRefItem(xrefItems,
4537 qualifiedName()+argsString(), // argsString is needed for overloaded functions (see bug 609624)
4538 memLabel,
4539 getOutputFileBase()+"#"+anchor(),memName,memArgs,pd);
4540}
4541
4543{
4544 auto it = m_sectionMap.find(container);
4545 return it!=m_sectionMap.end() ? it->second : nullptr;
4546}
4547
4549{
4550 //printf("MemberDefImpl::setSectionList(%s,%p) name=%s\n",qPrint(d->name()),sl,qPrint(name()));
4551 m_sectionMap.emplace(container,sl);
4552}
4553
4555{
4556 if (count>25)
4557 {
4559 "Internal inconsistency: recursion detected in overload relation for member %s!"
4560 ,qPrint(name())
4561 );
4562 return Specifier::Normal;
4563 }
4564 Specifier v = m_virt;
4565 const MemberDef *rmd = reimplements();
4566 while (rmd && v==Specifier::Normal)
4567 {
4569 rmd = rmd->reimplements();
4570 }
4571 return v;
4572}
4573
4574void MemberDefImpl::writeTagFile(TextStream &tagFile,bool useQualifiedName,bool showNamespaceMembers) const
4575{
4576 if (!isLinkableInProject()) return;
4577 if (!showNamespaceMembers && getNamespaceDef()) return;
4578 tagFile << " <member kind=\"";
4579 switch (m_mtype)
4580 {
4581 case MemberType::Define: tagFile << "define"; break;
4582 case MemberType::EnumValue: tagFile << "enumvalue"; break;
4583 case MemberType::Property: tagFile << "property"; break;
4584 case MemberType::Event: tagFile << "event"; break;
4585 case MemberType::Variable: tagFile << "variable"; break;
4586 case MemberType::Typedef: tagFile << "typedef"; break;
4587 case MemberType::Enumeration: tagFile << "enumeration"; break;
4588 case MemberType::Function: tagFile << "function"; break;
4589 case MemberType::Signal: tagFile << "signal"; break;
4590 case MemberType::Friend: tagFile << "friend"; break;
4591 case MemberType::DCOP: tagFile << "dcop"; break;
4592 case MemberType::Slot: tagFile << "slot"; break;
4593 case MemberType::Interface: tagFile << "interface"; break;
4594 case MemberType::Service: tagFile << "service"; break;
4595 case MemberType::Sequence: tagFile << "sequence"; break;
4596 case MemberType::Dictionary: tagFile << "dictionary"; break;
4597 }
4599 {
4600 tagFile << "\" protection=\"";
4601 if (m_prot==Protection::Protected) tagFile << "protected";
4602 else if (m_prot==Protection::Package) tagFile << "package";
4603 else /* Private */ tagFile << "private";
4604 }
4606 {
4607 tagFile << "\" virtualness=\"";
4608 if (m_virt==Specifier::Virtual) tagFile << "virtual";
4609 else /* Pure */ tagFile << "pure";
4610 }
4611 if (isStatic())
4612 {
4613 tagFile << "\" static=\"yes";
4614 }
4615 tagFile << "\">\n";
4616 if (typeString()!=QCString("@"))
4617 {
4618 tagFile << " <type>" << convertToXML(typeString()) << "</type>\n";
4619 }
4620 QCString fn = getOutputFileBase();
4622 tagFile << " <name>" << convertToXML(useQualifiedName ? qualifiedName() : name()) << "</name>\n";
4623 tagFile << " <anchorfile>" << convertToXML(fn) << "</anchorfile>\n";
4624 tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>\n";
4625 QCString idStr = id();
4626 if (!idStr.isEmpty())
4627 {
4628 tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
4629 }
4630 tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>\n";
4631 if (isStrong())
4632 {
4633 for (const auto &fmd : m_enumFields)
4634 {
4635 if (!fmd->isReference())
4636 {
4637 tagFile << " <enumvalue file=\"" << convertToXML(fn);
4638 tagFile << "\" anchor=\"" << convertToXML(fmd->anchor());
4639 idStr = fmd->id();
4640 if (!idStr.isEmpty())
4641 {
4642 tagFile << "\" clangid=\"" << convertToXML(idStr);
4643 }
4644 tagFile << "\">" << convertToXML(fmd->name()) << "</enumvalue>\n";
4645 }
4646 }
4647 }
4648 writeDocAnchorsToTagFile(tagFile);
4649 tagFile << " </member>\n";
4650}
4651
4653{
4654 m_isConstructorCached=1; // FALSE
4655 if (getClassDef())
4656 {
4657 if (m_isDMember) // for D
4658 {
4659 m_isConstructorCached = name()=="this" ? 2 : 1;
4660 return;
4661 }
4662 else if (getLanguage()==SrcLangExt::PHP) // for PHP
4663 {
4664 m_isConstructorCached = name()=="__construct" ? 2 : 1;
4665 return;
4666 }
4667 else if (name()=="__init__" &&
4668 getLanguage()==SrcLangExt::Python) // for Python
4669 {
4670 m_isConstructorCached = 2; // TRUE
4671 return;
4672 }
4673 else // for other languages
4674 {
4675 QCString locName = getClassDef()->localName();
4676 int i=locName.find('<');
4677 if (i==-1) // not a template class
4678 {
4679 m_isConstructorCached = name()==locName ? 2 : 1;
4680 }
4681 else
4682 {
4683 m_isConstructorCached = name()==locName.left(i) ? 2 : 1;
4684 }
4685 return;
4686 }
4687 }
4688}
4689
4691{
4692 if (m_isConstructorCached==0)
4693 {
4694 MemberDefImpl *that = const_cast<MemberDefImpl*>(this);
4695 that->_computeIsConstructor();
4696 }
4698 return m_isConstructorCached==2;
4699
4700}
4701
4703{
4704 bool isDestructor = false;
4705 if (m_isDMember) // for D
4706 {
4707 isDestructor = name()=="~this";
4708 }
4709 else if (getLanguage()==SrcLangExt::PHP) // for PHP
4710 {
4711 isDestructor = name()=="__destruct";
4712 }
4713 else if (name()=="__del__" &&
4714 getLanguage()==SrcLangExt::Python) // for Python
4715 {
4716 isDestructor = true;
4717 }
4718 else if (getLanguage()==SrcLangExt::Fortran) // for Fortran
4719 {
4720 isDestructor = typeString()=="final";
4721 }
4722 else // other languages
4723 {
4724 isDestructor =
4725 (name().find('~')!=-1 || name().find('!')!=-1) // The ! is for C++/CLI
4726 && name().find("operator")==-1;
4727 }
4729}
4730
4732{
4733 if (m_isDestructorCached==0)
4734 {
4735 MemberDefImpl *that=const_cast<MemberDefImpl*>(this);
4736 that->_computeIsDestructor();
4737 }
4739 return m_isDestructorCached==2;
4740}
4741
4743 const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,const ModuleDef *mod) const
4744{
4745 int enumMemCount=0;
4746
4747 uint32_t numVisibleEnumValues=0;
4748 for (const auto &fmd : m_enumFields)
4749 {
4750 if (fmd->isBriefSectionVisible()) numVisibleEnumValues++;
4751 }
4752 if (numVisibleEnumValues==0 && !isBriefSectionVisible())
4753 {
4754 return;
4755 }
4756
4757 QCString n = name();
4758 int i=n.findRev("::");
4759 if (i!=-1) n=n.right(n.length()-i-2); // strip scope (TODO: is this needed?)
4760 if (n[0]!='@') // not an anonymous enum
4761 {
4763 {
4764 //_writeTagData(compoundType);
4765 writeLink(typeDecl,cd,nd,fd,gd,mod);
4766 }
4767 else
4768 {
4769 typeDecl.startBold();
4770 typeDecl.docify(n);
4771 typeDecl.endBold();
4772 }
4773 typeDecl.writeChar(' ');
4774 }
4775 if (!m_enumBaseType.isEmpty())
4776 {
4777 typeDecl.writeChar(':');
4778 typeDecl.writeChar(' ');
4779 typeDecl.docify(m_enumBaseType);
4780 typeDecl.writeChar(' ');
4781 }
4782
4783 uint32_t enumValuesPerLine = static_cast<uint32_t>(Config_getInt(ENUM_VALUES_PER_LINE));
4784 if (numVisibleEnumValues>0 && enumValuesPerLine>0)
4785 {
4786 typeDecl.docify("{ ");
4787
4788 auto it = m_enumFields.begin();
4789 if (it!=m_enumFields.end())
4790 {
4791 const MemberDef *fmd=*it;
4792 bool fmdVisible = fmd->isBriefSectionVisible();
4793 bool first=true;
4794 while (fmd)
4795 {
4796 if (fmdVisible)
4797 {
4798 if (!first)
4799 {
4800 typeDecl.writeString(", ");
4801 }
4802 /* in html we start a new line after a number of items */
4803 if (numVisibleEnumValues>enumValuesPerLine
4804 && (enumMemCount%enumValuesPerLine)==0
4805 )
4806 {
4807 typeDecl.pushGeneratorState();
4809 typeDecl.enable(OutputType::Latex);
4810 typeDecl.enable(OutputType::Docbook);
4811 typeDecl.lineBreak();
4812 typeDecl.disable(OutputType::Latex);
4813 typeDecl.disable(OutputType::Docbook);
4814 typeDecl.writeString("&#160;&#160;");
4815 typeDecl.popGeneratorState();
4816 }
4817
4818 if (fmd->hasDocumentation()) // enum value has docs
4819 {
4820 fmd->writeLink(typeDecl,cd,nd,fd,gd,mod);
4821 }
4822 else // no docs for this enum value
4823 {
4824 typeDecl.startBold();
4825 typeDecl.docify(fmd->name());
4826 typeDecl.endBold();
4827 }
4828 if (fmd->hasOneLineInitializer()) // enum value has initializer
4829 {
4830 //typeDecl.writeString(" = ");
4831 typeDecl.writeString(" ");
4832 typeDecl.parseText(fmd->initializer());
4833 }
4834 first=false;
4835 }
4836
4837 bool prevVisible = fmdVisible;
4838 ++it;
4839 if (it!=m_enumFields.end())
4840 {
4841 fmd=*it;
4842 }
4843 else
4844 {
4845 fmd=nullptr;
4846 }
4847 if (prevVisible)
4848 {
4849 typeDecl.disable(OutputType::Man);
4850 typeDecl.writeString("\n"); // to prevent too long lines in LaTeX
4851 typeDecl.enable(OutputType::Man);
4852 enumMemCount++;
4853 }
4854 }
4855 if (numVisibleEnumValues>enumValuesPerLine)
4856 {
4857 typeDecl.pushGeneratorState();
4859 typeDecl.lineBreak();
4860 typeDecl.popGeneratorState();
4861 }
4862 }
4863 typeDecl.docify(" }");
4864 }
4865}
4866
4867void MemberDefImpl::moveArgumentList(std::unique_ptr<ArgumentList> al)
4868{
4869 m_defArgList = *al;
4870}
4871
4872void MemberDefImpl::moveDeclArgumentList(std::unique_ptr<ArgumentList> al)
4873{
4874 m_declArgList = *al;
4875}
4876
4881
4883{
4884 m_type = t;
4885}
4886
4888{
4889 m_accessorClass = cd;
4890 m_accessorType = t;
4891}
4892
4897
4904
4910
4916
4922
4928
4933
4938
4940{
4941 if (getClassDef() && getClassDef()->isObjectiveC() && isFunction()) return TRUE;
4942 return FALSE;
4943}
4944
4946{
4947 if (getClassDef() && getClassDef()->isObjectiveC() && isProperty()) return TRUE;
4948 return FALSE;
4949}
4950
4952{
4953 if (getClassDef() && getClassDef()->isCSharp() && isProperty()) return TRUE;
4954 return FALSE;
4955}
4956
4958{
4959 if (isObjCMethod())
4960 {
4961 QCString qm;
4962 if (isStatic()) qm="+"; else qm="-";
4963 qm+="[";
4964 qm+=getClassDef()->name()+" ";
4965 qm+=name();
4966 qm+="]";
4967 return qm;
4968 }
4969 else if (m_enumScope && m_enumScope->isStrong())
4970 {
4971 return m_enumScope->qualifiedName()+
4973 localName();
4974 }
4975 else
4976 {
4978 }
4979}
4980
4982{
4983 if (ti)
4984 {
4985 //printf("%s: Setting tag name=%s anchor=%s\n",qPrint(name()),qPrint(ti->tagName),qPrint(ti->anchor));
4986 m_anc=ti->anchor;
4987 setReference(ti->tagName);
4989 }
4990}
4991
4992QCString MemberDefImpl::objCMethodName(bool localLink,bool showStatic) const
4993{
4994 QCString qm;
4995 if (showStatic)
4996 {
4997 if (isStatic()) qm="+ "; else qm="- ";
4998 }
4999 qm+=name();
5000 if (!localLink) // link to method of same class
5001 {
5002 qm+=" (";
5003 qm+=getClassDef()->name();
5004 qm+=")";
5005 }
5006 return qm;
5007}
5008
5010{
5011 return m_decl;
5012}
5013
5015{
5016 return m_def;
5017}
5018
5023
5025{
5026 return m_type;
5027}
5028
5030{
5031 return m_args;
5032}
5033
5035{
5036 return m_exception;
5037}
5038
5040{
5041 return m_bitfields;
5042}
5043
5045{
5046 return m_initializer;
5047}
5048
5050{
5051 return m_initLines;
5052}
5053
5058
5063
5065{
5066 return m_classDef;
5067}
5068
5073
5078
5080{
5081 return m_fileDef;
5082}
5083
5085{
5086 return m_fileDef;
5087}
5088
5090{
5091 return m_nspace;
5092}
5093
5098
5100{
5101 return m_read;
5102}
5103
5105{
5106 return m_write;
5107}
5108
5110{
5111 return m_group;
5112}
5113
5115{
5116 return m_group;
5117}
5118
5120{
5121 return m_moduleDef;
5122}
5123
5128
5133
5135{
5136 return m_groupStartLine;
5137}
5138
5140{
5141 return m_groupHasDocs;
5142}
5143
5145{
5146 return m_prot;
5147}
5148
5150{
5151 return m_mtype;
5152}
5153
5155{
5157}
5158
5160{
5161 return m_mtype==MemberType::Slot;
5162}
5163
5165{
5167}
5168
5170{
5172}
5173
5175{
5177}
5178
5180{
5182}
5183
5185{
5187}
5188
5190{
5192}
5193
5195{
5197}
5198
5200{
5201 return m_mtype==MemberType::Variable && QCString(argsString()).find(")(")!=-1;
5202}
5203
5205{
5207}
5208
5210{
5212}
5213
5215{
5216 return m_mtype==MemberType::DCOP;
5217}
5218
5220{
5222}
5223
5225{
5226 return m_mtype==MemberType::Event;
5227}
5228
5230{
5232}
5233
5235{
5237}
5238
5240{
5241 return m_stat;
5242}
5243
5245{
5246 return m_memSpec.isInline();
5247}
5248
5250{
5251 return m_memSpec.isExplicit();
5252}
5253
5255{
5256 return m_memSpec.isMutable();
5257}
5258
5260{
5261 return m_memSpec.isGettable();
5262}
5263
5265{
5266 return m_memSpec.isPrivateGettable();
5267}
5268
5270{
5271 return m_memSpec.isProtectedGettable();
5272}
5273
5275{
5276 return m_memSpec.isSettable();
5277}
5278
5280{
5281 return m_memSpec.isPrivateSettable();
5282}
5283
5285{
5286 return m_memSpec.isProtectedSettable();
5287}
5288
5290{
5291 return m_memSpec.isAddable();
5292}
5293
5295{
5296 return m_memSpec.isRemovable();
5297}
5298
5300{
5301 return m_memSpec.isRaisable();
5302}
5303
5305{
5306 return m_memSpec.isReadable();
5307}
5308
5310{
5311 return m_memSpec.isWritable();
5312}
5313
5315{
5316 return m_memSpec.isFinal();
5317}
5318
5320{
5321 return m_memSpec.isNew();
5322}
5323
5325{
5326 return m_memSpec.isSealed();
5327}
5328
5330{
5331 return m_memSpec.isOverride();
5332}
5333
5335{
5336 return m_memSpec.isInitonly();
5337}
5338
5340{
5341 return m_memSpec.isAbstract();
5342}
5343
5345{
5346 return m_memSpec.isOptional();
5347}
5348
5350{
5351 return m_memSpec.isRequired();
5352}
5353
5355{
5356 return m_memSpec.isNonAtomic();
5357}
5358
5360{
5361 return m_memSpec.isCopy();
5362}
5363
5365{
5366 return m_memSpec.isAssign();
5367}
5368
5370{
5371 return m_memSpec.isRetain();
5372}
5373
5375{
5376 return m_memSpec.isWeak();
5377}
5378
5380{
5381 return m_memSpec.isStrong();
5382}
5383
5385{
5386 return m_memSpec.isEnumStruct();
5387}
5388
5390{
5392 m_enumScope &&
5393 m_enumScope->isStrong();
5394}
5395
5397{
5398 return m_memSpec.isUnretained();
5399}
5400
5402{
5403 return m_memSpec.isAlias();
5404}
5405
5407{
5408 return m_memSpec.isDefault();
5409}
5410
5412{
5413 return m_memSpec.isDelete();
5414}
5415
5417{
5418 return m_memSpec.isNoExcept();
5419}
5420
5422{
5423 return m_memSpec.isAttribute();
5424}
5425
5427{
5428 return m_memSpec.isProperty();
5429}
5430
5432{
5433 return m_memSpec.isReadonly();
5434}
5435
5437{
5438 return m_memSpec.isBound();
5439}
5440
5442{
5443 return m_memSpec.isConstrained();
5444}
5445
5447{
5448 return m_memSpec.isTransient();
5449}
5450
5452{
5453 return m_memSpec.isMaybeVoid();
5454}
5455
5457{
5458 return m_memSpec.isMaybeDefault();
5459}
5460
5462{
5463 return m_memSpec.isMaybeAmbiguous();
5464}
5465
5467{
5468 return m_memSpec.isPublished();
5469}
5470
5471
5473{
5474 return m_implOnly;
5475}
5476
5478{
5479 return m_explExt;
5480}
5481
5483{
5484 return m_tspec;
5485}
5486
5488{
5489 return isFunction() ||
5490 isSlot() ||
5491 isSignal() ||
5492 isConstructor() ||
5493 isDestructor() ||
5494 isObjCMethod() ||
5495 isFriend();
5496}
5497
5499{
5500 return m_relatedAlso;
5501}
5502
5504{
5505 return m_docEnumValues;
5506}
5507
5509{
5510 return m_annEnumType;
5511}
5512
5514{
5515 return m_docsForDefinition;
5516}
5517
5519{
5520 return m_enumScope;
5521}
5522
5524{
5525 return m_livesInsideEnum;
5526}
5527
5529{
5530 return m_memSpec.isLocal();
5531}
5532
5534{
5535 return m_memSpec.isNoDiscard();
5536}
5537
5539{
5540 return m_memSpec.isConstExpr();
5541}
5542
5544{
5545 return m_memSpec.isConstEval();
5546}
5547
5549{
5550 return m_memSpec.isConstInit();
5551}
5552
5554{
5555 return m_enumFields;
5556}
5557
5559{
5560 return m_examples;
5561}
5562
5564{
5565 return m_proto;
5566}
5567
5569{
5570 return m_defArgList;
5571}
5572
5574{
5575 return m_declArgList;
5576}
5577
5579{
5580 ArgumentList &decAl = m_declArgList;
5581 ArgumentList &defAl = m_defArgList;
5582 const ArgumentList &decAlSrc = md->declArgumentList();
5583 const ArgumentList &defAlSrc = md->argumentList();
5584 auto decSrc = decAlSrc.begin(), defSrc = defAlSrc.begin();
5585 for (auto decIt = decAl.begin(), defIt = defAl.begin();
5586 decIt != decAl.end() && defIt != defAl.end() && decSrc != decAlSrc.end() && defSrc != defAlSrc.end();
5587 ++decIt, ++defIt, ++decSrc, ++defSrc++)
5588 {
5589 Argument &decA = *decIt;
5590 Argument &defA = *defIt;
5591 const Argument &decAS = *decSrc;
5592 const Argument &defAS = *defSrc;
5593 if (decA.name.isEmpty())
5594 {
5595 if (!defA.name.isEmpty())
5596 {
5597 decA.name = defA.name;
5598 }
5599 else if (!decAS.name.isEmpty())
5600 {
5601 decA.name = decAS.name;
5602 }
5603 else if (!defAS.name.isEmpty())
5604 {
5605 decA.name = defAS.name;
5606 }
5607 }
5608 if (defA.name.isEmpty())
5609 {
5610 if (!decA.name.isEmpty())
5611 {
5612 defA.name = decA.name;
5613 }
5614 else if (!decAS.name.isEmpty())
5615 {
5616 defA.name = decAS.name;
5617 }
5618 else if (!defAS.name.isEmpty())
5619 {
5620 defA.name = defAS.name;
5621 }
5622 }
5623 }
5624}
5625
5627{
5628 return m_tArgList;
5629}
5630
5635
5637{
5638 return m_grpId;
5639}
5640
5645
5647{
5648 return m_annScope;
5649}
5650
5652{
5653 return m_hasCallGraph;
5654}
5655
5657{
5658 bool enabled = m_hasCallGraph &&
5659 (isFunction() || isSlot() || isSignal()) &&
5660 Config_getBool(HAVE_DOT);
5661 if (enabled)
5662 {
5663 bool trivial = DotCallGraph::isTrivial(this,FALSE);
5664 return !trivial;
5665 }
5666 return FALSE;
5667}
5668
5670{
5671 return m_hasCallerGraph;
5672}
5673
5675{
5676 bool enabled = m_hasCallerGraph &&
5677 (isFunction() || isSlot() || isSignal()) &&
5678 Config_getBool(HAVE_DOT);
5679 if (enabled)
5680 {
5681 bool trivial = DotCallGraph::isTrivial(this,TRUE);
5682 return !trivial;
5683 }
5684 return FALSE;
5685}
5686
5691
5696
5698{
5699 return m_hasInlineSource;
5700}
5701
5703{
5704 return m_hasEnumValues;
5705}
5706
5708{
5709 return m_templateMaster;
5710}
5711
5712std::optional<ArgumentList> MemberDefImpl::formalTemplateArguments() const
5713{
5715}
5716
5718{
5719 return m_isTypedefValCached;
5720}
5721
5726
5731
5733{
5734 //printf("MemberDefImpl::getCachedResolvedTypedef()=%s m_impl=%p\n",qPrint(m_cachedResolvedType),m_impl);
5735 return m_cachedResolvedType;
5736}
5737
5739{
5740 return m_memDef;
5741}
5742
5744{
5745 return m_memDec;
5746}
5747
5749{
5750 return m_docProvider;
5751}
5752
5754{
5755 return m_groupAlias;
5756}
5757
5762
5764{
5765 return m_declLine;
5766}
5767
5769{
5770 return m_declColumn;
5771}
5772
5773
5774//----------------------------------------------
5775
5781
5783{
5784 m_def=d;
5785}
5786
5794
5796{
5797 m_moduleDef=mod;
5798}
5799
5805
5810
5815
5820
5825
5827{
5828 for (const auto &sx : qualifiers)
5829 {
5830 bool alreadyAdded = std::find(m_qualifiers.begin(), m_qualifiers.end(), sx) != m_qualifiers.end();
5831 if (!alreadyAdded)
5832 {
5833 m_qualifiers.push_back(sx);
5834 }
5835 }
5836}
5837
5839{
5840 m_bitfields = QCString(s).simplifyWhiteSpace();
5841}
5842
5844{
5845 if (lines!=-1)
5846 {
5847 m_userInitLines=lines;
5848 }
5849}
5850
5852{
5853 m_read=r;
5854}
5855
5857{
5858 m_write=w;
5859}
5860
5862{
5863 m_tspec=b;
5864}
5865
5871
5877
5879{
5880 m_docProvider = md;
5881}
5882
5884{
5885 m_args = as;
5886}
5887
5892
5899
5901{
5902 m_docEnumValues=value;
5903}
5904
5906{
5907 m_annEnumType = md;
5908}
5909
5910void MemberDefImpl::setPrototype(bool p,const QCString &df,int line,int column)
5911{
5912 m_proto=p;
5913 if (p)
5914 {
5915 setDeclFile(df,line,column);
5916 }
5917 else
5918 {
5919 setDefFile(df,line,column);
5920 }
5921}
5922
5923void MemberDefImpl::setExplicitExternal(bool b,const QCString &df,int line,int column)
5924{
5925 m_explExt=b;
5926 if (b)
5927 {
5928 setDeclFile(df,line,column);
5929 }
5930 else
5931 {
5932 setDefFile(df,line,column);
5933 }
5934}
5935
5936void MemberDefImpl::setDeclFile(const QCString &df,int line,int column)
5937{
5938 m_declFileName = df;
5939 m_declLine = line;
5940 m_declColumn = column;
5941}
5942
5944{
5945 m_grpId=id;
5946}
5947
5952
5954{
5955 m_annScope=b;
5956}
5957
5962
5967
5973
5978
5983
5985{
5986 m_groupAlias = md;
5987}
5988
5993
5998
6003
6005{
6006 return m_category;
6007}
6008
6010{
6011 m_category = def;
6012}
6013
6015{
6016 return m_categoryRelation;
6017}
6018
6023
6025{
6026 m_enumBaseType = type;
6027}
6028
6030{
6031 return m_enumBaseType;
6032}
6033
6035{
6036 m_requiresClause = req;
6037}
6038
6043
6044void MemberDefImpl::cacheTypedefVal(const ClassDef*val, const QCString & templSpec, const QCString &resolvedType)
6045{
6048 m_cachedTypedefTemplSpec=templSpec;
6049 m_cachedResolvedType=resolvedType;
6050 //printf("MemberDefImpl::cacheTypedefVal=%s m_impl=%p\n",qPrint(m_cachedResolvedType),m_impl);
6051}
6052
6054{
6055 {
6056 const ArgumentList &srcAl = bmd->argumentList();
6057 ArgumentList &dstAl = m_defArgList;
6058 auto srcIt = srcAl.begin();
6059 auto dstIt = dstAl.begin();
6060 while ( srcIt!=srcAl.end() && dstIt!=dstAl.end())
6061 {
6062 Argument &argDst = *dstIt;
6063 const Argument &argSrc = *srcIt;
6064 argDst.name = argSrc.name;
6065 argDst.docs = argSrc.docs;
6066 ++srcIt;
6067 ++dstIt;
6068 }
6069 }
6070
6071 {
6072 const ArgumentList &srcAl = bmd->declArgumentList();
6073 ArgumentList &dstAl = m_declArgList;
6074 auto srcIt = srcAl.begin();
6075 auto dstIt = dstAl.begin();
6076
6077 while ( srcIt!=srcAl.end() && dstIt!=dstAl.end())
6078 {
6079 Argument &argDst = *dstIt;
6080 const Argument &argSrc = *srcIt;
6081 argDst.name = argSrc.name;
6082 argDst.docs = argSrc.docs;
6083 ++srcIt;
6084 ++dstIt;
6085 }
6086 }
6087}
6088
6090{
6091 for (Argument &a : al)
6092 {
6093 a.canType.clear();
6094 }
6095}
6096
6102
6107
6109{
6110 return m_numberOfFlowKW;
6111}
6112
6113//----------------
6114
6116{
6117 return DefinitionMixin::name();
6118}
6119
6120//----------------
6121
6123{
6124 for (auto decIt = decAl.begin(), defIt = defAl.begin();
6125 decIt!= decAl.end() && defIt!= defAl.end();
6126 ++decIt, ++defIt)
6127 {
6128 Argument &decA = *decIt;
6129 Argument &defA = *defIt;
6130 if (decA.docs.isEmpty() && !defA.docs.isEmpty())
6131 {
6132 decA.docs = defA.docs;
6133 }
6134 else if (defA.docs.isEmpty() && !decA.docs.isEmpty())
6135 {
6136 defA.docs = decA.docs;
6137 }
6138 if (Config_getBool(RESOLVE_UNNAMED_PARAMS))
6139 {
6140 if (decA.name.isEmpty() && !defA.name.isEmpty())
6141 {
6142 decA.name = defA.name;
6143 }
6144 else if (defA.name.isEmpty() && !decA.name.isEmpty())
6145 {
6146 defA.name = decA.name;
6147 }
6148 }
6149 }
6150}
6151
6153{
6154 AUTO_TRACE("mdec='{}' mdef='{}' mdec.isPrototype={} mdef.isPrototype={}",
6155 mdec->name(), mdef->name(), mdec->isPrototype(), mdef->isPrototype());
6156 if (
6157 (mdef->isFunction() && !mdef->isStatic() && !mdef->isPrototype()) ||
6158 (mdef->isVariable() && !mdef->isExternal() && !mdef->isStatic())
6159 )
6160 {
6161 bool sameNumTemplateArgs = mdef->templateArguments().size()==mdec->templateArguments().size();
6162
6163 ArgumentList &mdefAl = const_cast<ArgumentList&>(mdef->argumentList());
6164 ArgumentList &mdecAl = const_cast<ArgumentList&>(mdec->argumentList());
6165 if (sameNumTemplateArgs &&
6166 matchArguments2(mdef->getOuterScope(),mdef->getFileDef(),&mdefAl,
6167 mdec->getOuterScope(),mdec->getFileDef(),&mdecAl,
6168 TRUE,mdef->getLanguage()
6169 )
6170 ) /* match found */
6171 {
6172 AUTO_TRACE_ADD("combining definition and declaration");
6173
6174 if (Config_getBool(RESOLVE_UNNAMED_PARAMS))
6175 {
6176 mdec->resolveUnnamedParameters(mdef);
6177 }
6178
6179 // first merge argument documentation
6180 transferArgumentDocumentation(mdecAl,mdefAl);
6181
6182 /* copy documentation between function definition and declaration */
6183 if (!mdec->briefDescription().isEmpty())
6184 {
6185 mdef->setBriefDescription(mdec->briefDescription(),mdec->briefFile(),mdec->briefLine());
6186 }
6187 else if (!mdef->briefDescription().isEmpty())
6188 {
6189 mdec->setBriefDescription(mdef->briefDescription(),mdef->briefFile(),mdef->briefLine());
6190 }
6191 if (!mdef->documentation().isEmpty())
6192 {
6193 //printf("transferring docs mdef->mdec (%s->%s)\n",mdef->argsString(),mdec->argsString());
6194 mdec->setDocumentation(mdef->documentation(),mdef->docFile(),mdef->docLine());
6196 if (mdefAl.hasParameters())
6197 {
6198 auto mdefAlComb = stringToArgumentList(mdef->getLanguage(),mdef->argsString());
6199 transferArgumentDocumentation(mdefAl,*mdefAlComb);
6200 mdec->moveArgumentList(std::move(mdefAlComb));
6201 }
6202 }
6203 else if (!mdec->documentation().isEmpty())
6204 {
6205 //printf("transferring docs mdec->mdef (%s->%s)\n",mdec->argsString(),mdef->argsString());
6206 mdef->setDocumentation(mdec->documentation(),mdec->docFile(),mdec->docLine());
6208 if (mdecAl.hasParameters())
6209 {
6210 auto mdecAlComb = stringToArgumentList(mdec->getLanguage(),mdec->argsString());
6211 transferArgumentDocumentation(mdecAl,*mdecAlComb);
6212 mdef->moveDeclArgumentList(std::move(mdecAlComb));
6213 }
6214 }
6215 if (!mdef->inbodyDocumentation().isEmpty())
6216 {
6217 mdec->setInbodyDocumentation(mdef->inbodyDocumentation(),mdef->inbodyFile(),mdef->inbodyLine());
6218 }
6219 else if (!mdec->inbodyDocumentation().isEmpty())
6220 {
6221 mdef->setInbodyDocumentation(mdec->inbodyDocumentation(),mdec->inbodyFile(),mdec->inbodyLine());
6222 }
6223 if (mdec->getStartBodyLine()!=-1 && mdef->getStartBodyLine()==-1)
6224 {
6225 //printf("body mdec->mdef %d-%d\n",mdec->getStartBodyLine(),mdef->getEndBodyLine());
6226 mdef->setBodySegment(mdec->getDefLine(),mdec->getStartBodyLine(),mdec->getEndBodyLine());
6227 mdef->setBodyDef(mdec->getBodyDef());
6228 //mdef->setBodyMember(mdec);
6229 }
6230 else if (mdef->getStartBodyLine()!=-1 && mdec->getStartBodyLine()==-1)
6231 {
6232 //printf("body mdef->mdec %d-%d\n",mdef->getStartBodyLine(),mdec->getEndBodyLine());
6233 mdec->setBodySegment(mdef->getDefLine(),mdef->getStartBodyLine(),mdef->getEndBodyLine());
6234 mdec->setBodyDef(mdef->getBodyDef());
6235 //mdec->setBodyMember(mdef);
6236 }
6239
6240 // copy group info.
6241 if (mdec->getGroupDef()==nullptr && mdef->getGroupDef()!=nullptr)
6242 {
6243 mdec->setGroupDef(mdef->getGroupDef(),
6244 mdef->getGroupPri(),
6245 mdef->docFile(),
6246 mdef->docLine(),
6247 mdef->hasDocumentation(),
6248 mdef
6249 );
6250 }
6251 else if (mdef->getGroupDef()==nullptr && mdec->getGroupDef()!=nullptr)
6252 {
6253 mdef->setGroupDef(mdec->getGroupDef(),
6254 mdec->getGroupPri(),
6255 mdec->docFile(),
6256 mdec->docLine(),
6257 mdec->hasDocumentation(),
6258 mdec
6259 );
6260 }
6261
6262
6263 mdec->mergeRefItems(mdef);
6264 mdef->mergeRefItems(mdec);
6265
6266 mdef->setMemberDeclaration(mdec);
6267 mdec->setMemberDefinition(mdef);
6268
6269 mergeMemberOverrideOptions(mdec,mdef);
6270
6271 mdef->addQualifiers(mdec->getQualifiers());
6272 mdec->addQualifiers(mdef->getQualifiers());
6273 }
6274 }
6275}
6276
6278{
6279 if (m_templateMaster)
6280 {
6281 return m_templateMaster->briefDescription(abbr);
6282 }
6283 else
6284 {
6286 }
6287}
6288
6290{
6291 if (m_templateMaster)
6292 {
6293 return m_templateMaster->documentation();
6294 }
6295 else
6296 {
6298 }
6299}
6300
6302{
6303 if (m_templateMaster)
6304 {
6305 return m_templateMaster->hasUserDocumentation();
6306 }
6307 else
6308 {
6310 }
6311}
6312
6314{
6315 return m_typeConstraints;
6316}
6317
6319{
6320 bool hideFriendCompounds = Config_getBool(HIDE_FRIEND_COMPOUNDS);
6321 bool isFriendToHide = hideFriendCompounds &&
6322 (m_type=="friend class" ||
6323 m_type=="friend struct" ||
6324 m_type=="friend union");
6325 return isFriendToHide;
6326}
6327
6329{
6330 return (isFriend() &&
6331 (m_type=="friend class" || m_type=="friend struct" ||
6332 m_type=="friend union"));
6333}
6334
6335
6337{
6338 return !(isFriend() && isFriendToHide());
6339}
6340
6342{
6343 return isFunction() || isSlot() || isSignal();
6344}
6345
6347{
6348 return isRelated() || isForeign() || (isFriend() && !isFriendToHide());
6349}
6350
6352{
6354 (m_templateMaster && m_templateMaster->isReference());
6355}
6356
6380
6381//-------------------------------------------------------------------------------
6382// Helpers
6383
6385
6387{
6388 MemberDefMutable *src = toMemberDefMutable(const_cast<MemberDef*>(s));
6389 MemberDefMutable *dst = toMemberDefMutable(const_cast<MemberDef*>(d));
6390 if (src==nullptr || dst==nullptr) return;
6391 //printf("--> addDocCrossReference src=%s,dst=%s\n",qPrint(src->name()),qPrint(dst->name()));
6392 if (dst->isTypedef() || dst->isEnumerate()) return; // don't add types
6393 if ((dst->hasReferencedByRelation() || dst->hasCallerGraph()) &&
6394 src->isCallable()
6395 )
6396 {
6397 QCString sourceRefName = src->sourceRefName();
6400
6401 // ---- critical section
6402 std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
6403 dst->addSourceReferencedBy(src,sourceRefName);
6404 if (mdDef)
6405 {
6406 mdDef->addSourceReferencedBy(src,sourceRefName);
6407 }
6408 if (mdDecl)
6409 {
6410 mdDecl->addSourceReferencedBy(src,sourceRefName);
6411 }
6412 // ---- end critical section
6413 }
6414 if ((src->hasReferencesRelation() || src->hasCallGraph()) &&
6415 src->isCallable()
6416 )
6417 {
6418 QCString sourceRefName = dst->sourceRefName();
6421
6422 // ---- critical section
6423 std::lock_guard<std::mutex> lock(g_docCrossReferenceMutex);
6424 src->addSourceReferences(dst,sourceRefName);
6425 if (mdDef)
6426 {
6427 mdDef->addSourceReferences(dst,sourceRefName);
6428 }
6429 if (mdDecl)
6430 {
6431 mdDecl->addSourceReferences(dst,sourceRefName);
6432 }
6433 // ---- end critical section
6434 }
6435}
6436
6437// --- Cast functions
6438//
6440{
6441 if (d && (typeid(*d)==typeid(MemberDefImpl) || typeid(*d)==typeid(MemberDefAliasImpl)))
6442 {
6443 return static_cast<MemberDef*>(d);
6444 }
6445 else
6446 {
6447 return nullptr;
6448 }
6449}
6450
6452{
6453 Definition *d = toDefinition(md);
6454 if (d && typeid(*d)==typeid(MemberDefImpl))
6455 {
6456 return static_cast<MemberDef*>(d);
6457 }
6458 else
6459 {
6460 return nullptr;
6461 }
6462}
6463
6465{
6466 if (d && (typeid(*d)==typeid(MemberDefImpl) || typeid(*d)==typeid(MemberDefAliasImpl)))
6467 {
6468 return static_cast<const MemberDef*>(d);
6469 }
6470 else
6471 {
6472 return nullptr;
6473 }
6474}
6475
6477{
6478 if (d && typeid(*d)==typeid(MemberDefImpl))
6479 {
6480 return static_cast<MemberDefMutable*>(d);
6481 }
6482 else
6483 {
6484 return nullptr;
6485 }
6486}
6487
constexpr auto prefix
Definition anchor.cpp:44
std::vector< ArgumentList > ArgumentLists
Definition arguments.h:138
This class represents an function or template argument list.
Definition arguments.h:60
RefQualifierType refQualifier() const
Definition arguments.h:109
iterator end()
Definition arguments.h:87
bool hasParameters() const
Definition arguments.h:69
QCString trailingReturnType() const
Definition arguments.h:107
size_t size() const
Definition arguments.h:93
bool constSpecifier() const
Definition arguments.h:104
bool empty() const
Definition arguments.h:92
iterator begin()
Definition arguments.h:86
bool volatileSpecifier() const
Definition arguments.h:105
A abstract class representing of a compound symbol.
Definition classdef.h:104
virtual QCString compoundTypeString() const =0
Returns the type of compound as a string.
virtual int isBaseClass(const ClassDef *bcd, bool followInstances, const QCString &templSpec=QCString()) const =0
Returns TRUE iff bcd is a direct or indirect base class of this class.
virtual ArgumentLists getTemplateParameterLists() const =0
Returns the template parameter lists that form the template declaration of this class.
virtual bool isObjectiveC() const =0
Returns TRUE if this class is implemented in Objective-C.
virtual bool isSimple() const =0
virtual ClassDef * categoryOf() const =0
Returns the class of which this is a category (Objective-C only)
virtual void writeDeclaration(OutputList &ol, const MemberDef *md, bool inGroup, int indentLevel, const ClassDef *inheritedFrom, const QCString &inheritId) const =0
@ Interface
Definition classdef.h:112
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e.
const Definition * getAlias() const
const Definition * getScope() const
DefinitionAliasMixin(const Definition *scope, const Definition *alias)
The common base class of all entity definitions found in the sources.
Definition definition.h:76
virtual QCString docFile() const =0
virtual const QCString & localName() const =0
virtual int getEndBodyLine() const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual int docLine() const =0
virtual QCString getDefFileName() const =0
virtual bool isLinkable() const =0
virtual int getDefLine() const =0
virtual DefType definitionType() const =0
virtual QCString anchor() const =0
virtual int inbodyLine() const =0
virtual const FileDef * getBodyDef() const =0
virtual int briefLine() const =0
virtual bool hasDocumentation() const =0
virtual QCString id() const =0
virtual bool isLinkableInProject() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual bool hasUserDocumentation() const =0
virtual bool isAnonymous() const =0
virtual QCString getReference() const =0
virtual QCString documentation() const =0
virtual QCString qualifiedName() const =0
virtual QCString displayName(bool includeScope=TRUE) const =0
virtual QCString briefFile() const =0
virtual CodeSymbolType codeSymbolType() const =0
virtual QCString getOutputFileBase() const =0
virtual Definition * getOuterScope() const =0
virtual int getStartBodyLine() const =0
virtual bool isReference() const =0
virtual QCString inbodyDocumentation() const =0
virtual QCString inbodyFile() const =0
virtual const QCString & name() const =0
bool isReference() const override
const QCString & name() const override
void writeSourceDef(OutputList &ol) const override
bool hasUserDocumentation() const override
QCString inbodyFile() const override
QCString getDefFileName() const override
void writeSourceRefs(OutputList &ol, const QCString &scopeName) const override
bool hasBriefDescription() const override
QCString docFile() const override
QCString getDefFileExtension() const override
QCString briefFile() const override
QCString qualifiedName() const override
void setOuterScope(Definition *def) override
void setDocumentation(const QCString &doc, const QCString &docFile, int docLine, bool stripWhiteSpace=TRUE) override
void setReference(const QCString &r) override
QCString getSourceFileBase() const override
const RefItemVector & xrefListItems() const override
QCString briefDescription(bool abbreviate=FALSE) const override
bool hasSourceReffedBy() const override
void setBriefDescription(const QCString &brief, const QCString &briefFile, int briefLine) override
void writeSourceReffedBy(OutputList &ol, const QCString &scopeName) const override
Definition * getOuterScope() const override
void setInbodyDocumentation(const QCString &doc, const QCString &docFile, int docLine) override
QCString getReference() const override
DefinitionMixin(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
const QCString & localName() const override
void writeInlineCode(OutputList &ol, const QCString &scopeName) const override
const FileDef * getBodyDef() const override
void setDefFile(const QCString &df, int defLine, int defColumn) override
QCString inbodyDocumentation() const override
void setHidden(bool b) override
QCString documentation() const override
void writeDocAnchorsToTagFile(TextStream &fs) const override
bool hasDocumentation() const override
SrcLangExt getLanguage() const override
virtual void setBodySegment(int defLine, int bls, int ble)=0
virtual void setDocumentation(const QCString &d, const QCString &docFile, int docLine, bool stripWhiteSpace=TRUE)=0
virtual void addSourceReferences(MemberDef *d, const QCString &sourceRefName)=0
virtual void setInbodyDocumentation(const QCString &d, const QCString &docFile, int docLine)=0
virtual void mergeRefItems(Definition *d)=0
virtual void setBodyDef(const FileDef *fd)=0
virtual void setBriefDescription(const QCString &b, const QCString &briefFile, int briefLine)=0
virtual void addSourceReferencedBy(MemberDef *d, const QCString &sourceRefName)=0
int numNodes() const
bool isTooBig() const
bool isTrivial() const
static bool suppressDocWarnings
Definition doxygen.h:132
static bool parseSourcesNeeded
Definition doxygen.h:123
static ParserManager * parserManager
Definition doxygen.h:131
static NamespaceDefMutable * globalScope
Definition doxygen.h:121
A model of a file symbol.
Definition filedef.h:99
virtual const QCString & docName() const =0
A model of a group of symbols.
Definition groupdef.h:52
bool hasEnumValues() const override
bool isConstEval() const override
const ClassDef * getCachedTypedefVal() const override
NamespaceDef * getNamespaceDef() override
const NamespaceDef * getNamespaceDef() const override
bool hasExamples() const override
GroupDef * getGroupDef() override
QCString getDeclFileName() const override
QCString argsString() const override
bool isSettable() const override
bool isConstrained() const override
bool getGroupHasDocs() const override
const ClassDef * getClassDef() const override
const MemberDef * inheritsDocsFrom() const override
bool hasCallerGraph() const override
QCString enumBaseType() const override
bool isConstInit() const override
bool isFinal() const override
const MemberDef * reimplements() const override
bool isOptional() const override
QCString getOutputFileBase() const override
bool isTypeAlias() const override
bool isRequired() const override
bool isRemovable() const override
void setMemberGroup(MemberGroup *grp) override
bool isDeleted() const override
bool isPrivateGettable() const override
bool isSignal() const override
MemberDef * memberDeclaration() const override
bool isFriendClass() const override
const MemberDef * getGroupAlias() const override
bool isStrongEnumValue() const override
bool isAssign() const override
QCString getReadAccessor() const override
int getGroupStartLine() const override
std::unique_ptr< MemberDef > deepCopy() const override
bool isUNOProperty() const override
void warnIfUndocumented() const override
bool hasUserDocumentation() const override
bool isSliceLocal() const override
const ArgumentLists & definitionTemplateParameterLists() const override
bool isPublished() const override
bool isSequence() const override
bool isDictionary() const override
bool isVariable() const override
FileDef * getFileDef() override
ClassDef * getClassDefOfAnonymousType() const override
QCString getCachedResolvedTypedef() const override
const MemberDef * templateMaster() const override
void warnIfUndocumentedParams() const override
bool isExternal() const override
bool isProperty() const override
bool isWritable() const override
bool isDocumentedFriendClass() const override
bool isConstExpr() const override
int initializerLines() const override
bool isMaybeVoid() const override
int getMemberGroupId() const override
bool isInitonly() const override
const ExampleList & getExamples() const override
bool hasOneLineInitializer() const override
bool isProtectedGettable() const override
bool hasDocumentation() const override
bool livesInsideEnum() const override
QCString declaration() const override
bool hasCallGraph() const override
bool isCopy() const override
int getDeclLine() const override
bool isEnumerate() const override
void writeLink(OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, bool onlyText=FALSE) const override
const QCString & initializer() const override
bool isReference() const override
TypeSpecifier getMemberSpecifiers() const override
QCString getReference() const override
bool hasMultiLineInitializer() const override
QCString getCachedTypedefTemplSpec() const override
bool isDocsForDefinition() const override
Grouping::GroupPri_t getGroupPri() const override
bool isTypedefValCached() const override
const ClassDef * accessorClass() const override
bool isRaisable() const override
bool isUnretained() const override
bool isGettable() const override
const MemberVector & enumFieldList() const override
bool isObjCProperty() const override
int getDeclColumn() const override
const ArgumentList & declArgumentList() const override
bool isCallable() const override
bool isDefine() const override
bool isLinkableInProject() const override
bool hasDetailedDescription() const override
bool isFriendToHide() const override
QCString excpString() const override
QCString getDeclType() const override
QCString briefDescription(bool) const override
QCString objCMethodName(bool localLink, bool showStatic) const override
const GroupDef * getGroupDef() const override
bool isDestructor() const override
bool isNoDiscard() const override
bool hasDocumentedEnumValues() const override
bool isBound() const override
void detectUndocumentedParams(bool, bool) const override
bool fromAnonymousScope() const override
bool isFunctionPtr() const override
StringVector getLabels(const Definition *container) const override
QCString memberTypeName() const override
std::unique_ptr< MemberDef > createTemplateInstanceMember(const ArgumentList &formalArgs, const std::unique_ptr< ArgumentList > &actualArgs) const override
bool isAddable() const override
QCString getScopeString() const override
QCString getGroupFileName() const override
QCString extraTypeChars() const override
const ArgumentList & argumentList() const override
const ArgumentList & typeConstraints() const override
Specifier virtualness(int) const override
bool isFunctionOrSignalSlot() const override
bool isDefault() const override
bool isPrototype() const override
bool isAttribute() const override
MemberDef * memberDefinition() const override
bool isTypedef() const override
bool isNoExcept() const override
QCString displayDefinition() const override
bool isInline() const override
bool isRelatedOrFriend() const override
bool hasReferencesRelation() const override
bool isStrong() const override
const MemberDef * getMdAlias() const
bool isObjCMethod() const override
bool isAbstract() const override
bool isStatic() const override
bool isPrivateSettable() const override
bool isSealed() const override
bool isRelated() const override
MemberDef * getMdAlias()
bool isOverride() const override
bool isForeign() const override
bool isImplementation() const override
QCString anchor() const override
const MemberVector & reimplementedBy() const override
VhdlSpecifier getVhdlSpecifiers() const override
bool isMaybeDefault() const override
MemberType memberType() const override
bool isLinkable() const override
bool isProtectedSettable() const override
bool isReadonly() const override
const MemberDef * categoryRelation() const override
ClassDef * getClassDef() override
MemberDefAliasImpl(const Definition *newScope, const MemberDef *md)
const MemberDef * getEnumScope() const override
Protection protection() const override
bool isSlot() const override
const QCString & name() const override
bool isDelete() const override
bool isReadable() const override
bool isEvent() const override
QCString definition() const override
bool isNonAtomic() const override
QCString getWriteAccessor() const override
QCString bitfieldString() const override
DefType definitionType() const override
bool isReimplementedBy(const ClassDef *cd) const override
bool isDCOP() const override
void writeEnumDeclaration(OutputList &typeDecl, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod) const override
bool isDetailedSectionVisible(MemberListContainer container) const override
bool isNotFriend() const override
void writeDeclaration(OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, bool inGroup, int indentLevel, const ClassDef *inheritFrom=nullptr, const QCString &inheritId=QCString()) const override
const MemberList * getSectionList(const Definition *container) const override
bool isTemplateSpecialization() const override
QCString typeString() const override
const ModuleDef * getModuleDef() const override
bool isExplicit() const override
CodeSymbolType codeSymbolType() const override
MemberDef * fromAnonymousMember() const override
bool isConstructor() const override
bool isTransient() const override
int numberOfFlowKeyWords() const override
bool isFriend() const override
bool isWeak() const override
bool isMutable() const override
QCString requiresClause() const override
MemberDef * resolveAlias() override
const FileDef * getFileDef() const override
QCString fieldType() const override
std::optional< ArgumentList > formalTemplateArguments() const override
const MemberDef * resolveAlias() const override
bool isEnumValue() const override
bool isNew() const override
const MemberDef * getAnonymousEnumType() const override
bool isMaybeAmbiguous() const override
bool hasReferencedByRelation() const override
bool isCSharpProperty() const override
bool hasInlineSource() const override
ClassDef * category() const override
void moveTo(Definition *) override
MemberGroup * getMemberGroup() const override
MemberGroup * m_memberGroup
bool isFunction() const override
QCString displayName(bool b=TRUE) const override
bool visibleInIndex() const override
QCString sourceRefName() const override
ClassDef * relatedAlso() const override
bool isRetain() const override
bool isEnumStruct() const override
QCString documentation() const override
bool isBriefSectionVisible() const override
const ArgumentList & templateArguments() const override
~MemberDefAliasImpl() override
StringVector getQualifiers() const override
QCString qualifiedName() const override
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
virtual QCString typeString() const =0
virtual bool isConstExpr() const =0
virtual bool getGroupHasDocs() const =0
virtual const MemberDef * getAnonymousEnumType() const =0
virtual bool isConstEval() const =0
virtual bool isInitonly() const =0
virtual bool isSignal() const =0
virtual bool isNoExcept() const =0
virtual QCString requiresClause() const =0
virtual bool isDestructor() const =0
virtual bool hasDetailedDescription() const =0
virtual bool isAssign() const =0
virtual bool isExplicit() const =0
virtual MemberDef * memberDefinition() const =0
virtual bool isNew() const =0
virtual QCString declaration() const =0
virtual QCString getCachedResolvedTypedef() const =0
virtual bool isObjCMethod() const =0
virtual bool hasDocumentedEnumValues() const =0
virtual MemberDef * memberDeclaration() const =0
virtual bool isMaybeVoid() const =0
virtual bool isConstructor() const =0
virtual bool isFriend() const =0
virtual void writeEnumDeclaration(OutputList &typeDecl, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod) const =0
virtual const ClassDef * accessorClass() const =0
virtual bool isForeign() const =0
virtual bool isSealed() const =0
virtual QCString definition() const =0
virtual bool hasExamples() const =0
virtual QCString enumBaseType() const =0
virtual bool isDelete() const =0
virtual void writeDeclaration(OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *md, bool inGroup, int indentLevel=0, const ClassDef *inheritFrom=nullptr, const QCString &inheritId=QCString()) const =0
virtual int numberOfFlowKeyWords() const =0
virtual const MemberDef * inheritsDocsFrom() const =0
virtual bool isDefault() const =0
virtual bool isRelated() const =0
virtual bool isDocumentedFriendClass() const =0
virtual bool isConstInit() const =0
virtual bool fromAnonymousScope() const =0
virtual bool isDeleted() const =0
virtual const ClassDef * getCachedTypedefVal() const =0
virtual bool isRelatedOrFriend() const =0
virtual QCString fieldType() const =0
virtual QCString excpString() const =0
virtual bool isSequence() const =0
virtual bool isEnumStruct() const =0
virtual const ClassDef * getClassDef() const =0
virtual bool visibleInIndex() const =0
virtual const MemberDef * getGroupAlias() const =0
virtual bool isOverride() const =0
virtual bool hasReferencesRelation() const =0
virtual const ArgumentList & templateArguments() const =0
virtual GroupDef * getGroupDef()=0
virtual bool isSettable() const =0
virtual MemberDef * fromAnonymousMember() const =0
virtual bool isCSharpProperty() const =0
virtual bool isRetain() const =0
virtual bool isAddable() const =0
virtual bool isTypedef() const =0
virtual ClassDef * category() const =0
virtual bool isSlot() const =0
virtual const MemberVector & enumFieldList() const =0
virtual bool hasCallGraph() const =0
virtual const FileDef * getFileDef() const =0
virtual bool isInline() const =0
virtual bool isEvent() const =0
virtual const ArgumentList & argumentList() const =0
virtual QCString extraTypeChars() const =0
virtual bool isWritable() const =0
virtual bool isMaybeAmbiguous() const =0
virtual bool isPrivateGettable() const =0
virtual bool isStrongEnumValue() const =0
virtual VhdlSpecifier getVhdlSpecifiers() const =0
virtual const MemberVector & reimplementedBy() const =0
virtual int getGroupStartLine() const =0
virtual bool isFunction() const =0
virtual bool isRequired() const =0
virtual bool isAttribute() const =0
virtual bool isExternal() const =0
virtual QCString sourceRefName() const =0
virtual bool isCopy() const =0
virtual QCString displayDefinition() const =0
virtual QCString getScopeString() const =0
virtual int getMemberGroupId() const =0
virtual bool isDictionary() const =0
virtual int getDeclLine() const =0
virtual bool isTypeAlias() const =0
virtual QCString getDeclType() const =0
virtual int getDeclColumn() const =0
virtual bool isStatic() const =0
virtual const MemberDef * reimplements() const =0
virtual bool isMaybeDefault() const =0
virtual bool livesInsideEnum() const =0
virtual QCString getWriteAccessor() const =0
virtual bool hasInlineSource() const =0
virtual bool isTemplateSpecialization() const =0
virtual bool isPrivateSettable() const =0
virtual StringVector getQualifiers() const =0
virtual QCString getCachedTypedefTemplSpec() const =0
virtual QCString bitfieldString() const =0
virtual bool isRaisable() const =0
virtual bool isRemovable() const =0
virtual bool isTypedefValCached() const =0
virtual bool isConstrained() const =0
virtual bool isDocsForDefinition() const =0
virtual bool isBound() const =0
virtual bool hasEnumValues() const =0
virtual bool isFriendToHide() const =0
virtual bool isReimplementedBy(const ClassDef *cd) const =0
virtual bool isNonAtomic() const =0
virtual const ModuleDef * getModuleDef() const =0
virtual bool isDefine() const =0
virtual ClassDef * getClassDefOfAnonymousType() const =0
virtual const NamespaceDef * getNamespaceDef() const =0
virtual bool isPublished() const =0
virtual bool isFunctionPtr() const =0
virtual std::unique_ptr< MemberDef > createTemplateInstanceMember(const ArgumentList &formalArgs, const std::unique_ptr< ArgumentList > &actualArgs) const =0
virtual bool hasCallerGraph() const =0
virtual Grouping::GroupPri_t getGroupPri() const =0
virtual QCString getDeclFileName() const =0
virtual const ArgumentList & typeConstraints() const =0
virtual bool isProtectedSettable() const =0
virtual bool isImplementation() const =0
virtual bool isProtectedGettable() const =0
virtual QCString objCMethodName(bool localLink, bool showStatic) const =0
virtual bool hasOneLineInitializer() const =0
virtual const MemberDef * templateMaster() const =0
virtual std::optional< ArgumentList > formalTemplateArguments() const =0
virtual bool isObjCProperty() const =0
virtual bool isTransient() const =0
virtual const MemberList * getSectionList(const Definition *container) const =0
virtual bool hasMultiLineInitializer() const =0
virtual Protection protection() const =0
virtual TypeSpecifier getMemberSpecifiers() const =0
virtual bool isOptional() const =0
virtual QCString getReadAccessor() const =0
virtual bool isEnumerate() const =0
virtual bool isGettable() const =0
virtual MemberType memberType() const =0
virtual bool hasReferencedByRelation() const =0
virtual bool isFunctionOrSignalSlot() const =0
virtual bool isReadable() const =0
virtual bool isWeak() const =0
virtual bool isNoDiscard() const =0
virtual QCString memberTypeName() const =0
virtual bool isUnretained() const =0
virtual QCString getGroupFileName() const =0
virtual void writeLink(OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *md, bool onlyText=FALSE) const =0
virtual ClassDef * relatedAlso() const =0
virtual bool isBriefSectionVisible() const =0
virtual const ArgumentLists & definitionTemplateParameterLists() const =0
virtual StringVector getLabels(const Definition *container) const =0
virtual bool isVariable() const =0
virtual bool isNotFriend() const =0
virtual bool isDCOP() const =0
virtual bool isStrong() const =0
virtual QCString argsString() const =0
virtual bool isSliceLocal() const =0
virtual Specifier virtualness(int count=0) const =0
virtual bool isUNOProperty() const =0
virtual const MemberDef * categoryRelation() const =0
virtual int initializerLines() const =0
virtual bool isFinal() const =0
virtual const ArgumentList & declArgumentList() const =0
virtual const ExampleList & getExamples() const =0
virtual bool isAbstract() const =0
virtual bool isMutable() const =0
virtual bool isFriendClass() const =0
virtual bool isCallable() const =0
virtual bool isDetailedSectionVisible(MemberListContainer container) const =0
virtual const MemberDef * getEnumScope() const =0
virtual bool isEnumValue() const =0
virtual bool isPrototype() const =0
virtual bool isProperty() const =0
virtual const QCString & initializer() const =0
bool _hasVisibleCallerGraph() const
void writeDocumentation(const MemberList *ml, int memCount, int memTotal, OutputList &ol, const QCString &scopeName, const Definition *container, bool inGroup, bool showEnumValues=FALSE, bool showInline=FALSE) const override
void _writeCallerGraph(OutputList &ol) const
void insertReimplementedBy(MemberDef *md) override
bool isDCOP() const override
QCString sourceRefName() const override
VhdlSpecifier m_vhdlSpec
bool isDetailedSectionVisible(MemberListContainer container) const override
bool _isReimplements() const
bool isFunction() const override
int getDeclColumn() const override
void overrideReferencesRelation(bool e) override
const MemberDef * reimplements() const override
MemberType m_mtype
int getMemberGroupId() const override
bool isProperty() const override
bool visibleInIndex() const override
const ArgumentList & argumentList() const override
void setDocumentedEnumValues(bool value) override
bool m_detailedDescriptionCachedValue
bool isTypedefValCached() const override
void setTemplateMaster(MemberDef *mt) override
bool isInline() const override
const ExampleList & getExamples() const override
ArgumentLists m_defTmpArgLists
bool isFriendToHide() const override
void setFromAnonymousScope(bool b) override
bool fromAnonymousScope() const override
void invalidateTypedefValCache() override
ClassDef * accessorClass() const override
bool isFriendClass() const override
void setNamespace(NamespaceDef *nd) override
void setProtection(Protection p) override
const NamespaceDef * getNamespaceDef() const override
void setHidden(bool b) override
void _writeEnumValues(OutputList &ol, const Definition *container, const QCString &cfname, const QCString &ciname, const QCString &cname) const
void _writeTypeConstraints(OutputList &ol) const
bool isSliceLocal() const override
QCString m_args
void makeRelated() override
int getGroupStartLine() const override
void warnIfUndocumented() const override
bool m_hasReferencedByRelation
void setDefinition(const QCString &d) override
QCString objCMethodName(bool localLink, bool showStatic) const override
void setMemberType(MemberType t) override
QCString getWriteAccessor() const override
const ArgumentList & typeConstraints() const override
DefType definitionType() const override
Definition memberdef.cpp:64
void setEnumBaseType(const QCString &type) override
bool isDestructor() const override
StringVector getQualifiers() const override
QCString qualifiedName() const override
Specifier m_virt
void setAnonymousEnumType(const MemberDef *md) override
bool isOptional() const override
void _writeExamples(OutputList &ol) const
void moveTo(Definition *) override
bool isCallable() const override
QCString getCachedResolvedTypedef() const override
QCString anchor() const override
bool isBriefSectionVisible() const override
QCString m_anc
const MemberDef * m_categoryRelation
void init(Definition *def, const QCString &t, const QCString &a, const QCString &e, Protection p, Specifier v, bool s, Relationship r, MemberType mt, const ArgumentList &tal, const ArgumentList &al, const QCString &meta)
bool addExample(const QCString &anchor, const QCString &name, const QCString &file) override
void setCategoryRelation(const MemberDef *) override
bool isReference() const override
QCString extraTypeChars() const override
Protection m_prot
QCString getDeclType() const override
void warnIfUndocumentedParams() const override
VhdlSpecifier getVhdlSpecifiers() const override
bool _hasVisibleCallGraph() const
void setFormalTemplateArguments(const ArgumentList &al) override
ClassDef * m_category
bool isDefine() const override
void findSectionsInDocumentation() override
ClassDef * getClassDefOfAnonymousType() const override
QCString briefDescription(bool abbr=FALSE) const override
void setFileDef(FileDef *fd) override
const MemberDef * resolveAlias() const override
Definition memberdef.cpp:66
ArgumentList m_declArgList
std::unique_ptr< MemberDef > deepCopy() const override
void makeForeign() override
MemberDef * m_memDec
uint8_t m_isConstructorCached
bool hasMultiLineInitializer() const override
bool hasCallGraph() const override
QCString memberTypeName() const override
void _writeReimplementedBy(OutputList &ol) const
bool isNew() const override
void setMaxInitLines(int lines) override
void writeDeclaration(OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, bool inGroup, int indentLevel, const ClassDef *inheritFrom=nullptr, const QCString &inheritId=QCString()) const override
bool isDocsForDefinition() const override
const QCString & initializer() const override
void setEnumClassScope(ClassDef *cd) override
bool isUnretained() const override
MemberDef * m_annMemb
bool isGettable() const override
MemberGroup * getMemberGroup() const override
bool hasUserDocumentation() const override
std::optional< ArgumentList > formalTemplateArguments() const override
std::map< const Definition *, const MemberList * > m_sectionMap
bool isEnumValue() const override
bool isObjCMethod() const override
MemberDef * memberDefinition() const override
bool m_isTypedefValCached
bool m_hasDocumentedReturnType
void setFromAnonymousMember(MemberDef *m) override
QCString m_extraTypeChars
StringVector m_qualifiers
void overrideCallGraph(bool e) override
void setInheritsDocsFrom(const MemberDef *md) override
void setAccessorType(ClassDef *cd, const QCString &t) override
void setType(const QCString &t) override
Specifier virtualness(int count=0) const override
ClassDefMutable * getClassDefMutable() override
QCString m_type
bool hasDetailedDescription() const override
void setMemberGroupId(int id) override
QCString bitfieldString() const override
bool isCSharpProperty() const override
void setSectionList(const Definition *container, const MemberList *sl) override
QCString definition() const override
bool isRaisable() const override
void setDocumentation(const QCString &d, const QCString &docFile, int docLine, bool stripWhiteSpace=TRUE) override
std::unique_ptr< MemberDef > createTemplateInstanceMember(const ArgumentList &formalArgs, const std::unique_ptr< ArgumentList > &actualArgs) const override
const GroupDef * getGroupDef() const override
bool isRelatedOrFriend() const override
void insertEnumField(MemberDef *md) override
bool isMutable() const override
bool isPublished() const override
bool isLinkableInProject() const override
bool isProtectedSettable() const override
QCString getDeclFileName() const override
void setMemberGroup(MemberGroup *grp) override
void setMemberDeclaration(MemberDef *md) override
QCString enumBaseType() const override
bool isUNOProperty() const override
bool m_hasDocumentedParams
ModuleDef * m_moduleDef
bool m_hasReferencesRelation
void _computeIsConstructor()
QCString displayName(bool=TRUE) const override
size_t _countReimplementedBy() const
bool isRequired() const override
const MemberVector & reimplementedBy() const override
bool isStrong() const override
bool m_hasInlineSource
MemberDef * fromAnonymousMember() const override
void moveDeclArgumentList(std::unique_ptr< ArgumentList > al) override
bool isTypeAlias() const override
void setMemberClass(ClassDef *cd) override
QCString m_initializer
QCString excpString() const override
const MemberDef * templateMaster() const override
void setDocsForDefinition(bool b) override
const ClassDef * getCachedTypedefVal() const override
int initializerLines() const override
void setBitfields(const QCString &s) override
bool getGroupHasDocs() const override
const MemberDef * getEnumScope() const override
bool m_hasCallerGraph
QCString argsString() const override
bool isMaybeDefault() const override
QCString m_groupFileName
NamespaceDef * m_nspace
bool isReimplementedBy(const ClassDef *cd) const override
StringVector getLabels(const Definition *container) const override
bool isTransient() const override
ArgumentList m_defArgList
bool m_docsForDefinition
MemberDef * memberDeclaration() const override
std::optional< ArgumentList > m_formalTemplateArguments
bool isInitonly() const override
bool isAddable() const override
QCString m_read
bool isRelated() const override
void moveArgumentList(std::unique_ptr< ArgumentList > al) override
QCString m_decl
const ClassDef * m_cachedTypedefValue
MemberDef * m_redefines
QCString m_accessorType
void setCategory(ClassDef *) override
uint8_t m_isDestructorCached
MemberType memberType() const override
QCString getScopeString() const override
Protection protection() const override
bool isConstructor() const override
void setGroupAlias(const MemberDef *md) override
bool isEnumerate() const override
const ArgumentList & templateArguments() const override
bool isCopy() const override
MemberDef * m_templateMaster
bool isReadonly() const override
QCString declaration() const override
ClassDef * m_accessorClass
void setTagInfo(const TagInfo *i) override
const ArgumentLists & definitionTemplateParameterLists() const override
void _writeTemplatePrefix(OutputList &ol, const Definition *def, const ArgumentList &al, bool writeReqClause=true) const
bool isStatic() const override
void writeTagFile(TextStream &, bool useQualifiedName, bool showNamespaceMembers) const override
ClassDef * m_classDef
MemberDef * resolveAlias() override
Definition memberdef.cpp:65
bool isFinal() const override
QCString m_requiresClause
bool isAttribute() const override
const MemberDef * m_enumScope
bool isDictionary() const override
bool isSlot() const override
bool hasInlineSource() const override
void addListReference(Definition *d) override
void setAnchor() override
Relationship m_related
QCString m_bitfields
MemberGroup * m_memberGroup
const MemberDef * m_groupAlias
bool isRetain() const override
MemberVector m_redefinedBy
ClassDef * category() const override
void overrideEnumValues(bool e) override
bool isDocumentedFriendClass() const override
bool isConstEval() const override
bool hasReferencesRelation() const override
void _writeTagData(const DefType) const
void overrideReferencedByRelation(bool e) override
bool isEnumStruct() const override
bool hasEnumValues() const override
void setInbodyDocumentation(const QCString &d, const QCString &inbodyFile, int inbodyLine) override
bool isExplicit() const override
void _writeCategoryRelation(OutputList &ol) const
void setTemplateSpecialization(bool b) override
bool isTemplateSpecialization() const override
void setInitializer(const QCString &i) override
QCString fieldType() const override
const MemberDef * inheritsDocsFrom() const override
int getDeclLine() const override
void setTypeConstraints(const ArgumentList &al) override
void setVhdlSpecifiers(VhdlSpecifier s) override
bool isImplementation() const override
void _writeMultiLineInitializer(OutputList &ol, const QCString &scopeName) const
bool livesInsideEnum() const override
bool isDelete() const override
void setEnumScope(MemberDef *md, bool livesInsideEnum=FALSE) override
QCString getCachedTypedefTemplSpec() const override
void setGroupDef(GroupDef *gd, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs, MemberDef *member=nullptr) override
bool isNoExcept() const override
QCString getOutputFileBase() const override
bool isWeak() const override
const MemberDef * getAnonymousEnumType() const override
const ModuleDef * getModuleDef() const override
void setRequiresClause(const QCString &req) override
bool isNoDiscard() const override
void setPrototype(bool p, const QCString &df, int line, int column) override
GroupDef * m_group
void incrementFlowKeyWordCount() override
const MemberDef * getGroupAlias() const override
bool isConstInit() const override
void setModuleDef(ModuleDef *mod) override
QCString m_metaData
TypeSpecifier m_memSpec
TypeSpecifier getMemberSpecifiers() const override
bool hasReferencedByRelation() const override
void setDeclFile(const QCString &df, int line, int column) override
void makeImplementationDetail() override
Grouping::GroupPri_t getGroupPri() const override
bool isLinkable() const override
bool hasDocumentation() const override
int numberOfFlowKeyWords() const override
bool isProtectedGettable() const override
bool m_hasDetailedDescriptionCached
void setDefinitionTemplateParameterLists(const ArgumentLists &lists) override
ExampleList m_examples
const ArgumentList & declArgumentList() const override
void invalidateCachedArgumentTypes() override
bool _isAnonymousBitField() const
QCString m_cachedTypedefTemplSpec
void detectUndocumentedParams(bool hasParamCommand, bool hasReturnCommand) const override
ClassDef * m_relatedAlso
const MemberDef * m_annEnumType
bool isWritable() const override
bool isSealed() const override
void setWriteAccessor(const QCString &w) override
bool isAbstract() const override
bool isPrivateSettable() const override
void setArgsString(const QCString &as) override
QCString getReference() const override
bool isSequence() const override
void _computeLinkableInProject()
MemberDefImpl(const QCString &defFileName, int defLine, int defColumn, const QCString &type, const QCString &name, const QCString &args, const QCString &excp, Protection prot, Specifier virt, bool stat, Relationship related, MemberType t, const ArgumentList &tal, const ArgumentList &al, const QCString &metaData)
QCString m_enumBaseType
Grouping::GroupPri_t m_grouppri
void setRelatedAlso(ClassDef *cd) override
bool hasExamples() const override
void resolveUnnamedParameters(const MemberDef *md) override
void setMemberDefinition(MemberDef *md) override
void writeMemberDocSimple(OutputList &ol, const Definition *container) const override
void cacheTypedefVal(const ClassDef *val, const QCString &templSpec, const QCString &resolvedType) override
QCString documentation() const override
bool isSignal() const override
bool isMaybeVoid() const override
void _writeReimplements(OutputList &ol) const
bool isMaybeAmbiguous() const override
bool hasOneLineInitializer() const override
const MemberList * getSectionList(const Definition *) const override
void setReadAccessor(const QCString &r) override
bool isForeign() const override
void addQualifiers(const StringVector &qualifiers) override
QCString typeString() const override
bool isAssign() const override
bool isStrongEnumValue() const override
void _computeIsDestructor()
bool isNotFriend() const override
void copyArgumentNames(const MemberDef *bmd) override
bool isRemovable() const override
bool isDeleted() const override
MemberDef * m_memDef
MemberDef * m_groupMember
bool isFriend() const override
bool m_livesInsideEnum
ArgumentList m_typeConstraints
ClassDef * relatedAlso() const override
void setReimplements(MemberDef *md) override
MemberVector m_enumFields
void writeEnumDeclaration(OutputList &typeDecl, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod) const override
bool isConstExpr() const override
QCString getGroupFileName() const override
bool isExternal() const override
const FileDef * getFileDef() const override
bool isNonAtomic() const override
const MemberDef * categoryRelation() const override
const MemberVector & enumFieldList() const override
const ClassDef * getClassDef() const override
QCString m_def
bool isFunctionOrSignalSlot() const override
void overrideInlineSource(bool e) override
void overrideCallerGraph(bool e) override
bool isPrivateGettable() const override
void setExplicitExternal(bool b, const QCString &df, int line, int column) override
bool isEvent() const override
ClassDef * m_cachedAnonymousType
void setMemberSpecifiers(TypeSpecifier s) override
bool isFunctionPtr() const override
QCString m_cachedResolvedType
bool hasCallerGraph() const override
bool isObjCProperty() const override
bool isPrototype() const override
bool isTypedef() const override
QCString m_write
void _writeGroupInclude(OutputList &ol, bool inGroup) const
FileDef * m_fileDef
bool hasDocumentedEnumValues() const override
~MemberDefImpl() override=default
uint8_t m_isLinkableCached
QCString m_declFileName
QCString m_exception
bool isVariable() const override
void mergeMemberSpecifiers(TypeSpecifier s) override
ArgumentList m_tArgList
QCString requiresClause() const override
bool isConstrained() const override
bool isReadable() const override
QCString getReadAccessor() const override
void writeLink(OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, bool onlyText=FALSE) const override
QCString m_explicitOutputFileBase
void setBriefDescription(const QCString &b, const QCString &briefFile, int briefLine) override
bool isDefault() const override
void _writeCallGraph(OutputList &ol) const
bool isOverride() const override
const MemberDef * m_docProvider
bool isSettable() const override
bool isBound() const override
CodeSymbolType codeSymbolType() const override
QCString displayDefinition() const override
virtual void setMemberDeclaration(MemberDef *md)=0
virtual void resolveUnnamedParameters(const MemberDef *md)=0
virtual void setDocsForDefinition(bool b)=0
virtual void mergeMemberSpecifiers(TypeSpecifier s)=0
virtual void addQualifiers(const StringVector &qualifiers)=0
virtual void moveDeclArgumentList(std::unique_ptr< ArgumentList > al)=0
virtual void setGroupDef(GroupDef *gd, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs, MemberDef *member=nullptr)=0
virtual void setMemberDefinition(MemberDef *md)=0
virtual void moveArgumentList(std::unique_ptr< ArgumentList > al)=0
virtual void insertReimplementedBy(MemberDef *md)=0
A class representing a group of members.
Definition membergroup.h:43
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:108
A vector of MemberDef object.
Definition memberlist.h:34
iterator end() noexcept
Definition memberlist.h:55
iterator begin() noexcept
Definition memberlist.h:53
An abstract interface of a namespace symbol.
virtual QCString compoundTypeString() const =0
void startCodeFragment(const QCString &style)
Definition outputlist.h:278
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:314
bool isEnabled(OutputType o)
void endIndent()
Definition outputlist.h:585
void writeString(const QCString &text)
Definition outputlist.h:412
void startMemberDeclaration()
Definition outputlist.h:570
void startMemberDoc(const QCString &clName, const QCString &memName, const QCString &anchor, const QCString &title, int memCount, int memTotal, bool showInline)
Definition outputlist.h:532
void endDescTableRow()
Definition outputlist.h:633
void startMemberDocName(bool align)
Definition outputlist.h:679
void endParameterExtra(bool last, bool one, bool bracket)
Definition outputlist.h:693
void writeChar(char c)
Definition outputlist.h:530
void disable(OutputType o)
void endMemberTemplateParams(const QCString &anchor, const QCString &inheritId)
Definition outputlist.h:500
void endMemberDocName()
Definition outputlist.h:681
void endMemberDoc(bool hasArgs)
Definition outputlist.h:536
void startDescTableInit()
Definition outputlist.h:639
void startCallGraph()
Definition outputlist.h:655
void endDescTable()
Definition outputlist.h:629
void startParameterExtra()
Definition outputlist.h:691
const OutputCodeList & codeGenerators() const
Definition outputlist.h:357
void startParameterList(bool openBracket)
Definition outputlist.h:699
void writeLatexSpacing()
Definition outputlist.h:546
void enable(OutputType o)
void endInlineMemberType()
Definition outputlist.h:727
void endMemberDescription()
Definition outputlist.h:568
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition outputlist.h:440
void startInlineMemberType()
Definition outputlist.h:725
void startInlineMemberDoc()
Definition outputlist.h:733
void writeDoc(const IDocNodeAST *ast, const Definition *ctx, const MemberDef *md)
Definition outputlist.h:384
void startMemberDescription(const QCString &anchor, const QCString &inheritId=QCString(), bool typ=false)
Definition outputlist.h:566
void endDescTableTitle()
Definition outputlist.h:637
void endDoxyAnchor(const QCString &fn, const QCString &anchor)
Definition outputlist.h:542
void docify(const QCString &s)
Definition outputlist.h:438
void startIndent()
Definition outputlist.h:583
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:408
void endDescForItem()
Definition outputlist.h:550
void endExamples()
Definition outputlist.h:581
void exceptionEntry(const QCString &prefix, bool closeBracket)
Definition outputlist.h:703
void endParagraph()
Definition outputlist.h:410
void endDescTableData()
Definition outputlist.h:645
void addIndexItem(const QCString &s1, const QCString &s2)
Definition outputlist.h:591
void disableAll()
void startDescTableTitle()
Definition outputlist.h:635
void startExamples()
Definition outputlist.h:579
void endInlineMemberDoc()
Definition outputlist.h:735
void endMemberDocPrefixItem()
Definition outputlist.h:677
void startParameterDefVal(const char *separator)
Definition outputlist.h:695
void startAnonTypeScope(int i1)
Definition outputlist.h:490
void endTextLink()
Definition outputlist.h:445
void startBold()
Definition outputlist.h:562
void endMemberItem(OutputGenerator::MemberItemType type)
Definition outputlist.h:496
void startDescTable(const QCString &title, const bool hasInits)
Definition outputlist.h:627
void startTypewriter()
Definition outputlist.h:450
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
void addLabel(const QCString &fName, const QCString &anchor)
Definition outputlist.h:544
void startDescTableData()
Definition outputlist.h:643
void pushGeneratorState()
void insertMemberAlign(bool templ=FALSE)
Definition outputlist.h:518
void startDescForItem()
Definition outputlist.h:548
void endParameterDefVal()
Definition outputlist.h:697
void startParameterType(bool first, const QCString &key)
Definition outputlist.h:683
void disableAllBut(OutputType o)
void endParameterName()
Definition outputlist.h:689
void popGeneratorState()
void endBold()
Definition outputlist.h:564
void startDoxyAnchor(const QCString &fName, const QCString &manName, const QCString &anchor, const QCString &name, const QCString &args)
Definition outputlist.h:538
void endLabels()
Definition outputlist.h:741
void endParameterList()
Definition outputlist.h:701
void endCallGraph(DotCallGraph &g)
Definition outputlist.h:657
void startInlineMemberName()
Definition outputlist.h:729
void writeLabel(const QCString &l, bool isLast)
Definition outputlist.h:739
void startLabels()
Definition outputlist.h:737
void endParameterType()
Definition outputlist.h:685
void startMemberDocPrefixItem()
Definition outputlist.h:675
void endAnonTypeScope(int i1)
Definition outputlist.h:492
void endMemberDeclaration(const QCString &anchor, const QCString &inheritId)
Definition outputlist.h:572
void startParameterName(bool one)
Definition outputlist.h:687
void enableAll()
void startMemberItem(const QCString &anchor, OutputGenerator::MemberItemType type, const QCString &id=QCString())
Definition outputlist.h:494
void endTypewriter()
Definition outputlist.h:452
void endInlineMemberName()
Definition outputlist.h:731
void lineBreak(const QCString &style=QCString())
Definition outputlist.h:560
void parseText(const QCString &textStr)
void writeNonBreakableSpace(int num)
Definition outputlist.h:625
void endDescTableInit()
Definition outputlist.h:641
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:443
void startDescTableRow()
Definition outputlist.h:631
void startMemberTemplateParams()
Definition outputlist.h:498
std::unique_ptr< CodeParserInterface > getCodeParser(const QCString &extension)
Gets the interface to the parser associated with a given extension.
Definition parserintf.h:218
This is an alternative implementation of QCString.
Definition qcstring.h:101
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
QCString & prepend(const char *s)
Definition qcstring.h:407
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153
bool startsWith(const char *s) const
Definition qcstring.h:492
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:226
QCString lower() const
Definition qcstring.h:234
bool endsWith(const char *s) const
Definition qcstring.h:504
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:567
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition qcstring.h:245
QCString & remove(size_t index, size_t len)
Definition qcstring.h:427
const std::string & str() const
Definition qcstring.h:526
QCString & append(char c)
Definition qcstring.h:381
QCString right(size_t len) const
Definition qcstring.h:219
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:91
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:159
QCString left(size_t len) const
Definition qcstring.h:214
bool stripPrefix(const QCString &prefix)
Definition qcstring.h:198
void clear()
Definition qcstring.h:169
Implements TextGeneratorIntf for an OutputDocInterface stream.
Definition util.h:77
Text streaming class that buffers data.
Definition textstream.h:36
virtual QCString trProvidedByCategory()=0
virtual QCString trDefineValue()=0
virtual QCString trExtendsClass()=0
virtual QCString trCallerGraph()=0
virtual QCString trReimplementedInList(int numEntries)=0
virtual QCString trGlobal(bool first_capital, bool singular)=0
virtual QCString trCallGraph()=0
virtual QCString trEnumerationValues()=0
virtual QCString trMore()=0
virtual QCString trInitialValue()=0
virtual QCString trImplementedInList(int numEntries)=0
virtual QCString trSubprogram(bool first_capital, bool singular)=0
virtual QCString trMember(bool first_capital, bool singular)=0
virtual QCString trReimplementedFromList(int numEntries)=0
virtual QCString trVhdlType(VhdlSpecifier type, bool single)=0
virtual QCString trImplementedFromList(int numEntries)=0
Wrapper class for a number of boolean properties.
Definition types.h:492
static bool writeVHDLTypeDocumentation(const MemberDef *mdef, const Definition *d, OutputList &ol)
static void writeSource(const MemberDef *mdef, OutputList &ol, const QCString &cname)
static bool isMisc(const MemberDef *mdef)
ClassDefMutable * toClassDefMutable(Definition *d)
ClassDef * getClass(const QCString &n)
ClassDef * toClassDef(Definition *d)
Class representing a regular expression.
Definition regex.h:39
Object representing the matching results.
Definition regex.h:153
#define Config_getInt(name)
Definition config.h:34
#define Config_getBool(name)
Definition config.h:33
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition construct.h:37
std::vector< std::string > StringVector
Definition containers.h:33
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
Definition defargs.l:814
Definition * toDefinition(DefinitionMutable *dm)
#define AUTO_TRACE_ADD(...)
Definition docnode.cpp:47
#define AUTO_TRACE(...)
Definition docnode.cpp:46
void docFindSections(const QCString &input, const Definition *d, const QCString &fileName)
IDocParserPtr createDocParser()
factory function to create a parser
Definition docparser.cpp:54
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
static void setAnonymousEnumType()
Definition doxygen.cpp:8799
static void writeTagFile()
FileDef * toFileDef(Definition *d)
Definition filedef.cpp:1892
GroupDef * toGroupDef(Definition *d)
Translator * theTranslator
Definition language.cpp:71
static QCString simplifyTypeForTable(const QCString &s)
static void writeExceptionList(OutputList &ol, const ClassDef *cd, const MemberDef *md)
static void writeExceptionListImpl(OutputList &ol, const ClassDef *cd, const MemberDef *md, QCString const &exception)
static QCString stripTrailingReturn(const QCString &trailRet)
static QCString combineArgsAndException(QCString args, QCString exception)
static bool writeDefArgumentList(OutputList &ol, const Definition *scope, const MemberDef *md)
static std::mutex g_hasDetailedDescriptionMutex
static std::mutex g_docCrossReferenceMutex
std::unique_ptr< MemberDef > createMemberDefAlias(const Definition *newScope, const MemberDef *aliasMd)
static void invalidateCachedTypesInArgumentList(ArgumentList &al)
static std::mutex g_detectUndocumentedParamsMutex
static void transferArgumentDocumentation(ArgumentList &decAl, ArgumentList &defAl)
void addDocCrossReference(const MemberDef *s, const MemberDef *d)
static std::mutex g_cachedAnonymousTypeMutex
MemberDefMutable * toMemberDefMutable(Definition *d)
void combineDeclarationAndDefinition(MemberDefMutable *mdec, MemberDefMutable *mdef)
static QCString addTemplateNames(const QCString &s, const QCString &n, const QCString &t)
MemberDef * toMemberDef(Definition *d)
static const reg::Ex reAnonymous(R"([\w:@]*@\d+)")
std::unique_ptr< MemberDef > createMemberDef(const QCString &defFileName, int defLine, int defColumn, const QCString &type, const QCString &name, const QCString &args, const QCString &excp, Protection prot, Specifier virt, bool stat, Relationship related, MemberType t, const ArgumentList &tal, const ArgumentList &al, const QCString &metaData)
Factory method to create a new instance of a MemberDef.
void msg(const char *fmt,...)
Definition message.cpp:98
#define warn_undoc(file, line, fmt,...)
Definition message.h:64
#define warn_uncond(fmt,...)
Definition message.h:79
#define warn(file, line, fmt,...)
Definition message.h:59
#define err(fmt,...)
Definition message.h:84
#define warn_doc_error(file, line, fmt,...)
Definition message.h:74
ModuleDef * toModuleDef(Definition *d)
NamespaceDef * toNamespaceDef(Definition *d)
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
Definition regex.cpp:748
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:477
#define qsnprintf
Definition qcstring.h:49
const char * qPrint(const char *s)
Definition qcstring.h:661
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
uint32_t qstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
Definition qcstring.h:58
#define ASSERT(x)
Definition qcstring.h:39
std::vector< RefItem * > RefItemVector
Definition reflist.h:133
Web server based search engine.
std::string_view stripWhiteSpace(std::string_view s)
Given a string view s, returns a new, narrower view on that string, skipping over any leading or trai...
Definition stringutil.h:72
This class contains the information about the argument of a function or template.
Definition arguments.h:27
QCString type
Definition arguments.h:37
QCString name
Definition arguments.h:39
QCString defval
Definition arguments.h:41
QCString docs
Definition arguments.h:42
QCString array
Definition arguments.h:40
QCString attrib
Definition arguments.h:36
GroupPri_t
Grouping priority.
Definition types.h:68
@ GROUPING_AUTO_DEF
membership in group was defined via @defgroup
Definition types.h:72
This struct is used to capture the tag file information for an Entry.
Definition entry.h:103
QCString anchor
Definition entry.h:106
QCString fileName
Definition entry.h:105
QCString tagName
Definition entry.h:104
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
@ CSharp
Definition types.h:46
@ Fortran
Definition types.h:53
@ Python
Definition types.h:52
@ Slice
Definition types.h:59
Relationship
Kind of member relationship.
Definition types.h:38
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
QCString removeRedundantWhiteSpace(const QCString &s)
Definition util.cpp:578
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
Definition util.cpp:5549
bool protectionLevelVisible(Protection prot)
Definition util.cpp:6269
QCString substituteTemplateArgumentsInString(const QCString &nm, const ArgumentList &formalArgs, const ArgumentList *actualArgs)
Definition util.cpp:4705
void writeTypeConstraints(OutputList &ol, const Definition *d, const ArgumentList &al)
Definition util.cpp:5755
QCString stripAnonymousNamespaceScope(const QCString &s)
Definition util.cpp:241
QCString tempArgListToString(const ArgumentList &al, SrcLangExt lang, bool includeDefault)
Definition util.cpp:1219
void addRefItem(const RefItemVector &sli, const QCString &key, const QCString &prefix, const QCString &name, const QCString &title, const QCString &args, const Definition *scope)
Definition util.cpp:5146
void writePageRef(OutputList &ol, const QCString &cn, const QCString &mn)
Definition util.cpp:270
bool found
Definition util.cpp:984
QCString removeAnonymousScopes(const QCString &str)
Definition util.cpp:172
bool matchArguments2(const Definition *srcScope, const FileDef *srcFileScope, const ArgumentList *srcAl, const Definition *dstScope, const FileDef *dstFileScope, const ArgumentList *dstAl, bool checkCV, SrcLangExt lang)
Definition util.cpp:1931
QCString stripExtension(const QCString &fName)
Definition util.cpp:5265
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:4266
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:6229
void mergeMemberOverrideOptions(MemberDefMutable *md1, MemberDefMutable *md2)
Definition util.cpp:7188
void writeMarkerList(OutputList &ol, const std::string &markerText, size_t numMarkers, std::function< void(size_t)> replaceFunc)
Definition util.cpp:1103
QCString inlineArgListToDoc(const ArgumentList &al)
Definition util.cpp:1156
void linkifyText(const TextGeneratorIntf &out, const Definition *scope, const FileDef *fileScope, const Definition *self, const QCString &text, bool autoBreak, bool external, bool keepSpaces, int indentLevel)
Definition util.cpp:904
void writeExamples(OutputList &ol, const ExampleList &list)
Definition util.cpp:1127
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5243
A bunch of utility functions.
bool isId(int c)
Definition util.h:202