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
void setPrimaryConstructorParams (const ArgumentList &list) 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
ArgumentList m_primaryConstructorParams

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 804 of file classdef.cpp.

809 : DefinitionMixin(defFileName,defLine,defColumn,removeRedundantWhiteSpace(nm),nullptr,nullptr,isSymbol)
810{
811 AUTO_TRACE("name={}",name());
812 setReference(lref);
813 m_compType = ct;
815 QCString compTypeString = getCompoundTypeString(getLanguage(),ct,isJavaEnum);
816 if (!fName.isEmpty())
817 {
819 }
820 else
821 {
822 m_fileName=compTypeString+name();
823 }
824 m_prot=Protection::Public;
825 //nspace=nullptr;
826 m_fileDef=nullptr;
827 m_moduleDef=nullptr;
828 m_subGrouping=Config_getBool(SUBGROUPING);
829 m_templateMaster =nullptr;
834 m_categoryOf = nullptr;
836 m_isSimple = Config_getBool(INLINE_SIMPLE_STRUCTS);
837 m_arrowOperator = nullptr;
838 m_tagLessRef = nullptr;
839 m_spec=TypeSpecifier();
840 //QCString ns;
841 //extractNamespaceName(name,className,ns);
842 //printf("m_name=%s m_className=%s ns=%s\n",qPrint(m_name),qPrint(m_className),qPrint(ns));
843
844 // we cannot use getLanguage at this point, as setLanguage has not been called.
845 SrcLangExt lang = getLanguageFromFileName(defFileName);
846 if ((lang==SrcLangExt::Cpp || lang==SrcLangExt::ObjC) && guessSection(defFileName).isSource())
847 {
849 }
850 else
851 {
853 }
854 m_hasCollaborationGraph = Config_getBool(COLLABORATION_GRAPH);
856 m_memberListFileName = convertNameToFile(compTypeString+name()+"-members");
859 if (lref.isEmpty())
860 {
862 }
863 AUTO_TRACE_EXIT("m_fileName='{}'",m_fileName);
864}
QCString m_collabFileName
Definition classdef.cpp:421
QCString m_fileName
Definition classdef.cpp:415
const MemberDef * m_arrowOperator
Does this class overloaded the -> operator?
Definition classdef.cpp:539
TypeSpecifier m_spec
Definition classdef.cpp:546
ClassDef * m_categoryOf
Definition classdef.cpp:502
const ClassDef * m_tagLessRef
Definition classdef.cpp:541
Protection m_prot
Definition classdef.cpp:473
QCString m_inheritFileName
Definition classdef.cpp:424
const ClassDef * m_templateMaster
Definition classdef.cpp:494
bool m_membersMerged
Definition classdef.cpp:516
bool m_isJavaEnum
Does this class represent a Java style enum?
Definition classdef.cpp:544
ModuleDef * m_moduleDef
Definition classdef.cpp:449
bool isJavaEnum() const override
bool m_isSimple
Is this a simple (non-nested) C structure?
Definition classdef.cpp:536
CLASS_GRAPH_t m_typeInheritanceGraph
Definition classdef.cpp:556
bool m_isAbstract
Definition classdef.cpp:510
FileDef * m_fileDef
Definition classdef.cpp:446
ClassDef::CompoundType m_compType
Definition classdef.cpp:467
bool m_hasCollaborationGraph
Definition classdef.cpp:555
bool m_isTemplArg
Definition classdef.cpp:521
bool m_usedOnly
Reason of existence is a "use" relation.
Definition classdef.cpp:530
QCString m_memberListFileName
Definition classdef.cpp:418
bool m_subGrouping
Definition classdef.cpp:527
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:48
#define AUTO_TRACE_EXIT(...)
Definition docnode.cpp:50
#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:567
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
Definition util.cpp:5231
QCString stripExtension(const QCString &fName)
Definition util.cpp:4964
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3525
EntryType guessSection(const QCString &name)
Definition util.cpp:338

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 2727 of file classdef.cpp.

2728{
2729 StringVector sl;
2730 if (isFinal()) sl.emplace_back("final");
2731 if (isSealed()) sl.emplace_back("sealed");
2732 if (isAbstract()) sl.emplace_back("abstract");
2733 if (isExported()) sl.emplace_back("export");
2734 if (getLanguage()==SrcLangExt::IDL && isPublished()) sl.emplace_back("published");
2735
2736 for (const auto &sx : m_qualifiers)
2737 {
2738 bool alreadyAdded = std::find(sl.begin(), sl.end(), sx) != sl.end();
2739 if (!alreadyAdded)
2740 {
2741 sl.push_back(sx);
2742 }
2743 }
2744
2745 ol.pushGeneratorState();
2747 if (!sl.empty())
2748 {
2749 ol.startLabels();
2750 size_t i=0;
2751 for (const auto &s : sl)
2752 {
2753 i++;
2754 ol.writeLabel(s,i==sl.size());
2755 }
2756 ol.endLabels();
2757 }
2758 ol.popGeneratorState();
2759}
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:553
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 3419 of file classdef.cpp.

3420{
3421 return m_examples.inSort(Example(anchor,nameStr,file));
3422}
ExampleList m_examples
Definition classdef.cpp:464
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 4961 of file classdef.cpp.

4963{
4964 //printf("** %s::addGroupedInheritedMembers() inheritId=%s\n",qPrint(name()),qPrint(inheritId));
4965 for (const auto &mg : m_memberGroups)
4966 {
4967 if (!mg->allMembersInSameSection() || !m_subGrouping) // group is in its own section
4968 {
4969 mg->addGroupedInheritedMembers(ol,this,lt,inheritedFrom,inheritId);
4970 }
4971 }
4972}
MemberGroupList m_memberGroups
Definition classdef.cpp:507

References m_memberGroups, and m_subGrouping.

◆ addInnerCompound()

void ClassDefImpl::addInnerCompound ( Definition * d)
overridevirtual

Implements DefinitionMutable.

Definition at line 4344 of file classdef.cpp.

4345{
4346 //printf("**** %s::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
4347 if (d->definitionType()==Definition::TypeClass) // only classes can be
4348 // nested in classes.
4349 {
4350 m_innerClasses.add(d->localName(),toClassDef(d));
4351 }
4352}
ClassLinkedRefMap m_innerClasses
Definition classdef.cpp:478
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 4552 of file classdef.cpp.

4553{
4554 if (!isLinkableInProject()) return;
4555 SrcLangExt lang = getLanguage();
4557 qualifiedName(),
4560 displayName(),
4561 QCString(),
4562 this
4563 );
4564 for (const auto &mg : m_memberGroups)
4565 {
4566 mg->addListReferences(this);
4567 }
4568 for (auto &ml : m_memberLists)
4569 {
4570 if (ml->listType().isDetailed())
4571 {
4572 ml->addListReferences(this);
4573 }
4574 }
4575}
bool isLinkableInProject() const override
MemberLists m_memberLists
Definition classdef.cpp:504
QCString getOutputFileBase() const override
QCString displayName(bool includeScope=TRUE) const override
Definition classdef.cpp:996
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:4845

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 1021 of file classdef.cpp.

1022{
1023 for (auto &ml : m_memberLists)
1024 {
1025 if (!ml->listType().isDetailed())
1026 {
1028 }
1029 }
1030
1031 // add members inside sections to their groups
1032 for (const auto &mg : m_memberGroups)
1033 {
1034 if (mg->allMembersInSameSection() && m_subGrouping)
1035 {
1036 //printf("addToDeclarationSection(%s)\n",qPrint(mg->header()));
1037 mg->addToDeclarationSection();
1038 }
1039 }
1040}
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 4464 of file classdef.cpp.

4465{
4466 AUTO_TRACE("this={} cd={} templSpec={}",name(),cd->name(),templSpec);
4467 //printf("%s::addMembersToTemplateInstance(%s,%s)\n",qPrint(name()),qPrint(cd->name()),templSpec);
4468 for (const auto &mni : cd->memberNameInfoLinkedMap())
4469 {
4470 for (const auto &mi : *mni)
4471 {
4472 const MemberDef *md = mi->memberDef();
4473 if (m_allMemberNameInfoLinkedMap.find(md->name())==nullptr) // only insert the member if not hidden by one with the same name (#11541)
4474 {
4476 }
4477 }
4478 }
4479 // also instantatie members for nested classes
4480 for (const auto &innerCd : cd->getClasses())
4481 {
4482 ClassDefMutable *ncd = toClassDefMutable(m_innerClasses.find(innerCd->localName()));
4483 if (ncd)
4484 {
4485 ncd->addMembersToTemplateInstance(innerCd,cd->templateArguments(),templSpec);
4486 }
4487 }
4488}
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:452
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 4636 of file classdef.cpp.

4637{
4638 AUTO_TRACE("{} md={} lt={} isBrief={}",name(),md->name(),lt,isBrief);
4639 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
4640 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
4641 const auto &ml = m_memberLists.get(lt,MemberListContainer::Class);
4642 ml->setNeedsSorting((isBrief && sortBriefDocs) || (!isBrief && sortMemberDocs));
4643 ml->push_back(md);
4644
4645 // for members in the declaration lists we set the section, needed for member grouping
4646 if (!ml->listType().isDetailed())
4647 {
4648 MemberDefMutable *mdm = toMemberDefMutable(md);
4649 if (mdm)
4650 {
4651 mdm->setSectionList(this,ml.get());
4652 }
4653 }
4654}
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 4438 of file classdef.cpp.

4441{
4442 AUTO_TRACE("this={} md={}",name(),md->name());
4443 auto actualArguments_p = stringToArgumentList(getLanguage(),templSpec);
4444 auto imd = md->createTemplateInstanceMember(templateArguments,actualArguments_p);
4445 auto mmd = toMemberDefMutable(imd.get());
4446 mmd->setMemberClass(this);
4447 mmd->setTemplateMaster(md);
4448 mmd->setDocumentation(md->documentation(),md->docFile(),md->docLine());
4449 mmd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine());
4450 mmd->setInbodyDocumentation(md->inbodyDocumentation(),md->inbodyFile(),md->inbodyLine());
4451 mmd->setMemberSpecifiers(md->getMemberSpecifiers());
4452 mmd->setMemberGroupId(md->getMemberGroupId());
4453 mmd->setArtificial(true);
4454 insertMember(imd.get());
4455 //printf("Adding member=%s %s%s to class %s templSpec %s\n",
4456 // imd->typeString(),qPrint(imd->name()),imd->argsString(),
4457 // qPrint(imd->getClassDef()->name()),templSpec);
4458 // insert imd in the list of all members
4459 //printf("Adding member=%s class=%s\n",qPrint(imd->name()),qPrint(name()));
4460 MemberName *mn = Doxygen::memberNameLinkedMap->add(imd->name());
4461 mn->push_back(std::move(imd));
4462}
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:111
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 5336 of file classdef.cpp.

5337{
5338 for (const auto &sx : qualifiers)
5339 {
5340 bool alreadyAdded = std::find(m_qualifiers.begin(), m_qualifiers.end(), sx) != m_qualifiers.end();
5341 if (!alreadyAdded)
5342 {
5343 m_qualifiers.push_back(sx);
5344 }
5345 }
5346}

References m_qualifiers.

◆ addRequirementReferences()

void ClassDefImpl::addRequirementReferences ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4577 of file classdef.cpp.

4578{
4579 if (!isLinkableInProject()) return;
4581 for (const auto &mg : m_memberGroups)
4582 {
4583 mg->addRequirementReferences(this);
4584 }
4585 for (auto &ml : m_memberLists)
4586 {
4587 if (ml->listType().isDetailed())
4588 {
4589 ml->addRequirementReferences(this);
4590 }
4591 }
4592}
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 3430 of file classdef.cpp.

3431{
3432 //printf("addTypeConstraint(%s,%s)\n",qPrint(type),qPrint(typeConstraint));
3433 bool hideUndocRelation = Config_getBool(HIDE_UNDOC_RELATIONS);
3434 if (typeConstraint.isEmpty() || type.isEmpty()) return;
3435 SymbolResolver resolver(getFileDef());
3436 ClassDefMutable *cd = resolver.resolveClassMutable(this,typeConstraint);
3437 if (cd==nullptr && !hideUndocRelation)
3438 {
3439 cd = toClassDefMutable(
3440 Doxygen::hiddenClassLinkedMap->add(typeConstraint,
3441 std::unique_ptr<ClassDef>(
3442 new ClassDefImpl(
3444 getDefColumn(),
3445 typeConstraint,
3446 ClassDef::Class))));
3447 if (cd)
3448 {
3449 cd->setUsedOnly(TRUE);
3450 cd->setLanguage(getLanguage());
3451 //printf("Adding undocumented constraint '%s' to class %s on type %s\n",
3452 // qPrint(typeConstraint),qPrint(name()),qPrint(type));
3453 }
3454 }
3455 if (cd)
3456 {
3457 auto it = std::find_if(m_constraintClassList.begin(),
3459 [&cd](const auto &ccd) { return ccd.classDef==cd; });
3460
3461 if (it==m_constraintClassList.end())
3462 {
3463 m_constraintClassList.emplace_back(cd);
3464 it = m_constraintClassList.end()-1;
3465 }
3466 (*it).addAccessor(type);
3467 //printf("Adding constraint '%s' to class %s on type %s\n",
3468 // qPrint(typeConstraint),qPrint(name()),qPrint(type));
3469 }
3470}
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:804
ConstraintClassList m_constraintClassList
Definition classdef.cpp:484
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 3473 of file classdef.cpp.

3474{
3475 for (const Argument &a : m_tempArgs)
3476 {
3477 if (!a.typeConstraint.isEmpty())
3478 {
3479 QCString typeConstraint;
3480 int i=0,p=0;
3481 while ((i=a.typeConstraint.find('&',p))!=-1) // typeConstraint="A &I" for C<T extends A & I>
3482 {
3483 typeConstraint = a.typeConstraint.mid(p,i-p).stripWhiteSpace();
3484 addTypeConstraint(typeConstraint,a.type);
3485 p=i+1;
3486 }
3487 typeConstraint = a.typeConstraint.right(a.typeConstraint.length()-p).stripWhiteSpace();
3488 addTypeConstraint(typeConstraint,a.type);
3489 }
3490 }
3491}
void addTypeConstraint(const QCString &typeConstraint, const QCString &type)
ArgumentList m_tempArgs
Definition classdef.cpp:455
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 4231 of file classdef.cpp.

4233{
4234 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
4235 bool umlLook = Config_getBool(UML_LOOK);
4236 if (prot==Protection::Private && !extractPrivate) return;
4237 //printf("%s::addUsedByClass(%s,%s)\n",qPrint(name()),qPrint(cd->name()),accessName);
4238 //
4239 auto it = std::find_if(m_usedByImplClassList.begin(),
4241 [&cd](const auto &ucd) { return ucd.classDef==cd; });
4242 if (it==m_usedByImplClassList.end())
4243 {
4244 m_usedByImplClassList.emplace_back(cd);
4245 //printf("Adding used by class %s to class %s\n",
4246 // qPrint(cd->name()),qPrint(name()));
4247 it = m_usedByImplClassList.end()-1;
4248 }
4249 QCString acc = accessName;
4250 if (umlLook)
4251 {
4252 switch(prot)
4253 {
4254 case Protection::Public: acc.prepend("+"); break;
4255 case Protection::Private: acc.prepend("-"); break;
4256 case Protection::Protected: acc.prepend("#"); break;
4257 case Protection::Package: acc.prepend("~"); break;
4258 }
4259 }
4260 (*it).addAccessor(acc);
4261}
UsesClassList m_usedByImplClassList
Definition classdef.cpp:482
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 4199 of file classdef.cpp.

4201{
4202 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
4203 bool umlLook = Config_getBool(UML_LOOK);
4204 if (prot==Protection::Private && !extractPrivate) return;
4205 //printf("%s::addUsedClass(%s,%s)\n",qPrint(name()),qPrint(cd->name()),accessName);
4206
4207 auto it = std::find_if(m_usesImplClassList.begin(),
4208 m_usesImplClassList.end(),
4209 [&cd](const auto &ucd) { return ucd.classDef==cd; });
4210 if (it==m_usesImplClassList.end())
4211 {
4212 m_usesImplClassList.emplace_back(cd);
4213 //printf("Adding used class %s to class %s via accessor %s\n",
4214 // qPrint(cd->name()),qPrint(name()),accessName);
4215 it = m_usesImplClassList.end()-1;
4216 }
4217 QCString acc = accessName;
4218 if (umlLook)
4219 {
4220 switch(prot)
4221 {
4222 case Protection::Public: acc.prepend("+"); break;
4223 case Protection::Private: acc.prepend("-"); break;
4224 case Protection::Protected: acc.prepend("#"); break;
4225 case Protection::Package: acc.prepend("~"); break;
4226 }
4227 }
4228 (*it).addAccessor(acc);
4229}
UsesClassList m_usesImplClassList
Definition classdef.cpp:481

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 5260 of file classdef.cpp.

5261{
5262 QCString anc;
5264 {
5266 {
5267 // point to the template of which this class is an instance
5268 anc = m_templateMaster->getOutputFileBase();
5269 }
5270 else
5271 {
5272 anc = m_fileName;
5273 }
5274 }
5275 return anc;
5276}
bool m_implicitTemplateInstance
Definition classdef.cpp:558
bool isEmbeddedInOuterScope() const override
static bool generatingXmlOutput
Definition doxygen.h:134

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 5015 of file classdef.cpp.

5016{
5017 return m_inherits;
5018}
BaseClassList m_inherits
Definition classdef.cpp:434

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 5165 of file classdef.cpp.

5166{
5167 return m_categoryOf;
5168}

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 4536 of file classdef.cpp.

4537{
4538 QCString name = m_className.isEmpty() ? localName() : m_className;
4539 auto lang = getLanguage();
4540 if (lang==SrcLangExt::CSharp)
4541 {
4543 }
4544 return name;
4545}
QCString m_className
Definition classdef.cpp:497
const QCString & localName() const override
QCString tempArgListToString(const ArgumentList &al, SrcLangExt lang, bool includeDefault)
Definition util.cpp:1299
QCString demangleCSharpGenericName(const QCString &name, const QCString &templArgs)
Definition util.cpp:6941

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 5439 of file classdef.cpp.

5440{
5441 switch (compoundType())
5442 {
5443 case Class: return CodeSymbolType::Class; break;
5444 case Struct: return CodeSymbolType::Struct; break;
5445 case Union: return CodeSymbolType::Union; break;
5446 case Interface: return CodeSymbolType::Interface; break;
5447 case Protocol: return CodeSymbolType::Protocol; break;
5448 case Category: return CodeSymbolType::Category; break;
5449 case Exception: return CodeSymbolType::Exception; break;
5450 case Service: return CodeSymbolType::Service; break;
5451 case Singleton: return CodeSymbolType::Singleton; break;
5452 }
5453 return CodeSymbolType::Class;
5454}
@ 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 5419 of file classdef.cpp.

5420{
5421 return m_collabFileName;
5422}

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 5010 of file classdef.cpp.

5011{
5012 return m_compType;
5013}

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 1354 of file classdef.cpp.

1355{
1356 for (auto &ml : m_memberLists)
1357 {
1358 if (!ml->listType().isDetailed())
1359 {
1360 ml->setAnchors();
1361 }
1362 }
1363
1364 for (const auto &mg : m_memberGroups)
1365 {
1366 mg->setAnchors();
1367 }
1368}

References m_memberGroups, and m_memberLists.

◆ containsOverload()

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

Implements ClassDef.

Definition at line 5353 of file classdef.cpp.

5354{
5355 AUTO_TRACE("name={}",md->name());
5356 const auto &mni = m_allMemberNameInfoLinkedMap.find(md->name());
5357 if (mni)
5358 {
5359 for (const auto &mi : *mni)
5360 {
5361 const MemberDef *classMd = mi->memberDef();
5362 const ArgumentList &classAl = classMd->argumentList();
5363 const ArgumentList &al = md->argumentList();
5364 bool found = matchArguments2(
5365 classMd->getOuterScope(),classMd->getFileDef(),classMd->typeString(),&classAl,
5366 md->getOuterScope(),md->getFileDef(),md->typeString(),&al,
5367 true,getLanguage()
5368 );
5369 if (found)
5370 {
5371 AUTO_TRACE_EXIT("true");
5372 return true;
5373 }
5374 }
5375 }
5376 AUTO_TRACE_EXIT("false");
5377 return false;
5378}
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:2031

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 4810 of file classdef.cpp.

4811{
4812 int totalCount=0;
4813 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4814 {
4815 if (lde->kind()==LayoutDocEntry::MemberDecl)
4816 {
4817 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4818 if (lmd && lmd->type!=MemberListType::Friends()) // friendship is not inherited
4819 {
4820 ClassDefSet visited;
4821 totalCount+=countInheritedDecMembers(lmd->type,this,TRUE,FALSE,visited);
4822 }
4823 }
4824 }
4825 //printf("countAdditionalInheritedMembers()=%d\n",totalCount);
4826 return totalCount;
4827}
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 1831 of file classdef.cpp.

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

References countInheritedByNodes(), and countInheritsNodes().

Referenced by writeInheritanceGraph().

◆ countInheritedByNodes()

int ClassDefImpl::countInheritedByNodes ( ) const
private

Definition at line 1809 of file classdef.cpp.

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

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 4753 of file classdef.cpp.

4756{
4757 int inhCount = 0;
4758 int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
4759 bool process = count>0;
4760 //printf("%s: countInheritedDecMembers: lt=%s process=%d count=%d invert=%d\n",
4761 // qPrint(name()),lt.to_string(),process,count,invert);
4762 if ((process^invert) || showAlways)
4763 {
4764 for (const auto &ibcd : m_inherits)
4765 {
4766 ClassDefMutable *icd = toClassDefMutable(ibcd.classDef);
4767 MemberListType lt1 = MemberListType::Invalid();
4768 MemberListType lt2 = MemberListType::Invalid();
4769 if (icd && icd->isLinkable())
4770 {
4771 convertProtectionLevel(lt,ibcd.prot,&lt1,&lt2);
4772 //printf("%s: convert %s->(%s,%s) prot=%d\n",
4773 // qPrint(icd->name()),lt.to_string(),lt1.to_string(),lt2.to_string(),ibcd.prot);
4774 if (visitedClasses.find(icd)==visitedClasses.end())
4775 {
4776 visitedClasses.insert(icd); // guard for multiple virtual inheritance
4777 if (!lt1.isInvalid())
4778 {
4779 inhCount+=icd->countMemberDeclarations(lt1,inheritedFrom,lt2,FALSE,TRUE,visitedClasses);
4780 }
4781 }
4782 }
4783 }
4784 }
4785 //printf("%s: count=%d\n",qPrint(name()),inhCount);
4786 return inhCount;
4787}
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:6247

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 1820 of file classdef.cpp.

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

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 4675 of file classdef.cpp.

4677{
4678 //printf("%s: countMemberDeclarations for %s and %s\n",qPrint(name()),lt.to_string(),lt2.to_string());
4679 int count=0;
4680 MemberList * ml = getMemberList(lt);
4681 MemberList * ml2 = getMemberList(lt2);
4682 if (getLanguage()!=SrcLangExt::VHDL) // use specific declarations function
4683 {
4684 if (ml)
4685 {
4686 count+=ml->numDecMembers(inheritedFrom);
4687 //printf("-> ml=%d\n",ml->numDecMembers());
4688 }
4689 if (ml2)
4690 {
4691 count+=ml2->numDecMembers(inheritedFrom);
4692 //printf("-> ml2=%d\n",ml2->numDecMembers());
4693 }
4694 // also include grouped members that have their own section in the class (see bug 722759)
4695 if (inheritedFrom)
4696 {
4697 for (const auto &mg : m_memberGroups)
4698 {
4699 count+=mg->countGroupedInheritedMembers(lt);
4700 if (!lt2.isInvalid()) count+=mg->countGroupedInheritedMembers(lt2);
4701 }
4702 }
4703 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
4704 if (!inlineInheritedMembers) // show inherited members as separate lists
4705 {
4706 count+=countInheritedDecMembers(lt,inheritedFrom,invert,showAlways,visitedClasses);
4707 }
4708 }
4709 //printf("-> %d\n",count);
4710 return count;
4711}
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 4739 of file classdef.cpp.

4740{
4741 for (auto &ml : m_memberLists)
4742 {
4743 ml->countDecMembers();
4744 ml->countDocMembers();
4745 }
4746 for (const auto &mg : m_memberGroups)
4747 {
4748 mg->countDecMembers();
4749 mg->countDocMembers();
4750 }
4751}

References m_memberGroups, and m_memberLists.

◆ countMembersIncludingGrouped()

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

Implements ClassDef.

Definition at line 4846 of file classdef.cpp.

4848{
4849 int count=0;
4850 MemberList *ml = getMemberList(lt);
4851 if (ml)
4852 {
4853 count=ml->countInheritableMembers(inheritedFrom);
4854 }
4855 //printf("%s:countMembersIncludingGrouped: count=%d\n",qPrint(name()),count);
4856 for (const auto &mg : m_memberGroups)
4857 {
4858 bool hasOwnSection = !mg->allMembersInSameSection() ||
4859 !m_subGrouping; // group is in its own section
4860 if ((additional && hasOwnSection) || (!additional && !hasOwnSection))
4861 {
4862 count+=mg->countGroupedInheritedMembers(lt);
4863 }
4864 }
4865 //printf("%s:countMembersIncludingGrouped(lt=%s,%s)=%d\n",
4866 // qPrint(name()),qPrint(lt.to_string()),ml?qPrint(ml->listType().to_string()):"<none>",count);
4867 return count;
4868}
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 866 of file classdef.cpp.

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

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 996 of file classdef.cpp.

997{
998 return makeDisplayName(this,includeScope);
999}
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 1370 of file classdef.cpp.

1371{
1372 for (const auto &mg : m_memberGroups)
1373 {
1374 mg->distributeMemberGroupDocumentation();
1375 }
1376}

References m_memberGroups.

◆ endMemberDeclarations()

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

Definition at line 2226 of file classdef.cpp.

2227{
2228 //printf("%s: ClassDefImpl::endMemberDeclarations()\n",qPrint(name()));
2229 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
2230 if (!inlineInheritedMembers && countAdditionalInheritedMembers()>0)
2231 {
2232 ol.startMemberHeader("inherited");
2234 ol.endMemberHeader();
2236 }
2237 ol.endMemberSections();
2238}
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 2210 of file classdef.cpp.

2211{
2212 //printf("%s: ClassDefImpl::endMemberDocumentation()\n",qPrint(name()));
2213 if (Config_getBool(SEPARATE_MEMBER_PAGES))
2214 {
2217 }
2218}
static bool suppressDocWarnings
Definition doxygen.h:130
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 4354 of file classdef.cpp.

4355{
4356 return m_innerClasses.find(name);
4357}

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

◆ findSectionsInDocumentation()

void ClassDefImpl::findSectionsInDocumentation ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1378 of file classdef.cpp.

1379{
1383 for (const auto &mg : m_memberGroups)
1384 {
1385 mg->findSectionsInDocumentation(this);
1386 }
1387 for (auto &ml : m_memberLists)
1388 {
1389 if (!ml->listType().isDetailed())
1390 {
1391 ml->findSectionsInDocumentation(this);
1392 }
1393 }
1394}
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 1699 of file classdef.cpp.

1700{
1701 QCString result;
1702 SrcLangExt lang = getLanguage();
1703 size_t numFiles = m_files.size();
1704 if (lang==SrcLangExt::Fortran)
1705 {
1707 getLanguage()==SrcLangExt::ObjC && m_compType==Interface ? Class : m_compType,
1708 numFiles==1);
1709 }
1710 else if (isJavaEnum())
1711 {
1712 result = theTranslator->trEnumGeneratedFromFiles(numFiles==1);
1713 }
1714 else if (m_compType==Service)
1715 {
1716 result = theTranslator->trServiceGeneratedFromFiles(numFiles==1);
1717 }
1718 else if (m_compType==Singleton)
1719 {
1720 result = theTranslator->trSingletonGeneratedFromFiles(numFiles==1);
1721 }
1722 else
1723 {
1725 getLanguage()==SrcLangExt::ObjC && m_compType==Interface ? Class : m_compType,
1726 numFiles==1);
1727 }
1728 return result;
1729}
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 5005 of file classdef.cpp.

5006{
5007 return m_innerClasses;
5008}

References m_innerClasses.

◆ getExamples()

const ExampleList & ClassDefImpl::getExamples ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5399 of file classdef.cpp.

5400{
5401 return m_examples;
5402}

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 5060 of file classdef.cpp.

5061{
5062 return m_fileDef;
5063}

References m_fileDef.

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

◆ getInstanceOutputFileBase()

QCString ClassDefImpl::getInstanceOutputFileBase ( ) const
overridevirtual

Implements ClassDef.

Definition at line 4307 of file classdef.cpp.

4308{
4309 return m_fileName;
4310}

References m_fileName.

◆ getMemberByName()

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

Returns the member with the given name.

Implements ClassDef.

Definition at line 4594 of file classdef.cpp.

4595{
4596 const MemberDef *xmd = nullptr;
4597 const MemberNameInfo *mni = m_allMemberNameInfoLinkedMap.find(name);
4598 if (mni)
4599 {
4600 const int maxInheritanceDepth = 100000;
4601 int mdist=maxInheritanceDepth;
4602 for (auto &mi : *mni)
4603 {
4604 const ClassDef *mcd=mi->memberDef()->getClassDef();
4605 int m=minClassDistance(this,mcd);
4606 //printf("found member in %s linkable=%d m=%d\n",
4607 // qPrint(mcd->name()),mcd->isLinkable(),m);
4608 if (m<mdist)
4609 {
4610 mdist=m;
4611 xmd=mi->memberDef();
4612 }
4613 }
4614 }
4615 //printf("getMemberByName(%s)=%p\n",qPrint(name),xmd);
4616 return xmd;
4617}
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 5175 of file classdef.cpp.

5176{
5177 return m_memberGroups;
5178}

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 4624 of file classdef.cpp.

4625{
4626 for (auto &ml : m_memberLists)
4627 {
4628 if (ml->listType()==lt)
4629 {
4630 return ml.get();
4631 }
4632 }
4633 return nullptr;
4634}

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 991 of file classdef.cpp.

992{
994}

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 5170 of file classdef.cpp.

5171{
5172 return m_memberLists;
5173}

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 5065 of file classdef.cpp.

5066{
5067 return m_moduleDef;
5068}

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 4269 of file classdef.cpp.

4270{
4271 bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
4272 bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
4274 {
4275 Definition *scope=nullptr;
4276 if (inlineGroupedClasses && !partOfGroups().empty())
4277 {
4278 // point to the group that embeds this class
4279 return partOfGroups().front()->getOutputFileBase();
4280 }
4281 else if (inlineSimpleClasses && m_isSimple && !partOfGroups().empty())
4282 {
4283 // point to simple struct inside a group
4284 return partOfGroups().front()->getOutputFileBase();
4285 }
4286 else if (inlineSimpleClasses && m_isSimple && (scope=getOuterScope()))
4287 {
4288 if (scope==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) // simple struct embedded in file
4289 {
4290 return getFileDef()->getOutputFileBase();
4291 }
4292 else if (scope->isLinkableInProject()) // simple struct embedded in other container (namespace/group/class)
4293 {
4294 return getOuterScope()->getOutputFileBase();
4295 }
4296 }
4297 }
4298 AUTO_TRACE("name='{}' m_templateMaster={} m_implicitTemplateInstance={}",name(),(void*)m_templateMaster,m_implicitTemplateInstance);
4300 {
4301 // point to the template of which this class is an instance
4302 return m_templateMaster->getOutputFileBase();
4303 }
4304 return m_fileName;
4305}
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:121

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 5348 of file classdef.cpp.

5349{
5350 return m_qualifiers;
5351}

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 4490 of file classdef.cpp.

4491{
4493 {
4494 return m_templateMaster->getReference();
4495 }
4496 else
4497 {
4499 }
4500}
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 4312 of file classdef.cpp.

4313{
4315 {
4316 return m_templateMaster->getSourceFileBase();
4317 }
4318 else
4319 {
4321 }
4322}
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 4433 of file classdef.cpp.

4434{
4435 return m_templBaseClassNames;
4436}

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 5070 of file classdef.cpp.

5071{
5072 return m_templateInstances;
5073}

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 4514 of file classdef.cpp.

4515{
4516 ArgumentLists result;
4517 Definition *d=getOuterScope();
4518 while (d && d->definitionType()==Definition::TypeClass)
4519 {
4520 result.insert(result.begin(),toClassDef(d)->templateArguments());
4521 d = d->getOuterScope();
4522 }
4523 if (!templateArguments().empty())
4524 {
4525 result.push_back(templateArguments());
4526 }
4527 return result;
4528}
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 4789 of file classdef.cpp.

4791{
4792 SrcLangExt lang = getLanguage();
4793 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4794 {
4795 if (lde->kind()==LayoutDocEntry::MemberDecl)
4796 {
4797 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4798 if (lmd && lmd->type==type)
4799 {
4800 title = lmd->title(lang);
4801 subtitle = lmd->subtitle(lang);
4802 return;
4803 }
4804 }
4805 }
4806 title="";
4807 subtitle="";
4808}
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 5461 of file classdef.cpp.

5462{
5464}

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 1652 of file classdef.cpp.

1653{
1654 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
1655 bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
1656 return ((!briefDescription().isEmpty() && repeatBrief) ||
1657 (!documentation().isEmpty() || m_tempArgs.hasTemplateDocumentation()) ||
1658 (sourceBrowser && getStartBodyLine()!=-1 && getBodyDef()) ||
1660}
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 3680 of file classdef.cpp.

3681{
3683}
bool hasDocumentation() const override

References DefinitionMixin< Base >::hasDocumentation().

Referenced by isLinkableInProject(), and isVisibleInHierarchy().

◆ hasExamples()

bool ClassDefImpl::hasExamples ( ) const
overridevirtual

Implements ClassDef.

Definition at line 3425 of file classdef.cpp.

3426{
3427 return !m_examples.empty();
3428}

References m_examples.

Referenced by writeDetailedDocumentationBody(), and writeDocumentationContents().

◆ hasInheritanceGraph()

CLASS_GRAPH_t ClassDefImpl::hasInheritanceGraph ( ) const
overridevirtual

Implements ClassDefMutable.

Definition at line 5434 of file classdef.cpp.

5435{
5437}

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 3542 of file classdef.cpp.

3543{
3544 return hasNonReferenceSuperClassRec(this,0);
3545}
static bool hasNonReferenceSuperClassRec(const ClassDef *cd, int level)

References hasNonReferenceSuperClassRec().

Referenced by isVisibleInHierarchy().

◆ hideDerivedVariablesInPython()

void ClassDefImpl::hideDerivedVariablesInPython ( ClassDefMutable * cls)
private

Definition at line 3988 of file classdef.cpp.

3989{
3990 //printf("hideDerivedVariableInPython()\n");
3991 if (bClass)
3992 {
3993 const MemberNameInfoLinkedMap &srcMnd = bClass->memberNameInfoLinkedMap();
3994 MemberNameInfoLinkedMap &dstMnd = m_allMemberNameInfoLinkedMap;
3995
3996 // recurse up the inheritance hierarchy
3997 for (const auto &bcd : bClass->baseClasses())
3998 {
4000 }
4001
4002 for (auto &srcMni : srcMnd) // for each member in a base class
4003 {
4004 //printf(" candidate(%s)\n",qPrint(srcMni->memberName()));
4005 MemberNameInfo *dstMni=dstMnd.find(srcMni->memberName());
4006 if (dstMni) // that is also in this class
4007 {
4009 //printf("%s member in %s and %s\n",qPrint(name()),qPrint(bClass->name()),qPrint(name()));
4010 for (it=dstMni->begin();it!=dstMni->end();)
4011 {
4012 MemberDefMutable *dstMd = toMemberDefMutable((*it)->memberDef());
4013 if (dstMd && dstMd->isVariable() && !dstMd->name().startsWith("__"))
4014 {
4015 //printf(" hiding member %s\n",qPrint(dstMd->name()));
4016 // hide a member variable if it is already defined in a base class, unless
4017 // it is a __private variable
4018 removeMemberFromLists(dstMd);
4019 it = dstMni->erase(it);
4020 }
4021 else
4022 {
4023 ++it;
4024 }
4025 }
4026 if (dstMni->empty()) // if the list has become empty, remove the entry from the dictionary
4027 {
4028 dstMnd.del(srcMni->memberName());
4029 }
4030 }
4031 }
4032 }
4033}
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 5095 of file classdef.cpp.

5096{
5097 return m_incInfo.get();
5098}

References m_incInfo.

◆ inheritanceGraphFileName()

QCString ClassDefImpl::inheritanceGraphFileName ( ) const
overridevirtual

returns the file name to use for the inheritance graph

Implements ClassDef.

Definition at line 5424 of file classdef.cpp.

5425{
5426 return m_inheritFileName;
5427}

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 1002 of file classdef.cpp.

1004{
1005 //printf("*** insert base class %s into %s\n",qPrint(cd->name()),qPrint(name()));
1006 m_inherits.emplace_back(cd,n,p,s,t);
1007 m_isSimple = FALSE;
1008}

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 4422 of file classdef.cpp.

4423{
4424 AUTO_TRACE("this={} cd={} templSpec={}",name(),templateClass->name(),templSpec);
4425 m_templateInstances.emplace_back(templSpec,templateClass);
4426}

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

◆ insertMember()

void ClassDefImpl::insertMember ( MemberDef * md)
overridevirtual

Implements ClassDefMutable.

Definition at line 1348 of file classdef.cpp.

1349{
1351}
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 1011 of file classdef.cpp.

1013{
1014 //printf("*** insert sub class %s into %s\n",qPrint(cd->name()),qPrint(name()));
1015 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
1016 if (!extractPrivate && cd->protection()==Protection::Private) return;
1017 m_inheritedBy.emplace_back(cd,QCString(),p,s,t);
1018 m_isSimple = FALSE;
1019}
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 4359 of file classdef.cpp.

4361{
4362 freshInstance = FALSE;
4363 auto it = std::find_if(m_templateInstances.begin(),
4364 m_templateInstances.end(),
4365 [&templSpec](const auto &ti) { return templSpec==ti.templSpec; });
4366 ClassDefMutable *templateClass=nullptr;
4367 if (it!=m_templateInstances.end())
4368 {
4369 templateClass = toClassDefMutable((*it).classDef);
4370 }
4371 if (templateClass==nullptr)
4372 {
4373 QCString tcname = removeRedundantWhiteSpace(name()+templSpec);
4374 AUTO_TRACE("New template instance class name='{}' templSpec='{}' inside '{}' hidden={}",
4375 name(),templSpec,name(),isHidden());
4376
4377 ClassDef *foundCd = Doxygen::classLinkedMap->find(tcname);
4378 if (foundCd)
4379 {
4380 return foundCd;
4381 }
4382 templateClass =
4384 Doxygen::classLinkedMap->add(tcname,
4385 std::unique_ptr<ClassDef>(
4386 new ClassDefImpl(fileName,startLine,startColumn,tcname,ClassDef::Class))));
4387 if (templateClass)
4388 {
4389 templateClass->setTemplateMaster(this);
4390 ArgumentList tal = *stringToArgumentList(getLanguage(),templSpec);
4391 templateClass->setTemplateArguments(tal);
4392 templateClass->setOuterScope(getOuterScope());
4393 templateClass->setHidden(isHidden());
4394 templateClass->setArtificial(isArtificial());
4395 templateClass->setImplicitTemplateInstance(true);
4396 m_templateInstances.emplace_back(templSpec,templateClass);
4397
4398 // also add nested classes
4399 for (const auto &innerCd : m_innerClasses)
4400 {
4401 QCString innerName = tcname+"::"+innerCd->localName();
4402 ClassDefMutable *innerClass =
4404 Doxygen::classLinkedMap->add(innerName,
4405 std::unique_ptr<ClassDef>(
4406 new ClassDefImpl(fileName,startLine,startColumn,innerName,ClassDef::Class))));
4407 if (innerClass)
4408 {
4409 templateClass->addInnerCompound(innerClass);
4410 innerClass->setOuterScope(templateClass);
4411 innerClass->setHidden(isHidden());
4412 innerClass->setArtificial(TRUE);
4413 innerClass->setImplicitTemplateInstance(true);
4414 }
4415 }
4416 freshInstance=TRUE;
4417 }
4418 }
4419 return templateClass;
4420}
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 1398 of file classdef.cpp.

1399{
1400 if (fd == nullptr) return;
1401
1402 if (std::find(m_files.begin(), m_files.end(), fd) == m_files.end()) m_files.push_back(fd);
1403
1404 for (const auto &ti : m_templateInstances)
1405 {
1406 if (ClassDefMutable *cdm = toClassDefMutable(ti.classDef)) cdm->insertUsedFile(fd);
1407 }
1408}

References m_files, m_templateInstances, and toClassDefMutable().

◆ internalInsertMember()

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

isReference()

Definition at line 1043 of file classdef.cpp.

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

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 5120 of file classdef.cpp.

5121{
5122 return m_isAbstract || m_spec.isAbstract();
5123}

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 4619 of file classdef.cpp.

4620{
4621 return md->getClassDef() && isBaseClass(md->getClassDef(),TRUE,QCString());
4622}
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 3690 of file classdef.cpp.

3691{
3692 int distance=0;
3693 //printf("isBaseClass(cd=%s) looking for %s templSpec=%s\n",qPrint(name()),qPrint(bcd->name()),qPrint(templSpec));
3694 for (const auto &bclass : baseClasses())
3695 {
3696 const ClassDef *ccd = bclass.classDef;
3697 if (!followInstances && ccd->templateMaster())
3698 {
3699 ccd=ccd->templateMaster();
3700 }
3701 if (ccd==bcd && (templSpec.isEmpty() || templSpec==bclass.templSpecifiers))
3702 {
3703 distance=1;
3704 break; // no shorter path possible
3705 }
3706 else
3707 {
3708 int d = ccd->isBaseClass(bcd,followInstances,templSpec);
3709 if (d>256)
3710 {
3711 err("Possible recursive class relation while inside {} and looking for base class {}\n",name(),bcd->name());
3712 return 0;
3713 }
3714 else if (d>0) // path found
3715 {
3716 if (distance==0 || d+1<distance) // update if no path found yet or shorter path found
3717 {
3718 distance=d+1;
3719 }
3720 }
3721 }
3722 }
3723 return distance;
3724}
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 5160 of file classdef.cpp.

5161{
5162 return getLanguage()==SrcLangExt::CSharp;
5163}

References DefinitionMixin< ClassDefMutable >::getLanguage().

◆ isEmbeddedInOuterScope()

bool ClassDefImpl::isEmbeddedInOuterScope ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5278 of file classdef.cpp.

5279{
5280 bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
5281 bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
5282
5283 Definition *container = getOuterScope();
5284
5285 bool containerLinkable =
5286 container &&
5287 (
5288 (container==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) || // global class in documented file
5289 container->isLinkableInProject() // class in documented scope
5290 );
5291
5292 // inline because of INLINE_GROUPED_CLASSES=YES ?
5293 bool b1 = (inlineGroupedClasses && !partOfGroups().empty()); // a grouped class
5294 // inline because of INLINE_SIMPLE_STRUCTS=YES ?
5295 bool b2 = (inlineSimpleClasses && m_isSimple && // a simple class
5296 (containerLinkable || // in a documented container
5297 !partOfGroups().empty() // or part of a group
5298 )
5299 );
5300 //printf("%s::isEmbeddedInOuterScope(): inlineGroupedClasses=%d "
5301 // "inlineSimpleClasses=%d partOfGroups()=%p m_isSimple=%d "
5302 // "getOuterScope()=%s b1=%d b2=%d\n",
5303 // qPrint(name()),inlineGroupedClasses,inlineSimpleClasses,
5304 // partOfGroups().pointer(),m_isSimple,getOuterScope()?qPrint(getOuterScope()->name()):"<none>",b1,b2);
5305 return b1 || b2; // either reason will do
5306}

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 5380 of file classdef.cpp.

5381{
5382 QCString n = name();
5383 int si = n.find('(');
5384 int ei = n.find(')');
5385 bool b = ei>si && n.mid(si+1,ei-si-1).stripWhiteSpace().isEmpty();
5386 return b;
5387}

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 5125 of file classdef.cpp.

5126{
5127 return m_spec.isFinal();
5128}

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 5155 of file classdef.cpp.

5156{
5157 return getLanguage()==SrcLangExt::Fortran;
5158}

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 5140 of file classdef.cpp.

5141{
5142 return m_spec.isForwardDecl();
5143}

References m_spec.

◆ isImplicitTemplateInstance()

bool ClassDefImpl::isImplicitTemplateInstance ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5080 of file classdef.cpp.

5081{
5083}

References m_implicitTemplateInstance.

◆ isInterface()

bool ClassDefImpl::isInterface ( ) const
overridevirtual

Returns TRUE if this class represents an interface.

Implements ClassDef.

Definition at line 5145 of file classdef.cpp.

5146{
5147 return m_spec.isInterface();
5148}

References m_spec.

◆ isJavaEnum()

bool ClassDefImpl::isJavaEnum ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5326 of file classdef.cpp.

5327{
5328 return m_isJavaEnum;
5329}

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 3642 of file classdef.cpp.

3643{
3645 {
3646 return m_templateMaster->isLinkable();
3647 }
3648 else
3649 {
3650 return isReference() || isLinkableInProject();
3651 }
3652}
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 3610 of file classdef.cpp.

3611{
3612 bool extractLocal = Config_getBool(EXTRACT_LOCAL_CLASSES);
3613 bool extractStatic = Config_getBool(EXTRACT_STATIC);
3614 bool hideUndoc = Config_getBool(HIDE_UNDOC_CLASSES);
3616 {
3617 return m_templateMaster->isLinkableInProject();
3618 }
3619 else
3620 {
3621 //printf("%s::isLinkableInProject() conditions: artificial=%d hidden=%d anonymous=%d protection=%d local=%d docs=%d static=%d ref=%d\n",
3622 // qPrint(name()),
3623 // !isArtificial(),
3624 // !isHidden(),
3625 // !isAnonymous(),
3626 // m_prot,
3627 // !m_isLocal || extractLocal,
3628 // hasDocumentation() || m_tempArgs.hasTemplateDocumentation() || !hideUndoc,
3629 // !m_isStatic || extractStatic,
3630 // !isReference());
3631 return
3632 !isArtificial() && !isHidden() && /* not hidden */
3633 !isAnonymous() && /* not anonymous */
3634 protectionLevelVisible(m_prot) && /* private/internal */
3635 (!m_isLocal || extractLocal) && /* local */
3636 (hasDocumentation() || m_tempArgs.hasTemplateDocumentation() || !hideUndoc) && /* documented */
3637 (!m_isStatic || extractStatic) && /* static */
3638 !isReference(); /* not an external reference */
3639 }
3640}
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 5000 of file classdef.cpp.

5001{
5002 return m_isLocal;
5003}

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 5150 of file classdef.cpp.

5151{
5152 return getLanguage()==SrcLangExt::ObjC;
5153}

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 5135 of file classdef.cpp.

5136{
5137 return m_spec.isPublished();
5138}

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 4502 of file classdef.cpp.

4503{
4505 {
4506 return m_templateMaster->isReference();
4507 }
4508 else
4509 {
4511 }
4512}
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 5130 of file classdef.cpp.

5131{
5132 return m_spec.isSealed();
5133}

References m_spec.

Referenced by addClassAttributes().

◆ isSimple()

bool ClassDefImpl::isSimple ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5240 of file classdef.cpp.

5241{
5242 return m_isSimple;
5243}

References m_isSimple.

Referenced by internalInsertMember(), and writeInlineDocumentation().

◆ isSliceLocal()

bool ClassDefImpl::isSliceLocal ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5409 of file classdef.cpp.

5410{
5411 return m_spec.isLocal();
5412}

References m_spec.

Referenced by title(), and writeDeclarationLink().

◆ isSmartPointer()

const MemberDef * ClassDefImpl::isSmartPointer ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5245 of file classdef.cpp.

5246{
5247 return m_arrowOperator;
5248}

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 3728 of file classdef.cpp.

3729{
3730 bool found=FALSE;
3731 if (level>256)
3732 {
3733 err("Possible recursive class relation while inside {} and looking for derived class {}\n",name(),cd->name());
3734 return FALSE;
3735 }
3736 for (const auto &iscd : subClasses())
3737 {
3738 ClassDef *ccd=iscd.classDef;
3739 found = (ccd==cd) || ccd->isSubClass(cd,level+1);
3740 if (found) break;
3741 }
3742 return found;
3743}
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 5090 of file classdef.cpp.

5091{
5092 return !m_tempArgs.empty();
5093}

References m_tempArgs.

◆ isTemplateArgument()

bool ClassDefImpl::isTemplateArgument ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5115 of file classdef.cpp.

5116{
5117 return m_isTemplArg;
5118}

References m_isTemplArg.

◆ isUsedOnly()

bool ClassDefImpl::isUsedOnly ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5235 of file classdef.cpp.

5236{
5237 return m_usedOnly;
5238}

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 3656 of file classdef.cpp.

3657{
3658 bool allExternals = Config_getBool(ALLEXTERNALS);
3659 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
3660 bool extractStatic = Config_getBool(EXTRACT_STATIC);
3661
3662 return // show all classes or a subclass is visible
3663 ((allExternals && !isArtificial()) || hasNonReferenceSuperClass()) &&
3664 // and not an anonymous compound
3665 !isAnonymous() &&
3666 // and not privately inherited
3668 // documented or shown anyway or documentation is external
3669 (hasDocumentation() ||
3670 !hideUndocClasses ||
3671 (m_templateMaster && m_templateMaster->hasDocumentation()) ||
3672 isReference()
3673 ) &&
3674 // if this is an implicit template instance then it most be part of the inheritance hierarchy
3675 (!m_implicitTemplateInstance || !m_inherits.empty() || !m_inheritedBy.empty()) &&
3676 // is not part of an unnamed namespace or shown anyway
3677 (!m_isStatic || extractStatic);
3678}
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 5220 of file classdef.cpp.

5221{
5222 m_isTemplArg = b;
5223}

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 5035 of file classdef.cpp.

5036{
5038}

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 4081 of file classdef.cpp.

4082{
4083 AUTO_TRACE();
4084 ClassDefMutable *category = toClassDefMutable(cat);
4085 if (category)
4086 {
4087 bool extractLocalMethods = Config_getBool(EXTRACT_LOCAL_METHODS);
4088 bool makePrivate = category->isLocal();
4089 // in case extract local methods is not enabled we don't add the methods
4090 // of the category in case it is defined in the .m file.
4091 if (makePrivate && !extractLocalMethods) return;
4092 bool isExtension = category->isExtension();
4093
4094 category->setCategoryOf(this);
4095 if (isExtension)
4096 {
4097 category->setArtificial(TRUE);
4098
4099 // copy base classes/protocols from extension
4100 for (const auto &bcd : category->baseClasses())
4101 {
4102 insertBaseClass(bcd.classDef,bcd.usedName,bcd.prot,bcd.virt,bcd.templSpecifiers);
4103 // correct bcd.classDef so that they do no longer derive from
4104 // category, but from this class!
4105 BaseClassList scl = bcd.classDef->subClasses();
4106 for (auto &scd : scl)
4107 {
4108 if (scd.classDef==category)
4109 {
4110 scd.classDef=this;
4111 }
4112 }
4113 bcd.classDef->updateSubClasses(scl);
4114 }
4115 }
4116 // make methods private for categories defined in the .m file
4117 //printf("%s::mergeCategory makePrivate=%d\n",qPrint(name()),makePrivate);
4118
4119 const MemberNameInfoLinkedMap &srcMnd = category->memberNameInfoLinkedMap();
4120 MemberNameInfoLinkedMap &dstMnd = m_allMemberNameInfoLinkedMap;
4121
4122 for (auto &srcMni : srcMnd)
4123 {
4124 MemberNameInfo *dstMni=dstMnd.find(srcMni->memberName());
4125 if (dstMni) // method is already defined in the class
4126 {
4127 AUTO_TRACE_ADD("Existing member {}",srcMni->memberName());
4128 const auto &dstMi = dstMni->front();
4129 const auto &srcMi = srcMni->front();
4130 if (srcMi && dstMi)
4131 {
4132 MemberDefMutable *smdm = toMemberDefMutable(srcMi->memberDef());
4133 MemberDefMutable *dmdm = toMemberDefMutable(dstMi->memberDef());
4134 if (smdm && dmdm)
4135 {
4137 dmdm->setCategory(category);
4138 dmdm->setCategoryRelation(smdm);
4139 smdm->setCategoryRelation(dmdm);
4140 }
4141 }
4142 }
4143 else // new method name
4144 {
4145 AUTO_TRACE_ADD("New member {}",srcMni->memberName());
4146 // create a deep copy of the list
4147 MemberNameInfo *newMni = dstMnd.add(srcMni->memberName());
4148
4149 // copy the member(s) from the category to this class
4150 for (auto &mi : *srcMni)
4151 {
4152 //printf("Adding '%s'\n",qPrint(mi->memberDef->name()));
4153 Protection prot = mi->prot();
4154 //if (makePrivate) prot = Private;
4155 auto newMd = mi->memberDef()->deepCopy();
4156 if (newMd)
4157 {
4158 auto mmd = toMemberDefMutable(newMd.get());
4159 AUTO_TRACE_ADD("Copying member {}",mmd->name());
4160 if (mmd)
4161 {
4162 mmd->moveTo(this);
4163 }
4164
4165 auto newMi=std::make_unique<MemberInfo>(newMd.get(),prot,mi->virt(),mi->inherited(),mi->virtualBaseClass());
4166 newMi->setScopePath(mi->scopePath());
4167 newMi->setAmbigClass(mi->ambigClass());
4168 newMi->setAmbiguityResolutionScope(mi->ambiguityResolutionScope());
4169 newMni->push_back(std::move(newMi));
4170
4171 // also add the newly created member to the global members list
4172
4173 QCString name = newMd->name();
4174 MemberName *mn = Doxygen::memberNameLinkedMap->add(name);
4175
4176 if (mmd)
4177 {
4178 mmd->setCategory(category);
4179 mmd->setCategoryRelation(mi->memberDef());
4180 }
4181 auto miMmd = toMemberDefMutable(mi->memberDef());
4182 if (miMmd) miMmd->setCategoryRelation(newMd.get());
4183
4184 if (mmd && (makePrivate || isExtension))
4185 {
4186 mmd->makeImplementationDetail();
4187 }
4188 internalInsertMember(newMd.get(),prot,FALSE);
4189 mn->push_back(std::move(newMd));
4190 }
4191 }
4192 }
4193 }
4194 }
4195}
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
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 4040 of file classdef.cpp.

4041{
4042 if (m_membersMerged) return;
4043 if (getLanguage()==SrcLangExt::Python)
4044 {
4045 for (const auto &bcd : baseClasses())
4046 {
4047 ClassDefMutable *bClass=toClassDefMutable(bcd.classDef);
4049 }
4050 }
4051
4052 //printf("> %s::mergeMembers()\n",qPrint(name()));
4053
4055
4056 // first merge the members of the base class recursively
4057 for (const auto &bcd : baseClasses())
4058 {
4059 ClassDefMutable *bClass=toClassDefMutable(bcd.classDef);
4060 if (bClass)
4061 {
4062 // merge the members in the base class of this inheritance branch first
4063 bClass->mergeMembers();
4064 }
4065 }
4066
4067 // first merge the member that are not inherited via a virtual base class
4068 // (as this can end up reimplemented via multiple paths, see #10717 for examples)
4070 // then process the member that are inherited via a virtual base class to add the
4071 // ones that are not reimplemented via any path
4073
4074 //printf("< %s::mergeMembers()\n",qPrint(name()));
4075}
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 3754 of file classdef.cpp.

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

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 977 of file classdef.cpp.

978{
979 //printf("%s::moveTo(%s)\n",qPrint(name()),qPrint(scope->name()));
980 setOuterScope(scope);
982 {
983 m_fileDef = toFileDef(scope);
984 }
985 else if (scope->definitionType()==Definition::TypeModule)
986 {
987 m_moduleDef = toModuleDef(scope);
988 }
989}
void setOuterScope(Definition *def) override
FileDef * toFileDef(Definition *d)
Definition filedef.cpp:1966
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 5456 of file classdef.cpp.

5457{
5459}

References m_hasCollaborationGraph.

◆ overrideInheritanceGraph()

void ClassDefImpl::overrideInheritanceGraph ( CLASS_GRAPH_t e)
overridevirtual

Implements ClassDefMutable.

Definition at line 5429 of file classdef.cpp.

5430{
5432}

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 5050 of file classdef.cpp.

5051{
5052 return m_prot;
5053}

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 4530 of file classdef.cpp.

4532{
4533 return makeQualifiedNameWithTemplateParameters(this,actualParams,actualParamIndex);
4534}
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 5250 of file classdef.cpp.

5251{
5252 md->setMemberType(t);
5253 for (auto &ml : m_memberLists)
5254 {
5255 ml->remove(md);
5256 }
5257 insertMember(md);
5258}
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 5318 of file classdef.cpp.

5319{
5320 for (auto &ml : m_memberLists)
5321 {
5322 ml->remove(md);
5323 }
5324}

References m_memberLists.

Referenced by hideDerivedVariablesInPython().

◆ requiresClause()

QCString ClassDefImpl::requiresClause ( ) const
overridevirtual

Implements ClassDef.

Definition at line 3547 of file classdef.cpp.

3548{
3549 return m_requiresClause;
3550}

References m_requiresClause.

◆ setAnonymousEnumType()

void ClassDefImpl::setAnonymousEnumType ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4713 of file classdef.cpp.

4714{
4715 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4716 {
4717 if (lde->kind()==LayoutDocEntry::MemberDecl)
4718 {
4719 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4720 if (lmd)
4721 {
4722 MemberList * ml = getMemberList(lmd->type);
4723 if (ml)
4724 {
4726 }
4727 }
4728 }
4729 else if (lde->kind()==LayoutDocEntry::MemberGroups)
4730 {
4731 for (const auto &mg : m_memberGroups)
4732 {
4733 mg->setAnonymousEnumType();
4734 }
4735 }
4736 }
4737}
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 5225 of file classdef.cpp.

5226{
5227 m_categoryOf = cd;
5228}

References m_categoryOf.

◆ setClassName()

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

Implements ClassDefMutable.

Definition at line 4547 of file classdef.cpp.

4548{
4549 m_className = name;
4550}

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

◆ setClassSpecifier()

void ClassDefImpl::setClassSpecifier ( TypeSpecifier spec)
overridevirtual

Implements ClassDefMutable.

Definition at line 5331 of file classdef.cpp.

5332{
5333 m_spec = spec;
5334}

References m_spec.

◆ setCompoundType()

void ClassDefImpl::setCompoundType ( CompoundType t)
overridevirtual

Implements ClassDefMutable.

Definition at line 5209 of file classdef.cpp.

5210{
5211 m_compType = t;
5212}

References m_compType.

◆ setFileDef()

void ClassDefImpl::setFileDef ( FileDef * fd)
overridevirtual

Implements ClassDefMutable.

Definition at line 5180 of file classdef.cpp.

5181{
5182 m_fileDef = fd;
5183}

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 4324 of file classdef.cpp.

4325{
4326 gd->addClass(this);
4327 //printf("ClassDefImpl::setGroupDefForAllMembers(%s)\n",qPrint(gd->name()));
4328 for (auto &mni : m_allMemberNameInfoLinkedMap)
4329 {
4330 for (auto &mi : *mni)
4331 {
4332 MemberDefMutable *md = toMemberDefMutable(mi->memberDef());
4333 if (md)
4334 {
4335 md->setGroupDef(gd,pri,fileName,startLine,hasDocs);
4336 gd->insertMember(md,TRUE);
4337 ClassDefMutable *innerClass = toClassDefMutable(md->getClassDefOfAnonymousType());
4338 if (innerClass) innerClass->setGroupDefForAllMembers(gd,pri,fileName,startLine,hasDocs);
4339 }
4340 }
4341 }
4342}
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 5085 of file classdef.cpp.

5086{
5088}

References m_implicitTemplateInstance.

◆ setIncludeFile()

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

Implements ClassDefMutable.

Definition at line 1432 of file classdef.cpp.

1434{
1435 //printf("ClassDefImpl::setIncludeFile(%p,%s,%d,%d)\n",fd,includeName,local,force);
1436 if (!m_incInfo) m_incInfo = std::make_unique<IncludeInfo>();
1437 if ((!includeName.isEmpty() && m_incInfo->includeName.isEmpty()) ||
1438 (fd!=nullptr && m_incInfo->fileDef==nullptr)
1439 )
1440 {
1441 //printf("Setting file info\n");
1442 m_incInfo->fileDef = fd;
1443 m_incInfo->includeName = includeName;
1445 }
1446 if (force && !includeName.isEmpty())
1447 {
1448 m_incInfo->includeName = includeName;
1450 }
1451}
@ 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 5204 of file classdef.cpp.

5205{
5206 m_isStatic=b;
5207}

References m_isStatic.

◆ setMetaData()

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

Implements ClassDefMutable.

Definition at line 5414 of file classdef.cpp.

5415{
5416 m_metaData = md;
5417}

References m_metaData.

◆ setModuleDef()

void ClassDefImpl::setModuleDef ( ModuleDef * mod)
overridevirtual

Implements ClassDefMutable.

Definition at line 5185 of file classdef.cpp.

5186{
5187 m_moduleDef = mod;
5188}

References m_moduleDef.

◆ setPrimaryConstructorParams()

void ClassDefImpl::setPrimaryConstructorParams ( const ArgumentList & list)
overridevirtual

Implements ClassDefMutable.

Definition at line 3557 of file classdef.cpp.

3558{
3560}
ArgumentList m_primaryConstructorParams
Definition classdef.cpp:560

References m_primaryConstructorParams.

◆ setProtection()

void ClassDefImpl::setProtection ( Protection p)
overridevirtual

Implements ClassDefMutable.

Definition at line 5195 of file classdef.cpp.

5196{
5197 m_prot=p;
5198 if (getLanguage()==SrcLangExt::VHDL && VhdlDocGen::convert(p)==VhdlDocGen::ARCHITECTURECLASS)
5199 {
5200 m_className = name();
5201 }
5202}
@ 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 3552 of file classdef.cpp.

3553{
3554 m_requiresClause = req;
3555}

References m_requiresClause.

◆ setSubGrouping()

void ClassDefImpl::setSubGrouping ( bool enabled)
overridevirtual

Implements ClassDefMutable.

Definition at line 5190 of file classdef.cpp.

5191{
5192 m_subGrouping = enabled;
5193}

References m_subGrouping.

◆ setTagLessReference()

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

Implements ClassDefMutable.

Definition at line 5313 of file classdef.cpp.

5314{
5315 m_tagLessRef = cd;
5316}

References m_tagLessRef.

◆ setTemplateArguments()

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

Implements ClassDefMutable.

Definition at line 3499 of file classdef.cpp.

3500{
3501 m_tempArgs = al;
3502}

References m_tempArgs.

◆ setTemplateBaseClassNames()

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

Implements ClassDefMutable.

Definition at line 4428 of file classdef.cpp.

4429{
4430 m_templBaseClassNames = templateNames;
4431}

References m_templBaseClassNames.

◆ setTemplateMaster()

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

Implements ClassDefMutable.

Definition at line 5214 of file classdef.cpp.

5215{
5216 assert(tm!=this);
5218}

References m_templateMaster.

◆ setTypeConstraints()

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

Implements ClassDefMutable.

Definition at line 3494 of file classdef.cpp.

3495{
3496 m_typeConstraints = al;
3497}

References m_typeConstraints.

◆ setUsedOnly()

void ClassDefImpl::setUsedOnly ( bool b)
overridevirtual

Implements ClassDefMutable.

Definition at line 5230 of file classdef.cpp.

5231{
5232 m_usedOnly = b;
5233}

References m_usedOnly.

◆ showUsedFiles()

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

Definition at line 1731 of file classdef.cpp.

1732{
1733 ol.pushGeneratorState();
1735
1736
1737 ol.writeRuler();
1738 ol.pushGeneratorState();
1740 ol.startParagraph();
1742 ol.endParagraph();
1743 ol.popGeneratorState();
1747
1748 bool first=TRUE;
1749 for (const auto &fd : m_files)
1750 {
1751 if (first)
1752 {
1753 first=FALSE;
1754 ol.startItemList();
1755 }
1756
1757 ol.startItemListItem();
1758 QCString path=fd->getPath();
1759 if (Config_getBool(FULL_PATH_NAMES))
1760 {
1761 ol.docify(stripFromPath(path));
1762 }
1763
1764 QCString fname = fd->name();
1765 if (!fd->getVersion().isEmpty()) // append version if available
1766 {
1767 fname += " (" + fd->getVersion() + ")";
1768 }
1769
1770 // for HTML
1771 ol.pushGeneratorState();
1773 if (fd->generateSourceFile())
1774 {
1775 ol.writeObjectLink(QCString(),fd->getSourceFileBase(),QCString(),fname);
1776 }
1777 else if (fd->isLinkable())
1778 {
1779 ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fname);
1780 }
1781 else
1782 {
1783 ol.startBold();
1784 ol.docify(fname);
1785 ol.endBold();
1786 }
1787 ol.popGeneratorState();
1788
1789 // for other output formats
1790 ol.pushGeneratorState();
1792 if (fd->isLinkable())
1793 {
1794 ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fname);
1795 }
1796 else
1797 {
1798 ol.docify(fname);
1799 }
1800 ol.popGeneratorState();
1801
1802 ol.endItemListItem();
1803 }
1804 if (!first) ol.endItemList();
1805
1806 ol.popGeneratorState();
1807}
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:298

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 5040 of file classdef.cpp.

5041{
5042 std::stable_sort(m_allMemberNameInfoLinkedMap.begin(),
5044 [](const auto &m1,const auto &m2)
5045 {
5046 return qstricmp_sort(m1->memberName(),m2->memberName())<0;
5047 });
5048}

References m_allMemberNameInfoLinkedMap.

◆ sortMemberLists()

void ClassDefImpl::sortMemberLists ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4656 of file classdef.cpp.

4657{
4658 for (auto &ml : m_memberLists)
4659 {
4660 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
4661 }
4662 if (Config_getBool(SORT_BRIEF_DOCS))
4663 {
4664 std::stable_sort(m_innerClasses.begin(),
4665 m_innerClasses.end(),
4666 [](const auto &c1,const auto &c2)
4667 {
4668 return Config_getBool(SORT_BY_SCOPE_NAME) ?
4669 qstricmp_sort(c1->name(), c2->name() )<0 :
4670 qstricmp_sort(c1->className(), c2->className())<0 ;
4671 });
4672 }
4673}

References Config_getBool, FALSE, m_innerClasses, and m_memberLists.

◆ startMemberDeclarations()

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

Definition at line 2220 of file classdef.cpp.

2221{
2222 //printf("%s: ClassDefImpl::startMemberDeclarations()\n",qPrint(name()));
2224}
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 2200 of file classdef.cpp.

2201{
2202 //printf("%s: ClassDefImpl::startMemberDocumentation()\n",qPrint(name()));
2203 if (Config_getBool(SEPARATE_MEMBER_PAGES))
2204 {
2207 }
2208}

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 5025 of file classdef.cpp.

5026{
5027 return m_inheritedBy;
5028}

References m_inheritedBy.

Referenced by isSubClass().

◆ subGrouping()

bool ClassDefImpl::subGrouping ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5404 of file classdef.cpp.

5405{
5406 return m_subGrouping;
5407}

References m_subGrouping.

◆ tagLessReference()

const ClassDef * ClassDefImpl::tagLessReference ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5308 of file classdef.cpp.

5309{
5310 return m_tagLessRef;
5311}

References m_tagLessRef.

◆ templateArguments()

const ArgumentList & ClassDefImpl::templateArguments ( ) const
overridevirtual

Returns the template arguments of this class.

Implements ClassDef.

Definition at line 5055 of file classdef.cpp.

5056{
5057 return m_tempArgs;
5058}

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 5075 of file classdef.cpp.

5076{
5077 return m_templateMaster;
5078}

References m_templateMaster.

◆ templateTypeConstraints()

const ConstraintClassList & ClassDefImpl::templateTypeConstraints ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5110 of file classdef.cpp.

5111{
5112 return m_constraintClassList;
5113}

References m_constraintClassList.

◆ title()

QCString ClassDefImpl::title ( ) const
overridevirtual

Implements ClassDef.

Definition at line 2907 of file classdef.cpp.

2908{
2909 QCString pageTitle;
2910 SrcLangExt lang = getLanguage();
2911
2912 auto getReferenceTitle = [this](std::function<QCString()> translateFunc) -> QCString
2913 {
2914 return Config_getBool(HIDE_COMPOUND_REFERENCE) ? displayName() : translateFunc();
2915 };
2916
2917 if (lang==SrcLangExt::Fortran)
2918 {
2919 pageTitle = getReferenceTitle([this](){
2921 });
2922 }
2923 else if (lang==SrcLangExt::Slice)
2924 {
2925 pageTitle = getReferenceTitle([this](){
2927 });
2928 }
2929 else if (lang==SrcLangExt::VHDL)
2930 {
2931 pageTitle = getReferenceTitle([this](){
2933 });
2934 }
2935 else if (lang==SrcLangExt::CSharp && !m_primaryConstructorParams.empty())
2936 {
2937 pageTitle = getReferenceTitle([this](){
2939 m_compType,
2940 !m_tempArgs.empty());
2941 });
2942 }
2943 else if (isJavaEnum())
2944 {
2945 pageTitle = getReferenceTitle([this](){
2947 });
2948 }
2949 else if (m_compType==Service)
2950 {
2951 pageTitle = getReferenceTitle([this](){
2953 });
2954 }
2955 else if (m_compType==Singleton)
2956 {
2957 pageTitle = getReferenceTitle([this](){
2959 });
2960 }
2961 else
2962 {
2963 pageTitle = getReferenceTitle([this](){
2965 m_compType == Interface && getLanguage()==SrcLangExt::ObjC ? Class : m_compType,
2966 !m_tempArgs.empty());
2967 });
2968 }
2969 return pageTitle;
2970}
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 *)
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
Definition util.cpp:1254

References argListToString(), ClassDef::Class, Config_getBool, displayName(), VhdlDocGen::getClassTitle(), DefinitionMixin< ClassDefMutable >::getLanguage(), ClassDef::Interface, isJavaEnum(), isSliceLocal(), m_compType, m_primaryConstructorParams, 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 5394 of file classdef.cpp.

5395{
5396 return m_typeConstraints;
5397}

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 5020 of file classdef.cpp.

5021{
5022 m_inherits = bcd;
5023}

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 5030 of file classdef.cpp.

5031{
5032 m_inheritedBy = bcd;
5033}

References m_inheritedBy.

◆ usedByImplementationClasses()

const UsesClassList & ClassDefImpl::usedByImplementationClasses ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5105 of file classdef.cpp.

5106{
5107 return m_usedByImplClassList;
5108}

References m_usedByImplClassList.

◆ usedFiles()

const FileList & ClassDefImpl::usedFiles ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5389 of file classdef.cpp.

5390{
5391 return m_files;
5392}

References m_files.

◆ usedImplementationClasses()

const UsesClassList & ClassDefImpl::usedImplementationClasses ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5100 of file classdef.cpp.

5101{
5102 return m_usesImplClassList;
5103}

References m_usesImplClassList.

◆ visibleInParentsDeclList()

bool ClassDefImpl::visibleInParentsDeclList ( ) const
overridevirtual

show this class in the declaration section of its parent?

Implements ClassDef.

Definition at line 2597 of file classdef.cpp.

2598{
2599 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
2600 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
2601 bool extractLocalClasses = Config_getBool(EXTRACT_LOCAL_CLASSES);
2602 bool linkable = isLinkable();
2603 return (!isAnonymous() && !isExtension() &&
2604 (protection()!=Protection::Private || extractPrivate) &&
2605 (linkable || (!hideUndocClasses && (!isLocal() || extractLocalClasses)))
2606 );
2607}
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 4829 of file classdef.cpp.

4830{
4831 //printf("**** writeAdditionalInheritedMembers()\n");
4832 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4833 {
4834 if (lde->kind()==LayoutDocEntry::MemberDecl)
4835 {
4836 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4837 if (lmd && lmd->type!=MemberListType::Friends())
4838 {
4839 ClassDefSet visited;
4841 }
4842 }
4843 }
4844}
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 2240 of file classdef.cpp.

2241{
2242 ol.pushGeneratorState();
2244 ol.writeString("\n");
2245 ol.startGroupHeader();
2247 ol.endGroupHeader();
2249 ol.popGeneratorState();
2250}
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 1554 of file classdef.cpp.

1555{
1556 if (hasBriefDescription())
1557 {
1558 ol.startParagraph();
1559 ol.pushGeneratorState();
1561 ol.writeString(" - ");
1562 ol.popGeneratorState();
1564 briefLine(),
1565 this,
1566 nullptr,
1568 DocOptions()
1569 .setIndexWords(true)
1570 .setSingleLine(true));
1571 ol.pushGeneratorState();
1573 ol.writeString(" \n");
1575 ol.popGeneratorState();
1576
1577 if (hasDetailedDescription() || exampleFlag)
1578 {
1579 writeMoreLink(ol,anchor());
1580 }
1581
1582 ol.endParagraph();
1583 }
1584 ol.writeSynopsis();
1585}
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 1971 of file classdef.cpp.

1972{
1973 if (Config_getBool(HAVE_DOT) && m_hasCollaborationGraph /*&& Config_getBool(COLLABORATION_GRAPH)*/)
1974 {
1975 DotClassGraph usageImplGraph(this,GraphType::Collaboration);
1976 if (usageImplGraph.isTooBig())
1977 {
1978 warn_uncond("Collaboration graph for '{}' not generated, too many nodes ({}), threshold is {}. Consider increasing DOT_GRAPH_MAX_NODES.\n",
1979 name(), usageImplGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
1980 }
1981 else if (!usageImplGraph.isTrivial())
1982 {
1983 ol.pushGeneratorState();
1985 ol.startDotGraph();
1987 ol.endDotGraph(usageImplGraph);
1988 ol.popGeneratorState();
1989 }
1990 }
1991}
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 3565 of file classdef.cpp.

3567{
3568 //printf("ClassName='%s' inGroup=%d\n",qPrint(name()),inGroup);
3569
3571 QCString cn = displayName(FALSE);
3572 if (!cn.isEmpty())
3573 {
3574 ol.docify(" ");
3575 if (md && isLinkable())
3576 {
3577 ol.writeObjectLink(QCString(),QCString(),md->anchor(),cn);
3578 }
3579 else
3580 {
3581 ol.startBold();
3582 ol.docify(cn);
3583 ol.endBold();
3584 }
3585 }
3586 ol.docify(" {");
3588 ol.endMemberDeclaration(md ? md->anchor() : QCString(),inheritId);
3589
3590 // write user defined member groups
3591 for (const auto &mg : m_memberGroups)
3592 {
3593 mg->writePlainDeclarations(ol,inGroup,this,nullptr,nullptr,nullptr,nullptr,indentLevel,inheritedFrom,inheritId);
3594 }
3595
3596 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
3597 {
3598 if (lde->kind()==LayoutDocEntry::MemberDecl)
3599 {
3600 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
3601 if (lmd)
3602 {
3603 writePlainMemberDeclaration(ol,lmd->type,inGroup,indentLevel,inheritedFrom,inheritId);
3604 }
3605 }
3606 }
3607}
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 2609 of file classdef.cpp.

2610{
2611 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
2612 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
2613 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2614 SrcLangExt lang = getLanguage();
2616 {
2617 if (!found) // first class
2618 {
2619 if (sliceOpt)
2620 {
2621 if (compoundType()==Interface)
2622 {
2623 ol.startMemberHeader("interfaces");
2624 }
2625 else if (compoundType()==Struct)
2626 {
2627 ol.startMemberHeader("structs");
2628 }
2629 else if (compoundType()==Exception)
2630 {
2631 ol.startMemberHeader("exceptions");
2632 }
2633 else // compoundType==Class
2634 {
2635 ol.startMemberHeader("nested-classes");
2636 }
2637 }
2638 else // non-Slice optimization: single header for class/struct/..
2639 {
2640 ol.startMemberHeader("nested-classes");
2641 }
2642 if (!header.isEmpty())
2643 {
2644 ol.parseText(header);
2645 }
2646 else if (lang==SrcLangExt::VHDL)
2647 {
2649 }
2650 else
2651 {
2652 ol.parseText(lang==SrcLangExt::Fortran ?
2655 }
2656 ol.endMemberHeader();
2657 ol.startMemberList();
2658 found=TRUE;
2659 }
2661 QCString ctype = compoundTypeString();
2662 QCString cname = displayName(!localNames);
2663 QCString anc = anchor();
2664 if (anc.isEmpty()) anc = cname; else anc.prepend(cname+"_");
2666
2667 if (lang!=SrcLangExt::VHDL) // for VHDL we swap the name and the type
2668 {
2669 if (isSliceLocal())
2670 {
2671 ol.writeString("local ");
2672 }
2673 ol.writeString(ctype);
2674 ol.writeString(" ");
2675 ol.insertMemberAlign();
2676 }
2677 if (isLinkable())
2678 {
2681 anchor(),
2682 cname
2683 );
2684 }
2685 else
2686 {
2687 ol.startBold();
2688 ol.docify(cname);
2689 ol.endBold();
2690 }
2691 if (lang==SrcLangExt::VHDL) // now write the type
2692 {
2693 ol.writeString(" ");
2694 ol.insertMemberAlign();
2696 }
2698
2699 // add the brief description if available
2700 if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
2701 {
2702 auto parser { createDocParser() };
2703 auto ast { validatingParseDoc(*parser.get(),
2704 briefFile(),
2705 briefLine(),
2706 this,
2707 nullptr,
2709 DocOptions()
2710 .setSingleLine(true))
2711 };
2712 if (!ast->isEmpty())
2713 {
2715 ol.writeDoc(ast.get(),this,nullptr);
2716 if (isLinkableInProject())
2717 {
2718 writeMoreLink(ol,anchor());
2719 }
2721 }
2722 }
2723 ol.endMemberDeclaration(anchor(),QCString());
2724 }
2725}
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 1663 of file classdef.cpp.

1665{
1666 if (hasDetailedDescription() || exampleFlag)
1667 {
1668 ol.pushGeneratorState();
1670 ol.writeRuler();
1671 ol.popGeneratorState();
1672
1673 ol.pushGeneratorState();
1675 ol.writeAnchor(QCString(),anchor.isEmpty() ? QCString("details") : anchor);
1676 ol.popGeneratorState();
1677
1678 if (!anchor.isEmpty())
1679 {
1680 ol.pushGeneratorState();
1684 ol.popGeneratorState();
1685 }
1686
1687 ol.startGroupHeader("details");
1688 ol.parseText(title);
1689 ol.endGroupHeader();
1690
1692 }
1693 else
1694 {
1695 //writeTemplateSpec(ol,this,pageType);
1696 }
1697}
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 1587 of file classdef.cpp.

1588{
1589 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
1590
1591 ol.startTextBlock();
1592
1593 if (getLanguage()==SrcLangExt::Cpp)
1594 {
1595 writeTemplateSpec(ol,this,compoundTypeString(),SrcLangExt::Cpp);
1596 }
1597
1598 // repeat brief description
1599 if (!briefDescription().isEmpty() && repeatBrief)
1600 {
1602 briefLine(),
1603 this,
1604 nullptr,
1606 DocOptions());
1607 }
1608 if (!briefDescription().isEmpty() && repeatBrief &&
1609 !documentation().isEmpty())
1610 {
1611 ol.pushGeneratorState();
1613 ol.writeString("\n\n");
1614 ol.popGeneratorState();
1615 }
1616 // write documentation
1617 if (!documentation().isEmpty())
1618 {
1619 ol.generateDoc(docFile(),
1620 docLine(),
1621 this,
1622 nullptr,
1623 documentation(),
1624 DocOptions()
1625 .setIndexWords(true));
1626 }
1627 // write type constraints
1629
1630 ol.generateDoc(
1631 docFile(),docLine(),
1632 this,
1633 nullptr, // memberDef
1635 DocOptions()
1636 .setIndexWords(true));
1637
1638 // write examples
1639 if (hasExamples())
1640 {
1641 ol.startExamples();
1642 ol.startDescForItem();
1644 ol.endDescForItem();
1645 ol.endExamples();
1646 }
1647 writeSourceDef(ol);
1649 ol.endTextBlock();
1650}
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:5479
QCString inlineTemplateArgListToDoc(const ArgumentList &al)
Definition util.cpp:1227
void writeExamples(OutputList &ol, const ExampleList &list)
Definition util.cpp:1175

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 2973 of file classdef.cpp.

2974{
2975 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
2976 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
2977 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
2978 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2979 QCString pageTitle = title();
2980
2982 if (sliceOpt)
2983 {
2984 if (compoundType()==Interface)
2985 {
2987 }
2988 else if (compoundType()==Struct)
2989 {
2991 }
2992 else if (compoundType()==Exception)
2993 {
2995 }
2996 else
2997 {
2999 }
3000 }
3001 else
3002 {
3004 }
3005
3006 AUTO_TRACE("name='{}' getOutputFileBase='{}'",name(),getOutputFileBase());
3007 bool hasAllMembersLink=false;
3008 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
3009 {
3010 if (lde->kind()==LayoutDocEntry::ClassAllMembersLink)
3011 {
3012 hasAllMembersLink = true;
3013 break;
3014 }
3015 }
3016 QCString memListFile;
3017 if (hasAllMembersLink && !m_allMemberNameInfoLinkedMap.empty() && !Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
3018 {
3019 memListFile = getMemberListFileName();
3020 }
3021 startFile(ol,getOutputFileBase(),false,name(),pageTitle,hli,!generateTreeView,QCString(),0,memListFile);
3022 if (!generateTreeView)
3023 {
3025 {
3027 }
3028 ol.endQuickIndices();
3029 }
3030
3031 startTitle(ol,getOutputFileBase(),this);
3032 ol.parseText(pageTitle);
3034 addGroupListToTitle(ol,this);
3036 writeDocumentationContents(ol,pageTitle);
3037
3038 endFileWithNavPath(ol,this);
3039
3040 if (Config_getBool(SEPARATE_MEMBER_PAGES))
3041 {
3042 writeMemberPages(ol);
3043 }
3044}
void addClassAttributes(OutputList &ol) const
void writeMemberPages(OutputList &ol) const override
QCString getMemberListFileName() const override
Definition classdef.cpp:991
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:386
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:396
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:403
void endFileWithNavPath(OutputList &ol, const DefinitionMutable *d, bool showPageNavigation)
Definition index.cpp:450
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:4932

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 2761 of file classdef.cpp.

2762{
2763 ol.startContents();
2764
2765 QCString pageType = " ";
2766 pageType += compoundTypeString();
2767
2768 bool exampleFlag=hasExamples();
2769
2770 //---------------------------------------- start flexible part -------------------------------
2771
2772 SrcLangExt lang = getLanguage();
2773
2774 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
2775 {
2776 switch (lde->kind())
2777 {
2778 case LayoutDocEntry::BriefDesc:
2779 writeBriefDescription(ol,exampleFlag);
2780 break;
2781 case LayoutDocEntry::ClassIncludes:
2782 if (lang==SrcLangExt::Slice)
2783 {
2785 }
2786 else
2787 {
2789 }
2790 break;
2791 case LayoutDocEntry::ClassInheritanceGraph:
2793 break;
2794 case LayoutDocEntry::ClassCollaborationGraph:
2796 break;
2797 case LayoutDocEntry::ClassAllMembersLink:
2798 //writeAllMembersLink(ol); // this is now part of the summary links
2799 break;
2800 case LayoutDocEntry::MemberDeclStart:
2802 break;
2803 case LayoutDocEntry::MemberGroups:
2805 break;
2806 case LayoutDocEntry::MemberDecl:
2807 {
2808 ClassDefSet visitedClasses;
2809 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
2810 if (lmd)
2811 {
2812 writeMemberDeclarations(ol,visitedClasses,lmd->type,lmd->title(lang),lmd->subtitle(lang));
2813 }
2814 }
2815 break;
2816 case LayoutDocEntry::ClassNestedClasses:
2817 {
2818 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
2819 if (ls)
2820 {
2821 writeNestedClasses(ol,ls->title(lang));
2822 }
2823 }
2824 break;
2825 case LayoutDocEntry::MemberDeclEnd:
2827 break;
2828 case LayoutDocEntry::DetailedDesc:
2829 {
2830 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
2831 if (ls)
2832 {
2833 writeDetailedDescription(ol,pageType,exampleFlag,ls->title(lang));
2834 }
2835 }
2836 break;
2837 case LayoutDocEntry::MemberDefStart:
2839 break;
2840 case LayoutDocEntry::ClassInlineClasses:
2842 break;
2843 case LayoutDocEntry::MemberDef:
2844 {
2845 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
2846 if (lmd)
2847 {
2848 writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
2849 }
2850 }
2851 break;
2852 case LayoutDocEntry::MemberDefEnd:
2854 break;
2855 case LayoutDocEntry::ClassUsedFiles:
2856 showUsedFiles(ol);
2857 break;
2858 case LayoutDocEntry::AuthorSection:
2860 break;
2861 case LayoutDocEntry::NamespaceNestedNamespaces:
2862 case LayoutDocEntry::NamespaceNestedConstantGroups:
2863 case LayoutDocEntry::NamespaceClasses:
2864 case LayoutDocEntry::NamespaceConcepts:
2865 case LayoutDocEntry::NamespaceInterfaces:
2866 case LayoutDocEntry::NamespaceStructs:
2867 case LayoutDocEntry::NamespaceExceptions:
2868 case LayoutDocEntry::NamespaceInlineClasses:
2869 case LayoutDocEntry::ConceptDefinition:
2870 case LayoutDocEntry::FileClasses:
2871 case LayoutDocEntry::FileConcepts:
2872 case LayoutDocEntry::FileInterfaces:
2873 case LayoutDocEntry::FileStructs:
2874 case LayoutDocEntry::FileExceptions:
2875 case LayoutDocEntry::FileNamespaces:
2876 case LayoutDocEntry::FileConstantGroups:
2877 case LayoutDocEntry::FileIncludes:
2878 case LayoutDocEntry::FileIncludeGraph:
2879 case LayoutDocEntry::FileIncludedByGraph:
2880 case LayoutDocEntry::FileSourceLink:
2881 case LayoutDocEntry::FileInlineClasses:
2882 case LayoutDocEntry::GroupClasses:
2883 case LayoutDocEntry::GroupConcepts:
2884 case LayoutDocEntry::GroupModules:
2885 case LayoutDocEntry::GroupInlineClasses:
2886 case LayoutDocEntry::GroupNamespaces:
2887 case LayoutDocEntry::GroupDirs:
2888 case LayoutDocEntry::GroupNestedGroups:
2889 case LayoutDocEntry::GroupFiles:
2890 case LayoutDocEntry::GroupGraph:
2891 case LayoutDocEntry::GroupPageDocs:
2892 case LayoutDocEntry::ModuleExports:
2893 case LayoutDocEntry::ModuleClasses:
2894 case LayoutDocEntry::ModuleConcepts:
2895 case LayoutDocEntry::ModuleUsedFiles:
2896 case LayoutDocEntry::DirSubDirs:
2897 case LayoutDocEntry::DirFiles:
2898 case LayoutDocEntry::DirGraph:
2899 err("Internal inconsistency: member '{}' should not be part of LayoutDocManager::Class entry list\n",lde->entryToString());
2900 break;
2901 }
2902 }
2903
2904 ol.endContents();
2905}
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 3111 of file classdef.cpp.

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

References m_innerClasses, msg, and protectionLevelVisible().

◆ writeIncludeFiles()

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

Definition at line 2135 of file classdef.cpp.

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

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 1994 of file classdef.cpp.

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

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 1836 of file classdef.cpp.

1837{
1838 bool haveDot = Config_getBool(HAVE_DOT);
1839 auto classGraph = m_typeInheritanceGraph;
1840
1841 if (classGraph == CLASS_GRAPH_t::NO) return;
1842 // count direct inheritance relations
1843 int count=countInheritanceNodes();
1844
1845 bool renderDiagram = FALSE;
1846 if (haveDot && (classGraph==CLASS_GRAPH_t::YES || classGraph==CLASS_GRAPH_t::GRAPH))
1847 // write class diagram using dot
1848 {
1849 DotClassGraph inheritanceGraph(this,GraphType::Inheritance);
1850 if (inheritanceGraph.isTooBig())
1851 {
1852 warn_uncond("Inheritance graph for '{}' not generated, too many nodes ({}), threshold is {}. Consider increasing DOT_GRAPH_MAX_NODES.\n",
1853 name(), inheritanceGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
1854 }
1855 else if (!inheritanceGraph.isTrivial())
1856 {
1857 ol.pushGeneratorState();
1859 ol.startDotGraph();
1861 ol.endDotGraph(inheritanceGraph);
1862 ol.popGeneratorState();
1863 renderDiagram = TRUE;
1864 }
1865 }
1866 else if ((classGraph==CLASS_GRAPH_t::YES || classGraph==CLASS_GRAPH_t::GRAPH || classGraph==CLASS_GRAPH_t::BUILTIN) && count>0)
1867 // write class diagram using built-in generator
1868 {
1869 ClassDiagram diagram(this); // create a diagram of this class.
1870 ol.startClassDiagram();
1875 renderDiagram = TRUE;
1876 }
1877
1878 if (renderDiagram) // if we already show the inheritance relations graphically,
1879 // then hide the text version
1880 {
1882 }
1883
1884 count = countInheritsNodes();
1885 if (count>0)
1886 {
1887 auto replaceFunc = [this,&ol](size_t entryIndex)
1888 {
1889 for (size_t index=0; index<m_inherits.size() ; index++)
1890 {
1891 const BaseClassDef &bcd=m_inherits[index];
1892 const ClassDef *cd=bcd.classDef;
1893
1894 if (cd->isVisibleInHierarchy()) // filter on the class we want to show
1895 {
1896 if (index==entryIndex) // found the requested index
1897 {
1898 // use the class name but with the template arguments as given
1899 // in the inheritance relation
1901 cd->displayName(),bcd.templSpecifiers);
1902
1903 if (cd->isLinkable())
1904 {
1906 cd->getOutputFileBase(),
1907 cd->anchor(),
1908 displayName);
1909 }
1910 else
1911 {
1912 ol.docify(displayName);
1913 }
1914 return;
1915 }
1916 }
1917 }
1918 };
1919
1920 ol.startParagraph();
1921 writeMarkerList(ol,
1923 static_cast<size_t>(count),
1924 replaceFunc);
1925 ol.endParagraph();
1926 }
1927
1928 // write subclasses
1929 count = countInheritedByNodes();
1930 if (count>0)
1931 {
1932 auto replaceFunc = [this,&ol](size_t entryIndex)
1933 {
1934 for (size_t index=0; index<m_inheritedBy.size() ; index++)
1935 {
1936 const BaseClassDef &bcd=m_inheritedBy[index];
1937 const ClassDef *cd=bcd.classDef;
1938 if (cd->isVisibleInHierarchy()) // filter on the class we want to show
1939 {
1940 if (index==entryIndex) // found the requested index
1941 {
1942 if (cd->isLinkable())
1943 {
1946 }
1947 else
1948 {
1949 ol.docify(cd->displayName());
1950 }
1951 return;
1952 }
1953 }
1954 }
1955 };
1956
1957 ol.startParagraph();
1958 writeMarkerList(ol,
1960 static_cast<size_t>(count),
1961 replaceFunc);
1962 ol.endParagraph();
1963 }
1964
1965 if (renderDiagram)
1966 {
1967 ol.enableAll();
1968 }
1969}
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:3767
void writeMarkerList(OutputList &ol, const std::string &markerText, size_t numMarkers, std::function< void(size_t)> replaceFunc)
Definition util.cpp:1124

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 4871 of file classdef.cpp.

4874{
4875 int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
4876 bool process = count>0;
4877 //printf("%s: writeInheritedMemberDec: lt=%s process=%d invert=%d always=%d\n",
4878 // qPrint(name()),qPrint(lt.to_string()),process,invert,showAlways);
4879 if ((process^invert) || showAlways)
4880 {
4881 for (const auto &ibcd : m_inherits)
4882 {
4883 ClassDefMutable *icd=toClassDefMutable(ibcd.classDef);
4884 if (icd && icd->isLinkable())
4885 {
4886 MemberListType lt1 = MemberListType::Invalid();
4887 MemberListType lt3 = MemberListType::Invalid();
4888 convertProtectionLevel(lt,ibcd.prot,&lt1,&lt3);
4889 if (lt2.isInvalid() && !lt3.isInvalid())
4890 {
4891 lt2=lt3;
4892 }
4893 //printf("%s:convert %s->(%s,%s) prot=%d\n",qPrint(icd->name()),qPrint(lt.to_string()),
4894 // qPrint(lt1.to_string()),qPrint(lt2.to_string()),ibcd.prot);
4895 if (visitedClasses.find(icd)==visitedClasses.end())
4896 {
4897 visitedClasses.insert(icd); // guard for multiple virtual inheritance
4898 if (!lt1.isInvalid())
4899 {
4900 //printf("--> writeMemberDeclarations for type %s\n",qPrint(lt1.to_string()));
4901 icd->writeMemberDeclarations(ol,visitedClasses,lt1,
4902 title,QCString(),FALSE,inheritedFrom,lt2,FALSE,TRUE);
4903 }
4904 }
4905 else
4906 {
4907 //printf("%s: class already visited!\n",qPrint(icd->name()));
4908 }
4909 }
4910 }
4911 }
4912}
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 2195 of file classdef.cpp.

2196{
2197 m_innerClasses.writeDocumentation(ol,this);
2198}

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 2432 of file classdef.cpp.

2433{
2434 bool isSimple = m_isSimple;
2435
2436 ol.addIndexItem(name(),QCString());
2437 //printf("ClassDefImpl::writeInlineDocumentation(%s)\n",qPrint(name()));
2438
2439 // part 1: anchor and title
2440 QCString s = compoundTypeString()+" "+name();
2441
2442 // part 1a
2443 ol.pushGeneratorState();
2445 { // only HTML only
2446 ol.writeAnchor(QCString(),anchor());
2447 ol.startMemberDoc(QCString(),QCString(),anchor(),name(),1,1,FALSE);
2449 ol.parseText(s);
2450 ol.endMemberDocName();
2451 ol.endMemberDoc(FALSE);
2452 ol.writeString("</div>");
2453 ol.startIndent();
2454 }
2455 ol.popGeneratorState();
2456
2457 // part 1b
2458 ol.pushGeneratorState();
2461 { // for LaTeX/RTF only
2463 }
2464 ol.popGeneratorState();
2465
2466 // part 1c
2467 ol.pushGeneratorState();
2469 {
2470 // for LaTeX/RTF/Man
2471 ol.startGroupHeader("",1);
2472 ol.parseText(s);
2473 ol.endGroupHeader(1);
2474 }
2475 ol.popGeneratorState();
2476
2477 SrcLangExt lang=getLanguage();
2478
2479 // part 2: the header and detailed description
2480 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
2481 {
2482 switch (lde->kind())
2483 {
2484 case LayoutDocEntry::BriefDesc:
2485 {
2486 // since we already shown the brief description in the
2487 // declaration part of the container, so we use this to
2488 // show the details on top.
2490 }
2491 break;
2492 case LayoutDocEntry::ClassInheritanceGraph:
2494 break;
2495 case LayoutDocEntry::ClassCollaborationGraph:
2497 break;
2498 case LayoutDocEntry::MemberDeclStart:
2500 break;
2501 case LayoutDocEntry::MemberDecl:
2502 {
2503 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
2504 if (lmd)
2505 {
2506 ClassDefSet visitedClasses;
2507 if (!isSimple) writeMemberDeclarations(ol,visitedClasses,lmd->type,lmd->title(lang),lmd->subtitle(lang),TRUE);
2508 }
2509 }
2510 break;
2511 case LayoutDocEntry::MemberGroups:
2513 break;
2514 case LayoutDocEntry::MemberDeclEnd:
2516 break;
2517 case LayoutDocEntry::MemberDefStart:
2519 break;
2520 case LayoutDocEntry::MemberDef:
2521 {
2522 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
2523 if (lmd)
2524 {
2525 if (isSimple)
2526 {
2528 }
2529 else
2530 {
2531 writeMemberDocumentation(ol,lmd->type,lmd->title(lang),TRUE);
2532 }
2533 }
2534 }
2535 break;
2536 case LayoutDocEntry::MemberDefEnd:
2538 break;
2539 default:
2540 break;
2541 }
2542 }
2543
2544 // part 3: close the block
2545 ol.pushGeneratorState();
2547 { // HTML only
2548 ol.endIndent();
2549 }
2550 ol.popGeneratorState();
2551}
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 4914 of file classdef.cpp.

4918{
4919 //printf("%s: ClassDefImpl::writeMemberDeclarations lt=%s lt2=%s\n",qPrint(name()),qPrint(lt.to_string()),qPrint(lt2.to_string()));
4920 MemberList * ml = getMemberList(lt);
4921 MemberList * ml2 = getMemberList(lt2);
4922 if (getLanguage()==SrcLangExt::VHDL) // use specific declarations function
4923 {
4924 static const ClassDef *cdef;
4925 if (cdef!=this)
4926 { // only one inline link
4928 cdef=this;
4929 }
4930 if (ml)
4931 {
4932 VhdlDocGen::writeVhdlDeclarations(ml,ol,nullptr,this,nullptr,nullptr,nullptr);
4933 }
4934 }
4935 else
4936 {
4937 //printf("%s::writeMemberDeclarations(%s) ml=%p ml2=%p\n",qPrint(name()),qPrint(title),(void*)ml,(void*)ml2);
4938 QCString tt = title, st = subTitle;
4939 if (ml)
4940 {
4941 //printf(" writeDeclarations ml type=%s count=%d\n",qPrint(lt.to_string()),ml->numDecMembers(inheritedFrom));
4942 ml->writeDeclarations(ol,this,nullptr,nullptr,nullptr,nullptr,tt,st,FALSE,showInline,inheritedFrom,lt,true);
4943 tt.clear();
4944 st.clear();
4945 }
4946 if (ml2)
4947 {
4948 //printf(" writeDeclarations ml2 type=%s count=%d\n",qPrint(lt2.to_string()),ml2->numDecMembers(inheritedFrom));
4949 ml2->writeDeclarations(ol,this,nullptr,nullptr,nullptr,nullptr,tt,st,FALSE,showInline,inheritedFrom,lt,ml==nullptr);
4950 }
4951 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
4952 if (!inlineInheritedMembers) // show inherited members as separate lists
4953 {
4954 writeInheritedMemberDeclarations(ol,visitedClasses,lt,lt2,title,
4955 inheritedFrom ? inheritedFrom : this,
4956 invert,showAlways);
4957 }
4958 }
4959}
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 4974 of file classdef.cpp.

4975{
4976 //printf("%s: ClassDefImpl::writeMemberDocumentation()\n",qPrint(name()));
4977 MemberList * ml = getMemberList(lt);
4978 if (ml) ml->writeDocumentation(ol,displayName(),this,title,ml->listType().toLabel(),FALSE,showInline);
4979}
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 2172 of file classdef.cpp.

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

References m_memberGroups, and m_subGrouping.

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeMemberList()

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

Implements ClassDef.

Definition at line 3132 of file classdef.cpp.

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

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 3046 of file classdef.cpp.

3047{
3048 ///////////////////////////////////////////////////////////////////////////
3049 //// Member definitions on separate pages
3050 ///////////////////////////////////////////////////////////////////////////
3051
3052 ol.pushGeneratorState();
3054
3055 for (const auto &ml : m_memberLists)
3056 {
3057 if (ml->numDocMembers()>ml->numDocEnumValues() && ml->listType().isDetailed())
3058 {
3059 ml->writeDocumentationPage(ol,displayName(),this);
3060 }
3061 }
3062
3063 ol.popGeneratorState();
3064}

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 2553 of file classdef.cpp.

2554{
2555 // TODO: clean up this mess by moving it to
2556 // the output generators...
2557 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
2558 bool rtfHyperlinks = Config_getBool(RTF_HYPERLINKS);
2559 bool usePDFLatex = Config_getBool(USE_PDFLATEX);
2560
2561 // HTML only
2562 ol.pushGeneratorState();
2564 ol.docify(" ");
2566 anchor.isEmpty() ? QCString("details") : anchor);
2568 ol.endTextLink();
2569 ol.popGeneratorState();
2570
2571 if (!anchor.isEmpty())
2572 {
2573 ol.pushGeneratorState();
2574 // LaTeX + RTF
2578 if (!(usePDFLatex && pdfHyperlinks))
2579 {
2581 }
2582 if (!rtfHyperlinks)
2583 {
2585 }
2586 ol.docify(" ");
2589 ol.endTextLink();
2590 // RTF only
2592 ol.writeString("\\par");
2593 ol.popGeneratorState();
2594 }
2595}
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 2189 of file classdef.cpp.

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

References m_innerClasses, title(), and TRUE.

Referenced by writeDocumentationContents().

◆ writePageNavigation()

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

Implements DefinitionMutable.

Definition at line 2322 of file classdef.cpp.

2323{
2324 ol.writePageOutline();
2325}
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 4988 of file classdef.cpp.

4991{
4992 //printf("%s: ClassDefImpl::writePlainMemberDeclaration()\n",qPrint(name()));
4993 MemberList * ml = getMemberList(lt);
4994 if (ml)
4995 {
4996 ml->writePlainDeclarations(ol,inGroup,this,nullptr,nullptr,nullptr,nullptr,indentLevel,inheritedFrom,inheritId);
4997 }
4998}
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 3066 of file classdef.cpp.

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

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 4981 of file classdef.cpp.

4982{
4983 //printf("%s: ClassDefImpl::writeSimpleMemberDocumentation()\n",qPrint(name()));
4984 MemberList * ml = getMemberList(lt);
4985 if (ml) ml->writeSimpleDocumentation(ol,this);
4986}
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 2253 of file classdef.cpp.

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

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 2327 of file classdef.cpp.

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

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 1506 of file classdef.cpp.

1508{
1509 ArgumentLists specs;
1510 QCString name;
1511 searchTemplateSpecs(d,specs,name,lang);
1512 if (!specs.empty()) // class has template scope specifiers
1513 {
1515 for (const ArgumentList &al : specs)
1516 {
1517 ol.docify("template<");
1518 auto it = al.begin();
1519 while (it!=al.end())
1520 {
1521 Argument a = *it;
1522 linkifyText(TextGeneratorOLImpl(ol), // out
1523 a.type, // text
1524 LinkifyTextOptions().setScope(d).setFileScope(getFileDef()).setSelf(this));
1525 if (!a.name.isEmpty())
1526 {
1527 ol.docify(" ");
1528 ol.docify(a.name);
1529 }
1530 if (a.defval.length()!=0)
1531 {
1532 ol.docify(" = ");
1533 ol.docify(a.defval);
1534 }
1535 ++it;
1536 if (it!=al.end()) ol.docify(", ");
1537 }
1538 ol.docify(">");
1539 ol.lineBreak();
1540 }
1541 if (!m_requiresClause.isEmpty())
1542 {
1543 ol.docify("requires ");
1544 linkifyText(TextGeneratorOLImpl(ol), // out
1545 m_requiresClause, // text
1546 LinkifyTextOptions().setScope(d).setFileScope(getFileDef()).setSelf(this));
1547 ol.lineBreak();
1548 }
1549 ol.docify(type.lower()+" "+name);
1551 }
1552}
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 QCString &text, const LinkifyTextOptions &options)
Definition util.cpp:893

References Argument::defval, OutputList::docify(), OutputList::endCompoundTemplateParams(), 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 539 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 502 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 497 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 421 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 467 of file classdef.cpp.

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

◆ m_constraintClassList

ConstraintClassList ClassDefImpl::m_constraintClassList
private

Definition at line 484 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 464 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 446 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 415 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 461 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 429 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 438 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 424 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 510 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 544 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 519 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 513 of file classdef.cpp.

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

◆ m_isTemplArg

bool ClassDefImpl::m_isTemplArg = false
private

Definition at line 521 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 418 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 516 of file classdef.cpp.

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

◆ m_metaData

QCString ClassDefImpl::m_metaData
private

Definition at line 548 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 449 of file classdef.cpp.

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

◆ m_primaryConstructorParams

ArgumentList ClassDefImpl::m_primaryConstructorParams
private

Definition at line 560 of file classdef.cpp.

Referenced by setPrimaryConstructorParams(), and title().

◆ 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 473 of file classdef.cpp.

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

◆ m_qualifiers

StringVector ClassDefImpl::m_qualifiers
private

Definition at line 553 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 551 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 527 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 541 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 489 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 491 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 458 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 482 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 530 of file classdef.cpp.

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

◆ m_usesImplClassList

UsesClassList ClassDefImpl::m_usesImplClassList
private

Definition at line 481 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 533 of file classdef.cpp.

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


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