Doxygen
Loading...
Searching...
No Matches
ClassDefImpl Class Reference

Implementation of the ClassDef interface. More...

Inheritance diagram for ClassDefImpl:
Collaboration diagram for ClassDefImpl:

Public Member Functions

 ClassDefImpl (const QCString &fileName, int startLine, int startColumn, const QCString &name, CompoundType ct, const QCString &ref=QCString(), const QCString &fName=QCString(), bool isSymbol=TRUE, bool isJavaEnum=FALSE)
DefType definitionType () const override
std::unique_ptr< ClassDefdeepCopy (const QCString &name) const override
void moveTo (Definition *) override
CodeSymbolType codeSymbolType () const override
QCString getOutputFileBase () const override
QCString getInstanceOutputFileBase () const override
QCString getSourceFileBase () const override
QCString getReference () const override
bool isReference () const override
bool isLocal () const override
 Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES.
ClassLinkedRefMap getClasses () const override
 returns the classes nested into this class
bool hasDocumentation () const override
bool hasDetailedDescription () const override
 returns TRUE if this class has a non-empty detailed description
QCString collaborationGraphFileName () const override
 returns the file name to use for the collaboration graph
QCString inheritanceGraphFileName () const override
 returns the file name to use for the inheritance graph
QCString displayName (bool includeScope=TRUE) const override
CompoundType compoundType () const override
 Returns the type of compound this is, i.e.
QCString compoundTypeString () const override
 Returns the type of compound as a string.
const BaseClassListbaseClasses () const override
 Returns the list of base classes from which this class directly inherits.
void updateBaseClasses (const BaseClassList &bcd) override
 Update the list of base classes to the one passed.
const BaseClassListsubClasses () const override
 Returns the list of sub classes that directly derive from this class.
void updateSubClasses (const BaseClassList &bcd) override
 Update the list of sub classes to the one passed.
const MemberNameInfoLinkedMapmemberNameInfoLinkedMap () const override
 Returns a dictionary of all members.
Protection protection () const override
 Return the protection level (Public,Protected,Private) in which this compound was found.
bool isLinkableInProject () const override
bool isLinkable () const override
bool isVisibleInHierarchy () const override
bool visibleInParentsDeclList () const override
 show this class in the declaration section of its parent?
const ArgumentListtemplateArguments () const override
 Returns the template arguments of this class.
FileDefgetFileDef () const override
 Returns the namespace this compound is in, or 0 if it has a global scope.
ModuleDefgetModuleDef () const override
 Returns the C++20 module in which this compound's definition can be found.
const MemberDefgetMemberByName (const QCString &) const override
 Returns the member with the given name.
int isBaseClass (const ClassDef *bcd, bool followInstances, const QCString &templSpec) const override
 Returns TRUE iff bcd is a direct or indirect base class of this class.
bool isSubClass (ClassDef *bcd, int level=0) const override
 Returns TRUE iff bcd is a direct or indirect sub class of this class.
bool isAccessibleMember (const MemberDef *md) const override
 returns TRUE iff md is a member of this class or of the the public/protected members of a base class
const TemplateInstanceListgetTemplateInstances () const override
 Returns a sorted dictionary with all template instances found for this template class.
const ClassDeftemplateMaster () const override
 Returns the template master of which this class is an instance.
bool isTemplate () const override
 Returns TRUE if this class is a template.
const IncludeInfoincludeInfo () const override
const UsesClassListusedImplementationClasses () const override
const UsesClassListusedByImplementationClasses () const override
const ConstraintClassListtemplateTypeConstraints () const override
bool isTemplateArgument () const override
const DefinitionfindInnerCompound (const QCString &name) const override
ArgumentLists getTemplateParameterLists () const override
 Returns the template parameter lists that form the template declaration of this class.
QCString qualifiedNameWithTemplateParameters (const ArgumentLists *actualParams=nullptr, uint32_t *actualParamIndex=nullptr) const override
bool isAbstract () const override
 Returns TRUE if there is at least one pure virtual member in this class.
bool isObjectiveC () const override
 Returns TRUE if this class is implemented in Objective-C.
bool isFortran () const override
 Returns TRUE if this class is implemented in Fortran.
bool isCSharp () const override
 Returns TRUE if this class is implemented in C#.
bool isFinal () const override
 Returns TRUE if this class is marked as final.
bool isSealed () const override
 Returns TRUE if this class is marked as sealed.
bool isPublished () const override
 Returns TRUE if this class is marked as published.
bool isExtension () const override
 Returns TRUE if this class represents an Objective-C 2.0 extension (nameless category).
bool isForwardDeclared () const override
 Returns TRUE if this class represents a forward declaration of a template class.
bool isInterface () const override
 Returns TRUE if this class represents an interface.
ClassDefcategoryOf () const override
 Returns the class of which this is a category (Objective-C only).
QCString className () const override
 Returns the name of the class including outer classes, but not including namespaces.
MemberListgetMemberList (MemberListType lt) const override
 Returns the members in the list identified by lt.
const MemberListsgetMemberLists () const override
 Returns the list containing the list of members sorted per type.
const MemberGroupListgetMemberGroups () const override
 Returns the member groups defined for this class.
const TemplateNameMapgetTemplateBaseClassNames () const override
bool isUsedOnly () const override
QCString anchor () const override
bool isEmbeddedInOuterScope () const override
bool isSimple () const override
const ClassDeftagLessReference () const override
const MemberDefisSmartPointer () const override
bool isJavaEnum () const override
QCString title () const override
QCString generatedFromFiles () const override
const FileListusedFiles () const override
const ArgumentListtypeConstraints () const override
const ExampleListgetExamples () const override
bool hasExamples () const override
QCString getMemberListFileName () const override
bool subGrouping () const override
bool isSliceLocal () const override
bool hasNonReferenceSuperClass () const override
QCString requiresClause () const override
StringVector getQualifiers () const override
bool containsOverload (const MemberDef *md) const override
bool isImplicitTemplateInstance () const override
ClassDefinsertTemplateInstance (const QCString &fileName, int startLine, int startColumn, const QCString &templSpec, bool &freshInstance) override
void insertBaseClass (ClassDef *, const QCString &name, Protection p, Specifier s, const QCString &t=QCString()) override
void insertSubClass (ClassDef *, Protection p, Specifier s, const QCString &t=QCString()) override
void insertExplicitTemplateInstance (ClassDef *instance, const QCString &spec) override
void setIncludeFile (FileDef *fd, const QCString &incName, bool local, bool force) override
void insertMember (MemberDef *) override
void insertUsedFile (const FileDef *) override
bool addExample (const QCString &anchor, const QCString &name, const QCString &file) override
void mergeCategory (ClassDef *category) override
void setFileDef (FileDef *fd) override
void setModuleDef (ModuleDef *mod) override
void setSubGrouping (bool enabled) override
void setProtection (Protection p) override
void setGroupDefForAllMembers (GroupDef *g, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs) override
void addInnerCompound (Definition *d) override
void addUsedClass (ClassDef *cd, const QCString &accessName, Protection prot) override
void addUsedByClass (ClassDef *cd, const QCString &accessName, Protection prot) override
void setIsStatic (bool b) override
void setCompoundType (CompoundType t) override
void setClassName (const QCString &name) override
void setClassSpecifier (TypeSpecifier spec) override
void addQualifiers (const StringVector &qualifiers) override
void setTemplateArguments (const ArgumentList &al) override
void setTemplateBaseClassNames (const TemplateNameMap &templateNames) override
void setTemplateMaster (const ClassDef *tm) override
void setImplicitTemplateInstance (bool b) override
void setTypeConstraints (const ArgumentList &al) override
void addMemberToTemplateInstance (const MemberDef *md, const ArgumentList &templateArguments, const QCString &templSpec) override
void addMembersToTemplateInstance (const ClassDef *cd, const ArgumentList &templateArguments, const QCString &templSpec) override
void makeTemplateArgument (bool b=TRUE) override
void setCategoryOf (ClassDef *cd) override
void setUsedOnly (bool b) override
void setTagLessReference (const ClassDef *cd) override
void setMetaData (const QCString &md) override
void findSectionsInDocumentation () override
void addMembersToMemberGroup () override
void addListReferences () override
void addRequirementReferences () override
void addTypeConstraints () override
void computeAnchors () override
void mergeMembers () override
void sortMemberLists () override
void distributeMemberGroupDocumentation () override
void writeDocumentation (OutputList &ol) const override
void writeDocumentationForInnerClasses (OutputList &ol) const override
void writeMemberPages (OutputList &ol) const override
void writeMemberList (OutputList &ol) const override
void writeDeclaration (OutputList &ol, const MemberDef *md, bool inGroup, int indentLevel, const ClassDef *inheritedFrom, const QCString &inheritId) const override
void writeQuickMemberLinks (OutputList &ol, const MemberDef *md) const override
void writePageNavigation (OutputList &ol) const override
void writeSummaryLinks (OutputList &ol) const override
void reclassifyMember (MemberDefMutable *md, MemberType t) override
void writeInlineDocumentation (OutputList &ol) const override
 Write class documentation inside another container (i.e.
void writeDeclarationLink (OutputList &ol, bool &found, const QCString &header, bool localNames) const override
void removeMemberFromLists (MemberDef *md) override
void setAnonymousEnumType () override
void countMembers () override
void sortAllMembersList () override
void addGroupedInheritedMembers (OutputList &ol, MemberListType lt, const ClassDef *inheritedFrom, const QCString &inheritId) const override
void writeTagFile (TextStream &) const override
int countMembersIncludingGrouped (MemberListType lt, const ClassDef *inheritedFrom, bool additional) const override
int countMemberDeclarations (MemberListType lt, const ClassDef *inheritedFrom, MemberListType lt2, bool invert, bool showAlways, ClassDefSet &visitedClasses) const override
void writeMemberDeclarations (OutputList &ol, ClassDefSet &visitedClasses, MemberListType lt, const QCString &title, const QCString &subTitle=QCString(), bool showInline=FALSE, const ClassDef *inheritedFrom=nullptr, MemberListType lt2=MemberListType::Invalid(), bool invert=FALSE, bool showAlways=FALSE) const override
void setRequiresClause (const QCString &req) override
CLASS_GRAPH_t hasInheritanceGraph () const override
void overrideInheritanceGraph (CLASS_GRAPH_t e) override
bool hasCollaborationGraph () const override
void overrideCollaborationGraph (bool e) override
Public Member Functions inherited from DefinitionMixin< ClassDefMutable >
 DefinitionMixin (const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
DefinitionMixinoperator= (const DefinitionMixin &other)
 ~DefinitionMixin () override=default
bool isAlias () const override
const QCStringname () const override
bool isAnonymous () const override
const QCStringlocalName () const override
QCString qualifiedName () const override
QCString symbolName () const override
QCString getSourceFileBase () const override
QCString getSourceAnchor () const override
QCString documentation () const override
int docLine () const override
QCString docFile () const override
QCString briefDescription (bool abbreviate=FALSE) const override
QCString briefDescriptionAsTooltip () const override
int briefLine () const override
QCString inbodyDocumentation () const override
QCString inbodyFile () const override
int inbodyLine () const override
QCString briefFile () const override
QCString getDefFileName () const override
QCString getDefFileExtension () const override
int getDefLine () const override
int getDefColumn () const override
bool hasDocumentation () const override
bool hasUserDocumentation () const override
bool isVisibleInProject () const override
bool isVisible () const override
bool isHidden () const override
bool isArtificial () const override
bool isExported () const override
QCString getReference () const override
bool isReference () const override
QCString externalReference (const QCString &relPath) const override
int getStartDefLine () const override
int getStartBodyLine () const override
int getEndBodyLine () const override
const FileDefgetBodyDef () const override
SrcLangExt getLanguage () const override
const GroupListpartOfGroups () const override
bool isLinkableViaGroup () const override
const RefItemVectorxrefListItems () const override
const RequirementRefsrequirementReferences () const override
const DefinitionfindInnerCompound (const QCString &name) const override
DefinitiongetOuterScope () const override
const MemberVectorgetReferencesMembers () const override
const MemberVectorgetReferencedByMembers () const override
bool hasSections () const override
bool hasSources () const override
bool hasBriefDescription () const override
QCString id () const override
const SectionRefsgetSectionRefs () const override
void setName (const QCString &name) override
void setId (const QCString &name) override
void setDefFile (const QCString &df, int defLine, int defColumn) override
void setDocumentation (const QCString &doc, const QCString &docFile, int docLine, bool stripWhiteSpace=TRUE) override
void setBriefDescription (const QCString &brief, const QCString &briefFile, int briefLine) override
void setInbodyDocumentation (const QCString &doc, const QCString &docFile, int docLine) override
void setReference (const QCString &r) override
void addSectionsToDefinition (const std::vector< const SectionInfo * > &anchorList) override
void setBodySegment (int defLine, int bls, int ble) override
void setBodyDef (const FileDef *fd) override
void addSourceReferencedBy (MemberDef *md, const QCString &sourceRefName) override
void addSourceReferences (MemberDef *md, const QCString &sourceRefName) override
void setRefItems (const RefItemVector &sli) override
void setRequirementReferences (const RequirementRefs &rqli) override
void mergeRefItems (Definition *def) override
void mergeReferences (const Definition *other) override
void mergeReferencedBy (const Definition *other) override
void addInnerCompound (Definition *def) override
void setOuterScope (Definition *def) override
void setHidden (bool b) override
void setArtificial (bool b) override
void setExported (bool b) override
void setLanguage (SrcLangExt lang) override
void writeSourceDef (OutputList &ol) const override
void writeInlineCode (OutputList &ol, const QCString &scopeName) const override
bool hasSourceRefs () const override
bool hasSourceReffedBy () const override
void writeSourceRefs (OutputList &ol, const QCString &scopeName) const override
void writeSourceReffedBy (OutputList &ol, const QCString &scopeName) const override
bool hasRequirementRefs () const override
void writeRequirementRefs (OutputList &ol) const override
void makePartOfGroup (GroupDef *gd) override
void writeNavigationPath (OutputList &ol) const override
QCString navigationPathAsString () const override
void writeQuickMemberLinks (OutputList &ol, const MemberDef *md) const override
void writeSummaryLinks (OutputList &ol) const override
void writePageNavigation (OutputList &ol) const override
QCString pathFragment () const override
void writeDocAnchorsToTagFile (TextStream &fs) const override
void setLocalName (const QCString &name) override
void writeToc (OutputList &ol, const LocalToc &lt) const override
void computeTooltip () override
void _setSymbolName (const QCString &name) override
QCString _symbolName () const override

Private Member Functions

int countInheritedByNodes () const
int countInheritsNodes () const
int countInheritanceNodes () const
void addUsedInterfaceClasses (MemberDef *md, const QCString &typeStr)
void showUsedFiles (OutputList &ol) const
void writeDocumentationContents (OutputList &ol, const QCString &pageTitle) const
void internalInsertMember (MemberDef *md, Protection prot, bool addToAllList)
void addMemberToList (MemberListType lt, MemberDef *md, bool isBrief)
void writeInheritedMemberDeclarations (OutputList &ol, ClassDefSet &visitedClasses, MemberListType lt, MemberListType lt2, const QCString &title, const ClassDef *inheritedFrom, bool invert, bool showAlways) const
void writeMemberDocumentation (OutputList &ol, MemberListType lt, const QCString &title, bool showInline=FALSE) const
void writeSimpleMemberDocumentation (OutputList &ol, MemberListType lt) const
void writePlainMemberDeclaration (OutputList &ol, MemberListType lt, bool inGroup, int indentLevel, const ClassDef *inheritedFrom, const QCString &inheritId) const
void writeBriefDescription (OutputList &ol, bool exampleFlag) const
void writeDetailedDescription (OutputList &ol, const QCString &pageType, bool exampleFlag, const QCString &title, const QCString &anchor=QCString()) const
void writeIncludeFiles (OutputList &ol) const
void writeIncludeFilesForSlice (OutputList &ol) const
void writeInheritanceGraph (OutputList &ol) const
void writeCollaborationGraph (OutputList &ol) const
void writeMemberGroups (OutputList &ol, bool showInline=FALSE) const
void writeNestedClasses (OutputList &ol, const QCString &title) const
void writeInlineClasses (OutputList &ol) const
void startMemberDeclarations (OutputList &ol) const
void endMemberDeclarations (OutputList &ol) const
void startMemberDocumentation (OutputList &ol) const
void endMemberDocumentation (OutputList &ol) const
void writeAuthorSection (OutputList &ol) const
void writeMoreLink (OutputList &ol, const QCString &anchor) const
void writeDetailedDocumentationBody (OutputList &ol) const
int countAdditionalInheritedMembers () const
void writeAdditionalInheritedMembers (OutputList &ol) const
void addClassAttributes (OutputList &ol) const
int countInheritedDecMembers (MemberListType lt, const ClassDef *inheritedFrom, bool invert, bool showAlways, ClassDefSet &visitedClasses) const
void getTitleForMemberListType (MemberListType type, QCString &title, QCString &subtitle) const
void addTypeConstraint (const QCString &typeConstraint, const QCString &type)
void writeTemplateSpec (OutputList &ol, const Definition *d, const QCString &type, SrcLangExt lang) const
void mergeMembersFromBaseClasses (bool mergeVirtualBaseClass)
void hideDerivedVariablesInPython (ClassDefMutable *cls)

Private Attributes

QCString m_fileName
QCString m_memberListFileName
QCString m_collabFileName
QCString m_inheritFileName
std::unique_ptr< IncludeInfom_incInfo
BaseClassList m_inherits
BaseClassList m_inheritedBy
FileDefm_fileDef = nullptr
ModuleDefm_moduleDef = nullptr
MemberNameInfoLinkedMap m_allMemberNameInfoLinkedMap
ArgumentList m_tempArgs
ArgumentList m_typeConstraints
FileList m_files
ExampleList m_examples
ClassDef::CompoundType m_compType
Protection m_prot
ClassLinkedRefMap m_innerClasses
UsesClassList m_usesImplClassList
UsesClassList m_usedByImplClassList
ConstraintClassList m_constraintClassList
TemplateInstanceList m_templateInstances
TemplateNameMap m_templBaseClassNames
const ClassDefm_templateMaster = nullptr
QCString m_className
ClassDefm_categoryOf = nullptr
MemberLists m_memberLists
MemberGroupList m_memberGroups
bool m_isAbstract = false
bool m_isStatic = false
bool m_membersMerged = false
bool m_isLocal = false
bool m_isTemplArg = false
bool m_subGrouping = false
bool m_usedOnly = false
 Reason of existence is a "use" relation.
StringSet m_vhdlSummaryTitles
 List of titles to use for the summary.
bool m_isSimple = false
 Is this a simple (non-nested) C structure?
const MemberDefm_arrowOperator = nullptr
 Does this class overloaded the -> operator?
const ClassDefm_tagLessRef = nullptr
bool m_isJavaEnum = false
 Does this class represent a Java style enum?
TypeSpecifier m_spec
QCString m_metaData
QCString m_requiresClause
 C++20 requires clause.
StringVector m_qualifiers
bool m_hasCollaborationGraph = false
CLASS_GRAPH_t m_typeInheritanceGraph = CLASS_GRAPH_t::NO
bool m_implicitTemplateInstance = false

Additional Inherited Members

Public Types inherited from ClassDef
enum  CompoundType {
  Class , Struct , Union , Interface ,
  Protocol , Category , Exception , Service ,
  Singleton
}
 The various compound types. More...
Public Types inherited from Definition
enum  DefType {
  TypeClass = 0 , TypeFile = 1 , TypeNamespace = 2 , TypeModule = 3 ,
  TypeMember = 4 , TypeGroup = 5 , TypePackage = 6 , TypePage = 7 ,
  TypeDir = 8 , TypeConcept = 9
}

Detailed Description

Implementation of the ClassDef interface.

Definition at line 184 of file classdef.cpp.

Constructor & Destructor Documentation

◆ ClassDefImpl()

ClassDefImpl::ClassDefImpl ( const QCString & fileName,
int startLine,
int startColumn,
const QCString & name,
CompoundType ct,
const QCString & ref = QCString(),
const QCString & fName = QCString(),
bool isSymbol = TRUE,
bool isJavaEnum = FALSE )

Definition at line 801 of file classdef.cpp.

806 : DefinitionMixin(defFileName,defLine,defColumn,removeRedundantWhiteSpace(nm),nullptr,nullptr,isSymbol)
807{
808 AUTO_TRACE("name={}",name());
809 setReference(lref);
810 m_compType = ct;
812 QCString compTypeString = getCompoundTypeString(getLanguage(),ct,isJavaEnum);
813 if (!fName.isEmpty())
814 {
816 }
817 else
818 {
819 m_fileName=compTypeString+name();
820 }
821 m_prot=Protection::Public;
822 //nspace=nullptr;
823 m_fileDef=nullptr;
824 m_moduleDef=nullptr;
825 m_subGrouping=Config_getBool(SUBGROUPING);
826 m_templateMaster =nullptr;
831 m_categoryOf = nullptr;
833 m_isSimple = Config_getBool(INLINE_SIMPLE_STRUCTS);
834 m_arrowOperator = nullptr;
835 m_tagLessRef = nullptr;
836 m_spec=TypeSpecifier();
837 //QCString ns;
838 //extractNamespaceName(name,className,ns);
839 //printf("m_name=%s m_className=%s ns=%s\n",qPrint(m_name),qPrint(m_className),qPrint(ns));
840
841 // we cannot use getLanguage at this point, as setLanguage has not been called.
842 SrcLangExt lang = getLanguageFromFileName(defFileName);
843 if ((lang==SrcLangExt::Cpp || lang==SrcLangExt::ObjC) && guessSection(defFileName).isSource())
844 {
846 }
847 else
848 {
850 }
851 m_hasCollaborationGraph = Config_getBool(COLLABORATION_GRAPH);
853 m_memberListFileName = convertNameToFile(compTypeString+name()+"-members");
856 if (lref.isEmpty())
857 {
859 }
860 AUTO_TRACE_EXIT("m_fileName='{}'",m_fileName);
861}
QCString m_collabFileName
Definition classdef.cpp:420
QCString m_fileName
Definition classdef.cpp:414
const MemberDef * m_arrowOperator
Does this class overloaded the -> operator?
Definition classdef.cpp:538
TypeSpecifier m_spec
Definition classdef.cpp:545
ClassDef * m_categoryOf
Definition classdef.cpp:501
const ClassDef * m_tagLessRef
Definition classdef.cpp:540
Protection m_prot
Definition classdef.cpp:472
QCString m_inheritFileName
Definition classdef.cpp:423
const ClassDef * m_templateMaster
Definition classdef.cpp:493
bool m_membersMerged
Definition classdef.cpp:515
bool m_isJavaEnum
Does this class represent a Java style enum?
Definition classdef.cpp:543
ModuleDef * m_moduleDef
Definition classdef.cpp:448
bool isJavaEnum() const override
bool m_isSimple
Is this a simple (non-nested) C structure?
Definition classdef.cpp:535
CLASS_GRAPH_t m_typeInheritanceGraph
Definition classdef.cpp:555
bool m_isAbstract
Definition classdef.cpp:509
FileDef * m_fileDef
Definition classdef.cpp:445
ClassDef::CompoundType m_compType
Definition classdef.cpp:466
bool m_hasCollaborationGraph
Definition classdef.cpp:554
bool m_isTemplArg
Definition classdef.cpp:520
bool m_usedOnly
Reason of existence is a "use" relation.
Definition classdef.cpp:529
QCString m_memberListFileName
Definition classdef.cpp:417
bool m_subGrouping
Definition classdef.cpp:526
const QCString & name() const override
void setReference(const QCString &r) override
DefinitionMixin(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
SrcLangExt getLanguage() const override
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
static QCString getCompoundTypeString(SrcLangExt lang, ClassDef::CompoundType compType, bool isJavaEnum)
Definition classdef.cpp:146
#define Config_getBool(name)
Definition config.h:33
#define Config_getEnum(name)
Definition config.h:35
#define AUTO_TRACE(...)
Definition docnode.cpp:47
#define AUTO_TRACE_EXIT(...)
Definition docnode.cpp:49
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
SrcLangExt
Definition types.h:207
QCString removeRedundantWhiteSpace(const QCString &s)
Definition util.cpp:568
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
Definition util.cpp:5191
QCString stripExtension(const QCString &fName)
Definition util.cpp:4924
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3485
EntryType guessSection(const QCString &name)
Definition util.cpp:339

References AUTO_TRACE, AUTO_TRACE_EXIT, Config_getBool, Config_getEnum, convertNameToFile(), DefinitionMixin< ClassDefMutable >::DefinitionMixin(), FALSE, getCompoundTypeString(), DefinitionMixin< ClassDefMutable >::getLanguage(), getLanguageFromFileName(), guessSection(), QCString::isEmpty(), isJavaEnum(), m_arrowOperator, m_categoryOf, m_collabFileName, m_compType, m_fileDef, m_fileName, m_hasCollaborationGraph, m_inheritFileName, m_isAbstract, m_isJavaEnum, m_isLocal, m_isSimple, m_isStatic, m_isTemplArg, m_memberListFileName, m_membersMerged, m_moduleDef, m_prot, m_spec, m_subGrouping, m_tagLessRef, m_templateMaster, m_typeInheritanceGraph, m_usedOnly, DefinitionMixin< ClassDefMutable >::name(), removeRedundantWhiteSpace(), DefinitionMixin< ClassDefMutable >::setReference(), stripExtension(), and TRUE.

Referenced by addTypeConstraint(), and insertTemplateInstance().

Member Function Documentation

◆ addClassAttributes()

void ClassDefImpl::addClassAttributes ( OutputList & ol) const
private

Definition at line 2729 of file classdef.cpp.

2730{
2731 StringVector sl;
2732 if (isFinal()) sl.emplace_back("final");
2733 if (isSealed()) sl.emplace_back("sealed");
2734 if (isAbstract()) sl.emplace_back("abstract");
2735 if (isExported()) sl.emplace_back("export");
2736 if (getLanguage()==SrcLangExt::IDL && isPublished()) sl.emplace_back("published");
2737
2738 for (const auto &sx : m_qualifiers)
2739 {
2740 bool alreadyAdded = std::find(sl.begin(), sl.end(), sx) != sl.end();
2741 if (!alreadyAdded)
2742 {
2743 sl.push_back(sx);
2744 }
2745 }
2746
2747 ol.pushGeneratorState();
2749 if (!sl.empty())
2750 {
2751 ol.startLabels();
2752 size_t i=0;
2753 for (const auto &s : sl)
2754 {
2755 i++;
2756 ol.writeLabel(s,i==sl.size());
2757 }
2758 ol.endLabels();
2759 }
2760 ol.popGeneratorState();
2761}
bool isFinal() const override
Returns TRUE if this class is marked as final.
bool isPublished() const override
Returns TRUE if this class is marked as published.
StringVector m_qualifiers
Definition classdef.cpp:552
bool isAbstract() const override
Returns TRUE if there is at least one pure virtual member in this class.
bool isSealed() const override
Returns TRUE if this class is marked as sealed.
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void endLabels()
Definition outputlist.h:742
void writeLabel(const QCString &l, bool isLast)
Definition outputlist.h:740
void startLabels()
Definition outputlist.h:738
std::vector< std::string > StringVector
Definition containers.h:33

References OutputList::disableAllBut(), OutputList::endLabels(), DefinitionMixin< ClassDefMutable >::getLanguage(), Html, isAbstract(), DefinitionMixin< ClassDefMutable >::isExported(), isFinal(), isPublished(), isSealed(), m_qualifiers, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startLabels(), and OutputList::writeLabel().

Referenced by writeDocumentation().

◆ addExample()

bool ClassDefImpl::addExample ( const QCString & anchor,
const QCString & name,
const QCString & file )
overridevirtual

Implements ClassDefMutable.

Definition at line 3413 of file classdef.cpp.

3414{
3415 return m_examples.inSort(Example(anchor,nameStr,file));
3416}
ExampleList m_examples
Definition classdef.cpp:463
QCString anchor() const override

References anchor(), and m_examples.

◆ addGroupedInheritedMembers()

void ClassDefImpl::addGroupedInheritedMembers ( OutputList & ol,
MemberListType lt,
const ClassDef * inheritedFrom,
const QCString & inheritId ) const
overridevirtual

Implements ClassDef.

Definition at line 4944 of file classdef.cpp.

4946{
4947 //printf("** %s::addGroupedInheritedMembers() inheritId=%s\n",qPrint(name()),qPrint(inheritId));
4948 for (const auto &mg : m_memberGroups)
4949 {
4950 if (!mg->allMembersInSameSection() || !m_subGrouping) // group is in its own section
4951 {
4952 mg->addGroupedInheritedMembers(ol,this,lt,inheritedFrom,inheritId);
4953 }
4954 }
4955}
MemberGroupList m_memberGroups
Definition classdef.cpp:506

References m_memberGroups, and m_subGrouping.

◆ addInnerCompound()

void ClassDefImpl::addInnerCompound ( Definition * d)
overridevirtual

Implements DefinitionMutable.

Definition at line 4327 of file classdef.cpp.

4328{
4329 //printf("**** %s::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
4330 if (d->definitionType()==Definition::TypeClass) // only classes can be
4331 // nested in classes.
4332 {
4333 m_innerClasses.add(d->localName(),toClassDef(d));
4334 }
4335}
ClassLinkedRefMap m_innerClasses
Definition classdef.cpp:477
virtual const QCString & localName() const =0
virtual DefType definitionType() const =0
ClassDef * toClassDef(Definition *d)

References Definition::definitionType(), Definition::localName(), m_innerClasses, toClassDef(), and Definition::TypeClass.

◆ addListReferences()

void ClassDefImpl::addListReferences ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4535 of file classdef.cpp.

4536{
4537 if (!isLinkableInProject()) return;
4538 SrcLangExt lang = getLanguage();
4540 qualifiedName(),
4543 displayName(),
4544 QCString(),
4545 this
4546 );
4547 for (const auto &mg : m_memberGroups)
4548 {
4549 mg->addListReferences(this);
4550 }
4551 for (auto &ml : m_memberLists)
4552 {
4553 if (ml->listType().isDetailed())
4554 {
4555 ml->addListReferences(this);
4556 }
4557 }
4558}
bool isLinkableInProject() const override
MemberLists m_memberLists
Definition classdef.cpp:503
QCString getOutputFileBase() const override
QCString displayName(bool includeScope=TRUE) const override
Definition classdef.cpp:990
CompoundType compoundType() const override
Returns the type of compound this is, i.e.
QCString qualifiedName() const override
const RefItemVector & xrefListItems() const override
virtual QCString trCompoundType(ClassDef::CompoundType compType, SrcLangExt lang)=0
Translator * theTranslator
Definition language.cpp:71
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:4805

References addRefItem(), compoundType(), displayName(), DefinitionMixin< ClassDefMutable >::getLanguage(), getOutputFileBase(), isLinkableInProject(), m_memberGroups, m_memberLists, DefinitionMixin< ClassDefMutable >::qualifiedName(), theTranslator, and DefinitionMixin< ClassDefMutable >::xrefListItems().

◆ addMembersToMemberGroup()

void ClassDefImpl::addMembersToMemberGroup ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1015 of file classdef.cpp.

1016{
1017 for (auto &ml : m_memberLists)
1018 {
1019 if (!ml->listType().isDetailed())
1020 {
1022 }
1023 }
1024
1025 // add members inside sections to their groups
1026 for (const auto &mg : m_memberGroups)
1027 {
1028 if (mg->allMembersInSameSection() && m_subGrouping)
1029 {
1030 //printf("addToDeclarationSection(%s)\n",qPrint(mg->header()));
1031 mg->addToDeclarationSection();
1032 }
1033 }
1034}
void addMembersToMemberGroup() override

References addMembersToMemberGroup(), m_memberGroups, m_memberLists, and m_subGrouping.

Referenced by addMembersToMemberGroup().

◆ addMembersToTemplateInstance()

void ClassDefImpl::addMembersToTemplateInstance ( const ClassDef * cd,
const ArgumentList & templateArguments,
const QCString & templSpec )
overridevirtual

Implements ClassDefMutable.

Definition at line 4447 of file classdef.cpp.

4448{
4449 AUTO_TRACE("this={} cd={} templSpec={}",name(),cd->name(),templSpec);
4450 //printf("%s::addMembersToTemplateInstance(%s,%s)\n",qPrint(name()),qPrint(cd->name()),templSpec);
4451 for (const auto &mni : cd->memberNameInfoLinkedMap())
4452 {
4453 for (const auto &mi : *mni)
4454 {
4455 const MemberDef *md = mi->memberDef();
4456 if (m_allMemberNameInfoLinkedMap.find(md->name())==nullptr) // only insert the member if not hidden by one with the same name (#11541)
4457 {
4459 }
4460 }
4461 }
4462 // also instantatie members for nested classes
4463 for (const auto &innerCd : cd->getClasses())
4464 {
4465 ClassDefMutable *ncd = toClassDefMutable(m_innerClasses.find(innerCd->localName()));
4466 if (ncd)
4467 {
4468 ncd->addMembersToTemplateInstance(innerCd,cd->templateArguments(),templSpec);
4469 }
4470 }
4471}
virtual const ArgumentList & templateArguments() const =0
Returns the template arguments of this class.
virtual const MemberNameInfoLinkedMap & memberNameInfoLinkedMap() const =0
Returns a dictionary of all members.
virtual ClassLinkedRefMap getClasses() const =0
returns the classes nested into this class
void addMemberToTemplateInstance(const MemberDef *md, const ArgumentList &templateArguments, const QCString &templSpec) override
const ArgumentList & templateArguments() const override
Returns the template arguments of this class.
MemberNameInfoLinkedMap m_allMemberNameInfoLinkedMap
Definition classdef.cpp:451
virtual void addMembersToTemplateInstance(const ClassDef *cd, const ArgumentList &templateArguments, const QCString &templSpec)=0
virtual const QCString & name() const =0
ClassDefMutable * toClassDefMutable(Definition *d)

References ClassDefMutable::addMembersToTemplateInstance(), addMemberToTemplateInstance(), AUTO_TRACE, ClassDef::getClasses(), m_allMemberNameInfoLinkedMap, m_innerClasses, ClassDef::memberNameInfoLinkedMap(), Definition::name(), DefinitionMixin< ClassDefMutable >::name(), ClassDef::templateArguments(), templateArguments(), and toClassDefMutable().

◆ addMemberToList()

void ClassDefImpl::addMemberToList ( MemberListType lt,
MemberDef * md,
bool isBrief )
private

Definition at line 4619 of file classdef.cpp.

4620{
4621 AUTO_TRACE("{} md={} lt={} isBrief={}",name(),md->name(),lt,isBrief);
4622 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
4623 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
4624 const auto &ml = m_memberLists.get(lt,MemberListContainer::Class);
4625 ml->setNeedsSorting((isBrief && sortBriefDocs) || (!isBrief && sortMemberDocs));
4626 ml->push_back(md);
4627
4628 // for members in the declaration lists we set the section, needed for member grouping
4629 if (!ml->listType().isDetailed())
4630 {
4631 MemberDefMutable *mdm = toMemberDefMutable(md);
4632 if (mdm)
4633 {
4634 mdm->setSectionList(this,ml.get());
4635 }
4636 }
4637}
virtual void setSectionList(const Definition *container, const MemberList *sl)=0
MemberDefMutable * toMemberDefMutable(Definition *d)

References AUTO_TRACE, Class, Config_getBool, m_memberLists, Definition::name(), DefinitionMixin< ClassDefMutable >::name(), MemberDefMutable::setSectionList(), and toMemberDefMutable().

Referenced by internalInsertMember().

◆ addMemberToTemplateInstance()

void ClassDefImpl::addMemberToTemplateInstance ( const MemberDef * md,
const ArgumentList & templateArguments,
const QCString & templSpec )
overridevirtual

Implements ClassDefMutable.

Definition at line 4421 of file classdef.cpp.

4424{
4425 AUTO_TRACE("this={} md={}",name(),md->name());
4426 auto actualArguments_p = stringToArgumentList(getLanguage(),templSpec);
4427 auto imd = md->createTemplateInstanceMember(templateArguments,actualArguments_p);
4428 auto mmd = toMemberDefMutable(imd.get());
4429 mmd->setMemberClass(this);
4430 mmd->setTemplateMaster(md);
4431 mmd->setDocumentation(md->documentation(),md->docFile(),md->docLine());
4432 mmd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine());
4433 mmd->setInbodyDocumentation(md->inbodyDocumentation(),md->inbodyFile(),md->inbodyLine());
4434 mmd->setMemberSpecifiers(md->getMemberSpecifiers());
4435 mmd->setMemberGroupId(md->getMemberGroupId());
4436 mmd->setArtificial(true);
4437 insertMember(imd.get());
4438 //printf("Adding member=%s %s%s to class %s templSpec %s\n",
4439 // imd->typeString(),qPrint(imd->name()),imd->argsString(),
4440 // qPrint(imd->getClassDef()->name()),templSpec);
4441 // insert imd in the list of all members
4442 //printf("Adding member=%s class=%s\n",qPrint(imd->name()),qPrint(name()));
4443 MemberName *mn = Doxygen::memberNameLinkedMap->add(imd->name());
4444 mn->push_back(std::move(imd));
4445}
void insertMember(MemberDef *) override
virtual QCString docFile() const =0
virtual int docLine() const =0
virtual int inbodyLine() const =0
virtual int briefLine() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual QCString documentation() const =0
virtual QCString briefFile() const =0
virtual QCString inbodyDocumentation() const =0
virtual QCString inbodyFile() const =0
static MemberNameLinkedMap * memberNameLinkedMap
Definition doxygen.h:110
T * add(const char *k, Args &&... args)
Definition linkedmap.h:90
virtual int getMemberGroupId() const =0
virtual std::unique_ptr< MemberDef > createTemplateInstanceMember(const ArgumentList &formalArgs, const std::unique_ptr< ArgumentList > &actualArgs) const =0
virtual TypeSpecifier getMemberSpecifiers() const =0
void push_back(Ptr &&p)
Definition membername.h:54
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
Definition defargs.l:822

References AUTO_TRACE, Definition::briefDescription(), Definition::briefFile(), Definition::briefLine(), MemberDef::createTemplateInstanceMember(), Definition::docFile(), Definition::docLine(), Definition::documentation(), DefinitionMixin< ClassDefMutable >::getLanguage(), MemberDef::getMemberGroupId(), MemberDef::getMemberSpecifiers(), Definition::inbodyDocumentation(), Definition::inbodyFile(), Definition::inbodyLine(), insertMember(), Doxygen::memberNameLinkedMap, Definition::name(), DefinitionMixin< ClassDefMutable >::name(), MemberName::push_back(), stringToArgumentList(), templateArguments(), and toMemberDefMutable().

Referenced by addMembersToTemplateInstance().

◆ addQualifiers()

void ClassDefImpl::addQualifiers ( const StringVector & qualifiers)
overridevirtual

Implements ClassDefMutable.

Definition at line 5319 of file classdef.cpp.

5320{
5321 for (const auto &sx : qualifiers)
5322 {
5323 bool alreadyAdded = std::find(m_qualifiers.begin(), m_qualifiers.end(), sx) != m_qualifiers.end();
5324 if (!alreadyAdded)
5325 {
5326 m_qualifiers.push_back(sx);
5327 }
5328 }
5329}

References m_qualifiers.

◆ addRequirementReferences()

void ClassDefImpl::addRequirementReferences ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4560 of file classdef.cpp.

4561{
4562 if (!isLinkableInProject()) return;
4564 for (const auto &mg : m_memberGroups)
4565 {
4566 mg->addRequirementReferences(this);
4567 }
4568 for (auto &ml : m_memberLists)
4569 {
4570 if (ml->listType().isDetailed())
4571 {
4572 ml->addRequirementReferences(this);
4573 }
4574 }
4575}
static RequirementManager & instance()
void addRequirementRefsForSymbol(const Definition *symbol)

References RequirementManager::addRequirementRefsForSymbol(), RequirementManager::instance(), isLinkableInProject(), m_memberGroups, and m_memberLists.

◆ addTypeConstraint()

void ClassDefImpl::addTypeConstraint ( const QCString & typeConstraint,
const QCString & type )
private

Definition at line 3424 of file classdef.cpp.

3425{
3426 //printf("addTypeConstraint(%s,%s)\n",qPrint(type),qPrint(typeConstraint));
3427 bool hideUndocRelation = Config_getBool(HIDE_UNDOC_RELATIONS);
3428 if (typeConstraint.isEmpty() || type.isEmpty()) return;
3429 SymbolResolver resolver(getFileDef());
3430 ClassDefMutable *cd = resolver.resolveClassMutable(this,typeConstraint);
3431 if (cd==nullptr && !hideUndocRelation)
3432 {
3433 cd = toClassDefMutable(
3434 Doxygen::hiddenClassLinkedMap->add(typeConstraint,
3435 std::unique_ptr<ClassDef>(
3436 new ClassDefImpl(
3438 getDefColumn(),
3439 typeConstraint,
3440 ClassDef::Class))));
3441 if (cd)
3442 {
3443 cd->setUsedOnly(TRUE);
3444 cd->setLanguage(getLanguage());
3445 //printf("Adding undocumented constraint '%s' to class %s on type %s\n",
3446 // qPrint(typeConstraint),qPrint(name()),qPrint(type));
3447 }
3448 }
3449 if (cd)
3450 {
3451 auto it = std::find_if(m_constraintClassList.begin(),
3453 [&cd](const auto &ccd) { return ccd.classDef==cd; });
3454
3455 if (it==m_constraintClassList.end())
3456 {
3457 m_constraintClassList.emplace_back(cd);
3458 it = m_constraintClassList.end()-1;
3459 }
3460 (*it).addAccessor(type);
3461 //printf("Adding constraint '%s' to class %s on type %s\n",
3462 // qPrint(typeConstraint),qPrint(name()),qPrint(type));
3463 }
3464}
FileDef * getFileDef() const override
Returns the namespace this compound is in, or 0 if it has a global scope.
ClassDefImpl(const QCString &fileName, int startLine, int startColumn, const QCString &name, CompoundType ct, const QCString &ref=QCString(), const QCString &fName=QCString(), bool isSymbol=TRUE, bool isJavaEnum=FALSE)
Definition classdef.cpp:801
ConstraintClassList m_constraintClassList
Definition classdef.cpp:483
virtual void setUsedOnly(bool b)=0
QCString getDefFileName() const override
virtual void setLanguage(SrcLangExt lang)=0
static ClassLinkedMap * hiddenClassLinkedMap
Definition doxygen.h:96

References ClassDef::Class, ClassDefImpl(), Config_getBool, DefinitionMixin< ClassDefMutable >::getDefColumn(), DefinitionMixin< ClassDefMutable >::getDefFileName(), DefinitionMixin< ClassDefMutable >::getDefLine(), getFileDef(), DefinitionMixin< ClassDefMutable >::getLanguage(), Doxygen::hiddenClassLinkedMap, QCString::isEmpty(), m_constraintClassList, SymbolResolver::resolveClassMutable(), DefinitionMutable::setLanguage(), ClassDefMutable::setUsedOnly(), toClassDefMutable(), and TRUE.

Referenced by addTypeConstraints().

◆ addTypeConstraints()

void ClassDefImpl::addTypeConstraints ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 3467 of file classdef.cpp.

3468{
3469 for (const Argument &a : m_tempArgs)
3470 {
3471 if (!a.typeConstraint.isEmpty())
3472 {
3473 QCString typeConstraint;
3474 int i=0,p=0;
3475 while ((i=a.typeConstraint.find('&',p))!=-1) // typeConstraint="A &I" for C<T extends A & I>
3476 {
3477 typeConstraint = a.typeConstraint.mid(p,i-p).stripWhiteSpace();
3478 addTypeConstraint(typeConstraint,a.type);
3479 p=i+1;
3480 }
3481 typeConstraint = a.typeConstraint.right(a.typeConstraint.length()-p).stripWhiteSpace();
3482 addTypeConstraint(typeConstraint,a.type);
3483 }
3484 }
3485}
void addTypeConstraint(const QCString &typeConstraint, const QCString &type)
ArgumentList m_tempArgs
Definition classdef.cpp:454
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:241
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition qcstring.h:260
QCString right(size_t len) const
Definition qcstring.h:234

References addTypeConstraint(), m_tempArgs, QCString::mid(), QCString::right(), and QCString::stripWhiteSpace().

◆ addUsedByClass()

void ClassDefImpl::addUsedByClass ( ClassDef * cd,
const QCString & accessName,
Protection prot )
overridevirtual

Implements ClassDefMutable.

Definition at line 4214 of file classdef.cpp.

4216{
4217 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
4218 bool umlLook = Config_getBool(UML_LOOK);
4219 if (prot==Protection::Private && !extractPrivate) return;
4220 //printf("%s::addUsedByClass(%s,%s)\n",qPrint(name()),qPrint(cd->name()),accessName);
4221 //
4222 auto it = std::find_if(m_usedByImplClassList.begin(),
4224 [&cd](const auto &ucd) { return ucd.classDef==cd; });
4225 if (it==m_usedByImplClassList.end())
4226 {
4227 m_usedByImplClassList.emplace_back(cd);
4228 //printf("Adding used by class %s to class %s\n",
4229 // qPrint(cd->name()),qPrint(name()));
4230 it = m_usedByImplClassList.end()-1;
4231 }
4232 QCString acc = accessName;
4233 if (umlLook)
4234 {
4235 switch(prot)
4236 {
4237 case Protection::Public: acc.prepend("+"); break;
4238 case Protection::Private: acc.prepend("-"); break;
4239 case Protection::Protected: acc.prepend("#"); break;
4240 case Protection::Package: acc.prepend("~"); break;
4241 }
4242 }
4243 (*it).addAccessor(acc);
4244}
UsesClassList m_usedByImplClassList
Definition classdef.cpp:481
QCString & prepend(const char *s)
Definition qcstring.h:422

References Config_getBool, m_usedByImplClassList, and QCString::prepend().

◆ addUsedClass()

void ClassDefImpl::addUsedClass ( ClassDef * cd,
const QCString & accessName,
Protection prot )
overridevirtual

Implements ClassDefMutable.

Definition at line 4182 of file classdef.cpp.

4184{
4185 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
4186 bool umlLook = Config_getBool(UML_LOOK);
4187 if (prot==Protection::Private && !extractPrivate) return;
4188 //printf("%s::addUsedClass(%s,%s)\n",qPrint(name()),qPrint(cd->name()),accessName);
4189
4190 auto it = std::find_if(m_usesImplClassList.begin(),
4191 m_usesImplClassList.end(),
4192 [&cd](const auto &ucd) { return ucd.classDef==cd; });
4193 if (it==m_usesImplClassList.end())
4194 {
4195 m_usesImplClassList.emplace_back(cd);
4196 //printf("Adding used class %s to class %s via accessor %s\n",
4197 // qPrint(cd->name()),qPrint(name()),accessName);
4198 it = m_usesImplClassList.end()-1;
4199 }
4200 QCString acc = accessName;
4201 if (umlLook)
4202 {
4203 switch(prot)
4204 {
4205 case Protection::Public: acc.prepend("+"); break;
4206 case Protection::Private: acc.prepend("-"); break;
4207 case Protection::Protected: acc.prepend("#"); break;
4208 case Protection::Package: acc.prepend("~"); break;
4209 }
4210 }
4211 (*it).addAccessor(acc);
4212}
UsesClassList m_usesImplClassList
Definition classdef.cpp:480

References Config_getBool, m_usesImplClassList, and QCString::prepend().

◆ addUsedInterfaceClasses()

void ClassDefImpl::addUsedInterfaceClasses ( MemberDef * md,
const QCString & typeStr )
private

References anchor(), FALSE, and title().

◆ anchor()

QCString ClassDefImpl::anchor ( ) const
overridevirtual

Returns the anchor within a page where this item can be found

Implements Definition.

Definition at line 5243 of file classdef.cpp.

5244{
5245 QCString anc;
5247 {
5249 {
5250 // point to the template of which this class is an instance
5251 anc = m_templateMaster->getOutputFileBase();
5252 }
5253 else
5254 {
5255 anc = m_fileName;
5256 }
5257 }
5258 return anc;
5259}
bool m_implicitTemplateInstance
Definition classdef.cpp:557
bool isEmbeddedInOuterScope() const override
static bool generatingXmlOutput
Definition doxygen.h:135

References Doxygen::generatingXmlOutput, isEmbeddedInOuterScope(), m_fileName, m_implicitTemplateInstance, and m_templateMaster.

Referenced by addExample(), addUsedInterfaceClasses(), writeBriefDescription(), writeDeclarationLink(), writeDetailedDescription(), writeInlineDocumentation(), writeMemberList(), writeMoreLink(), and writeTagFile().

◆ baseClasses()

const BaseClassList & ClassDefImpl::baseClasses ( ) const
overridevirtual

Returns the list of base classes from which this class directly inherits.

Implements ClassDef.

Definition at line 4998 of file classdef.cpp.

4999{
5000 return m_inherits;
5001}
BaseClassList m_inherits
Definition classdef.cpp:433

References m_inherits.

Referenced by isBaseClass(), mergeMembers(), and mergeMembersFromBaseClasses().

◆ categoryOf()

ClassDef * ClassDefImpl::categoryOf ( ) const
overridevirtual

Returns the class of which this is a category (Objective-C only).

Implements ClassDef.

Definition at line 5148 of file classdef.cpp.

5149{
5150 return m_categoryOf;
5151}

References m_categoryOf.

◆ className()

QCString ClassDefImpl::className ( ) const
overridevirtual

Returns the name of the class including outer classes, but not including namespaces.

Implements ClassDef.

Definition at line 4519 of file classdef.cpp.

4520{
4521 QCString name = m_className.isEmpty() ? localName() : m_className;
4522 auto lang = getLanguage();
4523 if (lang==SrcLangExt::CSharp)
4524 {
4526 }
4527 return name;
4528}
QCString m_className
Definition classdef.cpp:496
const QCString & localName() const override
QCString tempArgListToString(const ArgumentList &al, SrcLangExt lang, bool includeDefault)
Definition util.cpp:1276
QCString demangleCSharpGenericName(const QCString &name, const QCString &templArgs)
Definition util.cpp:6923

References demangleCSharpGenericName(), DefinitionMixin< ClassDefMutable >::getLanguage(), DefinitionMixin< ClassDefMutable >::localName(), m_className, DefinitionMixin< ClassDefMutable >::name(), tempArgListToString(), and templateArguments().

◆ codeSymbolType()

CodeSymbolType ClassDefImpl::codeSymbolType ( ) const
overridevirtual

Used for syntax highlighting symbol class

Implements Definition.

Definition at line 5422 of file classdef.cpp.

5423{
5424 switch (compoundType())
5425 {
5426 case Class: return CodeSymbolType::Class; break;
5427 case Struct: return CodeSymbolType::Struct; break;
5428 case Union: return CodeSymbolType::Union; break;
5429 case Interface: return CodeSymbolType::Interface; break;
5430 case Protocol: return CodeSymbolType::Protocol; break;
5431 case Category: return CodeSymbolType::Category; break;
5432 case Exception: return CodeSymbolType::Exception; break;
5433 case Service: return CodeSymbolType::Service; break;
5434 case Singleton: return CodeSymbolType::Singleton; break;
5435 }
5436 return CodeSymbolType::Class;
5437}
@ Singleton
Definition classdef.h:117
@ Interface
Definition classdef.h:112
@ Exception
Definition classdef.h:115

References ClassDef::Category, Category, ClassDef::Class, Class, compoundType(), ClassDef::Exception, Exception, ClassDef::Interface, Interface, ClassDef::Protocol, Protocol, ClassDef::Service, Service, ClassDef::Singleton, Singleton, ClassDef::Struct, Struct, ClassDef::Union, and Union.

◆ collaborationGraphFileName()

QCString ClassDefImpl::collaborationGraphFileName ( ) const
overridevirtual

returns the file name to use for the collaboration graph

Implements ClassDef.

Definition at line 5402 of file classdef.cpp.

5403{
5404 return m_collabFileName;
5405}

References m_collabFileName.

◆ compoundType()

ClassDefImpl::CompoundType ClassDefImpl::compoundType ( ) const
overridevirtual

Returns the type of compound this is, i.e.

class/struct/union/..

Implements ClassDef.

Definition at line 4993 of file classdef.cpp.

4994{
4995 return m_compType;
4996}

References m_compType.

Referenced by addListReferences(), codeSymbolType(), deepCopy(), writeDeclarationLink(), writeDocumentation(), and writeMemberList().

◆ compoundTypeString()

QCString ClassDefImpl::compoundTypeString ( ) const
overridevirtual

◆ computeAnchors()

void ClassDefImpl::computeAnchors ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1348 of file classdef.cpp.

1349{
1350 for (auto &ml : m_memberLists)
1351 {
1352 if (!ml->listType().isDetailed())
1353 {
1354 ml->setAnchors();
1355 }
1356 }
1357
1358 for (const auto &mg : m_memberGroups)
1359 {
1360 mg->setAnchors();
1361 }
1362}

References m_memberGroups, and m_memberLists.

◆ containsOverload()

bool ClassDefImpl::containsOverload ( const MemberDef * md) const
overridevirtual

Implements ClassDef.

Definition at line 5336 of file classdef.cpp.

5337{
5338 AUTO_TRACE("name={}",md->name());
5339 const auto &mni = m_allMemberNameInfoLinkedMap.find(md->name());
5340 if (mni)
5341 {
5342 for (const auto &mi : *mni)
5343 {
5344 const MemberDef *classMd = mi->memberDef();
5345 const ArgumentList &classAl = classMd->argumentList();
5346 const ArgumentList &al = md->argumentList();
5347 bool found = matchArguments2(
5348 classMd->getOuterScope(),classMd->getFileDef(),classMd->typeString(),&classAl,
5349 md->getOuterScope(),md->getFileDef(),md->typeString(),&al,
5350 true,getLanguage()
5351 );
5352 if (found)
5353 {
5354 AUTO_TRACE_EXIT("true");
5355 return true;
5356 }
5357 }
5358 }
5359 AUTO_TRACE_EXIT("false");
5360 return false;
5361}
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual Definition * getOuterScope() const =0
virtual QCString typeString() const =0
virtual const FileDef * getFileDef() const =0
virtual const ArgumentList & argumentList() const =0
bool matchArguments2(const Definition *srcScope, const FileDef *srcFileScope, const QCString &srcReturnType, const ArgumentList *srcAl, const Definition *dstScope, const FileDef *dstFileScope, const QCString &dstReturnType, const ArgumentList *dstAl, bool checkCV, SrcLangExt lang)
Definition util.cpp:1998

References MemberDef::argumentList(), AUTO_TRACE, AUTO_TRACE_EXIT, MemberDef::getFileDef(), DefinitionMixin< ClassDefMutable >::getLanguage(), Definition::getOuterScope(), m_allMemberNameInfoLinkedMap, matchArguments2(), Definition::name(), and MemberDef::typeString().

◆ countAdditionalInheritedMembers()

int ClassDefImpl::countAdditionalInheritedMembers ( ) const
private

Definition at line 4793 of file classdef.cpp.

4794{
4795 int totalCount=0;
4796 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4797 {
4798 if (lde->kind()==LayoutDocEntry::MemberDecl)
4799 {
4800 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4801 if (lmd && lmd->type!=MemberListType::Friends()) // friendship is not inherited
4802 {
4803 ClassDefSet visited;
4804 totalCount+=countInheritedDecMembers(lmd->type,this,TRUE,FALSE,visited);
4805 }
4806 }
4807 }
4808 //printf("countAdditionalInheritedMembers()=%d\n",totalCount);
4809 return totalCount;
4810}
int countInheritedDecMembers(MemberListType lt, const ClassDef *inheritedFrom, bool invert, bool showAlways, ClassDefSet &visitedClasses) const
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1437
std::unordered_set< const ClassDef * > ClassDefSet
Definition classdef.h:95
MemberListType type
Definition layout.h:118

References countInheritedDecMembers(), FALSE, LayoutDocManager::instance(), TRUE, and LayoutDocEntryMemberDecl::type.

Referenced by endMemberDeclarations().

◆ countInheritanceNodes()

int ClassDefImpl::countInheritanceNodes ( ) const
private

Definition at line 1833 of file classdef.cpp.

1834{
1836}
int countInheritsNodes() const
int countInheritedByNodes() const

References countInheritedByNodes(), and countInheritsNodes().

Referenced by writeInheritanceGraph().

◆ countInheritedByNodes()

int ClassDefImpl::countInheritedByNodes ( ) const
private

Definition at line 1811 of file classdef.cpp.

1812{
1813 int count=0;
1814 for (const auto &ibcd : m_inheritedBy)
1815 {
1816 const ClassDef *icd=ibcd.classDef;
1817 if ( icd->isVisibleInHierarchy()) count++;
1818 }
1819 return count;
1820}
virtual bool isVisibleInHierarchy() const =0
the class is visible in a class diagram, or class hierarchy
BaseClassList m_inheritedBy
Definition classdef.cpp:437

References ClassDef::isVisibleInHierarchy(), and m_inheritedBy.

Referenced by countInheritanceNodes(), and writeInheritanceGraph().

◆ countInheritedDecMembers()

int ClassDefImpl::countInheritedDecMembers ( MemberListType lt,
const ClassDef * inheritedFrom,
bool invert,
bool showAlways,
ClassDefSet & visitedClasses ) const
private

Definition at line 4736 of file classdef.cpp.

4739{
4740 int inhCount = 0;
4741 int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
4742 bool process = count>0;
4743 //printf("%s: countInheritedDecMembers: lt=%s process=%d count=%d invert=%d\n",
4744 // qPrint(name()),lt.to_string(),process,count,invert);
4745 if ((process^invert) || showAlways)
4746 {
4747 for (const auto &ibcd : m_inherits)
4748 {
4749 ClassDefMutable *icd = toClassDefMutable(ibcd.classDef);
4750 MemberListType lt1 = MemberListType::Invalid();
4751 MemberListType lt2 = MemberListType::Invalid();
4752 if (icd && icd->isLinkable())
4753 {
4754 convertProtectionLevel(lt,ibcd.prot,&lt1,&lt2);
4755 //printf("%s: convert %s->(%s,%s) prot=%d\n",
4756 // qPrint(icd->name()),lt.to_string(),lt1.to_string(),lt2.to_string(),ibcd.prot);
4757 if (visitedClasses.find(icd)==visitedClasses.end())
4758 {
4759 visitedClasses.insert(icd); // guard for multiple virtual inheritance
4760 if (!lt1.isInvalid())
4761 {
4762 inhCount+=icd->countMemberDeclarations(lt1,inheritedFrom,lt2,FALSE,TRUE,visitedClasses);
4763 }
4764 }
4765 }
4766 }
4767 }
4768 //printf("%s: count=%d\n",qPrint(name()),inhCount);
4769 return inhCount;
4770}
virtual int countMemberDeclarations(MemberListType lt, const ClassDef *inheritedFrom, MemberListType lt2, bool invert, bool showAlways, ClassDefSet &visitedClasses) const =0
int countMembersIncludingGrouped(MemberListType lt, const ClassDef *inheritedFrom, bool additional) const override
virtual bool isLinkable() const =0
constexpr bool isInvalid() const noexcept
Definition types.h:372
static constexpr MemberListType Invalid() noexcept
Definition types.h:371
void convertProtectionLevel(MemberListType inListType, Protection inProt, MemberListType *outListType1, MemberListType *outListType2)
Computes for a given list type inListType, which are the the corresponding list type(s) in the base c...
Definition util.cpp:6229

References convertProtectionLevel(), ClassDef::countMemberDeclarations(), countMembersIncludingGrouped(), FALSE, MemberListType::Invalid(), MemberListType::isInvalid(), Definition::isLinkable(), m_inherits, toClassDefMutable(), and TRUE.

Referenced by countAdditionalInheritedMembers(), and countMemberDeclarations().

◆ countInheritsNodes()

int ClassDefImpl::countInheritsNodes ( ) const
private

Definition at line 1822 of file classdef.cpp.

1823{
1824 int count=0;
1825 for (const auto &ibcd : m_inherits)
1826 {
1827 const ClassDef *icd=ibcd.classDef;
1828 if ( icd->isVisibleInHierarchy()) count++;
1829 }
1830 return count;
1831}

References ClassDef::isVisibleInHierarchy(), and m_inherits.

Referenced by countInheritanceNodes(), and writeInheritanceGraph().

◆ countMemberDeclarations()

int ClassDefImpl::countMemberDeclarations ( MemberListType lt,
const ClassDef * inheritedFrom,
MemberListType lt2,
bool invert,
bool showAlways,
ClassDefSet & visitedClasses ) const
overridevirtual

Implements ClassDef.

Definition at line 4658 of file classdef.cpp.

4660{
4661 //printf("%s: countMemberDeclarations for %s and %s\n",qPrint(name()),lt.to_string(),lt2.to_string());
4662 int count=0;
4663 MemberList * ml = getMemberList(lt);
4664 MemberList * ml2 = getMemberList(lt2);
4665 if (getLanguage()!=SrcLangExt::VHDL) // use specific declarations function
4666 {
4667 if (ml)
4668 {
4669 count+=ml->numDecMembers(inheritedFrom);
4670 //printf("-> ml=%d\n",ml->numDecMembers());
4671 }
4672 if (ml2)
4673 {
4674 count+=ml2->numDecMembers(inheritedFrom);
4675 //printf("-> ml2=%d\n",ml2->numDecMembers());
4676 }
4677 // also include grouped members that have their own section in the class (see bug 722759)
4678 if (inheritedFrom)
4679 {
4680 for (const auto &mg : m_memberGroups)
4681 {
4682 count+=mg->countGroupedInheritedMembers(lt);
4683 if (!lt2.isInvalid()) count+=mg->countGroupedInheritedMembers(lt2);
4684 }
4685 }
4686 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
4687 if (!inlineInheritedMembers) // show inherited members as separate lists
4688 {
4689 count+=countInheritedDecMembers(lt,inheritedFrom,invert,showAlways,visitedClasses);
4690 }
4691 }
4692 //printf("-> %d\n",count);
4693 return count;
4694}
MemberList * getMemberList(MemberListType lt) const override
Returns the members in the list identified by lt.
int numDecMembers(const ClassDef *inheritedFrom) const
Definition memberlist.h:133

References Config_getBool, countInheritedDecMembers(), DefinitionMixin< ClassDefMutable >::getLanguage(), getMemberList(), MemberListType::isInvalid(), m_memberGroups, and MemberList::numDecMembers().

◆ countMembers()

void ClassDefImpl::countMembers ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4722 of file classdef.cpp.

4723{
4724 for (auto &ml : m_memberLists)
4725 {
4726 ml->countDecMembers();
4727 ml->countDocMembers();
4728 }
4729 for (const auto &mg : m_memberGroups)
4730 {
4731 mg->countDecMembers();
4732 mg->countDocMembers();
4733 }
4734}

References m_memberGroups, and m_memberLists.

◆ countMembersIncludingGrouped()

int ClassDefImpl::countMembersIncludingGrouped ( MemberListType lt,
const ClassDef * inheritedFrom,
bool additional ) const
overridevirtual

Implements ClassDef.

Definition at line 4829 of file classdef.cpp.

4831{
4832 int count=0;
4833 MemberList *ml = getMemberList(lt);
4834 if (ml)
4835 {
4836 count=ml->countInheritableMembers(inheritedFrom);
4837 }
4838 //printf("%s:countMembersIncludingGrouped: count=%d\n",qPrint(name()),count);
4839 for (const auto &mg : m_memberGroups)
4840 {
4841 bool hasOwnSection = !mg->allMembersInSameSection() ||
4842 !m_subGrouping; // group is in its own section
4843 if ((additional && hasOwnSection) || (!additional && !hasOwnSection))
4844 {
4845 count+=mg->countGroupedInheritedMembers(lt);
4846 }
4847 }
4848 //printf("%s:countMembersIncludingGrouped(lt=%s,%s)=%d\n",
4849 // qPrint(name()),qPrint(lt.to_string()),ml?qPrint(ml->listType().to_string()):"<none>",count);
4850 return count;
4851}
int countInheritableMembers(const ClassDef *inheritedFrom) const

References MemberList::countInheritableMembers(), getMemberList(), m_memberGroups, and m_subGrouping.

Referenced by countInheritedDecMembers(), and writeInheritedMemberDeclarations().

◆ deepCopy()

std::unique_ptr< ClassDef > ClassDefImpl::deepCopy ( const QCString & name) const
overridevirtual

Implements ClassDef.

Definition at line 863 of file classdef.cpp.

864{
865 AUTO_TRACE("name='{}'",name);
866 auto result = std::make_unique<ClassDefImpl>(
868 std::string(),std::string(),true,m_isJavaEnum);
869 result->setBriefDescription(briefDescription(),briefFile(),briefLine());
870 result->setDocumentation(documentation(),docFile(),docLine());
871 result->setInbodyDocumentation(inbodyDocumentation(),inbodyFile(),inbodyLine());
872 result->setBodySegment(getStartDefLine(),getStartBodyLine(),getEndBodyLine());
873 result->setBodyDef(getBodyDef());
874 result->setLanguage(getLanguage());
875
876 // copy other members
877 result->m_memberListFileName = m_memberListFileName;
878 result->m_collabFileName = m_collabFileName;
879 result->m_inheritFileName = m_inheritFileName;
880 if (m_incInfo)
881 {
882 result->m_incInfo = std::make_unique<IncludeInfo>();
883 *(result->m_incInfo) = *m_incInfo;
884 }
885 result->m_inherits = m_inherits;
886 result->m_inheritedBy = m_inheritedBy;
887 result->m_fileDef = m_fileDef;
888 result->m_moduleDef = m_moduleDef;
889 result->m_tempArgs = m_tempArgs;
890 result->m_typeConstraints = m_typeConstraints;
891 result->m_files = m_files;
892 result->m_examples = m_examples;
893 result->m_compType = m_compType;
894 result->m_prot = m_prot;
895 result->m_usesImplClassList = m_usesImplClassList;
896 result->m_usedByImplClassList = m_usedByImplClassList;
897 result->m_constraintClassList = m_constraintClassList;
898 result->m_templateInstances = m_templateInstances;
899 result->m_templBaseClassNames = m_templBaseClassNames;
900 result->m_templateMaster = m_templateMaster;
901 result->m_className = m_className;
902 result->m_categoryOf = m_categoryOf;
903 result->m_isAbstract = m_isAbstract;
904 result->m_isStatic = m_isStatic;
905 result->m_membersMerged = m_membersMerged;
906 result->m_isLocal = m_isLocal;
907 result->m_isTemplArg = m_isTemplArg;
908 result->m_subGrouping = m_subGrouping;
909 result->m_usedOnly = m_usedOnly;
910 result->m_vhdlSummaryTitles = m_vhdlSummaryTitles;
911 result->m_isSimple = m_isSimple;
912 result->m_arrowOperator = m_arrowOperator;
913 result->m_tagLessRef = m_tagLessRef;
914 result->m_isJavaEnum = m_isJavaEnum;
915 result->m_spec = m_spec;
916 result->m_metaData = m_metaData;
917 result->m_requiresClause = m_requiresClause;
918 result->m_qualifiers = m_qualifiers;
919 result->m_hasCollaborationGraph = m_hasCollaborationGraph;
920 result->m_typeInheritanceGraph = m_typeInheritanceGraph;
921
922 // set new file name
923 QCString compTypeString = getCompoundTypeString(getLanguage(),m_compType,m_isJavaEnum);
924 result->m_fileName = compTypeString+name;
925 result->m_memberListFileName = convertNameToFile(compTypeString+name+"-members");
926 result->m_collabFileName = convertNameToFile(result->m_fileName+"_coll_graph");
927 result->m_inheritFileName = convertNameToFile(result->m_fileName+"_inherit_graph");
928 result->m_fileName = convertNameToFile(result->m_fileName);
929
930 // deep copy nested classes
931 for (const auto &innerCd : m_innerClasses)
932 {
933 QCString innerName = name+"::"+innerCd->localName();
934 if (Doxygen::classLinkedMap->find(innerName)==nullptr)
935 {
936 auto cd = Doxygen::classLinkedMap->add(innerName,innerCd->deepCopy(innerName));
937 result->addInnerCompound(cd);
938 ClassDefMutable *cdm = toClassDefMutable(cd);
939 if (cdm)
940 {
941 cdm->setOuterScope(result.get());
942 }
943 }
944 }
945
946 // copy all member list (and make deep copies of members)
947 for (auto &mni : m_allMemberNameInfoLinkedMap)
948 {
949 for (auto &mi : *mni)
950 {
951 const MemberDef *md=mi->memberDef();
952 auto newMd = md->deepCopy();
953 if (newMd)
954 {
955 auto mmd = toMemberDefMutable(newMd.get());
956 AUTO_TRACE_ADD("Copying member {}",mmd->name());
957 mmd->moveTo(result.get());
958
959 result->internalInsertMember(newMd.get(),newMd->protection(),true);
960
961 // also add to the global list (which will own newMd)
962 MemberName *mn = Doxygen::memberNameLinkedMap->add(newMd->name());
963 mn->push_back(std::move(newMd));
964 }
965 }
966 }
967
968 return result;
969}
TemplateInstanceList m_templateInstances
Definition classdef.cpp:488
ArgumentList m_typeConstraints
Definition classdef.cpp:457
StringSet m_vhdlSummaryTitles
List of titles to use for the summary.
Definition classdef.cpp:532
FileList m_files
Definition classdef.cpp:460
QCString m_requiresClause
C++20 requires clause.
Definition classdef.cpp:550
TemplateNameMap m_templBaseClassNames
Definition classdef.cpp:490
std::unique_ptr< IncludeInfo > m_incInfo
Definition classdef.cpp:428
QCString m_metaData
Definition classdef.cpp:547
QCString inbodyFile() const override
QCString docFile() const override
QCString briefFile() const override
QCString briefDescription(bool abbreviate=FALSE) const override
const FileDef * getBodyDef() const override
int getStartBodyLine() const override
QCString inbodyDocumentation() const override
QCString documentation() const override
virtual void setOuterScope(Definition *d)=0
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:95
virtual std::unique_ptr< MemberDef > deepCopy() const =0
#define AUTO_TRACE_ADD(...)
Definition docnode.cpp:48

References AUTO_TRACE, AUTO_TRACE_ADD, DefinitionMixin< ClassDefMutable >::briefDescription(), DefinitionMixin< ClassDefMutable >::briefFile(), DefinitionMixin< ClassDefMutable >::briefLine(), Doxygen::classLinkedMap, compoundType(), convertNameToFile(), MemberDef::deepCopy(), DefinitionMixin< ClassDefMutable >::docFile(), DefinitionMixin< ClassDefMutable >::docLine(), DefinitionMixin< ClassDefMutable >::documentation(), DefinitionMixin< ClassDefMutable >::getBodyDef(), getCompoundTypeString(), DefinitionMixin< ClassDefMutable >::getDefColumn(), DefinitionMixin< ClassDefMutable >::getDefFileName(), DefinitionMixin< ClassDefMutable >::getDefLine(), DefinitionMixin< ClassDefMutable >::getEndBodyLine(), DefinitionMixin< ClassDefMutable >::getLanguage(), DefinitionMixin< ClassDefMutable >::getStartBodyLine(), DefinitionMixin< ClassDefMutable >::getStartDefLine(), DefinitionMixin< ClassDefMutable >::inbodyDocumentation(), DefinitionMixin< ClassDefMutable >::inbodyFile(), DefinitionMixin< ClassDefMutable >::inbodyLine(), m_allMemberNameInfoLinkedMap, m_arrowOperator, m_categoryOf, m_className, m_collabFileName, m_compType, m_constraintClassList, m_examples, m_fileDef, m_files, m_hasCollaborationGraph, m_incInfo, m_inheritedBy, m_inheritFileName, m_inherits, m_innerClasses, m_isAbstract, m_isJavaEnum, m_isLocal, m_isSimple, m_isStatic, m_isTemplArg, m_memberListFileName, m_membersMerged, m_metaData, m_moduleDef, m_prot, m_qualifiers, m_requiresClause, m_spec, m_subGrouping, m_tagLessRef, m_tempArgs, m_templateInstances, m_templateMaster, m_templBaseClassNames, m_typeConstraints, m_typeInheritanceGraph, m_usedByImplClassList, m_usedOnly, m_usesImplClassList, m_vhdlSummaryTitles, Doxygen::memberNameLinkedMap, DefinitionMixin< ClassDefMutable >::name(), MemberName::push_back(), DefinitionMutable::setOuterScope(), toClassDefMutable(), and toMemberDefMutable().

◆ definitionType()

DefType ClassDefImpl::definitionType ( ) const
inlineoverridevirtual

Use this for dynamic inspection of the type of the derived class

Implements Definition.

Definition at line 192 of file classdef.cpp.

192{ return TypeClass; }

References Definition::TypeClass.

◆ displayName()

QCString ClassDefImpl::displayName ( bool includeScope = TRUE) const
overridevirtual

Returns the name of the definition as it appears in the output

Implements Definition.

Definition at line 990 of file classdef.cpp.

991{
992 return makeDisplayName(this,includeScope);
993}
static QCString makeDisplayName(const ClassDef *cd, bool includeScope)
Definition classdef.cpp:107

References makeDisplayName().

Referenced by addListReferences(), title(), writeCollaborationGraph(), writeDeclaration(), writeDeclarationLink(), writeDocumentation(), writeInheritanceGraph(), writeMemberDocumentation(), writeMemberList(), writeMemberPages(), and writeTagFile().

◆ distributeMemberGroupDocumentation()

void ClassDefImpl::distributeMemberGroupDocumentation ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1364 of file classdef.cpp.

1365{
1366 for (const auto &mg : m_memberGroups)
1367 {
1368 mg->distributeMemberGroupDocumentation();
1369 }
1370}

References m_memberGroups.

◆ endMemberDeclarations()

void ClassDefImpl::endMemberDeclarations ( OutputList & ol) const
private

Definition at line 2228 of file classdef.cpp.

2229{
2230 //printf("%s: ClassDefImpl::endMemberDeclarations()\n",qPrint(name()));
2231 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
2232 if (!inlineInheritedMembers && countAdditionalInheritedMembers()>0)
2233 {
2234 ol.startMemberHeader("inherited");
2236 ol.endMemberHeader();
2238 }
2239 ol.endMemberSections();
2240}
int countAdditionalInheritedMembers() const
void writeAdditionalInheritedMembers(OutputList &ol) const
void endMemberHeader()
Definition outputlist.h:471
void parseText(const QCString &textStr)
void startMemberHeader(const QCString &anchor, int typ=2)
Definition outputlist.h:469
void endMemberSections()
Definition outputlist.h:463
virtual QCString trAdditionalInheritedMembers()=0

References Config_getBool, countAdditionalInheritedMembers(), OutputList::endMemberHeader(), OutputList::endMemberSections(), OutputList::parseText(), OutputList::startMemberHeader(), theTranslator, and writeAdditionalInheritedMembers().

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ endMemberDocumentation()

void ClassDefImpl::endMemberDocumentation ( OutputList & ol) const
private

Definition at line 2212 of file classdef.cpp.

2213{
2214 //printf("%s: ClassDefImpl::endMemberDocumentation()\n",qPrint(name()));
2215 if (Config_getBool(SEPARATE_MEMBER_PAGES))
2216 {
2219 }
2220}
static bool suppressDocWarnings
Definition doxygen.h:131
void enable(OutputType o)

References Config_getBool, OutputList::enable(), FALSE, Html, and Doxygen::suppressDocWarnings.

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ findInnerCompound()

const Definition * ClassDefImpl::findInnerCompound ( const QCString & name) const
overridevirtual

Implements Definition.

Definition at line 4337 of file classdef.cpp.

4338{
4339 return m_innerClasses.find(name);
4340}

References m_innerClasses, and DefinitionMixin< ClassDefMutable >::name().

◆ findSectionsInDocumentation()

void ClassDefImpl::findSectionsInDocumentation ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1372 of file classdef.cpp.

1373{
1377 for (const auto &mg : m_memberGroups)
1378 {
1379 mg->findSectionsInDocumentation(this);
1380 }
1381 for (auto &ml : m_memberLists)
1382 {
1383 if (!ml->listType().isDetailed())
1384 {
1385 ml->findSectionsInDocumentation(this);
1386 }
1387 }
1388}
void docFindSections(const QCString &input, const Definition *d, const QCString &fileName)

References DefinitionMixin< ClassDefMutable >::briefDescription(), DefinitionMixin< ClassDefMutable >::docFile(), docFindSections(), DefinitionMixin< ClassDefMutable >::documentation(), DefinitionMixin< ClassDefMutable >::inbodyDocumentation(), m_memberGroups, and m_memberLists.

◆ generatedFromFiles()

QCString ClassDefImpl::generatedFromFiles ( ) const
overridevirtual

Implements ClassDef.

Definition at line 1701 of file classdef.cpp.

1702{
1703 QCString result;
1704 SrcLangExt lang = getLanguage();
1705 size_t numFiles = m_files.size();
1706 if (lang==SrcLangExt::Fortran)
1707 {
1709 getLanguage()==SrcLangExt::ObjC && m_compType==Interface ? Class : m_compType,
1710 numFiles==1);
1711 }
1712 else if (isJavaEnum())
1713 {
1714 result = theTranslator->trEnumGeneratedFromFiles(numFiles==1);
1715 }
1716 else if (m_compType==Service)
1717 {
1718 result = theTranslator->trServiceGeneratedFromFiles(numFiles==1);
1719 }
1720 else if (m_compType==Singleton)
1721 {
1722 result = theTranslator->trSingletonGeneratedFromFiles(numFiles==1);
1723 }
1724 else
1725 {
1727 getLanguage()==SrcLangExt::ObjC && m_compType==Interface ? Class : m_compType,
1728 numFiles==1);
1729 }
1730 return result;
1731}
virtual QCString trServiceGeneratedFromFiles(bool single)=0
virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, bool single)=0
virtual QCString trSingletonGeneratedFromFiles(bool single)=0
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool single)=0
virtual QCString trEnumGeneratedFromFiles(bool single)=0

References ClassDef::Class, DefinitionMixin< ClassDefMutable >::getLanguage(), ClassDef::Interface, isJavaEnum(), m_compType, m_files, ClassDef::Service, ClassDef::Singleton, and theTranslator.

Referenced by showUsedFiles().

◆ getClasses()

ClassLinkedRefMap ClassDefImpl::getClasses ( ) const
overridevirtual

returns the classes nested into this class

Implements ClassDef.

Definition at line 4988 of file classdef.cpp.

4989{
4990 return m_innerClasses;
4991}

References m_innerClasses.

◆ getExamples()

const ExampleList & ClassDefImpl::getExamples ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5382 of file classdef.cpp.

5383{
5384 return m_examples;
5385}

References m_examples.

◆ getFileDef()

FileDef * ClassDefImpl::getFileDef ( ) const
overridevirtual

Returns the namespace this compound is in, or 0 if it has a global scope.

Returns the file in which this compound's definition can be found. Should not return 0 (but it might be a good idea to check anyway).

Implements ClassDef.

Definition at line 5043 of file classdef.cpp.

5044{
5045 return m_fileDef;
5046}

References m_fileDef.

Referenced by addTypeConstraint(), getOutputFileBase(), isEmbeddedInOuterScope(), and writeTemplateSpec().

◆ getInstanceOutputFileBase()

QCString ClassDefImpl::getInstanceOutputFileBase ( ) const
overridevirtual

Implements ClassDef.

Definition at line 4290 of file classdef.cpp.

4291{
4292 return m_fileName;
4293}

References m_fileName.

◆ getMemberByName()

const MemberDef * ClassDefImpl::getMemberByName ( const QCString & ) const
overridevirtual

Returns the member with the given name.

Implements ClassDef.

Definition at line 4577 of file classdef.cpp.

4578{
4579 const MemberDef *xmd = nullptr;
4580 const MemberNameInfo *mni = m_allMemberNameInfoLinkedMap.find(name);
4581 if (mni)
4582 {
4583 const int maxInheritanceDepth = 100000;
4584 int mdist=maxInheritanceDepth;
4585 for (auto &mi : *mni)
4586 {
4587 const ClassDef *mcd=mi->memberDef()->getClassDef();
4588 int m=minClassDistance(this,mcd);
4589 //printf("found member in %s linkable=%d m=%d\n",
4590 // qPrint(mcd->name()),mcd->isLinkable(),m);
4591 if (m<mdist)
4592 {
4593 mdist=m;
4594 xmd=mi->memberDef();
4595 }
4596 }
4597 }
4598 //printf("getMemberByName(%s)=%p\n",qPrint(name),xmd);
4599 return xmd;
4600}
int minClassDistance(const ClassDef *cd, const ClassDef *bcd, int level)

References m_allMemberNameInfoLinkedMap, minClassDistance(), and DefinitionMixin< ClassDefMutable >::name().

◆ getMemberGroups()

const MemberGroupList & ClassDefImpl::getMemberGroups ( ) const
overridevirtual

Returns the member groups defined for this class.

Implements ClassDef.

Definition at line 5158 of file classdef.cpp.

5159{
5160 return m_memberGroups;
5161}

References m_memberGroups.

◆ getMemberList()

MemberList * ClassDefImpl::getMemberList ( MemberListType lt) const
overridevirtual

Returns the members in the list identified by lt.

Implements ClassDef.

Definition at line 4607 of file classdef.cpp.

4608{
4609 for (auto &ml : m_memberLists)
4610 {
4611 if (ml->listType()==lt)
4612 {
4613 return ml.get();
4614 }
4615 }
4616 return nullptr;
4617}

References m_memberLists.

Referenced by countMemberDeclarations(), countMembersIncludingGrouped(), setAnonymousEnumType(), writeMemberDeclarations(), writeMemberDocumentation(), writePlainMemberDeclaration(), writeSimpleMemberDocumentation(), writeSummaryLinks(), and writeTagFile().

◆ getMemberListFileName()

QCString ClassDefImpl::getMemberListFileName ( ) const
overridevirtual

Implements ClassDef.

Definition at line 985 of file classdef.cpp.

986{
988}

References m_memberListFileName.

Referenced by writeDocumentation(), writeMemberList(), and writeSummaryLinks().

◆ getMemberLists()

const MemberLists & ClassDefImpl::getMemberLists ( ) const
overridevirtual

Returns the list containing the list of members sorted per type.

Implements ClassDef.

Definition at line 5153 of file classdef.cpp.

5154{
5155 return m_memberLists;
5156}

References m_memberLists.

◆ getModuleDef()

ModuleDef * ClassDefImpl::getModuleDef ( ) const
overridevirtual

Returns the C++20 module in which this compound's definition can be found.

Implements ClassDef.

Definition at line 5048 of file classdef.cpp.

5049{
5050 return m_moduleDef;
5051}

References m_moduleDef.

◆ getOutputFileBase()

QCString ClassDefImpl::getOutputFileBase ( ) const
overridevirtual

Returns the base file name (without extension) of this definition. as it is referenced to/written to disk.

Implements Definition.

Definition at line 4252 of file classdef.cpp.

4253{
4254 bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
4255 bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
4257 {
4258 Definition *scope=nullptr;
4259 if (inlineGroupedClasses && !partOfGroups().empty())
4260 {
4261 // point to the group that embeds this class
4262 return partOfGroups().front()->getOutputFileBase();
4263 }
4264 else if (inlineSimpleClasses && m_isSimple && !partOfGroups().empty())
4265 {
4266 // point to simple struct inside a group
4267 return partOfGroups().front()->getOutputFileBase();
4268 }
4269 else if (inlineSimpleClasses && m_isSimple && (scope=getOuterScope()))
4270 {
4271 if (scope==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) // simple struct embedded in file
4272 {
4273 return getFileDef()->getOutputFileBase();
4274 }
4275 else if (scope->isLinkableInProject()) // simple struct embedded in other container (namespace/group/class)
4276 {
4277 return getOuterScope()->getOutputFileBase();
4278 }
4279 }
4280 }
4281 AUTO_TRACE("name='{}' m_templateMaster={} m_implicitTemplateInstance={}",name(),(void*)m_templateMaster,m_implicitTemplateInstance);
4283 {
4284 // point to the template of which this class is an instance
4285 return m_templateMaster->getOutputFileBase();
4286 }
4287 return m_fileName;
4288}
virtual bool isLinkableInProject() const =0
virtual QCString getOutputFileBase() const =0
Definition * getOuterScope() const override
const GroupList & partOfGroups() const override
static NamespaceDefMutable * globalScope
Definition doxygen.h:120

References AUTO_TRACE, Config_getBool, Doxygen::generatingXmlOutput, getFileDef(), DefinitionMixin< ClassDefMutable >::getOuterScope(), Definition::getOutputFileBase(), Doxygen::globalScope, isLinkableInProject(), Definition::isLinkableInProject(), m_fileName, m_implicitTemplateInstance, m_isSimple, m_templateMaster, DefinitionMixin< ClassDefMutable >::name(), and DefinitionMixin< ClassDefMutable >::partOfGroups().

Referenced by addListReferences(), writeDeclarationLink(), writeDetailedDescription(), writeDocumentation(), writeInheritanceGraph(), writeInlineDocumentation(), writeMemberList(), writeMoreLink(), and writeTagFile().

◆ getQualifiers()

StringVector ClassDefImpl::getQualifiers ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5331 of file classdef.cpp.

5332{
5333 return m_qualifiers;
5334}

References m_qualifiers.

◆ getReference()

QCString ClassDefImpl::getReference ( ) const
overridevirtual

If this definition was imported via a tag file, this function returns the tagfile for the external project. This can be translated into an external link target via Doxygen::tagDestinationDict

Implements Definition.

Definition at line 4473 of file classdef.cpp.

4474{
4476 {
4477 return m_templateMaster->getReference();
4478 }
4479 else
4480 {
4482 }
4483}
QCString getReference() const override

References DefinitionMixin< Base >::getReference(), m_implicitTemplateInstance, and m_templateMaster.

Referenced by writeDeclarationLink(), and writeMemberList().

◆ getSourceFileBase()

QCString ClassDefImpl::getSourceFileBase ( ) const
overridevirtual

Returns the name of the source listing of this definition.

Implements Definition.

Definition at line 4295 of file classdef.cpp.

4296{
4298 {
4299 return m_templateMaster->getSourceFileBase();
4300 }
4301 else
4302 {
4304 }
4305}
QCString getSourceFileBase() const override

References DefinitionMixin< Base >::getSourceFileBase(), m_implicitTemplateInstance, and m_templateMaster.

◆ getTemplateBaseClassNames()

const TemplateNameMap & ClassDefImpl::getTemplateBaseClassNames ( ) const
overridevirtual

Implements ClassDef.

Definition at line 4416 of file classdef.cpp.

4417{
4418 return m_templBaseClassNames;
4419}

References m_templBaseClassNames.

◆ getTemplateInstances()

const TemplateInstanceList & ClassDefImpl::getTemplateInstances ( ) const
overridevirtual

Returns a sorted dictionary with all template instances found for this template class.

Returns 0 if not a template or no instances.

Implements ClassDef.

Definition at line 5053 of file classdef.cpp.

5054{
5055 return m_templateInstances;
5056}

References m_templateInstances.

Referenced by internalInsertMember().

◆ getTemplateParameterLists()

ArgumentLists ClassDefImpl::getTemplateParameterLists ( ) const
overridevirtual

Returns the template parameter lists that form the template declaration of this class.

Example: template<class T> class TC {} = 0; will return a list with one ArgumentList containing one argument with type="class" and name="T".

Implements ClassDef.

Definition at line 4497 of file classdef.cpp.

4498{
4499 ArgumentLists result;
4500 Definition *d=getOuterScope();
4501 while (d && d->definitionType()==Definition::TypeClass)
4502 {
4503 result.insert(result.begin(),toClassDef(d)->templateArguments());
4504 d = d->getOuterScope();
4505 }
4506 if (!templateArguments().empty())
4507 {
4508 result.push_back(templateArguments());
4509 }
4510 return result;
4511}
std::vector< ArgumentList > ArgumentLists
Definition arguments.h:147

References Definition::definitionType(), Definition::getOuterScope(), DefinitionMixin< ClassDefMutable >::getOuterScope(), templateArguments(), toClassDef(), and Definition::TypeClass.

◆ getTitleForMemberListType()

void ClassDefImpl::getTitleForMemberListType ( MemberListType type,
QCString & title,
QCString & subtitle ) const
private

Definition at line 4772 of file classdef.cpp.

4774{
4775 SrcLangExt lang = getLanguage();
4776 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4777 {
4778 if (lde->kind()==LayoutDocEntry::MemberDecl)
4779 {
4780 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4781 if (lmd && lmd->type==type)
4782 {
4783 title = lmd->title(lang);
4784 subtitle = lmd->subtitle(lang);
4785 return;
4786 }
4787 }
4788 }
4789 title="";
4790 subtitle="";
4791}
QCString title() const override
QCString title(SrcLangExt lang) const
Definition layout.cpp:1788
QCString subtitle(SrcLangExt lang) const
Definition layout.cpp:1793

References DefinitionMixin< ClassDefMutable >::getLanguage(), LayoutDocManager::instance(), LayoutDocEntryMemberDecl::subtitle(), title(), LayoutDocEntryMemberDecl::title(), and LayoutDocEntryMemberDecl::type.

◆ hasCollaborationGraph()

bool ClassDefImpl::hasCollaborationGraph ( ) const
overridevirtual

Implements ClassDefMutable.

Definition at line 5444 of file classdef.cpp.

5445{
5447}

References m_hasCollaborationGraph.

◆ hasDetailedDescription()

bool ClassDefImpl::hasDetailedDescription ( ) const
overridevirtual

returns TRUE if this class has a non-empty detailed description

Implements ClassDef.

Definition at line 1654 of file classdef.cpp.

1655{
1656 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
1657 bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
1658 return ((!briefDescription().isEmpty() && repeatBrief) ||
1659 (!documentation().isEmpty() || m_tempArgs.hasTemplateDocumentation()) ||
1660 (sourceBrowser && getStartBodyLine()!=-1 && getBodyDef()) ||
1662}
virtual int getStartBodyLine() const =0
bool hasRequirementRefs() const override

References DefinitionMixin< ClassDefMutable >::briefDescription(), Config_getBool, DefinitionMixin< ClassDefMutable >::documentation(), DefinitionMixin< ClassDefMutable >::getBodyDef(), DefinitionMixin< ClassDefMutable >::getStartBodyLine(), DefinitionMixin< ClassDefMutable >::hasRequirementRefs(), and m_tempArgs.

Referenced by writeBriefDescription(), and writeDetailedDescription().

◆ hasDocumentation()

bool ClassDefImpl::hasDocumentation ( ) const
overridevirtual

Returns TRUE iff the definition is documented (which could be generated documentation)

See also
hasUserDocumentation()

Implements Definition.

Definition at line 3669 of file classdef.cpp.

3670{
3672}
bool hasDocumentation() const override

References DefinitionMixin< Base >::hasDocumentation().

Referenced by isLinkableInProject(), and isVisibleInHierarchy().

◆ hasExamples()

bool ClassDefImpl::hasExamples ( ) const
overridevirtual

Implements ClassDef.

Definition at line 3419 of file classdef.cpp.

3420{
3421 return !m_examples.empty();
3422}

References m_examples.

Referenced by writeDetailedDocumentationBody(), and writeDocumentationContents().

◆ hasInheritanceGraph()

CLASS_GRAPH_t ClassDefImpl::hasInheritanceGraph ( ) const
overridevirtual

Implements ClassDefMutable.

Definition at line 5417 of file classdef.cpp.

5418{
5420}

References m_typeInheritanceGraph.

◆ hasNonReferenceSuperClass()

bool ClassDefImpl::hasNonReferenceSuperClass ( ) const
overridevirtual

Returns TRUE iff this class or a class inheriting from this class is not defined in an external tag file.

Implements ClassDef.

Definition at line 3536 of file classdef.cpp.

3537{
3538 return hasNonReferenceSuperClassRec(this,0);
3539}
static bool hasNonReferenceSuperClassRec(const ClassDef *cd, int level)

References hasNonReferenceSuperClassRec().

Referenced by isVisibleInHierarchy().

◆ hideDerivedVariablesInPython()

void ClassDefImpl::hideDerivedVariablesInPython ( ClassDefMutable * cls)
private

Definition at line 3977 of file classdef.cpp.

3978{
3979 //printf("hideDerivedVariableInPython()\n");
3980 if (bClass)
3981 {
3982 const MemberNameInfoLinkedMap &srcMnd = bClass->memberNameInfoLinkedMap();
3983 MemberNameInfoLinkedMap &dstMnd = m_allMemberNameInfoLinkedMap;
3984
3985 // recurse up the inheritance hierarchy
3986 for (const auto &bcd : bClass->baseClasses())
3987 {
3989 }
3990
3991 for (auto &srcMni : srcMnd) // for each member in a base class
3992 {
3993 //printf(" candidate(%s)\n",qPrint(srcMni->memberName()));
3994 MemberNameInfo *dstMni=dstMnd.find(srcMni->memberName());
3995 if (dstMni) // that is also in this class
3996 {
3998 //printf("%s member in %s and %s\n",qPrint(name()),qPrint(bClass->name()),qPrint(name()));
3999 for (it=dstMni->begin();it!=dstMni->end();)
4000 {
4001 MemberDefMutable *dstMd = toMemberDefMutable((*it)->memberDef());
4002 if (dstMd && dstMd->isVariable() && !dstMd->name().startsWith("__"))
4003 {
4004 //printf(" hiding member %s\n",qPrint(dstMd->name()));
4005 // hide a member variable if it is already defined in a base class, unless
4006 // it is a __private variable
4007 removeMemberFromLists(dstMd);
4008 it = dstMni->erase(it);
4009 }
4010 else
4011 {
4012 ++it;
4013 }
4014 }
4015 if (dstMni->empty()) // if the list has become empty, remove the entry from the dictionary
4016 {
4017 dstMnd.del(srcMni->memberName());
4018 }
4019 }
4020 }
4021 }
4022}
void hideDerivedVariablesInPython(ClassDefMutable *cls)
void removeMemberFromLists(MemberDef *md) override
bool del(const QCString &key)
Definition linkedmap.h:183
const T * find(const std::string &key) const
Definition linkedmap.h:47
virtual bool isVariable() const =0
bool empty() const
Definition membername.h:135
iterator begin()
Definition membername.h:131
iterator end()
Definition membername.h:132
typename Vec::iterator iterator
Definition membername.h:125
iterator erase(iterator pos)
Definition membername.h:142
bool startsWith(const char *s) const
Definition qcstring.h:507

References ClassDef::baseClasses(), MemberNameInfo::begin(), LinkedMap< T, Hash, KeyEqual, Map >::del(), MemberNameInfo::empty(), MemberNameInfo::end(), MemberNameInfo::erase(), LinkedMap< T, Hash, KeyEqual, Map >::find(), hideDerivedVariablesInPython(), MemberDef::isVariable(), m_allMemberNameInfoLinkedMap, ClassDef::memberNameInfoLinkedMap(), Definition::name(), removeMemberFromLists(), QCString::startsWith(), toClassDefMutable(), and toMemberDefMutable().

Referenced by hideDerivedVariablesInPython(), and mergeMembers().

◆ includeInfo()

const IncludeInfo * ClassDefImpl::includeInfo ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5078 of file classdef.cpp.

5079{
5080 return m_incInfo.get();
5081}

References m_incInfo.

◆ inheritanceGraphFileName()

QCString ClassDefImpl::inheritanceGraphFileName ( ) const
overridevirtual

returns the file name to use for the inheritance graph

Implements ClassDef.

Definition at line 5407 of file classdef.cpp.

5408{
5409 return m_inheritFileName;
5410}

References m_inheritFileName.

◆ insertBaseClass()

void ClassDefImpl::insertBaseClass ( ClassDef * cd,
const QCString & name,
Protection p,
Specifier s,
const QCString & t = QCString() )
overridevirtual

Implements ClassDefMutable.

Definition at line 996 of file classdef.cpp.

998{
999 //printf("*** insert base class %s into %s\n",qPrint(cd->name()),qPrint(name()));
1000 m_inherits.emplace_back(cd,n,p,s,t);
1001 m_isSimple = FALSE;
1002}

References FALSE, m_inherits, and m_isSimple.

Referenced by mergeCategory().

◆ insertExplicitTemplateInstance()

void ClassDefImpl::insertExplicitTemplateInstance ( ClassDef * instance,
const QCString & spec )
overridevirtual

Implements ClassDefMutable.

Definition at line 4405 of file classdef.cpp.

4406{
4407 AUTO_TRACE("this={} cd={} templSpec={}",name(),templateClass->name(),templSpec);
4408 m_templateInstances.emplace_back(templSpec,templateClass);
4409}

References AUTO_TRACE, m_templateInstances, Definition::name(), and DefinitionMixin< ClassDefMutable >::name().

◆ insertMember()

void ClassDefImpl::insertMember ( MemberDef * md)
overridevirtual

Implements ClassDefMutable.

Definition at line 1342 of file classdef.cpp.

1343{
1345}
void internalInsertMember(MemberDef *md, Protection prot, bool addToAllList)
virtual Protection protection() const =0

References internalInsertMember(), MemberDef::protection(), and TRUE.

Referenced by addMemberToTemplateInstance(), and reclassifyMember().

◆ insertSubClass()

void ClassDefImpl::insertSubClass ( ClassDef * cd,
Protection p,
Specifier s,
const QCString & t = QCString() )
overridevirtual

Implements ClassDefMutable.

Definition at line 1005 of file classdef.cpp.

1007{
1008 //printf("*** insert sub class %s into %s\n",qPrint(cd->name()),qPrint(name()));
1009 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
1010 if (!extractPrivate && cd->protection()==Protection::Private) return;
1011 m_inheritedBy.emplace_back(cd,QCString(),p,s,t);
1012 m_isSimple = FALSE;
1013}
virtual Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.

References Config_getBool, FALSE, m_inheritedBy, m_isSimple, and ClassDef::protection().

◆ insertTemplateInstance()

ClassDef * ClassDefImpl::insertTemplateInstance ( const QCString & fileName,
int startLine,
int startColumn,
const QCString & templSpec,
bool & freshInstance )
overridevirtual

Implements ClassDefMutable.

Definition at line 4342 of file classdef.cpp.

4344{
4345 freshInstance = FALSE;
4346 auto it = std::find_if(m_templateInstances.begin(),
4347 m_templateInstances.end(),
4348 [&templSpec](const auto &ti) { return templSpec==ti.templSpec; });
4349 ClassDefMutable *templateClass=nullptr;
4350 if (it!=m_templateInstances.end())
4351 {
4352 templateClass = toClassDefMutable((*it).classDef);
4353 }
4354 if (templateClass==nullptr)
4355 {
4356 QCString tcname = removeRedundantWhiteSpace(name()+templSpec);
4357 AUTO_TRACE("New template instance class name='{}' templSpec='{}' inside '{}' hidden={}",
4358 name(),templSpec,name(),isHidden());
4359
4360 ClassDef *foundCd = Doxygen::classLinkedMap->find(tcname);
4361 if (foundCd)
4362 {
4363 return foundCd;
4364 }
4365 templateClass =
4367 Doxygen::classLinkedMap->add(tcname,
4368 std::unique_ptr<ClassDef>(
4369 new ClassDefImpl(fileName,startLine,startColumn,tcname,ClassDef::Class))));
4370 if (templateClass)
4371 {
4372 templateClass->setTemplateMaster(this);
4373 ArgumentList tal = *stringToArgumentList(getLanguage(),templSpec);
4374 templateClass->setTemplateArguments(tal);
4375 templateClass->setOuterScope(getOuterScope());
4376 templateClass->setHidden(isHidden());
4377 templateClass->setArtificial(isArtificial());
4378 templateClass->setImplicitTemplateInstance(true);
4379 m_templateInstances.emplace_back(templSpec,templateClass);
4380
4381 // also add nested classes
4382 for (const auto &innerCd : m_innerClasses)
4383 {
4384 QCString innerName = tcname+"::"+innerCd->localName();
4385 ClassDefMutable *innerClass =
4387 Doxygen::classLinkedMap->add(innerName,
4388 std::unique_ptr<ClassDef>(
4389 new ClassDefImpl(fileName,startLine,startColumn,innerName,ClassDef::Class))));
4390 if (innerClass)
4391 {
4392 templateClass->addInnerCompound(innerClass);
4393 innerClass->setOuterScope(templateClass);
4394 innerClass->setHidden(isHidden());
4395 innerClass->setArtificial(TRUE);
4396 innerClass->setImplicitTemplateInstance(true);
4397 }
4398 }
4399 freshInstance=TRUE;
4400 }
4401 }
4402 return templateClass;
4403}
virtual void setTemplateArguments(const ArgumentList &al)=0
virtual void setTemplateMaster(const ClassDef *tm)=0
virtual void setImplicitTemplateInstance(bool b)=0
virtual void setHidden(bool b)=0
virtual void addInnerCompound(Definition *d)=0
virtual void setArtificial(bool b)=0

References DefinitionMutable::addInnerCompound(), AUTO_TRACE, ClassDef::Class, ClassDefImpl(), Doxygen::classLinkedMap, FALSE, DefinitionMixin< ClassDefMutable >::getLanguage(), DefinitionMixin< ClassDefMutable >::getOuterScope(), DefinitionMixin< ClassDefMutable >::isArtificial(), DefinitionMixin< ClassDefMutable >::isHidden(), m_innerClasses, m_templateInstances, DefinitionMixin< ClassDefMutable >::name(), removeRedundantWhiteSpace(), DefinitionMutable::setArtificial(), DefinitionMutable::setHidden(), ClassDefMutable::setImplicitTemplateInstance(), DefinitionMutable::setOuterScope(), ClassDefMutable::setTemplateArguments(), ClassDefMutable::setTemplateMaster(), stringToArgumentList(), toClassDefMutable(), and TRUE.

◆ insertUsedFile()

void ClassDefImpl::insertUsedFile ( const FileDef * fd)
overridevirtual

Implements ClassDefMutable.

Definition at line 1392 of file classdef.cpp.

1393{
1394 if (fd == nullptr) return;
1395
1396 if (std::find(m_files.begin(), m_files.end(), fd) == m_files.end()) m_files.push_back(fd);
1397
1398 for (const auto &ti : m_templateInstances)
1399 {
1400 if (ClassDefMutable *cdm = toClassDefMutable(ti.classDef)) cdm->insertUsedFile(fd);
1401 }
1402}

References m_files, m_templateInstances, and toClassDefMutable().

◆ internalInsertMember()

void ClassDefImpl::internalInsertMember ( MemberDef * md,
Protection prot,
bool addToAllList )
private

isReference()

Definition at line 1037 of file classdef.cpp.

1041{
1042 AUTO_TRACE("{} name={} isHidden={}",name(),md->name(),md->isHidden());
1043 if (md->isHidden()) return;
1044
1045 if (getLanguage()==SrcLangExt::VHDL)
1046 {
1048 m_vhdlSummaryTitles.insert(title.str());
1049 }
1050
1051 if (1 /*!isReference()*/) // changed to 1 for showing members of external
1052 // classes when HAVE_DOT and UML_LOOK are enabled.
1053 {
1054 bool isSimple=FALSE;
1055
1056 /********************************************/
1057 /* insert member in the declaration section */
1058 /********************************************/
1059 if (md->isRelated() && protectionLevelVisible(prot))
1060 {
1061 addMemberToList(MemberListType::Related(),md,TRUE);
1062 }
1063 else if (md->isFriend())
1064 {
1065 addMemberToList(MemberListType::Friends(),md,TRUE);
1066 }
1067 else
1068 {
1069 switch (md->memberType())
1070 {
1071 case MemberType::Service: // UNO IDL
1072 addMemberToList(MemberListType::Services(),md,TRUE);
1073 break;
1074 case MemberType::Interface: // UNO IDL
1075 addMemberToList(MemberListType::Interfaces(),md,TRUE);
1076 break;
1077 case MemberType::Signal: // Qt specific
1078 addMemberToList(MemberListType::Signals(),md,TRUE);
1079 break;
1080 case MemberType::DCOP: // KDE2 specific
1081 addMemberToList(MemberListType::DcopMethods(),md,TRUE);
1082 break;
1084 addMemberToList(MemberListType::Properties(),md,TRUE);
1085 break;
1086 case MemberType::Event:
1087 addMemberToList(MemberListType::Events(),md,TRUE);
1088 break;
1089 case MemberType::Slot: // Qt specific
1090 switch (prot)
1091 {
1092 case Protection::Protected:
1093 case Protection::Package: // slots in packages are not possible!
1094 addMemberToList(MemberListType::ProSlots(),md,TRUE);
1095 break;
1096 case Protection::Public:
1097 addMemberToList(MemberListType::PubSlots(),md,TRUE);
1098 break;
1099 case Protection::Private:
1100 addMemberToList(MemberListType::PriSlots(),md,TRUE);
1101 break;
1102 }
1103 break;
1104 default: // any of the other members
1105 if (md->isStatic())
1106 {
1107 if (md->isVariable())
1108 {
1109 switch (prot)
1110 {
1111 case Protection::Protected:
1112 addMemberToList(MemberListType::ProStaticAttribs(),md,TRUE);
1113 break;
1114 case Protection::Package:
1115 addMemberToList(MemberListType::PacStaticAttribs(),md,TRUE);
1116 break;
1117 case Protection::Public:
1118 addMemberToList(MemberListType::PubStaticAttribs(),md,TRUE);
1119 break;
1120 case Protection::Private:
1121 addMemberToList(MemberListType::PriStaticAttribs(),md,TRUE);
1122 break;
1123 }
1124 }
1125 else // function
1126 {
1127 switch (prot)
1128 {
1129 case Protection::Protected:
1130 addMemberToList(MemberListType::ProStaticMethods(),md,TRUE);
1131 break;
1132 case Protection::Package:
1133 addMemberToList(MemberListType::PacStaticMethods(),md,TRUE);
1134 break;
1135 case Protection::Public:
1136 addMemberToList(MemberListType::PubStaticMethods(),md,TRUE);
1137 break;
1138 case Protection::Private:
1139 addMemberToList(MemberListType::PriStaticMethods(),md,TRUE);
1140 break;
1141 }
1142 }
1143 }
1144 else // not static
1145 {
1146 if (md->isVariable())
1147 {
1148 switch (prot)
1149 {
1150 case Protection::Protected:
1151 addMemberToList(MemberListType::ProAttribs(),md,TRUE);
1152 break;
1153 case Protection::Package:
1154 addMemberToList(MemberListType::PacAttribs(),md,TRUE);
1155 break;
1156 case Protection::Public:
1157 {
1158 addMemberToList(MemberListType::PubAttribs(),md,TRUE);
1159 const int MAX_CELL_SIZE=60;
1160 isSimple=md->typeString().length()+md->name().length()+md->argsString().length()<=MAX_CELL_SIZE;
1161 }
1162 break;
1163 case Protection::Private:
1164 addMemberToList(MemberListType::PriAttribs(),md,TRUE);
1165 break;
1166 }
1167 }
1168 else if (md->isTypedef() || md->isEnumerate() || md->isEnumValue())
1169 {
1170 switch (prot)
1171 {
1172 case Protection::Protected:
1173 addMemberToList(MemberListType::ProTypes(),md,TRUE);
1174 break;
1175 case Protection::Package:
1176 addMemberToList(MemberListType::PacTypes(),md,TRUE);
1177 break;
1178 case Protection::Public:
1179 addMemberToList(MemberListType::PubTypes(),md,TRUE);
1180 isSimple=!md->isEnumerate() &&
1181 !md->isEnumValue() &&
1182 md->typeString().find(")(")==-1; // func ptr typedef
1183 break;
1184 case Protection::Private:
1185 addMemberToList(MemberListType::PriTypes(),md,TRUE);
1186 break;
1187 }
1188 }
1189 else // member function
1190 {
1191 switch (prot)
1192 {
1193 case Protection::Protected:
1194 addMemberToList(MemberListType::ProMethods(),md,TRUE);
1195 break;
1196 case Protection::Package:
1197 addMemberToList(MemberListType::PacMethods(),md,TRUE);
1198 break;
1199 case Protection::Public:
1200 addMemberToList(MemberListType::PubMethods(),md,TRUE);
1201 break;
1202 case Protection::Private:
1203 addMemberToList(MemberListType::PriMethods(),md,TRUE);
1204 break;
1205 }
1206 }
1207 }
1208 break;
1209 }
1210 }
1211 if (!isSimple) // not a simple field -> not a simple struct
1212 {
1213 m_isSimple = FALSE;
1214 }
1215 //printf("adding %s simple=%d total_simple=%d\n",qPrint(name()),isSimple,m_isSimple);
1216
1217 /*******************************************************/
1218 /* insert member in the detailed documentation section */
1219 /*******************************************************/
1220 if ((md->isRelated() && protectionLevelVisible(prot)) || md->isFriend())
1221 {
1222 addMemberToList(MemberListType::RelatedMembers(),md,FALSE);
1223 }
1224 else if (md->isFunction() &&
1225 md->protection()==Protection::Private &&
1226 (md->virtualness()!=Specifier::Normal || md->isOverride() || md->isFinal()) &&
1227 Config_getBool(EXTRACT_PRIV_VIRTUAL))
1228 {
1229 addMemberToList(MemberListType::FunctionMembers(),md,FALSE);
1230 }
1231 else
1232 {
1233 switch (md->memberType())
1234 {
1235 case MemberType::Service: // UNO IDL
1236 addMemberToList(MemberListType::ServiceMembers(),md,FALSE);
1237 break;
1238 case MemberType::Interface: // UNO IDL
1239 addMemberToList(MemberListType::InterfaceMembers(),md,FALSE);
1240 break;
1242 addMemberToList(MemberListType::PropertyMembers(),md,FALSE);
1243 break;
1244 case MemberType::Event:
1245 addMemberToList(MemberListType::EventMembers(),md,FALSE);
1246 break;
1247 case MemberType::Signal: // fall through
1248 case MemberType::DCOP:
1249 addMemberToList(MemberListType::FunctionMembers(),md,FALSE);
1250 break;
1251 case MemberType::Slot:
1252 if (protectionLevelVisible(prot))
1253 {
1254 addMemberToList(MemberListType::FunctionMembers(),md,FALSE);
1255 }
1256 break;
1257 default: // any of the other members
1258 if (protectionLevelVisible(prot))
1259 {
1260 switch (md->memberType())
1261 {
1263 addMemberToList(MemberListType::TypedefMembers(),md,FALSE);
1264 break;
1266 addMemberToList(MemberListType::EnumMembers(),md,FALSE);
1267 break;
1269 addMemberToList(MemberListType::EnumValMembers(),md,FALSE);
1270 break;
1272 if (md->isConstructor() || md->isDestructor())
1273 {
1274 m_memberLists.get(MemberListType::Constructors(),MemberListContainer::Class)->push_back(md);
1275 }
1276 else
1277 {
1278 addMemberToList(MemberListType::FunctionMembers(),md,FALSE);
1279 }
1280 break;
1282 addMemberToList(MemberListType::VariableMembers(),md,FALSE);
1283 break;
1284 case MemberType::Define:
1285 warn(md->getDefFileName(),md->getDefLine()-1,"A define ({}) cannot be made a member of {}",
1286 md->name(), this->name());
1287 break;
1288 default:
1289 err("Unexpected member type '{}' found!\n",md->memberTypeName());
1290 }
1291 }
1292 break;
1293 }
1294 }
1295
1296 /*************************************************/
1297 /* insert member in the appropriate member group */
1298 /*************************************************/
1299 // Note: this must be done AFTER inserting the member in the
1300 // regular groups
1301 //addMemberToGroup(md,groupId);
1302
1303 }
1304
1305 if (md->virtualness()==Specifier::Pure)
1306 {
1307 m_isAbstract=true;
1308 }
1309
1310 if (md->name()=="operator->")
1311 {
1312 m_arrowOperator=md;
1313 }
1314
1315 if (addToAllList &&
1316 !(Config_getBool(HIDE_FRIEND_COMPOUNDS) &&
1317 md->isFriend() &&
1318 (md->typeString()=="friend class" ||
1319 md->typeString()=="friend struct" ||
1320 md->typeString()=="friend union")))
1321 {
1322 //printf("=======> adding member %s to class %s\n",qPrint(md->name()),qPrint(name()));
1323
1324 MemberNameInfo *mni = m_allMemberNameInfoLinkedMap.add(md->name());
1325 mni->push_back(std::make_unique<MemberInfo>(md,prot,md->virtualness(),false,false));
1326 }
1327
1328 // if we already created template instances before inserting this member (i.e. due to a typedef or using statement)
1329 // then we also need to insert the member in the template instance.
1330 for (const auto &ti : getTemplateInstances())
1331 {
1332 AUTO_TRACE_ADD("member {} of class {} with template instance {}\n",md->name(),name(),ti.templSpec);
1333 ClassDefMutable *cdm = toClassDefMutable(ti.classDef);
1334 if (cdm)
1335 {
1336 cdm->addMemberToTemplateInstance(md,templateArguments(),ti.templSpec);
1337 }
1338 }
1339
1340}
void addMemberToList(MemberListType lt, MemberDef *md, bool isBrief)
const TemplateInstanceList & getTemplateInstances() const override
Returns a sorted dictionary with all template instances found for this template class.
bool isSimple() const override
virtual void addMemberToTemplateInstance(const MemberDef *md, const ArgumentList &templateArguments, const QCString &templSpec)=0
virtual QCString getDefFileName() const =0
virtual int getDefLine() const =0
virtual bool isHidden() const =0
virtual bool isDestructor() const =0
virtual bool isConstructor() const =0
virtual bool isFriend() const =0
virtual bool isRelated() const =0
virtual bool isOverride() const =0
virtual bool isTypedef() const =0
virtual VhdlSpecifier getVhdlSpecifiers() const =0
virtual bool isFunction() const =0
virtual bool isStatic() const =0
virtual bool isEnumerate() const =0
virtual MemberType memberType() const =0
virtual QCString memberTypeName() const =0
virtual QCString argsString() const =0
virtual Specifier virtualness(int count=0) const =0
virtual bool isFinal() const =0
virtual bool isEnumValue() const =0
void push_back(Ptr &&p)
Definition membername.h:141
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:166
virtual QCString trVhdlType(VhdlSpecifier type, bool single)=0
#define warn(file, line, fmt,...)
Definition message.h:97
#define err(fmt,...)
Definition message.h:127
@ Enumeration
Definition types.h:557
@ EnumValue
Definition types.h:558
@ Interface
Definition types.h:565
@ Variable
Definition types.h:555
@ Property
Definition types.h:563
@ Typedef
Definition types.h:556
@ Function
Definition types.h:554
@ Service
Definition types.h:566
bool protectionLevelVisible(Protection prot)
Definition util.cpp:5937

References addMemberToList(), ClassDefMutable::addMemberToTemplateInstance(), MemberDef::argsString(), AUTO_TRACE, AUTO_TRACE_ADD, Class, Config_getBool, DCOP, Define, Enumeration, EnumValue, err, Event, FALSE, QCString::find(), Function, Definition::getDefFileName(), Definition::getDefLine(), DefinitionMixin< ClassDefMutable >::getLanguage(), getTemplateInstances(), MemberDef::getVhdlSpecifiers(), Interface, MemberDef::isConstructor(), MemberDef::isDestructor(), MemberDef::isEnumerate(), MemberDef::isEnumValue(), MemberDef::isFinal(), MemberDef::isFriend(), MemberDef::isFunction(), Definition::isHidden(), MemberDef::isOverride(), MemberDef::isRelated(), isSimple(), MemberDef::isStatic(), MemberDef::isTypedef(), MemberDef::isVariable(), QCString::length(), m_allMemberNameInfoLinkedMap, m_arrowOperator, m_isAbstract, m_isSimple, m_memberLists, m_vhdlSummaryTitles, MemberDef::memberType(), MemberDef::memberTypeName(), Definition::name(), DefinitionMixin< ClassDefMutable >::name(), Property, MemberDef::protection(), protectionLevelVisible(), MemberNameInfo::push_back(), Service, Signal, Slot, templateArguments(), theTranslator, title(), toClassDefMutable(), TRUE, Typedef, MemberDef::typeString(), Variable, MemberDef::virtualness(), and warn.

Referenced by insertMember(), mergeCategory(), and mergeMembersFromBaseClasses().

◆ isAbstract()

bool ClassDefImpl::isAbstract ( ) const
overridevirtual

Returns TRUE if there is at least one pure virtual member in this class.

Implements ClassDef.

Definition at line 5103 of file classdef.cpp.

5104{
5105 return m_isAbstract || m_spec.isAbstract();
5106}

References m_isAbstract, and m_spec.

Referenced by addClassAttributes().

◆ isAccessibleMember()

bool ClassDefImpl::isAccessibleMember ( const MemberDef * md) const
overridevirtual

returns TRUE iff md is a member of this class or of the the public/protected members of a base class

Implements ClassDef.

Definition at line 4602 of file classdef.cpp.

4603{
4604 return md->getClassDef() && isBaseClass(md->getClassDef(),TRUE,QCString());
4605}
int isBaseClass(const ClassDef *bcd, bool followInstances, const QCString &templSpec) const override
Returns TRUE iff bcd is a direct or indirect base class of this class.
virtual const ClassDef * getClassDef() const =0

References MemberDef::getClassDef(), isBaseClass(), and TRUE.

◆ isBaseClass()

int ClassDefImpl::isBaseClass ( const ClassDef * bcd,
bool followInstances,
const QCString & templSpec ) const
overridevirtual

Returns TRUE iff bcd is a direct or indirect base class of this class.

This function will recursively traverse all branches of the inheritance tree.

Implements ClassDef.

Definition at line 3679 of file classdef.cpp.

3680{
3681 int distance=0;
3682 //printf("isBaseClass(cd=%s) looking for %s templSpec=%s\n",qPrint(name()),qPrint(bcd->name()),qPrint(templSpec));
3683 for (const auto &bclass : baseClasses())
3684 {
3685 const ClassDef *ccd = bclass.classDef;
3686 if (!followInstances && ccd->templateMaster())
3687 {
3688 ccd=ccd->templateMaster();
3689 }
3690 if (ccd==bcd && (templSpec.isEmpty() || templSpec==bclass.templSpecifiers))
3691 {
3692 distance=1;
3693 break; // no shorter path possible
3694 }
3695 else
3696 {
3697 int d = ccd->isBaseClass(bcd,followInstances,templSpec);
3698 if (d>256)
3699 {
3700 err("Possible recursive class relation while inside {} and looking for base class {}\n",name(),bcd->name());
3701 return 0;
3702 }
3703 else if (d>0) // path found
3704 {
3705 if (distance==0 || d+1<distance) // update if no path found yet or shorter path found
3706 {
3707 distance=d+1;
3708 }
3709 }
3710 }
3711 }
3712 return distance;
3713}
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 const ClassDef * templateMaster() const =0
Returns the template master of which this class is an instance.
const BaseClassList & baseClasses() const override
Returns the list of base classes from which this class directly inherits.

References baseClasses(), err, ClassDef::isBaseClass(), QCString::isEmpty(), Definition::name(), DefinitionMixin< ClassDefMutable >::name(), and ClassDef::templateMaster().

Referenced by isAccessibleMember().

◆ isCSharp()

bool ClassDefImpl::isCSharp ( ) const
overridevirtual

Returns TRUE if this class is implemented in C#.

Implements ClassDef.

Definition at line 5143 of file classdef.cpp.

5144{
5145 return getLanguage()==SrcLangExt::CSharp;
5146}

References DefinitionMixin< ClassDefMutable >::getLanguage().

◆ isEmbeddedInOuterScope()

bool ClassDefImpl::isEmbeddedInOuterScope ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5261 of file classdef.cpp.

5262{
5263 bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
5264 bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
5265
5266 Definition *container = getOuterScope();
5267
5268 bool containerLinkable =
5269 container &&
5270 (
5271 (container==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) || // global class in documented file
5272 container->isLinkableInProject() // class in documented scope
5273 );
5274
5275 // inline because of INLINE_GROUPED_CLASSES=YES ?
5276 bool b1 = (inlineGroupedClasses && !partOfGroups().empty()); // a grouped class
5277 // inline because of INLINE_SIMPLE_STRUCTS=YES ?
5278 bool b2 = (inlineSimpleClasses && m_isSimple && // a simple class
5279 (containerLinkable || // in a documented container
5280 !partOfGroups().empty() // or part of a group
5281 )
5282 );
5283 //printf("%s::isEmbeddedInOuterScope(): inlineGroupedClasses=%d "
5284 // "inlineSimpleClasses=%d partOfGroups()=%p m_isSimple=%d "
5285 // "getOuterScope()=%s b1=%d b2=%d\n",
5286 // qPrint(name()),inlineGroupedClasses,inlineSimpleClasses,
5287 // partOfGroups().pointer(),m_isSimple,getOuterScope()?qPrint(getOuterScope()->name()):"<none>",b1,b2);
5288 return b1 || b2; // either reason will do
5289}

References Config_getBool, getFileDef(), DefinitionMixin< ClassDefMutable >::getOuterScope(), Doxygen::globalScope, Definition::isLinkableInProject(), m_isSimple, and DefinitionMixin< ClassDefMutable >::partOfGroups().

Referenced by anchor().

◆ isExtension()

bool ClassDefImpl::isExtension ( ) const
overridevirtual

Returns TRUE if this class represents an Objective-C 2.0 extension (nameless category).

Implements ClassDef.

Definition at line 5363 of file classdef.cpp.

5364{
5365 QCString n = name();
5366 int si = n.find('(');
5367 int ei = n.find(')');
5368 bool b = ei>si && n.mid(si+1,ei-si-1).stripWhiteSpace().isEmpty();
5369 return b;
5370}

References QCString::find(), QCString::isEmpty(), QCString::mid(), DefinitionMixin< ClassDefMutable >::name(), and QCString::stripWhiteSpace().

Referenced by mergeCategory(), and visibleInParentsDeclList().

◆ isFinal()

bool ClassDefImpl::isFinal ( ) const
overridevirtual

Returns TRUE if this class is marked as final.

Implements ClassDef.

Definition at line 5108 of file classdef.cpp.

5109{
5110 return m_spec.isFinal();
5111}

References m_spec.

Referenced by addClassAttributes().

◆ isFortran()

bool ClassDefImpl::isFortran ( ) const
overridevirtual

Returns TRUE if this class is implemented in Fortran.

Implements ClassDef.

Definition at line 5138 of file classdef.cpp.

5139{
5140 return getLanguage()==SrcLangExt::Fortran;
5141}

References DefinitionMixin< ClassDefMutable >::getLanguage().

Referenced by writeTagFile().

◆ isForwardDeclared()

bool ClassDefImpl::isForwardDeclared ( ) const
overridevirtual

Returns TRUE if this class represents a forward declaration of a template class.

Implements ClassDef.

Definition at line 5123 of file classdef.cpp.

5124{
5125 return m_spec.isForwardDecl();
5126}

References m_spec.

◆ isImplicitTemplateInstance()

bool ClassDefImpl::isImplicitTemplateInstance ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5063 of file classdef.cpp.

5064{
5066}

References m_implicitTemplateInstance.

◆ isInterface()

bool ClassDefImpl::isInterface ( ) const
overridevirtual

Returns TRUE if this class represents an interface.

Implements ClassDef.

Definition at line 5128 of file classdef.cpp.

5129{
5130 return m_spec.isInterface();
5131}

References m_spec.

◆ isJavaEnum()

bool ClassDefImpl::isJavaEnum ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5309 of file classdef.cpp.

5310{
5311 return m_isJavaEnum;
5312}

References m_isJavaEnum.

Referenced by ClassDefImpl(), compoundTypeString(), generatedFromFiles(), and title().

◆ isLinkable()

bool ClassDefImpl::isLinkable ( ) const
overridevirtual

Returns TRUE iff it is possible to link to this item. This can be a link to another project imported via a tag file.

Implements Definition.

Definition at line 3631 of file classdef.cpp.

3632{
3634 {
3635 return m_templateMaster->isLinkable();
3636 }
3637 else
3638 {
3639 return isReference() || isLinkableInProject();
3640 }
3641}
bool isReference() const override

References isLinkableInProject(), isReference(), m_implicitTemplateInstance, and m_templateMaster.

Referenced by visibleInParentsDeclList(), writeDeclaration(), and writeDeclarationLink().

◆ isLinkableInProject()

bool ClassDefImpl::isLinkableInProject ( ) const
overridevirtual

a link to this class is possible within this project

Implements Definition.

Definition at line 3599 of file classdef.cpp.

3600{
3601 bool extractLocal = Config_getBool(EXTRACT_LOCAL_CLASSES);
3602 bool extractStatic = Config_getBool(EXTRACT_STATIC);
3603 bool hideUndoc = Config_getBool(HIDE_UNDOC_CLASSES);
3605 {
3606 return m_templateMaster->isLinkableInProject();
3607 }
3608 else
3609 {
3610 //printf("%s::isLinkableInProject() conditions: artificial=%d hidden=%d anonymous=%d protection=%d local=%d docs=%d static=%d ref=%d\n",
3611 // qPrint(name()),
3612 // !isArtificial(),
3613 // !isHidden(),
3614 // !isAnonymous(),
3615 // m_prot,
3616 // !m_isLocal || extractLocal,
3617 // hasDocumentation() || m_tempArgs.hasTemplateDocumentation() || !hideUndoc,
3618 // !m_isStatic || extractStatic,
3619 // !isReference());
3620 return
3621 !isArtificial() && !isHidden() && /* not hidden */
3622 !isAnonymous() && /* not anonymous */
3623 protectionLevelVisible(m_prot) && /* private/internal */
3624 (!m_isLocal || extractLocal) && /* local */
3625 (hasDocumentation() || m_tempArgs.hasTemplateDocumentation() || !hideUndoc) && /* documented */
3626 (!m_isStatic || extractStatic) && /* static */
3627 !isReference(); /* not an external reference */
3628 }
3629}
bool hasDocumentation() const override

References Config_getBool, hasDocumentation(), DefinitionMixin< ClassDefMutable >::isAnonymous(), DefinitionMixin< ClassDefMutable >::isArtificial(), DefinitionMixin< ClassDefMutable >::isHidden(), isReference(), m_implicitTemplateInstance, m_isLocal, m_isStatic, m_prot, m_tempArgs, m_templateMaster, and protectionLevelVisible().

Referenced by addListReferences(), addRequirementReferences(), getOutputFileBase(), isLinkable(), writeDeclarationLink(), and writeTagFile().

◆ isLocal()

bool ClassDefImpl::isLocal ( ) const
overridevirtual

Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES.

Implements ClassDef.

Definition at line 4983 of file classdef.cpp.

4984{
4985 return m_isLocal;
4986}

References m_isLocal.

Referenced by visibleInParentsDeclList().

◆ isObjectiveC()

bool ClassDefImpl::isObjectiveC ( ) const
overridevirtual

Returns TRUE if this class is implemented in Objective-C.

Implements ClassDef.

Definition at line 5133 of file classdef.cpp.

5134{
5135 return getLanguage()==SrcLangExt::ObjC;
5136}

References DefinitionMixin< ClassDefMutable >::getLanguage().

Referenced by writeTagFile().

◆ isPublished()

bool ClassDefImpl::isPublished ( ) const
overridevirtual

Returns TRUE if this class is marked as published.

Implements ClassDef.

Definition at line 5118 of file classdef.cpp.

5119{
5120 return m_spec.isPublished();
5121}

References m_spec.

Referenced by addClassAttributes().

◆ isReference()

bool ClassDefImpl::isReference ( ) const
overridevirtual

Returns TRUE if this definition is imported via a tag file.

Implements Definition.

Definition at line 4485 of file classdef.cpp.

4486{
4488 {
4489 return m_templateMaster->isReference();
4490 }
4491 else
4492 {
4494 }
4495}
bool isReference() const override

References DefinitionMixin< Base >::isReference(), m_implicitTemplateInstance, and m_templateMaster.

Referenced by isLinkable(), isLinkableInProject(), and isVisibleInHierarchy().

◆ isSealed()

bool ClassDefImpl::isSealed ( ) const
overridevirtual

Returns TRUE if this class is marked as sealed.

Implements ClassDef.

Definition at line 5113 of file classdef.cpp.

5114{
5115 return m_spec.isSealed();
5116}

References m_spec.

Referenced by addClassAttributes().

◆ isSimple()

bool ClassDefImpl::isSimple ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5223 of file classdef.cpp.

5224{
5225 return m_isSimple;
5226}

References m_isSimple.

Referenced by internalInsertMember(), and writeInlineDocumentation().

◆ isSliceLocal()

bool ClassDefImpl::isSliceLocal ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5392 of file classdef.cpp.

5393{
5394 return m_spec.isLocal();
5395}

References m_spec.

Referenced by title(), and writeDeclarationLink().

◆ isSmartPointer()

const MemberDef * ClassDefImpl::isSmartPointer ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5228 of file classdef.cpp.

5229{
5230 return m_arrowOperator;
5231}

References m_arrowOperator.

◆ isSubClass()

bool ClassDefImpl::isSubClass ( ClassDef * bcd,
int level = 0 ) const
overridevirtual

Returns TRUE iff bcd is a direct or indirect sub class of this class.

Implements ClassDef.

Definition at line 3717 of file classdef.cpp.

3718{
3719 bool found=FALSE;
3720 if (level>256)
3721 {
3722 err("Possible recursive class relation while inside {} and looking for derived class {}\n",name(),cd->name());
3723 return FALSE;
3724 }
3725 for (const auto &iscd : subClasses())
3726 {
3727 ClassDef *ccd=iscd.classDef;
3728 found = (ccd==cd) || ccd->isSubClass(cd,level+1);
3729 if (found) break;
3730 }
3731 return found;
3732}
virtual bool isSubClass(ClassDef *bcd, int level=0) const =0
Returns TRUE iff bcd is a direct or indirect sub class of this class.
const BaseClassList & subClasses() const override
Returns the list of sub classes that directly derive from this class.

References err, FALSE, ClassDef::isSubClass(), Definition::name(), DefinitionMixin< ClassDefMutable >::name(), and subClasses().

◆ isTemplate()

bool ClassDefImpl::isTemplate ( ) const
overridevirtual

Returns TRUE if this class is a template.

Implements ClassDef.

Definition at line 5073 of file classdef.cpp.

5074{
5075 return !m_tempArgs.empty();
5076}

References m_tempArgs.

◆ isTemplateArgument()

bool ClassDefImpl::isTemplateArgument ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5098 of file classdef.cpp.

5099{
5100 return m_isTemplArg;
5101}

References m_isTemplArg.

◆ isUsedOnly()

bool ClassDefImpl::isUsedOnly ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5218 of file classdef.cpp.

5219{
5220 return m_usedOnly;
5221}

References m_usedOnly.

◆ isVisibleInHierarchy()

bool ClassDefImpl::isVisibleInHierarchy ( ) const
overridevirtual

the class is visible in a class diagram, or class hierarchy

Implements ClassDef.

Definition at line 3645 of file classdef.cpp.

3646{
3647 bool allExternals = Config_getBool(ALLEXTERNALS);
3648 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
3649 bool extractStatic = Config_getBool(EXTRACT_STATIC);
3650
3651 return // show all classes or a subclass is visible
3652 ((allExternals && !isArtificial()) || hasNonReferenceSuperClass()) &&
3653 // and not an anonymous compound
3654 !isAnonymous() &&
3655 // and not privately inherited
3657 // documented or shown anyway or documentation is external
3658 (hasDocumentation() ||
3659 !hideUndocClasses ||
3660 (m_templateMaster && m_templateMaster->hasDocumentation()) ||
3661 isReference()
3662 ) &&
3663 // if this is an implicit template instance then it most be part of the inheritance hierarchy
3664 (!m_implicitTemplateInstance || !m_inherits.empty() || !m_inheritedBy.empty()) &&
3665 // is not part of an unnamed namespace or shown anyway
3666 (!m_isStatic || extractStatic);
3667}
bool hasNonReferenceSuperClass() const override

References Config_getBool, hasDocumentation(), hasNonReferenceSuperClass(), DefinitionMixin< ClassDefMutable >::isAnonymous(), DefinitionMixin< ClassDefMutable >::isArtificial(), isReference(), m_implicitTemplateInstance, m_inheritedBy, m_inherits, m_isStatic, m_prot, m_templateMaster, and protectionLevelVisible().

◆ makeTemplateArgument()

void ClassDefImpl::makeTemplateArgument ( bool b = TRUE)
overridevirtual

Implements ClassDefMutable.

Definition at line 5203 of file classdef.cpp.

5204{
5205 m_isTemplArg = b;
5206}

References m_isTemplArg.

◆ memberNameInfoLinkedMap()

const MemberNameInfoLinkedMap & ClassDefImpl::memberNameInfoLinkedMap ( ) const
overridevirtual

Returns a dictionary of all members.

This includes any inherited members. Members are sorted alphabetically.

Implements ClassDef.

Definition at line 5018 of file classdef.cpp.

5019{
5021}

References m_allMemberNameInfoLinkedMap.

◆ mergeCategory()

void ClassDefImpl::mergeCategory ( ClassDef * cat)
overridevirtual

Merges the members of a Objective-C category into this class.

Implements ClassDefMutable.

Definition at line 4070 of file classdef.cpp.

4071{
4072 AUTO_TRACE();
4073 ClassDefMutable *category = toClassDefMutable(cat);
4074 if (category)
4075 {
4076 bool extractLocalMethods = Config_getBool(EXTRACT_LOCAL_METHODS);
4077 bool makePrivate = category->isLocal();
4078 // in case extract local methods is not enabled we don't add the methods
4079 // of the category in case it is defined in the .m file.
4080 if (makePrivate && !extractLocalMethods) return;
4081 bool isExtension = category->isExtension();
4082
4083 category->setCategoryOf(this);
4084 if (isExtension)
4085 {
4086 category->setArtificial(TRUE);
4087
4088 // copy base classes/protocols from extension
4089 for (const auto &bcd : category->baseClasses())
4090 {
4091 insertBaseClass(bcd.classDef,bcd.usedName,bcd.prot,bcd.virt,bcd.templSpecifiers);
4092 // correct bcd.classDef so that they do no longer derive from
4093 // category, but from this class!
4094 BaseClassList scl = bcd.classDef->subClasses();
4095 for (auto &scd : scl)
4096 {
4097 if (scd.classDef==category)
4098 {
4099 scd.classDef=this;
4100 }
4101 }
4102 bcd.classDef->updateSubClasses(scl);
4103 }
4104 }
4105 // make methods private for categories defined in the .m file
4106 //printf("%s::mergeCategory makePrivate=%d\n",qPrint(name()),makePrivate);
4107
4108 const MemberNameInfoLinkedMap &srcMnd = category->memberNameInfoLinkedMap();
4109 MemberNameInfoLinkedMap &dstMnd = m_allMemberNameInfoLinkedMap;
4110
4111 for (auto &srcMni : srcMnd)
4112 {
4113 MemberNameInfo *dstMni=dstMnd.find(srcMni->memberName());
4114 if (dstMni) // method is already defined in the class
4115 {
4116 AUTO_TRACE_ADD("Existing member {}",srcMni->memberName());
4117 const auto &dstMi = dstMni->front();
4118 const auto &srcMi = srcMni->front();
4119 if (srcMi && dstMi)
4120 {
4121 MemberDefMutable *smdm = toMemberDefMutable(srcMi->memberDef());
4122 MemberDefMutable *dmdm = toMemberDefMutable(dstMi->memberDef());
4123 if (smdm && dmdm)
4124 {
4126 dmdm->setCategory(category);
4127 dmdm->setCategoryRelation(smdm);
4128 smdm->setCategoryRelation(dmdm);
4129 }
4130 }
4131 }
4132 else // new method name
4133 {
4134 AUTO_TRACE_ADD("New member {}",srcMni->memberName());
4135 // create a deep copy of the list
4136 MemberNameInfo *newMni = dstMnd.add(srcMni->memberName());
4137
4138 // copy the member(s) from the category to this class
4139 for (auto &mi : *srcMni)
4140 {
4141 //printf("Adding '%s'\n",qPrint(mi->memberDef->name()));
4142 Protection prot = mi->prot();
4143 //if (makePrivate) prot = Private;
4144 auto newMd = mi->memberDef()->deepCopy();
4145 if (newMd)
4146 {
4147 auto mmd = toMemberDefMutable(newMd.get());
4148 AUTO_TRACE_ADD("Copying member {}",mmd->name());
4149 mmd->moveTo(this);
4150
4151 auto newMi=std::make_unique<MemberInfo>(newMd.get(),prot,mi->virt(),mi->inherited(),mi->virtualBaseClass());
4152 newMi->setScopePath(mi->scopePath());
4153 newMi->setAmbigClass(mi->ambigClass());
4154 newMi->setAmbiguityResolutionScope(mi->ambiguityResolutionScope());
4155 newMni->push_back(std::move(newMi));
4156
4157 // also add the newly created member to the global members list
4158
4159 QCString name = newMd->name();
4160 MemberName *mn = Doxygen::memberNameLinkedMap->add(name);
4161
4162 mmd->setCategory(category);
4163 mmd->setCategoryRelation(mi->memberDef());
4164 auto miMmd = toMemberDefMutable(mi->memberDef());
4165 if (miMmd) miMmd->setCategoryRelation(newMd.get());
4166
4167 if (makePrivate || isExtension)
4168 {
4169 mmd->makeImplementationDetail();
4170 }
4171 internalInsertMember(newMd.get(),prot,FALSE);
4172 mn->push_back(std::move(newMd));
4173 }
4174 }
4175 }
4176 }
4177 }
4178}
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
virtual bool isLocal() const =0
Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES.
virtual bool isExtension() const =0
Returns TRUE if this class represents an Objective-C 2.0 extension (nameless category).
bool isExtension() const override
Returns TRUE if this class represents an Objective-C 2.0 extension (nameless category).
void insertBaseClass(ClassDef *, const QCString &name, Protection p, Specifier s, const QCString &t=QCString()) override
Definition classdef.cpp:996
virtual void setCategoryOf(ClassDef *cd)=0
virtual void setCategory(ClassDef *)=0
virtual void setCategoryRelation(const MemberDef *)=0
std::vector< BaseClassDef > BaseClassList
Definition classdef.h:81
void combineDeclarationAndDefinition(MemberDefMutable *mdec, MemberDefMutable *mdef)
Protection
Definition types.h:32

References LinkedMap< T, Hash, KeyEqual, Map >::add(), AUTO_TRACE, AUTO_TRACE_ADD, ClassDef::baseClasses(), combineDeclarationAndDefinition(), Config_getBool, FALSE, LinkedMap< T, Hash, KeyEqual, Map >::find(), MemberNameInfo::front(), insertBaseClass(), internalInsertMember(), ClassDef::isExtension(), isExtension(), ClassDef::isLocal(), m_allMemberNameInfoLinkedMap, ClassDef::memberNameInfoLinkedMap(), Doxygen::memberNameLinkedMap, DefinitionMixin< ClassDefMutable >::name(), MemberName::push_back(), MemberNameInfo::push_back(), DefinitionMutable::setArtificial(), MemberDefMutable::setCategory(), ClassDefMutable::setCategoryOf(), MemberDefMutable::setCategoryRelation(), toClassDefMutable(), toMemberDefMutable(), and TRUE.

◆ mergeMembers()

void ClassDefImpl::mergeMembers ( )
overridevirtual

recursively merges the 'all members' lists of a class base with that of this class. Must only be called for classes without subclasses!

Implements ClassDefMutable.

Definition at line 4029 of file classdef.cpp.

4030{
4031 if (m_membersMerged) return;
4032 if (getLanguage()==SrcLangExt::Python)
4033 {
4034 for (const auto &bcd : baseClasses())
4035 {
4036 ClassDefMutable *bClass=toClassDefMutable(bcd.classDef);
4038 }
4039 }
4040
4041 //printf("> %s::mergeMembers()\n",qPrint(name()));
4042
4044
4045 // first merge the members of the base class recursively
4046 for (const auto &bcd : baseClasses())
4047 {
4048 ClassDefMutable *bClass=toClassDefMutable(bcd.classDef);
4049 if (bClass)
4050 {
4051 // merge the members in the base class of this inheritance branch first
4052 bClass->mergeMembers();
4053 }
4054 }
4055
4056 // first merge the member that are not inherited via a virtual base class
4057 // (as this can end up reimplemented via multiple paths, see #10717 for examples)
4059 // then process the member that are inherited via a virtual base class to add the
4060 // ones that are not reimplemented via any path
4062
4063 //printf("< %s::mergeMembers()\n",qPrint(name()));
4064}
void mergeMembersFromBaseClasses(bool mergeVirtualBaseClass)
virtual void mergeMembers()=0

References baseClasses(), DefinitionMixin< ClassDefMutable >::getLanguage(), hideDerivedVariablesInPython(), m_membersMerged, ClassDefMutable::mergeMembers(), mergeMembersFromBaseClasses(), toClassDefMutable(), and TRUE.

◆ mergeMembersFromBaseClasses()

void ClassDefImpl::mergeMembersFromBaseClasses ( bool mergeVirtualBaseClass)
private

Definition at line 3743 of file classdef.cpp.

3744{
3745 SrcLangExt lang = getLanguage();
3746 QCString sep=getLanguageSpecificSeparator(lang,TRUE);
3747 size_t sepLen = sep.length();
3748 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
3749 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
3750
3751 //printf(" mergeMembers for %s mergeVirtualBaseClass=%d\n",qPrint(name()),mergeVirtualBaseClass);
3752 // the merge the base members with this class' members
3753 for (const auto &bcd : baseClasses())
3754 {
3755 ClassDefMutable *bClass=toClassDefMutable(bcd.classDef);
3756 if (bClass)
3757 {
3758 const MemberNameInfoLinkedMap &srcMnd = bClass->memberNameInfoLinkedMap();
3759 MemberNameInfoLinkedMap &dstMnd = m_allMemberNameInfoLinkedMap;
3760
3761 for (auto &srcMni : srcMnd)
3762 {
3763 MemberNameInfo *dstMni=dstMnd.find(srcMni->memberName());
3764 if (dstMni)
3765 // a member with that name is already in the class.
3766 // the member may hide or reimplement the one in the sub class
3767 // or there may be another path to the base class that is already
3768 // visited via another branch in the class hierarchy.
3769 {
3770 //printf(" %s hides member name %s\n",qPrint(bClass->name()),qPrint(srcMni->memberName()));
3771 for (auto &srcMi : *srcMni)
3772 {
3773 MemberDef *srcMd = srcMi->memberDef();
3774 bool found=FALSE;
3775 bool ambiguous=FALSE;
3776 bool hidden=FALSE;
3777 const ClassDef *srcCd = srcMd->getClassDef();
3778 for (auto &dstMi : *dstMni)
3779 {
3780 const MemberDef *dstMd = dstMi->memberDef();
3781 if (srcMd!=dstMd) // different members
3782 {
3783 const ClassDef *dstCd = dstMd->getClassDef();
3784 //printf(" Is %s a base class of %s?\n",qPrint(srcCd->name()),qPrint(dstCd->name()));
3785 if (srcCd==dstCd || dstCd->isBaseClass(srcCd,TRUE))
3786 // member is in the same or a base class
3787 {
3788 const ArgumentList &srcAl = srcMd->argumentList();
3789 const ArgumentList &dstAl = dstMd->argumentList();
3790 found=matchArguments2(
3791 srcMd->getOuterScope(),srcMd->getFileDef(),srcMd->typeString(),&srcAl,
3792 dstMd->getOuterScope(),dstMd->getFileDef(),dstMd->typeString(),&dstAl,
3793 TRUE,lang
3794 );
3795 //printf(" Yes, matching (%s<->%s): %d\n",
3796 // qPrint(argListToString(srcMd->argumentList())),
3797 // qPrint(argListToString(dstMd->argumentList())),
3798 // found);
3799 hidden = hidden || !found;
3800 }
3801 else // member is in a non base class => multiple inheritance
3802 // using the same base class.
3803 {
3804 //printf(" $$ Existing member %s %s add scope %s\n",
3805 // qPrint(dstMi->ambiguityResolutionScope()),
3806 // qPrint(dstMd->name()),
3807 // qPrint(dstMi->scopePath().left(dstMi->scopePath().find("::")+2)));
3808
3809 QCString scope=dstMi->scopePath().left(dstMi->scopePath().find(sep)+sepLen);
3810 if (scope!=dstMi->ambiguityResolutionScope().left(scope.length()))
3811 {
3812 dstMi->setAmbiguityResolutionScope(scope+dstMi->ambiguityResolutionScope());
3813 }
3814 ambiguous=TRUE;
3815 }
3816 }
3817 else // same members
3818 {
3819 // do not add if base class is virtual or
3820 // if scope paths are equal or
3821 // if base class is an interface (and thus implicitly virtual).
3822 //printf(" same member found srcMi->virt=%d dstMi->virt=%d\n",srcMi->virt(),dstMi->virt());
3823 if ((srcMi->virt()!=Specifier::Normal && dstMi->virt()!=Specifier::Normal) ||
3824 bClass->name()+sep+srcMi->scopePath() == dstMi->scopePath() ||
3826 )
3827 {
3828 found=TRUE;
3829 }
3830 else // member can be reached via multiple paths in the
3831 // inheritance tree
3832 {
3833 //printf(" $$ Existing member %s %s add scope %s\n",
3834 // qPrint(dstMi->ambiguityResolutionScope()),
3835 // qPrint(dstMd->name()),
3836 // qPrint(dstMi->scopePath().left(dstMi->scopePath().find("::")+2)));
3837
3838 QCString scope=dstMi->scopePath().left(dstMi->scopePath().find(sep)+sepLen);
3839 if (scope!=dstMi->ambiguityResolutionScope().left(scope.length()))
3840 {
3841 dstMi->setAmbiguityResolutionScope(dstMi->ambiguityResolutionScope()+scope);
3842 }
3843 ambiguous=TRUE;
3844 }
3845 }
3846 if (found) break;
3847 }
3848 //printf(" member %s::%s hidden %d ambiguous %d srcMi->ambigClass=%p found=%d\n",
3849 // qPrint(srcCd->name()),qPrint(srcMd->name()),hidden,ambiguous,
3850 // (void*)srcMi->ambigClass(),found);
3851
3852 // TODO: fix the case where a member is hidden by inheritance
3853 // of a member with the same name but with another prototype,
3854 // while there is more than one path to the member in the
3855 // base class due to multiple inheritance. In this case
3856 // it seems that the member is not reachable by prefixing a
3857 // scope name either (according to my compiler). Currently,
3858 // this case is shown anyway.
3859 if (!found && srcMd->protection()!=Protection::Private && !srcMd->isFriend() &&
3860 srcMi->virtualBaseClass()==mergeVirtualBaseClass && lang!=SrcLangExt::Python)
3861 {
3862 Protection prot = srcMd->protection();
3863 if (bcd.prot==Protection::Protected && prot==Protection::Public)
3864 {
3865 prot = bcd.prot;
3866 }
3867 else if (bcd.prot==Protection::Private)
3868 {
3869 prot = bcd.prot;
3870 }
3871
3872 if (inlineInheritedMembers)
3873 {
3874 if (!isStandardFunc(srcMd))
3875 {
3876 //printf(" %s::insertMember(%s)\n",qPrint(name()),qPrint(srcMd->name()));
3877 internalInsertMember(srcMd,prot,FALSE);
3878 }
3879 }
3880
3881 Specifier virt=srcMi->virt();
3882 if (virt==Specifier::Normal && bcd.virt!=Specifier::Normal) virt=bcd.virt;
3883 bool virtualBaseClass = bcd.virt!=Specifier::Normal;
3884
3885 auto newMi = std::make_unique<MemberInfo>(srcMd,prot,virt,TRUE,virtualBaseClass);
3886 newMi->setScopePath(bClass->name()+sep+srcMi->scopePath());
3887 if (ambiguous)
3888 {
3889 //printf("$$ New member %s %s add scope %s::\n",
3890 // qPrint(srcMi->ambiguityResolutionScope),
3891 // qPrint(srcMd->name()),
3892 // qPrint(bClass->name()));
3893
3894 QCString scope=bClass->name()+sep;
3895 if (scope!=srcMi->ambiguityResolutionScope().left(scope.length()))
3896 {
3897 newMi->setAmbiguityResolutionScope(scope+srcMi->ambiguityResolutionScope());
3898 }
3899 }
3900 if (hidden)
3901 {
3902 if (srcMi->ambigClass()==nullptr)
3903 {
3904 newMi->setAmbigClass(bClass);
3905 newMi->setAmbiguityResolutionScope(bClass->name()+sep);
3906 }
3907 else
3908 {
3909 newMi->setAmbigClass(srcMi->ambigClass());
3910 newMi->setAmbiguityResolutionScope(srcMi->ambigClass()->name()+sep);
3911 }
3912 }
3913 dstMni->push_back(std::move(newMi));
3914 }
3915 }
3916 }
3917 else // base class has a member that is not in the sub class => copy
3918 {
3919 //printf(" %s adds member name %s\n",qPrint(bClass->name()),qPrint(srcMni->memberName()));
3920 // create a deep copy of the list (only the MemberInfo's will be
3921 // copied, not the actual MemberDef's)
3922 MemberNameInfo *newMni = dstMnd.add(srcMni->memberName());
3923
3924 // copy the member(s) from the base to the sub class
3925 for (auto &mi : *srcMni)
3926 {
3927 if (mi->virtualBaseClass()==mergeVirtualBaseClass && !mi->memberDef()->isFriend()) // don't inherit friends
3928 {
3929 Protection prot = mi->prot();
3930 if (bcd.prot==Protection::Protected)
3931 {
3932 if (prot==Protection::Public) prot=Protection::Protected;
3933 }
3934 else if (bcd.prot==Protection::Private)
3935 {
3936 prot=Protection::Private;
3937 }
3938 Specifier virt=mi->virt();
3939 bool virtualBaseClass = bcd.virt!=Specifier::Normal || mi->virtualBaseClass();
3940 if (virt==Specifier::Normal && bcd.virt!=Specifier::Normal) virt=bcd.virt;
3941 //printf(" %s::%s: [mi.prot=%d, bcd.prot=%d => prot=%d], [mi.virt=%d, bcd.virt=%d => virt=%d] virtualBase=%d\n",
3942 // qPrint(name()),qPrint(mi->memberDef()->name()),
3943 // mi->prot(),bcd.prot,prot,
3944 // mi->virt(),bcd.virt,virt,
3945 // virtualBaseClass
3946 // );
3947
3948 if (prot!=Protection::Private || extractPrivate)
3949 {
3950
3951 if (inlineInheritedMembers)
3952 {
3953 if (!isStandardFunc(mi->memberDef()))
3954 {
3955 //printf(" %s::insertMember '%s'\n",qPrint(name()),qPrint(mi->memberDef()->name()));
3956 internalInsertMember(mi->memberDef(),prot,FALSE);
3957 }
3958 }
3959 //printf("Adding!\n");
3960 std::unique_ptr<MemberInfo> newMi = std::make_unique<MemberInfo>(mi->memberDef(),prot,virt,TRUE,virtualBaseClass);
3961 newMi->setScopePath(bClass->name()+sep+mi->scopePath());
3962 newMi->setAmbigClass(mi->ambigClass());
3963 newMi->setAmbiguityResolutionScope(mi->ambiguityResolutionScope());
3964 newMni->push_back(std::move(newMi));
3965 }
3966 }
3967 }
3968 }
3969 }
3970 }
3971 }
3972}
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e.
QCString left(size_t len) const
Definition qcstring.h:229
static bool isStandardFunc(const MemberDef *md)
Specifier
Definition types.h:80
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:5897

References LinkedMap< T, Hash, KeyEqual, Map >::add(), MemberDef::argumentList(), baseClasses(), ClassDef::compoundType(), Config_getBool, FALSE, LinkedMap< T, Hash, KeyEqual, Map >::find(), MemberDef::getClassDef(), MemberDef::getFileDef(), DefinitionMixin< ClassDefMutable >::getLanguage(), getLanguageSpecificSeparator(), Definition::getOuterScope(), ClassDef::Interface, internalInsertMember(), ClassDef::isBaseClass(), MemberDef::isFriend(), isStandardFunc(), QCString::left(), QCString::length(), m_allMemberNameInfoLinkedMap, matchArguments2(), ClassDef::memberNameInfoLinkedMap(), Definition::name(), MemberDef::protection(), MemberNameInfo::push_back(), toClassDefMutable(), TRUE, and MemberDef::typeString().

Referenced by mergeMembers().

◆ moveTo()

void ClassDefImpl::moveTo ( Definition * scope)
overridevirtual

Implements ClassDef.

Definition at line 971 of file classdef.cpp.

972{
973 //printf("%s::moveTo(%s)\n",qPrint(name()),qPrint(scope->name()));
974 setOuterScope(scope);
976 {
977 m_fileDef = toFileDef(scope);
978 }
979 else if (scope->definitionType()==Definition::TypeModule)
980 {
981 m_moduleDef = toModuleDef(scope);
982 }
983}
void setOuterScope(Definition *def) override
FileDef * toFileDef(Definition *d)
Definition filedef.cpp:1967
ModuleDef * toModuleDef(Definition *d)

References Definition::definitionType(), m_fileDef, m_moduleDef, DefinitionMixin< ClassDefMutable >::setOuterScope(), toFileDef(), toModuleDef(), Definition::TypeFile, and Definition::TypeModule.

◆ overrideCollaborationGraph()

void ClassDefImpl::overrideCollaborationGraph ( bool e)
overridevirtual

Implements ClassDefMutable.

Definition at line 5439 of file classdef.cpp.

5440{
5442}

References m_hasCollaborationGraph.

◆ overrideInheritanceGraph()

void ClassDefImpl::overrideInheritanceGraph ( CLASS_GRAPH_t e)
overridevirtual

Implements ClassDefMutable.

Definition at line 5412 of file classdef.cpp.

5413{
5415}

References m_typeInheritanceGraph.

◆ protection()

Protection ClassDefImpl::protection ( ) const
overridevirtual

Return the protection level (Public,Protected,Private) in which this compound was found.

Implements ClassDef.

Definition at line 5033 of file classdef.cpp.

5034{
5035 return m_prot;
5036}

References m_prot.

Referenced by visibleInParentsDeclList(), and writeDeclarationLink().

◆ qualifiedNameWithTemplateParameters()

QCString ClassDefImpl::qualifiedNameWithTemplateParameters ( const ArgumentLists * actualParams = nullptr,
uint32_t * actualParamIndex = nullptr ) const
overridevirtual

Implements ClassDef.

Definition at line 4513 of file classdef.cpp.

4515{
4516 return makeQualifiedNameWithTemplateParameters(this,actualParams,actualParamIndex);
4517}
static QCString makeQualifiedNameWithTemplateParameters(const ClassDef *cd, const ArgumentLists *actualParams, uint32_t *actualParamIndex)
Definition classdef.cpp:56

References makeQualifiedNameWithTemplateParameters().

◆ reclassifyMember()

void ClassDefImpl::reclassifyMember ( MemberDefMutable * md,
MemberType t )
overridevirtual

Implements ClassDefMutable.

Definition at line 5233 of file classdef.cpp.

5234{
5235 md->setMemberType(t);
5236 for (auto &ml : m_memberLists)
5237 {
5238 ml->remove(md);
5239 }
5240 insertMember(md);
5241}
virtual void setMemberType(MemberType t)=0

References insertMember(), m_memberLists, and MemberDefMutable::setMemberType().

◆ removeMemberFromLists()

void ClassDefImpl::removeMemberFromLists ( MemberDef * md)
overridevirtual

Implements ClassDefMutable.

Definition at line 5301 of file classdef.cpp.

5302{
5303 for (auto &ml : m_memberLists)
5304 {
5305 ml->remove(md);
5306 }
5307}

References m_memberLists.

Referenced by hideDerivedVariablesInPython().

◆ requiresClause()

QCString ClassDefImpl::requiresClause ( ) const
overridevirtual

Implements ClassDef.

Definition at line 3541 of file classdef.cpp.

3542{
3543 return m_requiresClause;
3544}

References m_requiresClause.

◆ setAnonymousEnumType()

void ClassDefImpl::setAnonymousEnumType ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4696 of file classdef.cpp.

4697{
4698 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4699 {
4700 if (lde->kind()==LayoutDocEntry::MemberDecl)
4701 {
4702 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4703 if (lmd)
4704 {
4705 MemberList * ml = getMemberList(lmd->type);
4706 if (ml)
4707 {
4709 }
4710 }
4711 }
4712 else if (lde->kind()==LayoutDocEntry::MemberGroups)
4713 {
4714 for (const auto &mg : m_memberGroups)
4715 {
4716 mg->setAnonymousEnumType();
4717 }
4718 }
4719 }
4720}
void setAnonymousEnumType()

References getMemberList(), LayoutDocManager::instance(), m_memberGroups, MemberList::setAnonymousEnumType(), and LayoutDocEntryMemberDecl::type.

◆ setCategoryOf()

void ClassDefImpl::setCategoryOf ( ClassDef * cd)
overridevirtual

Implements ClassDefMutable.

Definition at line 5208 of file classdef.cpp.

5209{
5210 m_categoryOf = cd;
5211}

References m_categoryOf.

◆ setClassName()

void ClassDefImpl::setClassName ( const QCString & name)
overridevirtual

Implements ClassDefMutable.

Definition at line 4530 of file classdef.cpp.

4531{
4532 m_className = name;
4533}

References m_className, and DefinitionMixin< ClassDefMutable >::name().

◆ setClassSpecifier()

void ClassDefImpl::setClassSpecifier ( TypeSpecifier spec)
overridevirtual

Implements ClassDefMutable.

Definition at line 5314 of file classdef.cpp.

5315{
5316 m_spec = spec;
5317}

References m_spec.

◆ setCompoundType()

void ClassDefImpl::setCompoundType ( CompoundType t)
overridevirtual

Implements ClassDefMutable.

Definition at line 5192 of file classdef.cpp.

5193{
5194 m_compType = t;
5195}

References m_compType.

◆ setFileDef()

void ClassDefImpl::setFileDef ( FileDef * fd)
overridevirtual

Implements ClassDefMutable.

Definition at line 5163 of file classdef.cpp.

5164{
5165 m_fileDef = fd;
5166}

References m_fileDef.

◆ setGroupDefForAllMembers()

void ClassDefImpl::setGroupDefForAllMembers ( GroupDef * g,
Grouping::GroupPri_t pri,
const QCString & fileName,
int startLine,
bool hasDocs )
overridevirtual

Implements ClassDefMutable.

Definition at line 4307 of file classdef.cpp.

4308{
4309 gd->addClass(this);
4310 //printf("ClassDefImpl::setGroupDefForAllMembers(%s)\n",qPrint(gd->name()));
4311 for (auto &mni : m_allMemberNameInfoLinkedMap)
4312 {
4313 for (auto &mi : *mni)
4314 {
4315 MemberDefMutable *md = toMemberDefMutable(mi->memberDef());
4316 if (md)
4317 {
4318 md->setGroupDef(gd,pri,fileName,startLine,hasDocs);
4319 gd->insertMember(md,TRUE);
4320 ClassDefMutable *innerClass = toClassDefMutable(md->getClassDefOfAnonymousType());
4321 if (innerClass) innerClass->setGroupDefForAllMembers(gd,pri,fileName,startLine,hasDocs);
4322 }
4323 }
4324 }
4325}
virtual void setGroupDefForAllMembers(GroupDef *g, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs)=0
virtual ClassDef * getClassDefOfAnonymousType() const =0
virtual void setGroupDef(GroupDef *gd, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs, MemberDef *member=nullptr)=0

References GroupDef::addClass(), MemberDef::getClassDefOfAnonymousType(), GroupDef::insertMember(), m_allMemberNameInfoLinkedMap, MemberDefMutable::setGroupDef(), ClassDefMutable::setGroupDefForAllMembers(), toClassDefMutable(), toMemberDefMutable(), and TRUE.

◆ setImplicitTemplateInstance()

void ClassDefImpl::setImplicitTemplateInstance ( bool b)
overridevirtual

Implements ClassDefMutable.

Definition at line 5068 of file classdef.cpp.

5069{
5071}

References m_implicitTemplateInstance.

◆ setIncludeFile()

void ClassDefImpl::setIncludeFile ( FileDef * fd,
const QCString & incName,
bool local,
bool force )
overridevirtual

Implements ClassDefMutable.

Definition at line 1426 of file classdef.cpp.

1428{
1429 //printf("ClassDefImpl::setIncludeFile(%p,%s,%d,%d)\n",fd,includeName,local,force);
1430 if (!m_incInfo) m_incInfo = std::make_unique<IncludeInfo>();
1431 if ((!includeName.isEmpty() && m_incInfo->includeName.isEmpty()) ||
1432 (fd!=nullptr && m_incInfo->fileDef==nullptr)
1433 )
1434 {
1435 //printf("Setting file info\n");
1436 m_incInfo->fileDef = fd;
1437 m_incInfo->includeName = includeName;
1439 }
1440 if (force && !includeName.isEmpty())
1441 {
1442 m_incInfo->includeName = includeName;
1444 }
1445}
@ IncludeLocal
Definition filedef.h:50
@ IncludeSystem
Definition filedef.h:49

References IncludeLocal, IncludeSystem, QCString::isEmpty(), and m_incInfo.

◆ setIsStatic()

void ClassDefImpl::setIsStatic ( bool b)
overridevirtual

Implements ClassDefMutable.

Definition at line 5187 of file classdef.cpp.

5188{
5189 m_isStatic=b;
5190}

References m_isStatic.

◆ setMetaData()

void ClassDefImpl::setMetaData ( const QCString & md)
overridevirtual

Implements ClassDefMutable.

Definition at line 5397 of file classdef.cpp.

5398{
5399 m_metaData = md;
5400}

References m_metaData.

◆ setModuleDef()

void ClassDefImpl::setModuleDef ( ModuleDef * mod)
overridevirtual

Implements ClassDefMutable.

Definition at line 5168 of file classdef.cpp.

5169{
5170 m_moduleDef = mod;
5171}

References m_moduleDef.

◆ setProtection()

void ClassDefImpl::setProtection ( Protection p)
overridevirtual

Implements ClassDefMutable.

Definition at line 5178 of file classdef.cpp.

5179{
5180 m_prot=p;
5181 if (getLanguage()==SrcLangExt::VHDL && VhdlDocGen::convert(p)==VhdlDocGen::ARCHITECTURECLASS)
5182 {
5183 m_className = name();
5184 }
5185}
@ ARCHITECTURECLASS
Definition vhdldocgen.h:77
static VhdlClasses convert(Protection prot)
Definition vhdldocgen.h:80

References VhdlDocGen::ARCHITECTURECLASS, VhdlDocGen::convert(), DefinitionMixin< ClassDefMutable >::getLanguage(), m_className, m_prot, and DefinitionMixin< ClassDefMutable >::name().

◆ setRequiresClause()

void ClassDefImpl::setRequiresClause ( const QCString & req)
overridevirtual

Implements ClassDefMutable.

Definition at line 3546 of file classdef.cpp.

3547{
3548 m_requiresClause = req;
3549}

References m_requiresClause.

◆ setSubGrouping()

void ClassDefImpl::setSubGrouping ( bool enabled)
overridevirtual

Implements ClassDefMutable.

Definition at line 5173 of file classdef.cpp.

5174{
5175 m_subGrouping = enabled;
5176}

References m_subGrouping.

◆ setTagLessReference()

void ClassDefImpl::setTagLessReference ( const ClassDef * cd)
overridevirtual

Implements ClassDefMutable.

Definition at line 5296 of file classdef.cpp.

5297{
5298 m_tagLessRef = cd;
5299}

References m_tagLessRef.

◆ setTemplateArguments()

void ClassDefImpl::setTemplateArguments ( const ArgumentList & al)
overridevirtual

Implements ClassDefMutable.

Definition at line 3493 of file classdef.cpp.

3494{
3495 m_tempArgs = al;
3496}

References m_tempArgs.

◆ setTemplateBaseClassNames()

void ClassDefImpl::setTemplateBaseClassNames ( const TemplateNameMap & templateNames)
overridevirtual

Implements ClassDefMutable.

Definition at line 4411 of file classdef.cpp.

4412{
4413 m_templBaseClassNames = templateNames;
4414}

References m_templBaseClassNames.

◆ setTemplateMaster()

void ClassDefImpl::setTemplateMaster ( const ClassDef * tm)
overridevirtual

Implements ClassDefMutable.

Definition at line 5197 of file classdef.cpp.

5198{
5199 assert(tm!=this);
5201}

References m_templateMaster.

◆ setTypeConstraints()

void ClassDefImpl::setTypeConstraints ( const ArgumentList & al)
overridevirtual

Implements ClassDefMutable.

Definition at line 3488 of file classdef.cpp.

3489{
3490 m_typeConstraints = al;
3491}

References m_typeConstraints.

◆ setUsedOnly()

void ClassDefImpl::setUsedOnly ( bool b)
overridevirtual

Implements ClassDefMutable.

Definition at line 5213 of file classdef.cpp.

5214{
5215 m_usedOnly = b;
5216}

References m_usedOnly.

◆ showUsedFiles()

void ClassDefImpl::showUsedFiles ( OutputList & ol) const
private

Definition at line 1733 of file classdef.cpp.

1734{
1735 ol.pushGeneratorState();
1737
1738
1739 ol.writeRuler();
1740 ol.pushGeneratorState();
1742 ol.startParagraph();
1744 ol.endParagraph();
1745 ol.popGeneratorState();
1749
1750 bool first=TRUE;
1751 for (const auto &fd : m_files)
1752 {
1753 if (first)
1754 {
1755 first=FALSE;
1756 ol.startItemList();
1757 }
1758
1759 ol.startItemListItem();
1760 QCString path=fd->getPath();
1761 if (Config_getBool(FULL_PATH_NAMES))
1762 {
1763 ol.docify(stripFromPath(path));
1764 }
1765
1766 QCString fname = fd->name();
1767 if (!fd->getVersion().isEmpty()) // append version if available
1768 {
1769 fname += " (" + fd->getVersion() + ")";
1770 }
1771
1772 // for HTML
1773 ol.pushGeneratorState();
1775 if (fd->generateSourceFile())
1776 {
1777 ol.writeObjectLink(QCString(),fd->getSourceFileBase(),QCString(),fname);
1778 }
1779 else if (fd->isLinkable())
1780 {
1781 ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fname);
1782 }
1783 else
1784 {
1785 ol.startBold();
1786 ol.docify(fname);
1787 ol.endBold();
1788 }
1789 ol.popGeneratorState();
1790
1791 // for other output formats
1792 ol.pushGeneratorState();
1794 if (fd->isLinkable())
1795 {
1796 ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fname);
1797 }
1798 else
1799 {
1800 ol.docify(fname);
1801 }
1802 ol.popGeneratorState();
1803
1804 ol.endItemListItem();
1805 }
1806 if (!first) ol.endItemList();
1807
1808 ol.popGeneratorState();
1809}
QCString generatedFromFiles() const override
void startItemList()
Definition outputlist.h:429
void disable(OutputType o)
void writeRuler()
Definition outputlist.h:521
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition outputlist.h:439
void docify(const QCString &s)
Definition outputlist.h:437
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:407
void endParagraph()
Definition outputlist.h:409
void startItemListItem()
Definition outputlist.h:457
void endItemListItem()
Definition outputlist.h:459
void startBold()
Definition outputlist.h:561
void endBold()
Definition outputlist.h:563
void endItemList()
Definition outputlist.h:431
static QCString stripFromPath(const QCString &p, const StringVector &l)
Definition util.cpp:299

References Config_getBool, OutputList::disable(), OutputList::disableAllBut(), Docbook, OutputList::docify(), OutputList::enable(), OutputList::endBold(), OutputList::endItemList(), OutputList::endItemListItem(), OutputList::endParagraph(), FALSE, generatedFromFiles(), Html, m_files, Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startBold(), OutputList::startItemList(), OutputList::startItemListItem(), OutputList::startParagraph(), stripFromPath(), TRUE, OutputList::writeObjectLink(), and OutputList::writeRuler().

Referenced by writeDocumentationContents().

◆ sortAllMembersList()

void ClassDefImpl::sortAllMembersList ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 5023 of file classdef.cpp.

5024{
5025 std::stable_sort(m_allMemberNameInfoLinkedMap.begin(),
5027 [](const auto &m1,const auto &m2)
5028 {
5029 return qstricmp_sort(m1->memberName(),m2->memberName())<0;
5030 });
5031}

References m_allMemberNameInfoLinkedMap.

◆ sortMemberLists()

void ClassDefImpl::sortMemberLists ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4639 of file classdef.cpp.

4640{
4641 for (auto &ml : m_memberLists)
4642 {
4643 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
4644 }
4645 if (Config_getBool(SORT_BRIEF_DOCS))
4646 {
4647 std::stable_sort(m_innerClasses.begin(),
4648 m_innerClasses.end(),
4649 [](const auto &c1,const auto &c2)
4650 {
4651 return Config_getBool(SORT_BY_SCOPE_NAME) ?
4652 qstricmp_sort(c1->name(), c2->name() )<0 :
4653 qstricmp_sort(c1->className(), c2->className())<0 ;
4654 });
4655 }
4656}

References Config_getBool, FALSE, m_innerClasses, and m_memberLists.

◆ startMemberDeclarations()

void ClassDefImpl::startMemberDeclarations ( OutputList & ol) const
private

Definition at line 2222 of file classdef.cpp.

2223{
2224 //printf("%s: ClassDefImpl::startMemberDeclarations()\n",qPrint(name()));
2226}
void startMemberSections()
Definition outputlist.h:461

References OutputList::startMemberSections().

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ startMemberDocumentation()

void ClassDefImpl::startMemberDocumentation ( OutputList & ol) const
private

Definition at line 2202 of file classdef.cpp.

2203{
2204 //printf("%s: ClassDefImpl::startMemberDocumentation()\n",qPrint(name()));
2205 if (Config_getBool(SEPARATE_MEMBER_PAGES))
2206 {
2209 }
2210}

References Config_getBool, OutputList::disable(), Html, Doxygen::suppressDocWarnings, and TRUE.

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ subClasses()

const BaseClassList & ClassDefImpl::subClasses ( ) const
overridevirtual

Returns the list of sub classes that directly derive from this class.

Implements ClassDef.

Definition at line 5008 of file classdef.cpp.

5009{
5010 return m_inheritedBy;
5011}

References m_inheritedBy.

Referenced by isSubClass().

◆ subGrouping()

bool ClassDefImpl::subGrouping ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5387 of file classdef.cpp.

5388{
5389 return m_subGrouping;
5390}

References m_subGrouping.

◆ tagLessReference()

const ClassDef * ClassDefImpl::tagLessReference ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5291 of file classdef.cpp.

5292{
5293 return m_tagLessRef;
5294}

References m_tagLessRef.

◆ templateArguments()

const ArgumentList & ClassDefImpl::templateArguments ( ) const
overridevirtual

Returns the template arguments of this class.

Implements ClassDef.

Definition at line 5038 of file classdef.cpp.

5039{
5040 return m_tempArgs;
5041}

References m_tempArgs.

Referenced by addMembersToTemplateInstance(), addMemberToTemplateInstance(), className(), getTemplateParameterLists(), and internalInsertMember().

◆ templateMaster()

const ClassDef * ClassDefImpl::templateMaster ( ) const
overridevirtual

Returns the template master of which this class is an instance.

Returns 0 if not applicable.

Implements ClassDef.

Definition at line 5058 of file classdef.cpp.

5059{
5060 return m_templateMaster;
5061}

References m_templateMaster.

◆ templateTypeConstraints()

const ConstraintClassList & ClassDefImpl::templateTypeConstraints ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5093 of file classdef.cpp.

5094{
5095 return m_constraintClassList;
5096}

References m_constraintClassList.

◆ title()

QCString ClassDefImpl::title ( ) const
overridevirtual

Implements ClassDef.

Definition at line 2909 of file classdef.cpp.

2910{
2911 QCString pageTitle;
2912 SrcLangExt lang = getLanguage();
2913
2914 auto getReferenceTitle = [this](std::function<QCString()> translateFunc) -> QCString
2915 {
2916 return Config_getBool(HIDE_COMPOUND_REFERENCE) ? displayName() : translateFunc();
2917 };
2918
2919 if (lang==SrcLangExt::Fortran)
2920 {
2921 pageTitle = getReferenceTitle([this](){
2923 });
2924 }
2925 else if (lang==SrcLangExt::Slice)
2926 {
2927 pageTitle = getReferenceTitle([this](){
2929 });
2930 }
2931 else if (lang==SrcLangExt::VHDL)
2932 {
2933 pageTitle = getReferenceTitle([this](){
2935 });
2936 }
2937 else if (isJavaEnum())
2938 {
2939 pageTitle = getReferenceTitle([this](){
2941 });
2942 }
2943 else if (m_compType==Service)
2944 {
2945 pageTitle = getReferenceTitle([this](){
2947 });
2948 }
2949 else if (m_compType==Singleton)
2950 {
2951 pageTitle = getReferenceTitle([this](){
2953 });
2954 }
2955 else
2956 {
2957 pageTitle = getReferenceTitle([this](){
2959 m_compType == Interface && getLanguage()==SrcLangExt::ObjC ? Class : m_compType,
2960 !m_tempArgs.empty());
2961 });
2962 }
2963 return pageTitle;
2964}
bool isSliceLocal() const override
virtual QCString trCompoundReference(const QCString &clName, ClassDef::CompoundType compType, bool isTemplate)=0
virtual QCString trEnumReference(const QCString &name)=0
virtual QCString trSingletonReference(const QCString &sName)=0
virtual QCString trServiceReference(const QCString &sName)=0
virtual QCString trCustomReference(const QCString &name)=0
virtual QCString trCompoundReferenceFortran(const QCString &clName, ClassDef::CompoundType compType, bool isTemplate)=0
virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)=0
static QCString getClassTitle(const ClassDef *)

References ClassDef::Class, Config_getBool, displayName(), VhdlDocGen::getClassTitle(), DefinitionMixin< ClassDefMutable >::getLanguage(), ClassDef::Interface, isJavaEnum(), isSliceLocal(), m_compType, m_tempArgs, ClassDef::Service, ClassDef::Singleton, and theTranslator.

Referenced by addUsedInterfaceClasses(), getTitleForMemberListType(), internalInsertMember(), writeDetailedDescription(), writeDocumentation(), writeInheritedMemberDeclarations(), writeMemberDeclarations(), writeMemberDocumentation(), and writeNestedClasses().

◆ typeConstraints()

const ArgumentList & ClassDefImpl::typeConstraints ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5377 of file classdef.cpp.

5378{
5379 return m_typeConstraints;
5380}

References m_typeConstraints.

◆ updateBaseClasses()

void ClassDefImpl::updateBaseClasses ( const BaseClassList & bcd)
overridevirtual

Update the list of base classes to the one passed.

Implements ClassDef.

Definition at line 5003 of file classdef.cpp.

5004{
5005 m_inherits = bcd;
5006}

References m_inherits.

◆ updateSubClasses()

void ClassDefImpl::updateSubClasses ( const BaseClassList & bcd)
overridevirtual

Update the list of sub classes to the one passed.

Implements ClassDef.

Definition at line 5013 of file classdef.cpp.

5014{
5015 m_inheritedBy = bcd;
5016}

References m_inheritedBy.

◆ usedByImplementationClasses()

const UsesClassList & ClassDefImpl::usedByImplementationClasses ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5088 of file classdef.cpp.

5089{
5090 return m_usedByImplClassList;
5091}

References m_usedByImplClassList.

◆ usedFiles()

const FileList & ClassDefImpl::usedFiles ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5372 of file classdef.cpp.

5373{
5374 return m_files;
5375}

References m_files.

◆ usedImplementationClasses()

const UsesClassList & ClassDefImpl::usedImplementationClasses ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5083 of file classdef.cpp.

5084{
5085 return m_usesImplClassList;
5086}

References m_usesImplClassList.

◆ visibleInParentsDeclList()

bool ClassDefImpl::visibleInParentsDeclList ( ) const
overridevirtual

show this class in the declaration section of its parent?

Implements ClassDef.

Definition at line 2599 of file classdef.cpp.

2600{
2601 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
2602 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
2603 bool extractLocalClasses = Config_getBool(EXTRACT_LOCAL_CLASSES);
2604 bool linkable = isLinkable();
2605 return (!isAnonymous() && !isExtension() &&
2606 (protection()!=Protection::Private || extractPrivate) &&
2607 (linkable || (!hideUndocClasses && (!isLocal() || extractLocalClasses)))
2608 );
2609}
bool isLocal() const override
Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES.
bool isLinkable() const override
Protection protection() const override
Return the protection level (Public,Protected,Private) in which this compound was found.

References Config_getBool, DefinitionMixin< ClassDefMutable >::isAnonymous(), isExtension(), isLinkable(), isLocal(), and protection().

Referenced by writeDeclarationLink().

◆ writeAdditionalInheritedMembers()

void ClassDefImpl::writeAdditionalInheritedMembers ( OutputList & ol) const
private

Definition at line 4812 of file classdef.cpp.

4813{
4814 //printf("**** writeAdditionalInheritedMembers()\n");
4815 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4816 {
4817 if (lde->kind()==LayoutDocEntry::MemberDecl)
4818 {
4819 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4820 if (lmd && lmd->type!=MemberListType::Friends())
4821 {
4822 ClassDefSet visited;
4824 }
4825 }
4826 }
4827}
void writeInheritedMemberDeclarations(OutputList &ol, ClassDefSet &visitedClasses, MemberListType lt, MemberListType lt2, const QCString &title, const ClassDef *inheritedFrom, bool invert, bool showAlways) const

References FALSE, DefinitionMixin< ClassDefMutable >::getLanguage(), LayoutDocManager::instance(), MemberListType::Invalid(), LayoutDocEntryMemberDecl::title(), TRUE, LayoutDocEntryMemberDecl::type, and writeInheritedMemberDeclarations().

Referenced by endMemberDeclarations().

◆ writeAuthorSection()

void ClassDefImpl::writeAuthorSection ( OutputList & ol) const
private

Definition at line 2242 of file classdef.cpp.

2243{
2244 ol.pushGeneratorState();
2246 ol.writeString("\n");
2247 ol.startGroupHeader();
2249 ol.endGroupHeader();
2251 ol.popGeneratorState();
2252}
void writeString(const QCString &text)
Definition outputlist.h:411
void startGroupHeader(const QCString &id=QCString(), int extraLevels=0)
Definition outputlist.h:453
void endGroupHeader(int extraLevels=0)
Definition outputlist.h:455
virtual QCString trGeneratedAutomatically(const QCString &s)=0
virtual QCString trAuthor(bool first_capital, bool singular)=0
#define Config_getString(name)
Definition config.h:32

References Config_getString, OutputList::disableAllBut(), OutputList::endGroupHeader(), Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startGroupHeader(), theTranslator, TRUE, and OutputList::writeString().

Referenced by writeDocumentationContents().

◆ writeBriefDescription()

void ClassDefImpl::writeBriefDescription ( OutputList & ol,
bool exampleFlag ) const
private

Definition at line 1556 of file classdef.cpp.

1557{
1558 if (hasBriefDescription())
1559 {
1560 ol.startParagraph();
1561 ol.pushGeneratorState();
1563 ol.writeString(" - ");
1564 ol.popGeneratorState();
1566 briefLine(),
1567 this,
1568 nullptr,
1570 DocOptions()
1571 .setIndexWords(true)
1572 .setSingleLine(true));
1573 ol.pushGeneratorState();
1575 ol.writeString(" \n");
1577 ol.popGeneratorState();
1578
1579 if (hasDetailedDescription() || exampleFlag)
1580 {
1581 writeMoreLink(ol,anchor());
1582 }
1583
1584 ol.endParagraph();
1585 }
1586 ol.writeSynopsis();
1587}
void writeMoreLink(OutputList &ol, const QCString &anchor) const
bool hasDetailedDescription() const override
returns TRUE if this class has a non-empty detailed description
bool hasBriefDescription() const override
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, const DocOptions &options)
void writeSynopsis()
Definition outputlist.h:592

References anchor(), DefinitionMixin< ClassDefMutable >::briefDescription(), DefinitionMixin< ClassDefMutable >::briefFile(), DefinitionMixin< ClassDefMutable >::briefLine(), OutputList::disable(), OutputList::disableAllBut(), OutputList::enable(), OutputList::endParagraph(), OutputList::generateDoc(), DefinitionMixin< ClassDefMutable >::hasBriefDescription(), hasDetailedDescription(), Man, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, OutputList::startParagraph(), writeMoreLink(), OutputList::writeString(), and OutputList::writeSynopsis().

Referenced by writeDocumentationContents().

◆ writeCollaborationGraph()

void ClassDefImpl::writeCollaborationGraph ( OutputList & ol) const
private

Definition at line 1973 of file classdef.cpp.

1974{
1975 if (Config_getBool(HAVE_DOT) && m_hasCollaborationGraph /*&& Config_getBool(COLLABORATION_GRAPH)*/)
1976 {
1977 DotClassGraph usageImplGraph(this,GraphType::Collaboration);
1978 if (usageImplGraph.isTooBig())
1979 {
1980 warn_uncond("Collaboration graph for '{}' not generated, too many nodes ({}), threshold is {}. Consider increasing DOT_GRAPH_MAX_NODES.\n",
1981 name(), usageImplGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
1982 }
1983 else if (!usageImplGraph.isTrivial())
1984 {
1985 ol.pushGeneratorState();
1987 ol.startDotGraph();
1989 ol.endDotGraph(usageImplGraph);
1990 ol.popGeneratorState();
1991 }
1992 }
1993}
void endDotGraph(DotClassGraph &g)
Definition outputlist.h:650
void startDotGraph()
Definition outputlist.h:648
virtual QCString trCollaborationDiagram(const QCString &clName)=0
#define Config_getInt(name)
Definition config.h:34
@ Collaboration
Definition dotgraph.h:31
#define warn_uncond(fmt,...)
Definition message.h:122

References Collaboration, Config_getBool, Config_getInt, OutputList::disable(), displayName(), OutputList::endDotGraph(), DotClassGraph::isTooBig(), DotClassGraph::isTrivial(), m_hasCollaborationGraph, Man, DefinitionMixin< ClassDefMutable >::name(), DotClassGraph::numNodes(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startDotGraph(), theTranslator, and warn_uncond.

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeDeclaration()

void ClassDefImpl::writeDeclaration ( OutputList & ol,
const MemberDef * md,
bool inGroup,
int indentLevel,
const ClassDef * inheritedFrom,
const QCString & inheritId ) const
overridevirtual

called from MemberDef::writeDeclaration() to (recursively) write the definition of an anonymous struct, union or class.

Implements ClassDef.

Definition at line 3554 of file classdef.cpp.

3556{
3557 //printf("ClassName='%s' inGroup=%d\n",qPrint(name()),inGroup);
3558
3560 QCString cn = displayName(FALSE);
3561 if (!cn.isEmpty())
3562 {
3563 ol.docify(" ");
3564 if (md && isLinkable())
3565 {
3566 ol.writeObjectLink(QCString(),QCString(),md->anchor(),cn);
3567 }
3568 else
3569 {
3570 ol.startBold();
3571 ol.docify(cn);
3572 ol.endBold();
3573 }
3574 }
3575 ol.docify(" {");
3577 ol.endMemberDeclaration(md ? md->anchor() : QCString(),inheritId);
3578
3579 // write user defined member groups
3580 for (const auto &mg : m_memberGroups)
3581 {
3582 mg->writePlainDeclarations(ol,inGroup,this,nullptr,nullptr,nullptr,nullptr,indentLevel,inheritedFrom,inheritId);
3583 }
3584
3585 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
3586 {
3587 if (lde->kind()==LayoutDocEntry::MemberDecl)
3588 {
3589 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
3590 if (lmd)
3591 {
3592 writePlainMemberDeclaration(ol,lmd->type,inGroup,indentLevel,inheritedFrom,inheritId);
3593 }
3594 }
3595 }
3596}
QCString compoundTypeString() const override
Returns the type of compound as a string.
void writePlainMemberDeclaration(OutputList &ol, MemberListType lt, bool inGroup, int indentLevel, const ClassDef *inheritedFrom, const QCString &inheritId) const
virtual QCString anchor() const =0
void endMemberItem(OutputGenerator::MemberItemType type)
Definition outputlist.h:495
void endMemberDeclaration(const QCString &anchor, const QCString &inheritId)
Definition outputlist.h:571

References Definition::anchor(), OutputGenerator::AnonymousStart, compoundTypeString(), displayName(), OutputList::docify(), OutputList::endBold(), OutputList::endMemberDeclaration(), OutputList::endMemberItem(), FALSE, LayoutDocManager::instance(), QCString::isEmpty(), isLinkable(), m_memberGroups, OutputList::startBold(), LayoutDocEntryMemberDecl::type, OutputList::writeObjectLink(), and writePlainMemberDeclaration().

◆ writeDeclarationLink()

void ClassDefImpl::writeDeclarationLink ( OutputList & ol,
bool & found,
const QCString & header,
bool localNames ) const
overridevirtual

Implements ClassDef.

Definition at line 2611 of file classdef.cpp.

2612{
2613 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
2614 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
2615 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2616 SrcLangExt lang = getLanguage();
2618 {
2619 if (!found) // first class
2620 {
2621 if (sliceOpt)
2622 {
2623 if (compoundType()==Interface)
2624 {
2625 ol.startMemberHeader("interfaces");
2626 }
2627 else if (compoundType()==Struct)
2628 {
2629 ol.startMemberHeader("structs");
2630 }
2631 else if (compoundType()==Exception)
2632 {
2633 ol.startMemberHeader("exceptions");
2634 }
2635 else // compoundType==Class
2636 {
2637 ol.startMemberHeader("nested-classes");
2638 }
2639 }
2640 else // non-Slice optimization: single header for class/struct/..
2641 {
2642 ol.startMemberHeader("nested-classes");
2643 }
2644 if (!header.isEmpty())
2645 {
2646 ol.parseText(header);
2647 }
2648 else if (lang==SrcLangExt::VHDL)
2649 {
2651 }
2652 else
2653 {
2654 ol.parseText(lang==SrcLangExt::Fortran ?
2657 }
2658 ol.endMemberHeader();
2659 ol.startMemberList();
2660 found=TRUE;
2661 }
2663 QCString ctype = compoundTypeString();
2664 QCString cname = displayName(!localNames);
2665 QCString anc = anchor();
2666 if (anc.isEmpty()) anc = cname; else anc.prepend(cname+"_");
2668
2669 if (lang!=SrcLangExt::VHDL) // for VHDL we swap the name and the type
2670 {
2671 if (isSliceLocal())
2672 {
2673 ol.writeString("local ");
2674 }
2675 ol.writeString(ctype);
2676 ol.writeString(" ");
2677 ol.insertMemberAlign();
2678 }
2679 if (isLinkable())
2680 {
2683 anchor(),
2684 cname
2685 );
2686 }
2687 else
2688 {
2689 ol.startBold();
2690 ol.docify(cname);
2691 ol.endBold();
2692 }
2693 if (lang==SrcLangExt::VHDL) // now write the type
2694 {
2695 ol.writeString(" ");
2696 ol.insertMemberAlign();
2698 }
2700
2701 // add the brief description if available
2702 if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
2703 {
2704 auto parser { createDocParser() };
2705 auto ast { validatingParseDoc(*parser.get(),
2706 briefFile(),
2707 briefLine(),
2708 this,
2709 nullptr,
2711 DocOptions()
2712 .setSingleLine(true))
2713 };
2714 if (!ast->isEmpty())
2715 {
2717 ol.writeDoc(ast.get(),this,nullptr);
2718 if (isLinkableInProject())
2719 {
2720 writeMoreLink(ol,anchor());
2721 }
2723 }
2724 }
2725 ol.endMemberDeclaration(anchor(),QCString());
2726 }
2727}
QCString getReference() const override
bool visibleInParentsDeclList() const override
show this class in the declaration section of its parent?
void writeDoc(const IDocNodeAST *ast, const Definition *ctx, const MemberDef *md, int sectionLevel=-1)
Definition outputlist.h:383
void startMemberDeclaration()
Definition outputlist.h:569
void endMemberDescription()
Definition outputlist.h:567
void startMemberDescription(const QCString &anchor, const QCString &inheritId=QCString(), bool typ=false)
Definition outputlist.h:565
void startMemberList()
Definition outputlist.h:481
void insertMemberAlign(bool templ=FALSE)
Definition outputlist.h:517
void startMemberItem(const QCString &anchor, OutputGenerator::MemberItemType type, const QCString &id=QCString())
Definition outputlist.h:493
virtual QCString trDataTypes()=0
virtual QCString trCompounds()=0
static QCString getProtectionName(int prot)
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, const DocOptions &options)
IDocParserPtr createDocParser()
factory function to create a parser
Definition docparser.cpp:55

References anchor(), ARCHITECTURE, DefinitionMixin< ClassDefMutable >::briefDescription(), DefinitionMixin< ClassDefMutable >::briefFile(), DefinitionMixin< ClassDefMutable >::briefLine(), compoundType(), compoundTypeString(), Config_getBool, VhdlDocGen::convert(), createDocParser(), displayName(), OutputList::docify(), OutputList::endBold(), OutputList::endMemberDeclaration(), OutputList::endMemberDescription(), OutputList::endMemberHeader(), OutputList::endMemberItem(), ClassDef::Exception, FALSE, DefinitionMixin< ClassDefMutable >::getLanguage(), getOutputFileBase(), VhdlDocGen::getProtectionName(), getReference(), OutputList::insertMemberAlign(), ClassDef::Interface, QCString::isEmpty(), isLinkable(), isLinkableInProject(), isSliceLocal(), OutputGenerator::Normal, OutputList::parseText(), QCString::prepend(), protection(), OutputList::startBold(), OutputList::startMemberDeclaration(), OutputList::startMemberDescription(), OutputList::startMemberHeader(), OutputList::startMemberItem(), OutputList::startMemberList(), ClassDef::Struct, theTranslator, TRUE, validatingParseDoc(), visibleInParentsDeclList(), OutputList::writeDoc(), writeMoreLink(), OutputList::writeObjectLink(), and OutputList::writeString().

◆ writeDetailedDescription()

void ClassDefImpl::writeDetailedDescription ( OutputList & ol,
const QCString & pageType,
bool exampleFlag,
const QCString & title,
const QCString & anchor = QCString() ) const
private

Definition at line 1665 of file classdef.cpp.

1667{
1668 if (hasDetailedDescription() || exampleFlag)
1669 {
1670 ol.pushGeneratorState();
1672 ol.writeRuler();
1673 ol.popGeneratorState();
1674
1675 ol.pushGeneratorState();
1677 ol.writeAnchor(QCString(),anchor.isEmpty() ? QCString("details") : anchor);
1678 ol.popGeneratorState();
1679
1680 if (!anchor.isEmpty())
1681 {
1682 ol.pushGeneratorState();
1686 ol.popGeneratorState();
1687 }
1688
1689 ol.startGroupHeader("details");
1690 ol.parseText(title);
1691 ol.endGroupHeader();
1692
1694 }
1695 else
1696 {
1697 //writeTemplateSpec(ol,this,pageType);
1698 }
1699}
void writeDetailedDocumentationBody(OutputList &ol) const
void writeAnchor(const QCString &fileName, const QCString &name)
Definition outputlist.h:523

References anchor(), OutputList::disable(), OutputList::disableAllBut(), OutputList::endGroupHeader(), getOutputFileBase(), hasDetailedDescription(), Html, Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startGroupHeader(), title(), OutputList::writeAnchor(), writeDetailedDocumentationBody(), and OutputList::writeRuler().

Referenced by writeDocumentationContents().

◆ writeDetailedDocumentationBody()

void ClassDefImpl::writeDetailedDocumentationBody ( OutputList & ol) const
private

Definition at line 1589 of file classdef.cpp.

1590{
1591 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
1592
1593 ol.startTextBlock();
1594
1595 if (getLanguage()==SrcLangExt::Cpp)
1596 {
1598 }
1599
1600 // repeat brief description
1601 if (!briefDescription().isEmpty() && repeatBrief)
1602 {
1604 briefLine(),
1605 this,
1606 nullptr,
1608 DocOptions());
1609 }
1610 if (!briefDescription().isEmpty() && repeatBrief &&
1611 !documentation().isEmpty())
1612 {
1613 ol.pushGeneratorState();
1615 ol.writeString("\n\n");
1616 ol.popGeneratorState();
1617 }
1618 // write documentation
1619 if (!documentation().isEmpty())
1620 {
1621 ol.generateDoc(docFile(),
1622 docLine(),
1623 this,
1624 nullptr,
1625 documentation(),
1626 DocOptions()
1627 .setIndexWords(true));
1628 }
1629 // write type constraints
1631
1632 ol.generateDoc(
1633 docFile(),docLine(),
1634 this,
1635 nullptr, // memberDef
1637 DocOptions()
1638 .setIndexWords(true));
1639
1640 // write examples
1641 if (hasExamples())
1642 {
1643 ol.startExamples();
1644 ol.startDescForItem();
1646 ol.endDescForItem();
1647 ol.endExamples();
1648 }
1649 writeSourceDef(ol);
1651 ol.endTextBlock();
1652}
void writeTemplateSpec(OutputList &ol, const Definition *d, const QCString &type, SrcLangExt lang) const
bool hasExamples() const override
void writeSourceDef(OutputList &ol) const override
void writeRequirementRefs(OutputList &ol) const override
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:672
void endDescForItem()
Definition outputlist.h:549
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:670
void endExamples()
Definition outputlist.h:580
void startExamples()
Definition outputlist.h:578
void startDescForItem()
Definition outputlist.h:547
void writeTypeConstraints(OutputList &ol, const Definition *d, const ArgumentList &al)
Definition util.cpp:5439
QCString inlineTemplateArgListToDoc(const ArgumentList &al)
Definition util.cpp:1204
void writeExamples(OutputList &ol, const ExampleList &list)
Definition util.cpp:1157

References DefinitionMixin< ClassDefMutable >::briefDescription(), DefinitionMixin< ClassDefMutable >::briefFile(), DefinitionMixin< ClassDefMutable >::briefLine(), compoundTypeString(), Config_getBool, OutputList::disable(), DefinitionMixin< ClassDefMutable >::docFile(), DefinitionMixin< ClassDefMutable >::docLine(), DefinitionMixin< ClassDefMutable >::documentation(), OutputList::endDescForItem(), OutputList::endExamples(), OutputList::endTextBlock(), OutputList::generateDoc(), DefinitionMixin< ClassDefMutable >::getLanguage(), hasExamples(), DefinitionMixin< ClassDefMutable >::hasRequirementRefs(), Html, inlineTemplateArgListToDoc(), m_examples, m_tempArgs, m_typeConstraints, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startDescForItem(), OutputList::startExamples(), OutputList::startTextBlock(), writeExamples(), DefinitionMixin< ClassDefMutable >::writeRequirementRefs(), DefinitionMixin< ClassDefMutable >::writeSourceDef(), OutputList::writeString(), writeTemplateSpec(), and writeTypeConstraints().

Referenced by writeDetailedDescription(), and writeInlineDocumentation().

◆ writeDocumentation()

void ClassDefImpl::writeDocumentation ( OutputList & ol) const
overridevirtual

Implements ClassDef.

Definition at line 2967 of file classdef.cpp.

2968{
2969 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
2970 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
2971 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
2972 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2973 QCString pageTitle = title();
2974
2976 if (sliceOpt)
2977 {
2978 if (compoundType()==Interface)
2979 {
2981 }
2982 else if (compoundType()==Struct)
2983 {
2985 }
2986 else if (compoundType()==Exception)
2987 {
2989 }
2990 else
2991 {
2993 }
2994 }
2995 else
2996 {
2998 }
2999
3000 AUTO_TRACE("name='{}' getOutputFileBase='{}'",name(),getOutputFileBase());
3001 bool hasAllMembersLink=false;
3002 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
3003 {
3004 if (lde->kind()==LayoutDocEntry::ClassAllMembersLink)
3005 {
3006 hasAllMembersLink = true;
3007 break;
3008 }
3009 }
3010 QCString memListFile;
3011 if (hasAllMembersLink && !m_allMemberNameInfoLinkedMap.empty() && !Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
3012 {
3013 memListFile = getMemberListFileName();
3014 }
3015 startFile(ol,getOutputFileBase(),false,name(),pageTitle,hli,!generateTreeView,QCString(),0,memListFile);
3016 if (!generateTreeView)
3017 {
3019 {
3021 }
3022 ol.endQuickIndices();
3023 }
3024
3025 startTitle(ol,getOutputFileBase(),this);
3026 ol.parseText(pageTitle);
3028 addGroupListToTitle(ol,this);
3030 writeDocumentationContents(ol,pageTitle);
3031
3032 endFileWithNavPath(ol,this);
3033
3034 if (Config_getBool(SEPARATE_MEMBER_PAGES))
3035 {
3036 writeMemberPages(ol);
3037 }
3038}
void addClassAttributes(OutputList &ol) const
void writeMemberPages(OutputList &ol) const override
QCString getMemberListFileName() const override
Definition classdef.cpp:985
void writeDocumentationContents(OutputList &ol, const QCString &pageTitle) const
void writeNavigationPath(OutputList &ol) const override
void endQuickIndices()
Definition outputlist.h:604
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition index.cpp:384
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:394
void startFile(OutputList &ol, const QCString &name, bool isSource, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
Definition index.cpp:401
void endFileWithNavPath(OutputList &ol, const DefinitionMutable *d, bool showPageNavigation)
Definition index.cpp:448
HighlightedItem
Definition index.h:59
@ InterfaceVisible
Definition index.h:89
@ ExceptionVisible
Definition index.h:91
void addGroupListToTitle(OutputList &ol, const Definition *d)
Definition util.cpp:4892

References addClassAttributes(), addGroupListToTitle(), AUTO_TRACE, ClassVisible, compoundType(), Config_getBool, displayName(), endFileWithNavPath(), OutputList::endQuickIndices(), endTitle(), ClassDef::Exception, ExceptionVisible, getMemberListFileName(), DefinitionMixin< ClassDefMutable >::getOuterScope(), getOutputFileBase(), Doxygen::globalScope, LayoutDocManager::instance(), ClassDef::Interface, InterfaceVisible, m_allMemberNameInfoLinkedMap, DefinitionMixin< ClassDefMutable >::name(), None, OutputList::parseText(), startFile(), startTitle(), ClassDef::Struct, StructVisible, title(), writeDocumentationContents(), writeMemberPages(), and DefinitionMixin< ClassDefMutable >::writeNavigationPath().

◆ writeDocumentationContents()

void ClassDefImpl::writeDocumentationContents ( OutputList & ol,
const QCString & pageTitle ) const
private

Definition at line 2763 of file classdef.cpp.

2764{
2765 ol.startContents();
2766
2767 QCString pageType = " ";
2768 pageType += compoundTypeString();
2769
2770 bool exampleFlag=hasExamples();
2771
2772 //---------------------------------------- start flexible part -------------------------------
2773
2774 SrcLangExt lang = getLanguage();
2775
2776 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
2777 {
2778 switch (lde->kind())
2779 {
2780 case LayoutDocEntry::BriefDesc:
2781 writeBriefDescription(ol,exampleFlag);
2782 break;
2783 case LayoutDocEntry::ClassIncludes:
2784 if (lang==SrcLangExt::Slice)
2785 {
2787 }
2788 else
2789 {
2791 }
2792 break;
2793 case LayoutDocEntry::ClassInheritanceGraph:
2795 break;
2796 case LayoutDocEntry::ClassCollaborationGraph:
2798 break;
2799 case LayoutDocEntry::ClassAllMembersLink:
2800 //writeAllMembersLink(ol); // this is now part of the summary links
2801 break;
2802 case LayoutDocEntry::MemberDeclStart:
2804 break;
2805 case LayoutDocEntry::MemberGroups:
2807 break;
2808 case LayoutDocEntry::MemberDecl:
2809 {
2810 ClassDefSet visitedClasses;
2811 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
2812 if (lmd)
2813 {
2814 writeMemberDeclarations(ol,visitedClasses,lmd->type,lmd->title(lang),lmd->subtitle(lang));
2815 }
2816 }
2817 break;
2818 case LayoutDocEntry::ClassNestedClasses:
2819 {
2820 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
2821 if (ls)
2822 {
2823 writeNestedClasses(ol,ls->title(lang));
2824 }
2825 }
2826 break;
2827 case LayoutDocEntry::MemberDeclEnd:
2829 break;
2830 case LayoutDocEntry::DetailedDesc:
2831 {
2832 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
2833 if (ls)
2834 {
2835 writeDetailedDescription(ol,pageType,exampleFlag,ls->title(lang));
2836 }
2837 }
2838 break;
2839 case LayoutDocEntry::MemberDefStart:
2841 break;
2842 case LayoutDocEntry::ClassInlineClasses:
2844 break;
2845 case LayoutDocEntry::MemberDef:
2846 {
2847 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
2848 if (lmd)
2849 {
2850 writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
2851 }
2852 }
2853 break;
2854 case LayoutDocEntry::MemberDefEnd:
2856 break;
2857 case LayoutDocEntry::ClassUsedFiles:
2858 showUsedFiles(ol);
2859 break;
2860 case LayoutDocEntry::AuthorSection:
2862 break;
2863 case LayoutDocEntry::NamespaceNestedNamespaces:
2864 case LayoutDocEntry::NamespaceNestedConstantGroups:
2865 case LayoutDocEntry::NamespaceClasses:
2866 case LayoutDocEntry::NamespaceConcepts:
2867 case LayoutDocEntry::NamespaceInterfaces:
2868 case LayoutDocEntry::NamespaceStructs:
2869 case LayoutDocEntry::NamespaceExceptions:
2870 case LayoutDocEntry::NamespaceInlineClasses:
2871 case LayoutDocEntry::ConceptDefinition:
2872 case LayoutDocEntry::FileClasses:
2873 case LayoutDocEntry::FileConcepts:
2874 case LayoutDocEntry::FileInterfaces:
2875 case LayoutDocEntry::FileStructs:
2876 case LayoutDocEntry::FileExceptions:
2877 case LayoutDocEntry::FileNamespaces:
2878 case LayoutDocEntry::FileConstantGroups:
2879 case LayoutDocEntry::FileIncludes:
2880 case LayoutDocEntry::FileIncludeGraph:
2881 case LayoutDocEntry::FileIncludedByGraph:
2882 case LayoutDocEntry::FileSourceLink:
2883 case LayoutDocEntry::FileInlineClasses:
2884 case LayoutDocEntry::GroupClasses:
2885 case LayoutDocEntry::GroupConcepts:
2886 case LayoutDocEntry::GroupModules:
2887 case LayoutDocEntry::GroupInlineClasses:
2888 case LayoutDocEntry::GroupNamespaces:
2889 case LayoutDocEntry::GroupDirs:
2890 case LayoutDocEntry::GroupNestedGroups:
2891 case LayoutDocEntry::GroupFiles:
2892 case LayoutDocEntry::GroupGraph:
2893 case LayoutDocEntry::GroupPageDocs:
2894 case LayoutDocEntry::ModuleExports:
2895 case LayoutDocEntry::ModuleClasses:
2896 case LayoutDocEntry::ModuleConcepts:
2897 case LayoutDocEntry::ModuleUsedFiles:
2898 case LayoutDocEntry::DirSubDirs:
2899 case LayoutDocEntry::DirFiles:
2900 case LayoutDocEntry::DirGraph:
2901 err("Internal inconsistency: member '{}' should not be part of LayoutDocManager::Class entry list\n",lde->entryToString());
2902 break;
2903 }
2904 }
2905
2906 ol.endContents();
2907}
void writeIncludeFilesForSlice(OutputList &ol) const
void writeInheritanceGraph(OutputList &ol) const
void writeMemberDeclarations(OutputList &ol, ClassDefSet &visitedClasses, MemberListType lt, const QCString &title, const QCString &subTitle=QCString(), bool showInline=FALSE, const ClassDef *inheritedFrom=nullptr, MemberListType lt2=MemberListType::Invalid(), bool invert=FALSE, bool showAlways=FALSE) const override
void writeBriefDescription(OutputList &ol, bool exampleFlag) const
void writeInlineClasses(OutputList &ol) const
void endMemberDeclarations(OutputList &ol) const
void writeCollaborationGraph(OutputList &ol) const
void writeAuthorSection(OutputList &ol) const
void writeDetailedDescription(OutputList &ol, const QCString &pageType, bool exampleFlag, const QCString &title, const QCString &anchor=QCString()) const
void endMemberDocumentation(OutputList &ol) const
void writeIncludeFiles(OutputList &ol) const
void writeMemberGroups(OutputList &ol, bool showInline=FALSE) const
void writeNestedClasses(OutputList &ol, const QCString &title) const
void writeMemberDocumentation(OutputList &ol, MemberListType lt, const QCString &title, bool showInline=FALSE) const
void startMemberDeclarations(OutputList &ol) const
void showUsedFiles(OutputList &ol) const
void startMemberDocumentation(OutputList &ol) const
void endContents()
Definition outputlist.h:620
void startContents()
Definition outputlist.h:618
MemberListType type
Definition layout.h:137
QCString title(SrcLangExt lang) const
Definition layout.cpp:1800
QCString title(SrcLangExt lang) const
Definition layout.cpp:1781

References compoundTypeString(), OutputList::endContents(), endMemberDeclarations(), endMemberDocumentation(), err, DefinitionMixin< ClassDefMutable >::getLanguage(), hasExamples(), LayoutDocManager::instance(), showUsedFiles(), OutputList::startContents(), startMemberDeclarations(), startMemberDocumentation(), LayoutDocEntryMemberDecl::subtitle(), LayoutDocEntryMemberDecl::title(), LayoutDocEntryMemberDef::title(), LayoutDocEntrySection::title(), LayoutDocEntryMemberDecl::type, LayoutDocEntryMemberDef::type, writeAuthorSection(), writeBriefDescription(), writeCollaborationGraph(), writeDetailedDescription(), writeIncludeFiles(), writeIncludeFilesForSlice(), writeInheritanceGraph(), writeInlineClasses(), writeMemberDeclarations(), writeMemberDocumentation(), writeMemberGroups(), and writeNestedClasses().

Referenced by writeDocumentation().

◆ writeDocumentationForInnerClasses()

void ClassDefImpl::writeDocumentationForInnerClasses ( OutputList & ol) const
overridevirtual

Implements ClassDef.

Definition at line 3105 of file classdef.cpp.

3106{
3107 // write inner classes after the parent, so the tag files contain
3108 // the definition in proper order!
3109 for (const auto &innerCd : m_innerClasses)
3110 {
3111 if (
3112 innerCd->isLinkableInProject() && !innerCd->isImplicitTemplateInstance() &&
3113 protectionLevelVisible(innerCd->protection()) &&
3114 !innerCd->isEmbeddedInOuterScope()
3115 )
3116 {
3117 msg("Generating docs for nested compound {}...\n",innerCd->displayName());
3118 innerCd->writeDocumentation(ol);
3119 innerCd->writeMemberList(ol);
3120 }
3121 innerCd->writeDocumentationForInnerClasses(ol);
3122 }
3123}
#define msg(fmt,...)
Definition message.h:94

References m_innerClasses, msg, and protectionLevelVisible().

◆ writeIncludeFiles()

void ClassDefImpl::writeIncludeFiles ( OutputList & ol) const
private

Definition at line 2137 of file classdef.cpp.

2138{
2139 if (m_incInfo /*&& Config_getBool(SHOW_HEADERFILE)*/)
2140 {
2141 SrcLangExt lang = getLanguage();
2142 QCString nm=m_incInfo->includeName.isEmpty() ?
2143 (m_incInfo->fileDef ?
2144 m_incInfo->fileDef->docName() : QCString()
2145 ) :
2146 m_incInfo->includeName;
2147 if (!nm.isEmpty())
2148 {
2149 ol.startParagraph();
2150 ol.startTypewriter();
2151 ol.docify(::includeStatement(lang,m_incInfo->kind));
2152 ol.docify(::includeOpen(lang,m_incInfo->kind));
2153 ol.pushGeneratorState();
2155 ol.docify(nm);
2158 if (m_incInfo->fileDef)
2159 {
2160 ol.writeObjectLink(QCString(),m_incInfo->fileDef->includeName(),QCString(),nm);
2161 }
2162 else
2163 {
2164 ol.docify(nm);
2165 }
2166 ol.popGeneratorState();
2167 ol.docify(::includeClose(lang,m_incInfo->kind));
2168 ol.endTypewriter();
2169 ol.endParagraph();
2170 }
2171 }
2172}
void startTypewriter()
Definition outputlist.h:449
void endTypewriter()
Definition outputlist.h:451
QCString includeClose(SrcLangExt lang, IncludeKind kind)
Definition filedef.cpp:86
QCString includeStatement(SrcLangExt lang, IncludeKind kind)
Definition filedef.cpp:56
QCString includeOpen(SrcLangExt lang, IncludeKind kind)
Definition filedef.cpp:73

References OutputList::disable(), OutputList::disableAllBut(), OutputList::docify(), OutputList::enable(), OutputList::endParagraph(), OutputList::endTypewriter(), DefinitionMixin< ClassDefMutable >::getLanguage(), Html, includeClose(), includeOpen(), includeStatement(), QCString::isEmpty(), m_incInfo, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startParagraph(), OutputList::startTypewriter(), and OutputList::writeObjectLink().

Referenced by writeDocumentationContents().

◆ writeIncludeFilesForSlice()

void ClassDefImpl::writeIncludeFilesForSlice ( OutputList & ol) const
private

Definition at line 1996 of file classdef.cpp.

1997{
1998 if (m_incInfo)
1999 {
2000 QCString nm;
2001 const StringVector &paths = Config_getList(STRIP_FROM_PATH);
2002 if (!paths.empty() && m_incInfo->fileDef)
2003 {
2004 QCString abs = m_incInfo->fileDef->absFilePath();
2005 QCString potential;
2006 size_t length = 0;
2007 for (const auto &s : paths)
2008 {
2009 FileInfo info(s);
2010 if (info.exists())
2011 {
2012 QCString prefix = info.absFilePath();
2013 if (prefix.at(prefix.length() - 1) != '/')
2014 {
2015 prefix += '/';
2016 }
2017
2018 if (prefix.length() > length &&
2019 qstricmp(abs.left(prefix.length()).data(), prefix.data()) == 0) // case insensitive compare
2020 {
2021 length = prefix.length();
2022 potential = abs.right(abs.length() - prefix.length());
2023 }
2024 }
2025 }
2026
2027 if (length > 0)
2028 {
2029 nm = potential;
2030 }
2031 }
2032
2033 if (nm.isEmpty())
2034 {
2035 nm = m_incInfo->includeName;
2036 }
2037
2038 ol.startParagraph();
2039 ol.docify(theTranslator->trDefinedIn()+" ");
2040 ol.startTypewriter();
2041 ol.docify("<");
2042 if (m_incInfo->fileDef)
2043 {
2044 ol.writeObjectLink(QCString(),m_incInfo->fileDef->includeName(),QCString(),nm);
2045 }
2046 else
2047 {
2048 ol.docify(nm);
2049 }
2050 ol.docify(">");
2051 ol.endTypewriter();
2052 ol.endParagraph();
2053 }
2054
2055 // Write a summary of the Slice definition including metadata.
2056 ol.startParagraph();
2057 ol.startTypewriter();
2058 if (!m_metaData.isEmpty())
2059 {
2060 ol.docify(m_metaData);
2061 ol.lineBreak();
2062 }
2063 if (m_spec.isLocal())
2064 {
2065 ol.docify("local ");
2066 }
2067 if (m_spec.isInterface())
2068 {
2069 ol.docify("interface ");
2070 }
2071 else if (m_spec.isStruct())
2072 {
2073 ol.docify("struct ");
2074 }
2075 else if (m_spec.isException())
2076 {
2077 ol.docify("exception ");
2078 }
2079 else
2080 {
2081 ol.docify("class ");
2082 }
2083 ol.docify(stripScope(name()));
2084 if (!m_inherits.empty())
2085 {
2086 if (m_spec.isInterface() || m_spec.isException())
2087 {
2088 ol.docify(" extends ");
2089 bool first=true;
2090 for (const auto &ibcd : m_inherits)
2091 {
2092 if (!first) ol.docify(", ");
2093 ClassDef *icd = ibcd.classDef;
2094 ol.docify(icd->name());
2095 first=false;
2096 }
2097 }
2098 else
2099 {
2100 // Must be a class.
2101 bool implements = false;
2102 for (const auto &ibcd : m_inherits)
2103 {
2104 ClassDef *icd = ibcd.classDef;
2105 if (icd->isInterface())
2106 {
2107 implements = true;
2108 }
2109 else
2110 {
2111 ol.docify(" extends ");
2112 ol.docify(icd->name());
2113 }
2114 }
2115 if (implements)
2116 {
2117 ol.docify(" implements ");
2118 bool first = true;
2119 for (const auto &ibcd : m_inherits)
2120 {
2121 ClassDef *icd = ibcd.classDef;
2122 if (icd->isInterface())
2123 {
2124 if (!first) ol.docify(", ");
2125 first = false;
2126 ol.docify(icd->name());
2127 }
2128 }
2129 }
2130 }
2131 }
2132 ol.docify(" { ... }");
2133 ol.endTypewriter();
2134 ol.endParagraph();
2135}
constexpr auto prefix
Definition anchor.cpp:44
virtual bool isInterface() const =0
Returns TRUE if this class represents an interface.
void lineBreak(const QCString &style=QCString())
Definition outputlist.h:559
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:172
virtual QCString trDefinedIn()=0
#define Config_getList(name)
Definition config.h:38
int qstricmp(const char *s1, const char *s2)
Definition qcstring.cpp:530
QCString stripScope(const QCString &name)
Definition util.cpp:3760

References FileInfo::absFilePath(), Config_getList, QCString::data(), OutputList::docify(), OutputList::endParagraph(), OutputList::endTypewriter(), FileInfo::exists(), QCString::isEmpty(), ClassDef::isInterface(), QCString::left(), QCString::length(), OutputList::lineBreak(), m_incInfo, m_inherits, m_metaData, m_spec, Definition::name(), DefinitionMixin< ClassDefMutable >::name(), prefix, qstricmp(), QCString::right(), OutputList::startParagraph(), OutputList::startTypewriter(), stripScope(), theTranslator, and OutputList::writeObjectLink().

Referenced by writeDocumentationContents().

◆ writeInheritanceGraph()

void ClassDefImpl::writeInheritanceGraph ( OutputList & ol) const
private

Definition at line 1838 of file classdef.cpp.

1839{
1840 bool haveDot = Config_getBool(HAVE_DOT);
1841 auto classGraph = m_typeInheritanceGraph;
1842
1843 if (classGraph == CLASS_GRAPH_t::NO) return;
1844 // count direct inheritance relations
1845 int count=countInheritanceNodes();
1846
1847 bool renderDiagram = FALSE;
1848 if (haveDot && (classGraph==CLASS_GRAPH_t::YES || classGraph==CLASS_GRAPH_t::GRAPH))
1849 // write class diagram using dot
1850 {
1851 DotClassGraph inheritanceGraph(this,GraphType::Inheritance);
1852 if (inheritanceGraph.isTooBig())
1853 {
1854 warn_uncond("Inheritance graph for '{}' not generated, too many nodes ({}), threshold is {}. Consider increasing DOT_GRAPH_MAX_NODES.\n",
1855 name(), inheritanceGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
1856 }
1857 else if (!inheritanceGraph.isTrivial())
1858 {
1859 ol.pushGeneratorState();
1861 ol.startDotGraph();
1863 ol.endDotGraph(inheritanceGraph);
1864 ol.popGeneratorState();
1865 renderDiagram = TRUE;
1866 }
1867 }
1868 else if ((classGraph==CLASS_GRAPH_t::YES || classGraph==CLASS_GRAPH_t::GRAPH || classGraph==CLASS_GRAPH_t::BUILTIN) && count>0)
1869 // write class diagram using built-in generator
1870 {
1871 ClassDiagram diagram(this); // create a diagram of this class.
1872 ol.startClassDiagram();
1877 renderDiagram = TRUE;
1878 }
1879
1880 if (renderDiagram) // if we already show the inheritance relations graphically,
1881 // then hide the text version
1882 {
1884 }
1885
1886 count = countInheritsNodes();
1887 if (count>0)
1888 {
1889 auto replaceFunc = [this,&ol](size_t entryIndex)
1890 {
1891 for (size_t index=0; index<m_inherits.size() ; index++)
1892 {
1893 const BaseClassDef &bcd=m_inherits[index];
1894 const ClassDef *cd=bcd.classDef;
1895
1896 if (cd->isVisibleInHierarchy()) // filter on the class we want to show
1897 {
1898 if (index==entryIndex) // found the requested index
1899 {
1900 // use the class name but with the template arguments as given
1901 // in the inheritance relation
1903 cd->displayName(),bcd.templSpecifiers);
1904
1905 if (cd->isLinkable())
1906 {
1908 cd->getOutputFileBase(),
1909 cd->anchor(),
1910 displayName);
1911 }
1912 else
1913 {
1914 ol.docify(displayName);
1915 }
1916 return;
1917 }
1918 }
1919 }
1920 };
1921
1922 ol.startParagraph();
1923 writeMarkerList(ol,
1925 static_cast<size_t>(count),
1926 replaceFunc);
1927 ol.endParagraph();
1928 }
1929
1930 // write subclasses
1931 count = countInheritedByNodes();
1932 if (count>0)
1933 {
1934 auto replaceFunc = [this,&ol](size_t entryIndex)
1935 {
1936 for (size_t index=0; index<m_inheritedBy.size() ; index++)
1937 {
1938 const BaseClassDef &bcd=m_inheritedBy[index];
1939 const ClassDef *cd=bcd.classDef;
1940 if (cd->isVisibleInHierarchy()) // filter on the class we want to show
1941 {
1942 if (index==entryIndex) // found the requested index
1943 {
1944 if (cd->isLinkable())
1945 {
1948 }
1949 else
1950 {
1951 ol.docify(cd->displayName());
1952 }
1953 return;
1954 }
1955 }
1956 }
1957 };
1958
1959 ol.startParagraph();
1960 writeMarkerList(ol,
1962 static_cast<size_t>(count),
1963 replaceFunc);
1964 ol.endParagraph();
1965 }
1966
1967 if (renderDiagram)
1968 {
1969 ol.enableAll();
1970 }
1971}
int countInheritanceNodes() const
virtual QCString getReference() const =0
virtual QCString displayName(bool includeScope=TRUE) const =0
void startClassDiagram()
Definition outputlist.h:594
void endClassDiagram(const ClassDiagram &d, const QCString &f, const QCString &n)
Definition outputlist.h:596
void enableAll()
const std::string & str() const
Definition qcstring.h:552
virtual QCString trInheritsList(int numEntries)=0
virtual QCString trInheritedByList(int numEntries)=0
virtual QCString trClassDiagram(const QCString &clName)=0
static void writeInheritanceSpecifier(OutputList &ol, const BaseClassDef &bcd)
@ Inheritance
Definition dotgraph.h:31
ClassDef * classDef
Class definition that this relation inherits from.
Definition classdef.h:60
QCString templSpecifiers
Template arguments used for the base class.
Definition classdef.h:78
QCString insertTemplateSpecifierInScope(const QCString &scope, const QCString &templ)
Definition util.cpp:3727
void writeMarkerList(OutputList &ol, const std::string &markerText, size_t numMarkers, std::function< void(size_t)> replaceFunc)
Definition util.cpp:1106

References Definition::anchor(), BaseClassDef::classDef, Config_getBool, Config_getInt, countInheritanceNodes(), countInheritedByNodes(), countInheritsNodes(), OutputList::disable(), OutputList::disableAllBut(), displayName(), Definition::displayName(), OutputList::docify(), OutputList::enable(), OutputList::enableAll(), OutputList::endClassDiagram(), OutputList::endDotGraph(), OutputList::endParagraph(), FALSE, getOutputFileBase(), Definition::getOutputFileBase(), Definition::getReference(), Inheritance, insertTemplateSpecifierInScope(), Definition::isLinkable(), DotClassGraph::isTooBig(), DotClassGraph::isTrivial(), ClassDef::isVisibleInHierarchy(), m_inheritedBy, m_inherits, m_typeInheritanceGraph, Man, DefinitionMixin< ClassDefMutable >::name(), DotClassGraph::numNodes(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startClassDiagram(), OutputList::startDotGraph(), OutputList::startParagraph(), BaseClassDef::templSpecifiers, theTranslator, TRUE, warn_uncond, writeInheritanceSpecifier(), writeMarkerList(), and OutputList::writeObjectLink().

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeInheritedMemberDeclarations()

void ClassDefImpl::writeInheritedMemberDeclarations ( OutputList & ol,
ClassDefSet & visitedClasses,
MemberListType lt,
MemberListType lt2,
const QCString & title,
const ClassDef * inheritedFrom,
bool invert,
bool showAlways ) const
private

Definition at line 4854 of file classdef.cpp.

4857{
4858 int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
4859 bool process = count>0;
4860 //printf("%s: writeInheritedMemberDec: lt=%s process=%d invert=%d always=%d\n",
4861 // qPrint(name()),qPrint(lt.to_string()),process,invert,showAlways);
4862 if ((process^invert) || showAlways)
4863 {
4864 for (const auto &ibcd : m_inherits)
4865 {
4866 ClassDefMutable *icd=toClassDefMutable(ibcd.classDef);
4867 if (icd && icd->isLinkable())
4868 {
4869 MemberListType lt1 = MemberListType::Invalid();
4870 MemberListType lt3 = MemberListType::Invalid();
4871 convertProtectionLevel(lt,ibcd.prot,&lt1,&lt3);
4872 if (lt2.isInvalid() && !lt3.isInvalid())
4873 {
4874 lt2=lt3;
4875 }
4876 //printf("%s:convert %s->(%s,%s) prot=%d\n",qPrint(icd->name()),qPrint(lt.to_string()),
4877 // qPrint(lt1.to_string()),qPrint(lt2.to_string()),ibcd.prot);
4878 if (visitedClasses.find(icd)==visitedClasses.end())
4879 {
4880 visitedClasses.insert(icd); // guard for multiple virtual inheritance
4881 if (!lt1.isInvalid())
4882 {
4883 //printf("--> writeMemberDeclarations for type %s\n",qPrint(lt1.to_string()));
4884 icd->writeMemberDeclarations(ol,visitedClasses,lt1,
4885 title,QCString(),FALSE,inheritedFrom,lt2,FALSE,TRUE);
4886 }
4887 }
4888 else
4889 {
4890 //printf("%s: class already visited!\n",qPrint(icd->name()));
4891 }
4892 }
4893 }
4894 }
4895}
virtual void writeMemberDeclarations(OutputList &ol, ClassDefSet &visitedClasses, MemberListType lt, const QCString &title, const QCString &subTitle=QCString(), bool showInline=FALSE, const ClassDef *inheritedFrom=nullptr, MemberListType lt2=MemberListType::Invalid(), bool invert=FALSE, bool showAlways=FALSE) const =0

References convertProtectionLevel(), countMembersIncludingGrouped(), FALSE, MemberListType::Invalid(), MemberListType::isInvalid(), Definition::isLinkable(), m_inherits, title(), toClassDefMutable(), TRUE, and ClassDef::writeMemberDeclarations().

Referenced by writeAdditionalInheritedMembers(), and writeMemberDeclarations().

◆ writeInlineClasses()

void ClassDefImpl::writeInlineClasses ( OutputList & ol) const
private

Definition at line 2197 of file classdef.cpp.

2198{
2199 m_innerClasses.writeDocumentation(ol,this);
2200}

References m_innerClasses.

Referenced by writeDocumentationContents().

◆ writeInlineDocumentation()

void ClassDefImpl::writeInlineDocumentation ( OutputList & ol) const
overridevirtual

Write class documentation inside another container (i.e.

a group)

Implements ClassDef.

Definition at line 2434 of file classdef.cpp.

2435{
2436 bool isSimple = m_isSimple;
2437
2438 ol.addIndexItem(name(),QCString());
2439 //printf("ClassDefImpl::writeInlineDocumentation(%s)\n",qPrint(name()));
2440
2441 // part 1: anchor and title
2442 QCString s = compoundTypeString()+" "+name();
2443
2444 // part 1a
2445 ol.pushGeneratorState();
2447 { // only HTML only
2448 ol.writeAnchor(QCString(),anchor());
2449 ol.startMemberDoc(QCString(),QCString(),anchor(),name(),1,1,FALSE);
2451 ol.parseText(s);
2452 ol.endMemberDocName();
2453 ol.endMemberDoc(FALSE);
2454 ol.writeString("</div>");
2455 ol.startIndent();
2456 }
2457 ol.popGeneratorState();
2458
2459 // part 1b
2460 ol.pushGeneratorState();
2463 { // for LaTeX/RTF only
2465 }
2466 ol.popGeneratorState();
2467
2468 // part 1c
2469 ol.pushGeneratorState();
2471 {
2472 // for LaTeX/RTF/Man
2473 ol.startGroupHeader("",1);
2474 ol.parseText(s);
2475 ol.endGroupHeader(1);
2476 }
2477 ol.popGeneratorState();
2478
2479 SrcLangExt lang=getLanguage();
2480
2481 // part 2: the header and detailed description
2482 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
2483 {
2484 switch (lde->kind())
2485 {
2486 case LayoutDocEntry::BriefDesc:
2487 {
2488 // since we already shown the brief description in the
2489 // declaration part of the container, so we use this to
2490 // show the details on top.
2492 }
2493 break;
2494 case LayoutDocEntry::ClassInheritanceGraph:
2496 break;
2497 case LayoutDocEntry::ClassCollaborationGraph:
2499 break;
2500 case LayoutDocEntry::MemberDeclStart:
2502 break;
2503 case LayoutDocEntry::MemberDecl:
2504 {
2505 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
2506 if (lmd)
2507 {
2508 ClassDefSet visitedClasses;
2509 if (!isSimple) writeMemberDeclarations(ol,visitedClasses,lmd->type,lmd->title(lang),lmd->subtitle(lang),TRUE);
2510 }
2511 }
2512 break;
2513 case LayoutDocEntry::MemberGroups:
2515 break;
2516 case LayoutDocEntry::MemberDeclEnd:
2518 break;
2519 case LayoutDocEntry::MemberDefStart:
2521 break;
2522 case LayoutDocEntry::MemberDef:
2523 {
2524 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
2525 if (lmd)
2526 {
2527 if (isSimple)
2528 {
2530 }
2531 else
2532 {
2533 writeMemberDocumentation(ol,lmd->type,lmd->title(lang),TRUE);
2534 }
2535 }
2536 }
2537 break;
2538 case LayoutDocEntry::MemberDefEnd:
2540 break;
2541 default:
2542 break;
2543 }
2544 }
2545
2546 // part 3: close the block
2547 ol.pushGeneratorState();
2549 { // HTML only
2550 ol.endIndent();
2551 }
2552 ol.popGeneratorState();
2553}
void writeSimpleMemberDocumentation(OutputList &ol, MemberListType lt) const
void endIndent()
Definition outputlist.h:584
void startMemberDoc(const QCString &clName, const QCString &memName, const QCString &anchor, const QCString &title, int memCount, int memTotal, bool showInline)
Definition outputlist.h:531
void startMemberDocName(bool align)
Definition outputlist.h:680
void endMemberDocName()
Definition outputlist.h:682
void endMemberDoc(bool hasArgs)
Definition outputlist.h:535
void startIndent()
Definition outputlist.h:582
void addIndexItem(const QCString &s1, const QCString &s2)
Definition outputlist.h:590

References OutputList::addIndexItem(), anchor(), compoundTypeString(), OutputList::disable(), OutputList::disableAllBut(), OutputList::endGroupHeader(), OutputList::endIndent(), endMemberDeclarations(), OutputList::endMemberDoc(), OutputList::endMemberDocName(), endMemberDocumentation(), FALSE, DefinitionMixin< ClassDefMutable >::getLanguage(), getOutputFileBase(), Html, LayoutDocManager::instance(), isSimple(), m_isSimple, Man, DefinitionMixin< ClassDefMutable >::name(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startGroupHeader(), OutputList::startIndent(), startMemberDeclarations(), OutputList::startMemberDoc(), OutputList::startMemberDocName(), startMemberDocumentation(), LayoutDocEntryMemberDecl::subtitle(), LayoutDocEntryMemberDecl::title(), LayoutDocEntryMemberDef::title(), TRUE, LayoutDocEntryMemberDecl::type, LayoutDocEntryMemberDef::type, OutputList::writeAnchor(), writeCollaborationGraph(), writeDetailedDocumentationBody(), writeInheritanceGraph(), writeMemberDeclarations(), writeMemberDocumentation(), writeMemberGroups(), writeSimpleMemberDocumentation(), and OutputList::writeString().

◆ writeMemberDeclarations()

void ClassDefImpl::writeMemberDeclarations ( OutputList & ol,
ClassDefSet & visitedClasses,
MemberListType lt,
const QCString & title,
const QCString & subTitle = QCString(),
bool showInline = FALSE,
const ClassDef * inheritedFrom = nullptr,
MemberListType lt2 = MemberListType::Invalid(),
bool invert = FALSE,
bool showAlways = FALSE ) const
overridevirtual

Implements ClassDef.

Definition at line 4897 of file classdef.cpp.

4901{
4902 //printf("%s: ClassDefImpl::writeMemberDeclarations lt=%s lt2=%s\n",qPrint(name()),qPrint(lt.to_string()),qPrint(lt2.to_string()));
4903 MemberList * ml = getMemberList(lt);
4904 MemberList * ml2 = getMemberList(lt2);
4905 if (getLanguage()==SrcLangExt::VHDL) // use specific declarations function
4906 {
4907 static const ClassDef *cdef;
4908 if (cdef!=this)
4909 { // only one inline link
4911 cdef=this;
4912 }
4913 if (ml)
4914 {
4915 VhdlDocGen::writeVhdlDeclarations(ml,ol,nullptr,this,nullptr,nullptr,nullptr);
4916 }
4917 }
4918 else
4919 {
4920 //printf("%s::writeMemberDeclarations(%s) ml=%p ml2=%p\n",qPrint(name()),qPrint(title),(void*)ml,(void*)ml2);
4921 QCString tt = title, st = subTitle;
4922 if (ml)
4923 {
4924 //printf(" writeDeclarations ml type=%s count=%d\n",qPrint(lt.to_string()),ml->numDecMembers(inheritedFrom));
4925 ml->writeDeclarations(ol,this,nullptr,nullptr,nullptr,nullptr,tt,st,FALSE,showInline,inheritedFrom,lt,true);
4926 tt.clear();
4927 st.clear();
4928 }
4929 if (ml2)
4930 {
4931 //printf(" writeDeclarations ml2 type=%s count=%d\n",qPrint(lt2.to_string()),ml2->numDecMembers(inheritedFrom));
4932 ml2->writeDeclarations(ol,this,nullptr,nullptr,nullptr,nullptr,tt,st,FALSE,showInline,inheritedFrom,lt,ml==nullptr);
4933 }
4934 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
4935 if (!inlineInheritedMembers) // show inherited members as separate lists
4936 {
4937 writeInheritedMemberDeclarations(ol,visitedClasses,lt,lt2,title,
4938 inheritedFrom ? inheritedFrom : this,
4939 invert,showAlways);
4940 }
4941 }
4942}
void writeDeclarations(OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, const QCString &title, const QCString &subtitle, bool showEnumValues=FALSE, bool showInline=FALSE, const ClassDef *inheritedFrom=nullptr, MemberListType lt=MemberListType::PubMethods(), bool showSectionTitle=true) const
Writes the list of members to the output.
void clear()
Definition qcstring.h:182
static void writeInlineClassLink(const ClassDef *, OutputList &ol)
static void writeVhdlDeclarations(const MemberList *, OutputList &, const GroupDef *, const ClassDef *, const FileDef *, const NamespaceDef *, const ModuleDef *)

References QCString::clear(), Config_getBool, FALSE, DefinitionMixin< ClassDefMutable >::getLanguage(), getMemberList(), title(), MemberList::writeDeclarations(), writeInheritedMemberDeclarations(), VhdlDocGen::writeInlineClassLink(), and VhdlDocGen::writeVhdlDeclarations().

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeMemberDocumentation()

void ClassDefImpl::writeMemberDocumentation ( OutputList & ol,
MemberListType lt,
const QCString & title,
bool showInline = FALSE ) const
private

Definition at line 4957 of file classdef.cpp.

4958{
4959 //printf("%s: ClassDefImpl::writeMemberDocumentation()\n",qPrint(name()));
4960 MemberList * ml = getMemberList(lt);
4961 if (ml) ml->writeDocumentation(ol,displayName(),this,title,ml->listType().toLabel(),FALSE,showInline);
4962}
MemberListType listType() const
Definition memberlist.h:130
void writeDocumentation(OutputList &ol, const QCString &scopeName, const Definition *container, const QCString &title, const QCString &anchor, bool showEnumValues=FALSE, bool showInline=FALSE) const
constexpr const char * toLabel() const noexcept
Definition types.h:402

References displayName(), FALSE, getMemberList(), MemberList::listType(), title(), MemberListType::toLabel(), and MemberList::writeDocumentation().

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeMemberGroups()

void ClassDefImpl::writeMemberGroups ( OutputList & ol,
bool showInline = FALSE ) const
private

Definition at line 2174 of file classdef.cpp.

2175{
2176 // write user defined member groups
2177 for (const auto &mg : m_memberGroups)
2178 {
2179 if (!mg->allMembersInSameSection() || !m_subGrouping) // group is in its own section
2180 {
2181 mg->writeDeclarations(ol,this,nullptr,nullptr,nullptr,nullptr,showInline);
2182 }
2183 else // add this group to the corresponding member section
2184 {
2185 //printf("addToDeclarationSection(%s)\n",qPrint(mg->header()));
2186 //mg->addToDeclarationSection();
2187 }
2188 }
2189}

References m_memberGroups, and m_subGrouping.

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeMemberList()

void ClassDefImpl::writeMemberList ( OutputList & ol) const
overridevirtual

Implements ClassDef.

Definition at line 3126 of file classdef.cpp.

3127{
3128 bool cOpt = Config_getBool(OPTIMIZE_OUTPUT_FOR_C);
3129 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3130 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3131 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3132 if (m_allMemberNameInfoLinkedMap.empty() || cOpt) return;
3133 // only for HTML
3134 ol.pushGeneratorState();
3136
3138 if (sliceOpt)
3139 {
3140 if (compoundType()==Interface)
3141 {
3143 }
3144 else if (compoundType()==Struct)
3145 {
3147 }
3148 else if (compoundType()==Exception)
3149 {
3151 }
3152 else
3153 {
3155 }
3156 }
3157 else
3158 {
3160 }
3161
3162 QCString memListFile = getMemberListFileName();
3163 startFile(ol,memListFile,false,memListFile,theTranslator->trMemberList(),hli,!generateTreeView,getOutputFileBase());
3164 if (!generateTreeView)
3165 {
3167 {
3169 }
3170 ol.endQuickIndices();
3171 }
3172 startTitle(ol,QCString());
3174 endTitle(ol,QCString(),QCString());
3175 ol.startContents();
3176 ol.startParagraph();
3178 ol.docify(" ");
3181 ol.endParagraph();
3182
3183 //ol.startItemList();
3184
3185 bool first = true; // to prevent empty table
3186 int idx=0;
3187 for (auto &mni : m_allMemberNameInfoLinkedMap)
3188 {
3189 for (auto &mi : *mni)
3190 {
3191 const MemberDef *md=mi->memberDef();
3192 const ClassDef *cd=md->getClassDef();
3193 Protection prot = mi->prot();
3194 Specifier virt=md->virtualness();
3195
3196 //printf("%s: Member %s of class %s md->protection()=%d mi->prot=%d prot=%d inherited=%d\n",
3197 // qPrint(name()),qPrint(md->name()),qPrint(cd->name()),md->protection(),mi->prot,prot,mi->inherited);
3198
3199 if (cd && !md->name().isEmpty() && !md->isAnonymous())
3200 {
3201 bool memberWritten=FALSE;
3202 if (cd->isLinkable() && md->isLinkable())
3203 // create a link to the documentation
3204 {
3205 QCString name=mi->ambiguityResolutionScope()+md->name();
3206 //ol.writeListItem();
3207 if (first)
3208 {
3209 ol.writeString("<table class=\"directory\">\n");
3210 first = false;
3211 }
3212 ol.writeString(" <tr");
3213 if ((idx&1)==0) ol.writeString(" class=\"even\""); else ol.writeString(" class=\"odd\"");
3214 idx++;
3215 ol.writeString("><td class=\"entry\">");
3216 if (cd->isObjectiveC())
3217 {
3218 if (md->isObjCMethod())
3219 {
3220 if (md->isStatic())
3221 ol.writeString("+&#160;</td><td>");
3222 else
3223 ol.writeString("-&#160;</td><td>");
3224 }
3225 else
3226 ol.writeString("</td><td class=\"entry\">");
3227 }
3228 if (md->isObjCMethod())
3229 {
3231 md->getOutputFileBase(),
3232 md->anchor(),md->name());
3233 }
3234 else
3235 {
3236 //Definition *bd = md->getGroupDef();
3237 //if (bd==nullptr) bd=cd;
3239 md->getOutputFileBase(),
3240 md->anchor(),name);
3241
3242 if ( md->isFunction() || md->isSignal() || md->isSlot() ||
3243 (md->isFriend() && !md->argsString().isEmpty()))
3244 ol.docify(md->argsString());
3245 else if (md->isEnumerate())
3247 else if (md->isEnumValue())
3249 else if (md->isTypedef())
3250 ol.docify(" typedef");
3251 else if (md->isFriend() && md->typeString()=="friend class")
3252 ol.docify(" class");
3253 //ol.writeString("\n");
3254 }
3255 ol.writeString("</td>");
3256 memberWritten=TRUE;
3257 }
3258 else if (!cd->isArtificial() &&
3259 !Config_getBool(HIDE_UNDOC_MEMBERS) &&
3261 ) // no documentation,
3262 // generate link to the class instead.
3263 {
3264 //ol.writeListItem();
3265 if (first)
3266 {
3267 ol.writeString("<table class=\"directory\">\n");
3268 first = false;
3269 }
3270 ol.writeString(" <tr bgcolor=\"#f0f0f0\"");
3271 if ((idx&1)==0) ol.writeString(" class=\"even\""); else ol.writeString(" class=\"odd\"");
3272 idx++;
3273 ol.writeString("><td class=\"entry\">");
3274 if (cd->isObjectiveC())
3275 {
3276 if (md->isObjCMethod())
3277 {
3278 if (md->isStatic())
3279 ol.writeString("+&#160;</td><td class=\"entry\">");
3280 else
3281 ol.writeString("-&#160;</td><td class=\"entry\">");
3282 }
3283 else
3284 ol.writeString("</td><td class=\"entry\">");
3285 }
3286 ol.startBold();
3287 ol.docify(md->name());
3288 ol.endBold();
3289 if (!md->isObjCMethod())
3290 {
3291 if ( md->isFunction() || md->isSignal() || md->isSlot() )
3292 ol.docify(md->argsString());
3293 else if (md->isEnumerate())
3295 else if (md->isEnumValue())
3297 else if (md->isTypedef())
3298 ol.docify(" typedef");
3299 }
3300 ol.writeString(" (");
3302 if (cd->isLinkable())
3303 {
3304 ol.writeObjectLink(
3305 cd->getReference(),
3306 cd->getOutputFileBase(),
3307 cd->anchor(),
3308 cd->displayName());
3309 }
3310 else
3311 {
3312 ol.startBold();
3313 ol.docify(cd->displayName());
3314 ol.endBold();
3315 }
3316 ol.writeString(")");
3317 ol.writeString("</td>");
3318 memberWritten=TRUE;
3319 }
3320 if (memberWritten)
3321 {
3322 ol.writeString("<td class=\"entry\">");
3324 cd->getOutputFileBase(),
3325 cd->anchor(),
3326 md->category() ?
3327 md->category()->displayName() :
3328 cd->displayName());
3329 ol.writeString("</td>");
3330 ol.writeString("<td class=\"entry\">");
3331 }
3332 SrcLangExt lang = md->getLanguage();
3333 if (
3334 (prot!=Protection::Public || (virt!=Specifier::Normal && getLanguage()!=SrcLangExt::ObjC) ||
3335 md->isFriend() || md->isRelated() || md->isExplicit() ||
3336 md->isMutable() || (md->isInline() && Config_getBool(INLINE_INFO)) ||
3337 md->isSignal() || md->isSlot() || md->isThreadLocal() ||
3338 (getLanguage()==SrcLangExt::IDL &&
3339 (md->isOptional() || md->isAttribute() || md->isUNOProperty())) ||
3340 md->isStatic() || lang==SrcLangExt::VHDL
3341 )
3342 && memberWritten)
3343 {
3344 StringVector sl;
3345 if (lang==SrcLangExt::VHDL)
3346 {
3347 sl.push_back(theTranslator->trVhdlType(md->getVhdlSpecifiers(),TRUE).str()); //append vhdl type
3348 }
3349 else if (md->isFriend()) sl.emplace_back("friend");
3350 else if (md->isRelated()) sl.emplace_back("related");
3351 else
3352 {
3353 if (Config_getBool(INLINE_INFO) && md->isInline())
3354 sl.emplace_back("inline");
3355 if (md->isExplicit()) sl.emplace_back("explicit");
3356 if (md->isMutable()) sl.emplace_back("mutable");
3357 if (md->isThreadLocal()) sl.emplace_back("thread_local");
3358 if (prot==Protection::Protected) sl.emplace_back("protected");
3359 else if (prot==Protection::Private) sl.emplace_back("private");
3360 else if (prot==Protection::Package) sl.emplace_back("package");
3361 if (virt==Specifier::Virtual && getLanguage()!=SrcLangExt::ObjC)
3362 sl.emplace_back("virtual");
3363 else if (virt==Specifier::Pure) sl.emplace_back("pure virtual");
3364 if (md->isStatic()) sl.emplace_back("static");
3365 if (md->isSignal()) sl.emplace_back("signal");
3366 if (md->isSlot()) sl.emplace_back("slot");
3367// this is the extra member page
3368 if (md->isOptional()) sl.emplace_back("optional");
3369 if (md->isAttribute()) sl.emplace_back("attribute");
3370 if (md->isUNOProperty()) sl.emplace_back("property");
3371 if (md->isReadonly()) sl.emplace_back("readonly");
3372 if (md->isBound()) sl.emplace_back("bound");
3373 if (md->isRemovable()) sl.emplace_back("removable");
3374 if (md->isConstrained()) sl.emplace_back("constrained");
3375 if (md->isTransient()) sl.emplace_back("transient");
3376 if (md->isMaybeVoid()) sl.emplace_back("maybevoid");
3377 if (md->isMaybeDefault()) sl.emplace_back("maybedefault");
3378 if (md->isMaybeAmbiguous()) sl.emplace_back("maybeambiguous");
3379 }
3380 bool firstSpan=true;
3381 for (const auto &s : sl)
3382 {
3383 if (!firstSpan)
3384 {
3385 ol.writeString("</span><span class=\"mlabel\">");
3386 }
3387 else
3388 {
3389 ol.writeString("<span class=\"mlabel\">");
3390 firstSpan=false;
3391 }
3392 ol.docify(s);
3393 }
3394 if (!firstSpan) ol.writeString("</span>");
3395 }
3396 if (memberWritten)
3397 {
3398 ol.writeString("</td>");
3399 ol.writeString("</tr>\n");
3400 }
3401 }
3402 }
3403 }
3404 //ol.endItemList();
3405
3406 if (!first) ol.writeString("</table>");
3407
3408 endFile(ol);
3409 ol.popGeneratorState();
3410}
virtual bool isObjectiveC() const =0
Returns TRUE if this class is implemented in Objective-C.
virtual bool isAnonymous() const =0
virtual bool isArtificial() const =0
virtual bool isSignal() const =0
virtual bool isExplicit() const =0
virtual bool isObjCMethod() const =0
virtual bool isMaybeVoid() const =0
virtual ClassDef * category() const =0
virtual bool isSlot() const =0
virtual bool isInline() const =0
virtual bool isMaybeAmbiguous() const =0
virtual bool isAttribute() const =0
virtual bool isMaybeDefault() const =0
virtual bool isRemovable() const =0
virtual bool isConstrained() const =0
virtual bool isReadonly() const =0
virtual bool isBound() const =0
virtual bool isThreadLocal() const =0
virtual bool isTransient() const =0
virtual bool isOptional() const =0
virtual bool isUNOProperty() const =0
virtual bool isMutable() const =0
virtual QCString trMemberList()=0
virtual QCString trIncludingInheritedMembers()=0
virtual QCString trThisIsTheListOfAllMembers()=0
virtual QCString trEnumName()=0
virtual QCString trEnumValue()=0
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
Definition index.cpp:427

References anchor(), Definition::anchor(), MemberDef::argsString(), MemberDef::category(), ClassVisible, compoundType(), Config_getBool, OutputList::disableAllBut(), displayName(), Definition::displayName(), OutputList::docify(), OutputList::endBold(), endFile(), OutputList::endParagraph(), OutputList::endQuickIndices(), endTitle(), ClassDef::Exception, ExceptionVisible, FALSE, MemberDef::getClassDef(), Definition::getLanguage(), DefinitionMixin< ClassDefMutable >::getLanguage(), getMemberListFileName(), DefinitionMixin< ClassDefMutable >::getOuterScope(), getOutputFileBase(), Definition::getOutputFileBase(), getReference(), Definition::getReference(), MemberDef::getVhdlSpecifiers(), Doxygen::globalScope, Html, ClassDef::Interface, InterfaceVisible, Definition::isAnonymous(), Definition::isArtificial(), MemberDef::isAttribute(), MemberDef::isBound(), MemberDef::isConstrained(), QCString::isEmpty(), MemberDef::isEnumerate(), MemberDef::isEnumValue(), MemberDef::isExplicit(), MemberDef::isFriend(), MemberDef::isFunction(), MemberDef::isInline(), Definition::isLinkable(), MemberDef::isMaybeAmbiguous(), MemberDef::isMaybeDefault(), MemberDef::isMaybeVoid(), MemberDef::isMutable(), MemberDef::isObjCMethod(), ClassDef::isObjectiveC(), MemberDef::isOptional(), MemberDef::isReadonly(), MemberDef::isRelated(), MemberDef::isRemovable(), MemberDef::isSignal(), MemberDef::isSlot(), MemberDef::isStatic(), MemberDef::isThreadLocal(), MemberDef::isTransient(), MemberDef::isTypedef(), MemberDef::isUNOProperty(), m_allMemberNameInfoLinkedMap, Definition::name(), DefinitionMixin< ClassDefMutable >::name(), None, OutputList::parseText(), OutputList::popGeneratorState(), MemberDef::protection(), protectionLevelVisible(), OutputList::pushGeneratorState(), OutputList::startBold(), OutputList::startContents(), startFile(), OutputList::startParagraph(), startTitle(), ClassDef::Struct, StructVisible, theTranslator, TRUE, MemberDef::typeString(), MemberDef::virtualness(), DefinitionMixin< ClassDefMutable >::writeNavigationPath(), OutputList::writeObjectLink(), and OutputList::writeString().

◆ writeMemberPages()

void ClassDefImpl::writeMemberPages ( OutputList & ol) const
overridevirtual

Implements ClassDef.

Definition at line 3040 of file classdef.cpp.

3041{
3042 ///////////////////////////////////////////////////////////////////////////
3043 //// Member definitions on separate pages
3044 ///////////////////////////////////////////////////////////////////////////
3045
3046 ol.pushGeneratorState();
3048
3049 for (const auto &ml : m_memberLists)
3050 {
3051 if (ml->numDocMembers()>ml->numDocEnumValues() && ml->listType().isDetailed())
3052 {
3053 ml->writeDocumentationPage(ol,displayName(),this);
3054 }
3055 }
3056
3057 ol.popGeneratorState();
3058}

References OutputList::disableAllBut(), displayName(), Html, m_memberLists, OutputList::popGeneratorState(), and OutputList::pushGeneratorState().

Referenced by writeDocumentation().

◆ writeMoreLink()

void ClassDefImpl::writeMoreLink ( OutputList & ol,
const QCString & anchor ) const
private

Definition at line 2555 of file classdef.cpp.

2556{
2557 // TODO: clean up this mess by moving it to
2558 // the output generators...
2559 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
2560 bool rtfHyperlinks = Config_getBool(RTF_HYPERLINKS);
2561 bool usePDFLatex = Config_getBool(USE_PDFLATEX);
2562
2563 // HTML only
2564 ol.pushGeneratorState();
2566 ol.docify(" ");
2568 anchor.isEmpty() ? QCString("details") : anchor);
2570 ol.endTextLink();
2571 ol.popGeneratorState();
2572
2573 if (!anchor.isEmpty())
2574 {
2575 ol.pushGeneratorState();
2576 // LaTeX + RTF
2580 if (!(usePDFLatex && pdfHyperlinks))
2581 {
2583 }
2584 if (!rtfHyperlinks)
2585 {
2587 }
2588 ol.docify(" ");
2591 ol.endTextLink();
2592 // RTF only
2594 ol.writeString("\\par");
2595 ol.popGeneratorState();
2596 }
2597}
void endTextLink()
Definition outputlist.h:444
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:442
virtual QCString trMore()=0

References anchor(), Config_getBool, OutputList::disable(), OutputList::disableAllBut(), Docbook, OutputList::docify(), OutputList::endTextLink(), getOutputFileBase(), Html, Latex, Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, OutputList::startTextLink(), theTranslator, and OutputList::writeString().

Referenced by writeBriefDescription(), and writeDeclarationLink().

◆ writeNestedClasses()

void ClassDefImpl::writeNestedClasses ( OutputList & ol,
const QCString & title ) const
private

Definition at line 2191 of file classdef.cpp.

2192{
2193 // nested classes
2194 m_innerClasses.writeDeclaration(ol,nullptr,title,TRUE);
2195}

References m_innerClasses, title(), and TRUE.

Referenced by writeDocumentationContents().

◆ writePageNavigation()

void ClassDefImpl::writePageNavigation ( OutputList & ol) const
overridevirtual

Implements DefinitionMutable.

Definition at line 2324 of file classdef.cpp.

2325{
2326 ol.writePageOutline();
2327}
void writePageOutline()
Definition outputlist.h:616

References OutputList::writePageOutline().

◆ writePlainMemberDeclaration()

void ClassDefImpl::writePlainMemberDeclaration ( OutputList & ol,
MemberListType lt,
bool inGroup,
int indentLevel,
const ClassDef * inheritedFrom,
const QCString & inheritId ) const
private

Definition at line 4971 of file classdef.cpp.

4974{
4975 //printf("%s: ClassDefImpl::writePlainMemberDeclaration()\n",qPrint(name()));
4976 MemberList * ml = getMemberList(lt);
4977 if (ml)
4978 {
4979 ml->writePlainDeclarations(ol,inGroup,this,nullptr,nullptr,nullptr,nullptr,indentLevel,inheritedFrom,inheritId);
4980 }
4981}
void writePlainDeclarations(OutputList &ol, bool inGroup, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, int indentLevel, const ClassDef *inheritedFrom, const QCString &inheritId) const

References getMemberList(), and MemberList::writePlainDeclarations().

Referenced by writeDeclaration().

◆ writeQuickMemberLinks()

void ClassDefImpl::writeQuickMemberLinks ( OutputList & ol,
const MemberDef * md ) const
overridevirtual

Implements DefinitionMutable.

Definition at line 3060 of file classdef.cpp.

3061{
3062 bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
3063
3064 ol.writeString(" <div class=\"navtab\">\n");
3065 ol.writeString(" <table>\n");
3066
3067 for (auto &mni : m_allMemberNameInfoLinkedMap)
3068 {
3069 for (auto &mi : *mni)
3070 {
3071 const MemberDef *md=mi->memberDef();
3072 if (md->getClassDef()==this && md->isLinkable() && !md->isEnumValue())
3073 {
3074 if (md->isLinkableInProject())
3075 {
3076 if (md==currentMd) // selected item => highlight
3077 {
3078 ol.writeString(" <tr><td class=\"navtabHL\">");
3079 }
3080 else
3081 {
3082 ol.writeString(" <tr><td class=\"navtab\">");
3083 }
3084 ol.writeString("<span class=\"label\"><a ");
3085 ol.writeString("href=\"");
3086 if (createSubDirs) ol.writeString("../../");
3087 QCString url = md->getOutputFileBase();
3089 ol.writeString(url+"#"+md->anchor());
3090 ol.writeString("\">");
3091 ol.writeString(convertToHtml(md->name()));
3092 ol.writeString("</a></span>");
3093 ol.writeString("</td></tr>\n");
3094 }
3095 }
3096 }
3097 }
3098
3099 ol.writeString(" </table>\n");
3100 ol.writeString(" </div>\n");
3101}
QCString convertToHtml(const QCString &s, bool keepEntities)
Definition util.cpp:3944
void createSubDirs(const Dir &d)
Definition util.cpp:3621
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:4902

References addHtmlExtensionIfMissing(), Definition::anchor(), Config_getBool, convertToHtml(), createSubDirs(), MemberDef::getClassDef(), Definition::getOutputFileBase(), MemberDef::isEnumValue(), Definition::isLinkable(), Definition::isLinkableInProject(), m_allMemberNameInfoLinkedMap, Definition::name(), and OutputList::writeString().

◆ writeSimpleMemberDocumentation()

void ClassDefImpl::writeSimpleMemberDocumentation ( OutputList & ol,
MemberListType lt ) const
private

Definition at line 4964 of file classdef.cpp.

4965{
4966 //printf("%s: ClassDefImpl::writeSimpleMemberDocumentation()\n",qPrint(name()));
4967 MemberList * ml = getMemberList(lt);
4968 if (ml) ml->writeSimpleDocumentation(ol,this);
4969}
void writeSimpleDocumentation(OutputList &ol, const Definition *container) const

References getMemberList(), and MemberList::writeSimpleDocumentation().

Referenced by writeInlineDocumentation().

◆ writeSummaryLinks()

void ClassDefImpl::writeSummaryLinks ( OutputList & ol) const
overridevirtual

Implements DefinitionMutable.

Definition at line 2255 of file classdef.cpp.

2256{
2257 static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
2258 ol.pushGeneratorState();
2260 bool first=TRUE;
2261 SrcLangExt lang = getLanguage();
2262
2263 if (lang!=SrcLangExt::VHDL)
2264 {
2265 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
2266 {
2267 if (lde->kind()==LayoutDocEntry::ClassNestedClasses &&
2268 m_innerClasses.declVisible()
2269 )
2270 {
2271 for (const auto &innerCd : m_innerClasses)
2272 {
2273 if (!innerCd->isAnonymous() &&
2274 !innerCd->isExtension() &&
2275 (innerCd->protection()!=Protection::Private || extractPrivate) &&
2276 innerCd->visibleInParentsDeclList()
2277 )
2278 {
2279 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection *>(lde.get());
2280 ol.writeSummaryLink(QCString(),"nested-classes",ls->title(lang),first);
2281 first=FALSE;
2282 break;
2283 }
2284 }
2285 }
2286 else if (lde->kind()==LayoutDocEntry::ClassAllMembersLink &&
2288 !Config_getBool(OPTIMIZE_OUTPUT_FOR_C)
2289 )
2290 {
2292 first=FALSE;
2293 }
2294 else if (lde->kind()==LayoutDocEntry::MemberDecl)
2295 {
2296 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
2297 if (lmd)
2298 {
2299 MemberList * ml = getMemberList(lmd->type);
2300 if (ml && ml->declVisible())
2301 {
2302 ol.writeSummaryLink(QCString(),ml->listType().toLabel(),lmd->title(lang),first);
2303 first=FALSE;
2304 }
2305 }
2306 }
2307 }
2308 }
2309 else // VDHL only
2310 {
2311 for (const auto &s : m_vhdlSummaryTitles)
2312 {
2313 ol.writeSummaryLink(QCString(),convertToId(s),s,first);
2314 first=FALSE;
2315 }
2316 }
2317 if (!first)
2318 {
2319 ol.writeString(" </div>\n");
2320 }
2321 ol.popGeneratorState();
2322}
bool declVisible() const
void writeSummaryLink(const QCString &file, const QCString &anchor, const QCString &title, bool first)
Definition outputlist.h:614
virtual QCString trListOfAllMembers()=0
QCString convertToId(const QCString &s)
Definition util.cpp:3853

References Config_getBool, convertToId(), MemberList::declVisible(), OutputList::disableAllBut(), FALSE, DefinitionMixin< ClassDefMutable >::getLanguage(), getMemberList(), getMemberListFileName(), Html, LayoutDocManager::instance(), MemberList::listType(), m_allMemberNameInfoLinkedMap, m_innerClasses, m_vhdlSummaryTitles, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), theTranslator, LayoutDocEntryMemberDecl::title(), LayoutDocEntrySection::title(), MemberListType::toLabel(), TRUE, LayoutDocEntryMemberDecl::type, OutputList::writeString(), and OutputList::writeSummaryLink().

◆ writeTagFile()

void ClassDefImpl::writeTagFile ( TextStream & tagFile) const
overridevirtual

Implements ClassDef.

Definition at line 2329 of file classdef.cpp.

2330{
2331 if (!isLinkableInProject() || isArtificial()) return;
2332 tagFile << " <compound kind=\"";
2333 if (isFortran() && (compoundTypeString() == "type"))
2334 tagFile << "struct";
2335 else
2336 tagFile << compoundTypeString();
2337 tagFile << "\"";
2338 if (isObjectiveC()) { tagFile << " objc=\"yes\""; }
2339 tagFile << ">\n";
2340 tagFile << " <name>" << convertToXML(name()) << "</name>\n";
2341 QCString fn = getOutputFileBase();
2343 tagFile << " <filename>" << convertToXML(fn) << "</filename>\n";
2344 if (!anchor().isEmpty())
2345 {
2346 tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>\n";
2347 }
2348 QCString idStr = id();
2349 if (!idStr.isEmpty())
2350 {
2351 tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
2352 }
2353 for (const Argument &a : m_tempArgs)
2354 {
2355 tagFile << " <templarg>" << convertToXML(a.type);
2356 if (!a.name.isEmpty())
2357 {
2358 tagFile << " " << convertToXML(a.name);
2359 }
2360 tagFile << "</templarg>\n";
2361 }
2362 for (const auto &ibcd : m_inherits)
2363 {
2364 ClassDef *cd=ibcd.classDef;
2365 if (cd && cd->isLinkable())
2366 {
2367 tagFile << " <base";
2368 if (ibcd.prot==Protection::Protected)
2369 {
2370 tagFile << " protection=\"protected\"";
2371 }
2372 else if (ibcd.prot==Protection::Private)
2373 {
2374 tagFile << " protection=\"private\"";
2375 }
2376 if (ibcd.virt==Specifier::Virtual)
2377 {
2378 tagFile << " virtualness=\"virtual\"";
2379 }
2381 cd->displayName(),ibcd.templSpecifiers);
2382 tagFile << ">" << convertToXML(displayName) << "</base>\n";
2383 }
2384 }
2385 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
2386 {
2387 switch (lde->kind())
2388 {
2389 case LayoutDocEntry::ClassNestedClasses:
2390 {
2391 for (const auto &innerCd : m_innerClasses)
2392 {
2393 if (innerCd->isLinkableInProject() && !innerCd->isImplicitTemplateInstance() &&
2394 protectionLevelVisible(innerCd->protection()) &&
2395 !innerCd->isEmbeddedInOuterScope()
2396 )
2397 {
2398 tagFile << " <class kind=\"" << innerCd->compoundTypeString() <<
2399 "\">" << convertToXML(innerCd->name()) << "</class>\n";
2400 }
2401 }
2402 }
2403 break;
2404 case LayoutDocEntry::MemberDecl:
2405 {
2406 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
2407 if (lmd)
2408 {
2409 MemberList * ml = getMemberList(lmd->type);
2410 if (ml)
2411 {
2412 ml->writeTagFile(tagFile);
2413 }
2414 }
2415 }
2416 break;
2417 case LayoutDocEntry::MemberGroups:
2418 {
2419 for (const auto &mg : m_memberGroups)
2420 {
2421 mg->writeTagFile(tagFile);
2422 }
2423 }
2424 break;
2425 default:
2426 break;
2427 }
2428 }
2429 writeDocAnchorsToTagFile(tagFile);
2430 tagFile << " </compound>\n";
2431}
bool isObjectiveC() const override
Returns TRUE if this class is implemented in Objective-C.
bool isFortran() const override
Returns TRUE if this class is implemented in Fortran.
QCString id() const override
void writeDocAnchorsToTagFile(TextStream &fs) const override
void writeTagFile(TextStream &, bool useQualifiedName=false, bool showNamespaceMembers=true)
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:3893

References addHtmlExtensionIfMissing(), anchor(), compoundTypeString(), convertToXML(), displayName(), Definition::displayName(), getMemberList(), getOutputFileBase(), DefinitionMixin< ClassDefMutable >::id(), insertTemplateSpecifierInScope(), LayoutDocManager::instance(), DefinitionMixin< ClassDefMutable >::isArtificial(), QCString::isEmpty(), isFortran(), Definition::isLinkable(), isLinkableInProject(), isObjectiveC(), m_inherits, m_innerClasses, m_memberGroups, m_tempArgs, DefinitionMixin< ClassDefMutable >::name(), protectionLevelVisible(), LayoutDocEntryMemberDecl::type, DefinitionMixin< ClassDefMutable >::writeDocAnchorsToTagFile(), and MemberList::writeTagFile().

◆ writeTemplateSpec()

void ClassDefImpl::writeTemplateSpec ( OutputList & ol,
const Definition * d,
const QCString & type,
SrcLangExt lang ) const
private

Definition at line 1500 of file classdef.cpp.

1502{
1503 ArgumentLists specs;
1504 QCString name;
1505 searchTemplateSpecs(d,specs,name,lang);
1506 if (!specs.empty()) // class has template scope specifiers
1507 {
1509 for (const ArgumentList &al : specs)
1510 {
1511 ol.docify("template<");
1512 auto it = al.begin();
1513 while (it!=al.end())
1514 {
1515 Argument a = *it;
1516 linkifyText(TextGeneratorOLImpl(ol), // out
1517 d, // scope
1518 getFileDef(), // fileScope
1519 this, // self
1520 a.type, // text
1521 FALSE // autoBreak
1522 );
1523 if (!a.name.isEmpty())
1524 {
1525 ol.docify(" ");
1526 ol.docify(a.name);
1527 }
1528 if (a.defval.length()!=0)
1529 {
1530 ol.docify(" = ");
1531 ol.docify(a.defval);
1532 }
1533 ++it;
1534 if (it!=al.end()) ol.docify(", ");
1535 }
1536 ol.docify(">");
1537 ol.lineBreak();
1538 }
1539 if (!m_requiresClause.isEmpty())
1540 {
1541 ol.docify("requires ");
1542 linkifyText(TextGeneratorOLImpl(ol), // out
1543 d, // scope
1544 getFileDef(), // fileScope
1545 this, // self
1546 m_requiresClause, // text
1547 FALSE // autoBreak
1548 );
1549 ol.lineBreak();
1550 }
1551 ol.docify(type.lower()+" "+name);
1553 }
1554}
void endCompoundTemplateParams()
Definition outputlist.h:503
void startCompoundTemplateParams()
Definition outputlist.h:501
QCString lower() const
Definition qcstring.h:249
static void searchTemplateSpecs(const Definition *d, ArgumentLists &result, QCString &name, SrcLangExt lang)
QCString type
Definition arguments.h:42
QCString name
Definition arguments.h:44
QCString defval
Definition arguments.h:46
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:894

References Argument::defval, OutputList::docify(), OutputList::endCompoundTemplateParams(), FALSE, getFileDef(), QCString::isEmpty(), QCString::length(), OutputList::lineBreak(), linkifyText(), QCString::lower(), m_requiresClause, Argument::name, DefinitionMixin< ClassDefMutable >::name(), searchTemplateSpecs(), OutputList::startCompoundTemplateParams(), and Argument::type.

Referenced by writeDetailedDocumentationBody().

Member Data Documentation

◆ m_allMemberNameInfoLinkedMap

◆ m_arrowOperator

const MemberDef* ClassDefImpl::m_arrowOperator = nullptr
private

Does this class overloaded the -> operator?

Definition at line 538 of file classdef.cpp.

Referenced by ClassDefImpl(), deepCopy(), internalInsertMember(), and isSmartPointer().

◆ m_categoryOf

ClassDef* ClassDefImpl::m_categoryOf = nullptr
private

If this class is a Objective-C category, then this points to the class which is extended.

Definition at line 501 of file classdef.cpp.

Referenced by categoryOf(), ClassDefImpl(), deepCopy(), and setCategoryOf().

◆ m_className

QCString ClassDefImpl::m_className
private

local class name which could be a typedef'ed alias name.

Definition at line 496 of file classdef.cpp.

Referenced by className(), deepCopy(), setClassName(), and setProtection().

◆ m_collabFileName

QCString ClassDefImpl::m_collabFileName
private

file name used for the collaboration diagram

Definition at line 420 of file classdef.cpp.

Referenced by ClassDefImpl(), collaborationGraphFileName(), and deepCopy().

◆ m_compType

ClassDef::CompoundType ClassDefImpl::m_compType
private

Holds the kind of "class" this is.

Definition at line 466 of file classdef.cpp.

Referenced by ClassDefImpl(), compoundType(), compoundTypeString(), deepCopy(), generatedFromFiles(), setCompoundType(), and title().

◆ m_constraintClassList

ConstraintClassList ClassDefImpl::m_constraintClassList
private

Definition at line 483 of file classdef.cpp.

Referenced by addTypeConstraint(), deepCopy(), and templateTypeConstraints().

◆ m_examples

ExampleList ClassDefImpl::m_examples
private

Examples that use this class

Definition at line 463 of file classdef.cpp.

Referenced by addExample(), deepCopy(), getExamples(), hasExamples(), and writeDetailedDocumentationBody().

◆ m_fileDef

FileDef* ClassDefImpl::m_fileDef = nullptr
private

Namespace this class is part of (this is the inner most namespace in case of nested namespaces)

File this class is defined in

Definition at line 445 of file classdef.cpp.

Referenced by ClassDefImpl(), deepCopy(), getFileDef(), moveTo(), and setFileDef().

◆ m_fileName

QCString ClassDefImpl::m_fileName
private

file name that forms the base for the output file containing the class documentation. For compatibility with Qt (e.g. links via tag files) this name cannot be derived from the class name directly.

Definition at line 414 of file classdef.cpp.

Referenced by anchor(), ClassDefImpl(), getInstanceOutputFileBase(), and getOutputFileBase().

◆ m_files

FileList ClassDefImpl::m_files
private

Files that were used for generating the class documentation.

Definition at line 460 of file classdef.cpp.

Referenced by deepCopy(), generatedFromFiles(), insertUsedFile(), showUsedFiles(), and usedFiles().

◆ m_hasCollaborationGraph

bool ClassDefImpl::m_hasCollaborationGraph = false
private

◆ m_implicitTemplateInstance

◆ m_incInfo

std::unique_ptr<IncludeInfo> ClassDefImpl::m_incInfo
private

Include information about the header file should be included in the documentation. 0 by default, set by setIncludeFile().

Definition at line 428 of file classdef.cpp.

Referenced by deepCopy(), includeInfo(), setIncludeFile(), writeIncludeFiles(), and writeIncludeFilesForSlice().

◆ m_inheritedBy

BaseClassList ClassDefImpl::m_inheritedBy
private

List of sub-classes that directly derive from this class

Definition at line 437 of file classdef.cpp.

Referenced by countInheritedByNodes(), deepCopy(), insertSubClass(), isVisibleInHierarchy(), subClasses(), updateSubClasses(), and writeInheritanceGraph().

◆ m_inheritFileName

QCString ClassDefImpl::m_inheritFileName
private

file name used for the inheritance graph

Definition at line 423 of file classdef.cpp.

Referenced by ClassDefImpl(), deepCopy(), and inheritanceGraphFileName().

◆ m_inherits

BaseClassList ClassDefImpl::m_inherits
private

◆ m_innerClasses

ClassLinkedRefMap ClassDefImpl::m_innerClasses
private

◆ m_isAbstract

bool ClassDefImpl::m_isAbstract = false
private

Is this an abstract class?

Definition at line 509 of file classdef.cpp.

Referenced by ClassDefImpl(), deepCopy(), internalInsertMember(), and isAbstract().

◆ m_isJavaEnum

bool ClassDefImpl::m_isJavaEnum = false
private

Does this class represent a Java style enum?

Definition at line 543 of file classdef.cpp.

Referenced by ClassDefImpl(), deepCopy(), and isJavaEnum().

◆ m_isLocal

bool ClassDefImpl::m_isLocal = false
private

TRUE if the class is defined in a source file rather than a header file.

Definition at line 518 of file classdef.cpp.

Referenced by ClassDefImpl(), deepCopy(), isLinkableInProject(), and isLocal().

◆ m_isSimple

bool ClassDefImpl::m_isSimple = false
private

◆ m_isStatic

bool ClassDefImpl::m_isStatic = false
private

Is the class part of an unnamed namespace?

Definition at line 512 of file classdef.cpp.

Referenced by ClassDefImpl(), deepCopy(), isLinkableInProject(), isVisibleInHierarchy(), and setIsStatic().

◆ m_isTemplArg

bool ClassDefImpl::m_isTemplArg = false
private

Definition at line 520 of file classdef.cpp.

Referenced by ClassDefImpl(), deepCopy(), isTemplateArgument(), and makeTemplateArgument().

◆ m_memberGroups

◆ m_memberListFileName

QCString ClassDefImpl::m_memberListFileName
private

file name used for the list of all members

Definition at line 417 of file classdef.cpp.

Referenced by ClassDefImpl(), deepCopy(), and getMemberListFileName().

◆ m_memberLists

◆ m_membersMerged

bool ClassDefImpl::m_membersMerged = false
private

TRUE if classes members are merged with those of the base classes.

Definition at line 515 of file classdef.cpp.

Referenced by ClassDefImpl(), deepCopy(), and mergeMembers().

◆ m_metaData

QCString ClassDefImpl::m_metaData
private

Definition at line 547 of file classdef.cpp.

Referenced by deepCopy(), setMetaData(), and writeIncludeFilesForSlice().

◆ m_moduleDef

ModuleDef* ClassDefImpl::m_moduleDef = nullptr
private

Module this class is defined in

Definition at line 448 of file classdef.cpp.

Referenced by ClassDefImpl(), deepCopy(), getModuleDef(), moveTo(), and setModuleDef().

◆ m_prot

Protection ClassDefImpl::m_prot
private

The protection level in which this class was found. Typically Public, but for nested classes this can also be Protected or Private.

Definition at line 472 of file classdef.cpp.

Referenced by ClassDefImpl(), deepCopy(), isLinkableInProject(), isVisibleInHierarchy(), protection(), and setProtection().

◆ m_qualifiers

StringVector ClassDefImpl::m_qualifiers
private

Definition at line 552 of file classdef.cpp.

Referenced by addClassAttributes(), addQualifiers(), deepCopy(), and getQualifiers().

◆ m_requiresClause

QCString ClassDefImpl::m_requiresClause
private

C++20 requires clause.

Definition at line 550 of file classdef.cpp.

Referenced by deepCopy(), requiresClause(), setRequiresClause(), and writeTemplateSpec().

◆ m_spec

◆ m_subGrouping

bool ClassDefImpl::m_subGrouping = false
private

Does this class group its user-grouped members as a sub-section of the normal (public/protected/..) groups?

Definition at line 526 of file classdef.cpp.

Referenced by addGroupedInheritedMembers(), addMembersToMemberGroup(), ClassDefImpl(), countMembersIncludingGrouped(), deepCopy(), setSubGrouping(), subGrouping(), and writeMemberGroups().

◆ m_tagLessRef

const ClassDef* ClassDefImpl::m_tagLessRef = nullptr
private

Definition at line 540 of file classdef.cpp.

Referenced by ClassDefImpl(), deepCopy(), setTagLessReference(), and tagLessReference().

◆ m_tempArgs

◆ m_templateInstances

TemplateInstanceList ClassDefImpl::m_templateInstances
private

Template instances that exists of this class, the key in the dictionary is the template argument list.

Definition at line 488 of file classdef.cpp.

Referenced by deepCopy(), getTemplateInstances(), insertExplicitTemplateInstance(), insertTemplateInstance(), and insertUsedFile().

◆ m_templateMaster

const ClassDef* ClassDefImpl::m_templateMaster = nullptr
private

◆ m_templBaseClassNames

TemplateNameMap ClassDefImpl::m_templBaseClassNames
private

Definition at line 490 of file classdef.cpp.

Referenced by deepCopy(), getTemplateBaseClassNames(), and setTemplateBaseClassNames().

◆ m_typeConstraints

ArgumentList ClassDefImpl::m_typeConstraints
private

Type constraints for template parameters

Definition at line 457 of file classdef.cpp.

Referenced by deepCopy(), setTypeConstraints(), typeConstraints(), and writeDetailedDocumentationBody().

◆ m_typeInheritanceGraph

CLASS_GRAPH_t ClassDefImpl::m_typeInheritanceGraph = CLASS_GRAPH_t::NO
private

◆ m_usedByImplClassList

UsesClassList ClassDefImpl::m_usedByImplClassList
private

Definition at line 481 of file classdef.cpp.

Referenced by addUsedByClass(), deepCopy(), and usedByImplementationClasses().

◆ m_usedOnly

bool ClassDefImpl::m_usedOnly = false
private

Reason of existence is a "use" relation.

Definition at line 529 of file classdef.cpp.

Referenced by ClassDefImpl(), deepCopy(), isUsedOnly(), and setUsedOnly().

◆ m_usesImplClassList

UsesClassList ClassDefImpl::m_usesImplClassList
private

Definition at line 480 of file classdef.cpp.

Referenced by addUsedClass(), deepCopy(), and usedImplementationClasses().

◆ m_vhdlSummaryTitles

StringSet ClassDefImpl::m_vhdlSummaryTitles
private

List of titles to use for the summary.

Definition at line 532 of file classdef.cpp.

Referenced by deepCopy(), internalInsertMember(), and writeSummaryLinks().


The documentation for this class was generated from the following file: