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

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. class/struct/union/...
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 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 setAnonymousMemberPrefix (const QCString &prefix) 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 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. a group).
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?
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 799 of file classdef.cpp.

804 : DefinitionMixin(defFileName,defLine,defColumn,removeRedundantWhiteSpace(nm),nullptr,nullptr,isSymbol)
805{
806 AUTO_TRACE("name={}",name());
807 setReference(lref);
808 m_compType = ct;
810 QCString compTypeString = getCompoundTypeString(getLanguage(),ct,isJavaEnum);
811 if (!fName.isEmpty())
812 {
814 }
815 else
816 {
817 m_fileName=compTypeString+name();
818 }
819 m_prot=Protection::Public;
820 //nspace=nullptr;
821 m_fileDef=nullptr;
822 m_moduleDef=nullptr;
823 m_subGrouping=Config_getBool(SUBGROUPING);
824 m_templateMaster =nullptr;
829 m_categoryOf = nullptr;
831 m_isSimple = Config_getBool(INLINE_SIMPLE_STRUCTS);
832 m_arrowOperator = nullptr;
833 m_spec=TypeSpecifier();
834 //QCString ns;
835 //extractNamespaceName(name,className,ns);
836 //printf("m_name=%s m_className=%s ns=%s\n",qPrint(m_name),qPrint(m_className),qPrint(ns));
837
838 // we cannot use getLanguage at this point, as setLanguage has not been called.
839 SrcLangExt lang = getLanguageFromFileName(defFileName);
840 if ((lang==SrcLangExt::Cpp || lang==SrcLangExt::ObjC) && guessSection(defFileName).isSource())
841 {
843 }
844 else
845 {
847 }
848 m_hasCollaborationGraph = Config_getBool(COLLABORATION_GRAPH);
850 m_memberListFileName = convertNameToFile(compTypeString+name()+"-members");
853 if (lref.isEmpty())
854 {
856 }
857 AUTO_TRACE_EXIT("m_fileName='{}'",m_fileName);
858}
QCString m_collabFileName
Definition classdef.cpp:420
QCString m_fileName
Definition classdef.cpp:414
const MemberDef * m_arrowOperator
Does this class overloaded the -> operator?
Definition classdef.cpp:538
TypeSpecifier m_spec
Definition classdef.cpp:543
ClassDef * m_categoryOf
Definition classdef.cpp:501
Protection m_prot
Definition classdef.cpp:472
QCString m_inheritFileName
Definition classdef.cpp:423
const ClassDef * m_templateMaster
Definition classdef.cpp:493
bool m_membersMerged
Definition classdef.cpp:515
bool m_isJavaEnum
Does this class represent a Java style enum?
Definition classdef.cpp:541
ModuleDef * m_moduleDef
Definition classdef.cpp:448
bool isJavaEnum() const override
bool m_isSimple
Is this a simple (non-nested) C structure?
Definition classdef.cpp:535
CLASS_GRAPH_t m_typeInheritanceGraph
Definition classdef.cpp:553
bool m_isAbstract
Definition classdef.cpp:509
FileDef * m_fileDef
Definition classdef.cpp:445
ClassDef::CompoundType m_compType
Definition classdef.cpp:466
bool m_hasCollaborationGraph
Definition classdef.cpp:552
bool m_isTemplArg
Definition classdef.cpp:520
bool m_usedOnly
Reason of existence is a "use" relation.
Definition classdef.cpp:529
QCString m_memberListFileName
Definition classdef.cpp:417
bool m_subGrouping
Definition classdef.cpp:526
const QCString & name() const override
void setReference(const QCString &r) override
DefinitionMixin(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
SrcLangExt getLanguage() const override
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:167
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:5235
QCString stripExtension(const QCString &fName)
Definition util.cpp:4968
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_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 2720 of file classdef.cpp.

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

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

References anchor(), and m_examples.

◆ addGroupedInheritedMembers()

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

Implements ClassDef.

Definition at line 4983 of file classdef.cpp.

4985{
4986 //printf("** %s::addGroupedInheritedMembers() inheritId=%s\n",qPrint(name()),qPrint(inheritId));
4987 for (const auto &mg : m_memberGroups)
4988 {
4989 if (!mg->allMembersInSameSection() || !m_subGrouping) // group is in its own section
4990 {
4991 mg->addGroupedInheritedMembers(ol,this,lt,inheritedFrom,inheritId);
4992 }
4993 }
4994}
MemberGroupList m_memberGroups
Definition classdef.cpp:506

References m_memberGroups, and m_subGrouping.

◆ addInnerCompound()

void ClassDefImpl::addInnerCompound ( Definition * d)
overridevirtual

Implements DefinitionMutable.

Definition at line 4366 of file classdef.cpp.

4367{
4368 //printf("**** %s::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
4369 if (d->definitionType()==Definition::TypeClass) // only classes can be
4370 // nested in classes.
4371 {
4372 m_innerClasses.add(d->localName(),toClassDef(d));
4373 }
4374}
ClassLinkedRefMap m_innerClasses
Definition classdef.cpp:477
virtual const QCString & localName() const =0
virtual DefType definitionType() const =0
ClassDef * toClassDef(Definition *d)

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

◆ addListReferences()

void ClassDefImpl::addListReferences ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4574 of file classdef.cpp.

4575{
4576 if (!isLinkableInProject()) return;
4577 SrcLangExt lang = getLanguage();
4579 qualifiedName(),
4582 displayName(),
4583 QCString(),
4584 this
4585 );
4586 for (const auto &mg : m_memberGroups)
4587 {
4588 mg->addListReferences(this);
4589 }
4590 for (auto &ml : m_memberLists)
4591 {
4592 if (ml->listType().isDetailed())
4593 {
4594 ml->addListReferences(this);
4595 }
4596 }
4597}
bool isLinkableInProject() const override
MemberLists m_memberLists
Definition classdef.cpp:503
QCString getOutputFileBase() const override
QCString displayName(bool includeScope=TRUE) const override
Definition classdef.cpp:989
CompoundType compoundType() const override
Returns the type of compound this is, i.e. class/struct/union/...
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:4849

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

1015{
1016 for (auto &ml : m_memberLists)
1017 {
1018 if (!ml->listType().isDetailed())
1019 {
1021 }
1022 }
1023
1024 // add members inside sections to their groups
1025 for (const auto &mg : m_memberGroups)
1026 {
1027 if (mg->allMembersInSameSection() && m_subGrouping)
1028 {
1029 //printf("addToDeclarationSection(%s)\n",qPrint(mg->header()));
1030 mg->addToDeclarationSection();
1031 }
1032 }
1033}
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 4486 of file classdef.cpp.

4487{
4488 AUTO_TRACE("this={} cd={} templSpec={}",name(),cd->name(),templSpec);
4489 //printf("%s::addMembersToTemplateInstance(%s,%s)\n",qPrint(name()),qPrint(cd->name()),templSpec);
4490 for (const auto &mni : cd->memberNameInfoLinkedMap())
4491 {
4492 for (const auto &mi : *mni)
4493 {
4494 const MemberDef *md = mi->memberDef();
4495 if (m_allMemberNameInfoLinkedMap.find(md->name())==nullptr) // only insert the member if not hidden by one with the same name (#11541)
4496 {
4498 }
4499 }
4500 }
4501 // also instantatie members for nested classes
4502 for (const auto &innerCd : cd->getClasses())
4503 {
4504 ClassDefMutable *ncd = toClassDefMutable(m_innerClasses.find(innerCd->localName()));
4505 if (ncd)
4506 {
4507 ncd->addMembersToTemplateInstance(innerCd,cd->templateArguments(),templSpec);
4508 }
4509 }
4510}
virtual const ArgumentList & templateArguments() const =0
Returns the template arguments of this class.
virtual const MemberNameInfoLinkedMap & memberNameInfoLinkedMap() const =0
Returns a dictionary of all members.
virtual ClassLinkedRefMap getClasses() const =0
returns the classes nested into this class
void addMemberToTemplateInstance(const MemberDef *md, const ArgumentList &templateArguments, const QCString &templSpec) override
const ArgumentList & templateArguments() const override
Returns the template arguments of this class.
MemberNameInfoLinkedMap m_allMemberNameInfoLinkedMap
Definition classdef.cpp:451
virtual void addMembersToTemplateInstance(const ClassDef *cd, const ArgumentList &templateArguments, const QCString &templSpec)=0
virtual const QCString & name() const =0
ClassDefMutable * toClassDefMutable(Definition *d)

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

◆ addMemberToList()

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

Definition at line 4658 of file classdef.cpp.

4659{
4660 AUTO_TRACE("{} md={} lt={} isBrief={}",name(),md->name(),lt,isBrief);
4661 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
4662 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
4663 const auto &ml = m_memberLists.get(lt,MemberListContainer::Class);
4664 ml->setNeedsSorting((isBrief && sortBriefDocs) || (!isBrief && sortMemberDocs));
4665 ml->push_back(md);
4666
4667 // for members in the declaration lists we set the section, needed for member grouping
4668 if (!ml->listType().isDetailed())
4669 {
4670 MemberDefMutable *mdm = toMemberDefMutable(md);
4671 if (mdm)
4672 {
4673 mdm->setSectionList(this,ml.get());
4674 }
4675 }
4676}
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 4460 of file classdef.cpp.

4463{
4464 AUTO_TRACE("this={} md={}",name(),md->name());
4465 auto actualArguments_p = stringToArgumentList(getLanguage(),templSpec);
4466 auto imd = md->createTemplateInstanceMember(templateArguments,actualArguments_p);
4467 auto mmd = toMemberDefMutable(imd.get());
4468 mmd->setMemberClass(this);
4469 mmd->setTemplateMaster(md);
4470 mmd->setDocumentation(md->documentation(),md->docFile(),md->docLine());
4471 mmd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine());
4472 mmd->setInbodyDocumentation(md->inbodyDocumentation(),md->inbodyFile(),md->inbodyLine());
4473 mmd->setMemberSpecifiers(md->getMemberSpecifiers());
4474 mmd->setMemberGroupId(md->getMemberGroupId());
4475 mmd->setArtificial(true);
4476 insertMember(imd.get());
4477 //printf("Adding member=%s %s%s to class %s templSpec %s\n",
4478 // imd->typeString(),qPrint(imd->name()),imd->argsString(),
4479 // qPrint(imd->getClassDef()->name()),templSpec);
4480 // insert imd in the list of all members
4481 //printf("Adding member=%s class=%s\n",qPrint(imd->name()),qPrint(name()));
4482 MemberName *mn = Doxygen::memberNameLinkedMap->add(imd->name());
4483 mn->push_back(std::move(imd));
4484}
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:826

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

5369{
5370 for (const auto &sx : qualifiers)
5371 {
5372 bool alreadyAdded = std::find(m_qualifiers.begin(), m_qualifiers.end(), sx) != m_qualifiers.end();
5373 if (!alreadyAdded)
5374 {
5375 m_qualifiers.push_back(sx);
5376 }
5377 }
5378}

References m_qualifiers.

◆ addRequirementReferences()

void ClassDefImpl::addRequirementReferences ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4599 of file classdef.cpp.

4600{
4601 if (!isLinkableInProject()) return;
4603 for (const auto &mg : m_memberGroups)
4604 {
4605 mg->addRequirementReferences(this);
4606 }
4607 for (auto &ml : m_memberLists)
4608 {
4609 if (ml->listType().isDetailed())
4610 {
4611 ml->addRequirementReferences(this);
4612 }
4613 }
4614}
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 3423 of file classdef.cpp.

3424{
3425 //printf("addTypeConstraint(%s,%s)\n",qPrint(type),qPrint(typeConstraint));
3426 bool hideUndocRelation = Config_getBool(HIDE_UNDOC_RELATIONS);
3427 if (typeConstraint.isEmpty() || type.isEmpty()) return;
3428 SymbolResolver resolver(getFileDef());
3429 ClassDefMutable *cd = resolver.resolveClassMutable(this,typeConstraint);
3430 if (cd==nullptr && !hideUndocRelation)
3431 {
3432 cd = toClassDefMutable(
3433 Doxygen::hiddenClassLinkedMap->add(typeConstraint,
3434 std::unique_ptr<ClassDef>(
3435 new ClassDefImpl(
3437 getDefColumn(),
3438 typeConstraint,
3439 ClassDef::Class))));
3440 if (cd)
3441 {
3442 cd->setUsedOnly(TRUE);
3443 cd->setLanguage(getLanguage());
3444 //printf("Adding undocumented constraint '%s' to class %s on type %s\n",
3445 // qPrint(typeConstraint),qPrint(name()),qPrint(type));
3446 }
3447 }
3448 if (cd)
3449 {
3450 auto it = std::find_if(m_constraintClassList.begin(),
3452 [&cd](const auto &ccd) { return ccd.classDef==cd; });
3453
3454 if (it==m_constraintClassList.end())
3455 {
3456 m_constraintClassList.emplace_back(cd);
3457 it = m_constraintClassList.end()-1;
3458 }
3459 (*it).addAccessor(type);
3460 //printf("Adding constraint '%s' to class %s on type %s\n",
3461 // qPrint(typeConstraint),qPrint(name()),qPrint(type));
3462 }
3463}
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:799
ConstraintClassList m_constraintClassList
Definition classdef.cpp:483
virtual void setUsedOnly(bool b)=0
QCString getDefFileName() const override
virtual void setLanguage(SrcLangExt lang)=0
static ClassLinkedMap * hiddenClassLinkedMap
Definition doxygen.h:96

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

Referenced by addTypeConstraints().

◆ addTypeConstraints()

void ClassDefImpl::addTypeConstraints ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 3466 of file classdef.cpp.

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

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

4255{
4256 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
4257 bool umlLook = Config_getBool(UML_LOOK);
4258 if (prot==Protection::Private && !extractPrivate) return;
4259 //printf("%s::addUsedByClass(%s,%s)\n",qPrint(name()),qPrint(cd->name()),accessName);
4260 //
4261 auto it = std::find_if(m_usedByImplClassList.begin(),
4263 [&cd](const auto &ucd) { return ucd.classDef==cd; });
4264 if (it==m_usedByImplClassList.end())
4265 {
4266 m_usedByImplClassList.emplace_back(cd);
4267 //printf("Adding used by class %s to class %s\n",
4268 // qPrint(cd->name()),qPrint(name()));
4269 it = m_usedByImplClassList.end()-1;
4270 }
4271 QCString acc = accessName;
4272 if (umlLook)
4273 {
4274 switch(prot)
4275 {
4276 case Protection::Public: acc.prepend("+"); break;
4277 case Protection::Private: acc.prepend("-"); break;
4278 case Protection::Protected: acc.prepend("#"); break;
4279 case Protection::Package: acc.prepend("~"); break;
4280 }
4281 }
4282 (*it).addAccessor(acc);
4283}
UsesClassList m_usedByImplClassList
Definition classdef.cpp:481
QCString & prepend(const char *s)
Definition qcstring.h:426

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

4223{
4224 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
4225 bool umlLook = Config_getBool(UML_LOOK);
4226 if (prot==Protection::Private && !extractPrivate) return;
4227 //printf("%s::addUsedClass(%s,%s)\n",qPrint(name()),qPrint(cd->name()),accessName);
4228
4229 auto it = std::find_if(m_usesImplClassList.begin(),
4230 m_usesImplClassList.end(),
4231 [&cd](const auto &ucd) { return ucd.classDef==cd; });
4232 if (it==m_usesImplClassList.end())
4233 {
4234 m_usesImplClassList.emplace_back(cd);
4235 //printf("Adding used class %s to class %s via accessor %s\n",
4236 // qPrint(cd->name()),qPrint(name()),accessName);
4237 it = m_usesImplClassList.end()-1;
4238 }
4239 QCString acc = accessName;
4240 if (umlLook)
4241 {
4242 switch(prot)
4243 {
4244 case Protection::Public: acc.prepend("+"); break;
4245 case Protection::Private: acc.prepend("-"); break;
4246 case Protection::Protected: acc.prepend("#"); break;
4247 case Protection::Package: acc.prepend("~"); break;
4248 }
4249 }
4250 (*it).addAccessor(acc);
4251}
UsesClassList m_usesImplClassList
Definition classdef.cpp:480

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

◆ addUsedInterfaceClasses()

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

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

◆ anchor()

QCString ClassDefImpl::anchor ( ) const
overridevirtual

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

Implements Definition.

Definition at line 5297 of file classdef.cpp.

5298{
5299 QCString anc;
5301 {
5303 {
5304 // point to the template of which this class is an instance
5305 anc = m_templateMaster->getOutputFileBase();
5306 }
5307 else
5308 {
5309 anc = m_fileName;
5310 }
5311 }
5312 return anc;
5313}
bool m_implicitTemplateInstance
Definition classdef.cpp:555
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(), writeDeclaration(), 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 5037 of file classdef.cpp.

5038{
5039 return m_inherits;
5040}
BaseClassList m_inherits
Definition classdef.cpp:433

References m_inherits.

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

◆ categoryOf()

ClassDef * ClassDefImpl::categoryOf ( ) const
overridevirtual

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

Implements ClassDef.

Definition at line 5202 of file classdef.cpp.

5203{
5204 return m_categoryOf;
5205}

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

4559{
4560 QCString name = m_className.isEmpty() ? localName() : m_className;
4561 auto lang = getLanguage();
4562 if (lang==SrcLangExt::CSharp)
4563 {
4565 }
4566 return name;
4567}
QCString m_className
Definition classdef.cpp:496
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:6945

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

5472{
5473 switch (compoundType())
5474 {
5475 case Class: return CodeSymbolType::Class; break;
5476 case Struct: return CodeSymbolType::Struct; break;
5477 case Union: return CodeSymbolType::Union; break;
5478 case Interface: return CodeSymbolType::Interface; break;
5479 case Protocol: return CodeSymbolType::Protocol; break;
5480 case Category: return CodeSymbolType::Category; break;
5481 case Exception: return CodeSymbolType::Exception; break;
5482 case Service: return CodeSymbolType::Service; break;
5483 case Singleton: return CodeSymbolType::Singleton; break;
5484 }
5485 return CodeSymbolType::Class;
5486}
@ 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 5451 of file classdef.cpp.

5452{
5453 return m_collabFileName;
5454}

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

5033{
5034 return m_compType;
5035}

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

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

References m_memberGroups, and m_memberLists.

◆ containsOverload()

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

Implements ClassDef.

Definition at line 5385 of file classdef.cpp.

5386{
5387 AUTO_TRACE("name={}",md->name());
5388 const auto &mni = m_allMemberNameInfoLinkedMap.find(md->name());
5389 if (mni)
5390 {
5391 for (const auto &mi : *mni)
5392 {
5393 const MemberDef *classMd = mi->memberDef();
5394 const ArgumentList &classAl = classMd->argumentList();
5395 const ArgumentList &al = md->argumentList();
5396 bool found = matchArguments2(
5397 classMd->getOuterScope(),classMd->getFileDef(),classMd->typeString(),&classAl,
5398 md->getOuterScope(),md->getFileDef(),md->typeString(),&al,
5399 true,getLanguage()
5400 );
5401 if (found)
5402 {
5403 AUTO_TRACE_EXIT("true");
5404 return true;
5405 }
5406 }
5407 }
5408 AUTO_TRACE_EXIT("false");
5409 return false;
5410}
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 4832 of file classdef.cpp.

4833{
4834 int totalCount=0;
4835 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4836 {
4837 if (lde->kind()==LayoutDocEntry::MemberDecl)
4838 {
4839 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4840 if (lmd && lmd->type!=MemberListType::Friends()) // friendship is not inherited
4841 {
4842 ClassDefSet visited;
4843 totalCount+=countInheritedDecMembers(lmd->type,this,TRUE,FALSE,visited);
4844 }
4845 }
4846 }
4847 //printf("countAdditionalInheritedMembers()=%d\n",totalCount);
4848 return totalCount;
4849}
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 1824 of file classdef.cpp.

1825{
1827}
int countInheritsNodes() const
int countInheritedByNodes() const

References countInheritedByNodes(), and countInheritsNodes().

Referenced by writeInheritanceGraph().

◆ countInheritedByNodes()

int ClassDefImpl::countInheritedByNodes ( ) const
private

Definition at line 1802 of file classdef.cpp.

1803{
1804 int count=0;
1805 for (const auto &ibcd : m_inheritedBy)
1806 {
1807 const ClassDef *icd=ibcd.classDef;
1808 if ( icd->isVisibleInHierarchy()) count++;
1809 }
1810 return count;
1811}
virtual bool isVisibleInHierarchy() const =0
the class is visible in a class diagram, or class hierarchy
BaseClassList m_inheritedBy
Definition classdef.cpp:437

References ClassDef::isVisibleInHierarchy(), and m_inheritedBy.

Referenced by countInheritanceNodes(), and writeInheritanceGraph().

◆ countInheritedDecMembers()

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

Definition at line 4775 of file classdef.cpp.

4778{
4779 int inhCount = 0;
4780 int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
4781 bool process = count>0;
4782 //printf("%s: countInheritedDecMembers: lt=%s process=%d count=%d invert=%d\n",
4783 // qPrint(name()),lt.to_string(),process,count,invert);
4784 if ((process^invert) || showAlways)
4785 {
4786 for (const auto &ibcd : m_inherits)
4787 {
4788 ClassDefMutable *icd = toClassDefMutable(ibcd.classDef);
4789 MemberListType lt1 = MemberListType::Invalid();
4790 MemberListType lt2 = MemberListType::Invalid();
4791 if (icd && icd->isLinkable())
4792 {
4793 convertProtectionLevel(lt,ibcd.prot,&lt1,&lt2);
4794 //printf("%s: convert %s->(%s,%s) prot=%d\n",
4795 // qPrint(icd->name()),lt.to_string(),lt1.to_string(),lt2.to_string(),ibcd.prot);
4796 if (visitedClasses.find(icd)==visitedClasses.end())
4797 {
4798 visitedClasses.insert(icd); // guard for multiple virtual inheritance
4799 if (!lt1.isInvalid())
4800 {
4801 inhCount+=icd->countMemberDeclarations(lt1,inheritedFrom,lt2,FALSE,TRUE,visitedClasses);
4802 }
4803 }
4804 }
4805 }
4806 }
4807 //printf("%s: count=%d\n",qPrint(name()),inhCount);
4808 return inhCount;
4809}
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:6251

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

1814{
1815 int count=0;
1816 for (const auto &ibcd : m_inherits)
1817 {
1818 const ClassDef *icd=ibcd.classDef;
1819 if ( icd->isVisibleInHierarchy()) count++;
1820 }
1821 return count;
1822}

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

4699{
4700 //printf("%s: countMemberDeclarations for %s and %s\n",qPrint(name()),lt.to_string(),lt2.to_string());
4701 int count=0;
4702 MemberList * ml = getMemberList(lt);
4703 MemberList * ml2 = getMemberList(lt2);
4704 if (getLanguage()!=SrcLangExt::VHDL) // use specific declarations function
4705 {
4706 if (ml)
4707 {
4708 count+=ml->numDecMembers(inheritedFrom);
4709 //printf("-> ml=%d\n",ml->numDecMembers());
4710 }
4711 if (ml2)
4712 {
4713 count+=ml2->numDecMembers(inheritedFrom);
4714 //printf("-> ml2=%d\n",ml2->numDecMembers());
4715 }
4716 // also include grouped members that have their own section in the class (see bug 722759)
4717 if (inheritedFrom)
4718 {
4719 for (const auto &mg : m_memberGroups)
4720 {
4721 count+=mg->countGroupedInheritedMembers(lt);
4722 if (!lt2.isInvalid()) count+=mg->countGroupedInheritedMembers(lt2);
4723 }
4724 }
4725 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
4726 if (!inlineInheritedMembers) // show inherited members as separate lists
4727 {
4728 count+=countInheritedDecMembers(lt,inheritedFrom,invert,showAlways,visitedClasses);
4729 }
4730 }
4731 //printf("-> %d\n",count);
4732 return count;
4733}
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 4761 of file classdef.cpp.

4762{
4763 for (auto &ml : m_memberLists)
4764 {
4765 ml->countDecMembers();
4766 ml->countDocMembers();
4767 }
4768 for (const auto &mg : m_memberGroups)
4769 {
4770 mg->countDecMembers();
4771 mg->countDocMembers();
4772 }
4773}

References m_memberGroups, and m_memberLists.

◆ countMembersIncludingGrouped()

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

Implements ClassDef.

Definition at line 4868 of file classdef.cpp.

4870{
4871 int count=0;
4872 MemberList *ml = getMemberList(lt);
4873 if (ml)
4874 {
4875 count=ml->countInheritableMembers(inheritedFrom);
4876 }
4877 //printf("%s:countMembersIncludingGrouped: count=%d\n",qPrint(name()),count);
4878 for (const auto &mg : m_memberGroups)
4879 {
4880 bool hasOwnSection = !mg->allMembersInSameSection() ||
4881 !m_subGrouping; // group is in its own section
4882 if ((additional && hasOwnSection) || (!additional && !hasOwnSection))
4883 {
4884 count+=mg->countGroupedInheritedMembers(lt);
4885 }
4886 }
4887 //printf("%s:countMembersIncludingGrouped(lt=%s,%s)=%d\n",
4888 // qPrint(name()),qPrint(lt.to_string()),ml?qPrint(ml->listType().to_string()):"<none>",count);
4889 return count;
4890}
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 860 of file classdef.cpp.

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

990{
991 return makeDisplayName(this,includeScope);
992}
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 1363 of file classdef.cpp.

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

References m_memberGroups.

◆ endMemberDeclarations()

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

Definition at line 2219 of file classdef.cpp.

2220{
2221 //printf("%s: ClassDefImpl::endMemberDeclarations()\n",qPrint(name()));
2222 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
2223 if (!inlineInheritedMembers && countAdditionalInheritedMembers()>0)
2224 {
2225 ol.startMemberHeader("inherited");
2227 ol.endMemberHeader();
2229 }
2230 ol.endMemberSections();
2231}
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 2203 of file classdef.cpp.

2204{
2205 //printf("%s: ClassDefImpl::endMemberDocumentation()\n",qPrint(name()));
2206 if (Config_getBool(SEPARATE_MEMBER_PAGES))
2207 {
2210 }
2211}
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 4376 of file classdef.cpp.

4377{
4378 return m_innerClasses.find(name);
4379}

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

◆ findSectionsInDocumentation()

void ClassDefImpl::findSectionsInDocumentation ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1371 of file classdef.cpp.

1372{
1376 for (const auto &mg : m_memberGroups)
1377 {
1378 mg->findSectionsInDocumentation(this);
1379 }
1380 for (auto &ml : m_memberLists)
1381 {
1382 if (!ml->listType().isDetailed())
1383 {
1384 ml->findSectionsInDocumentation(this);
1385 }
1386 }
1387}
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 1692 of file classdef.cpp.

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

5028{
5029 return m_innerClasses;
5030}

References m_innerClasses.

◆ getExamples()

const ExampleList & ClassDefImpl::getExamples ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5431 of file classdef.cpp.

5432{
5433 return m_examples;
5434}

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

5083{
5084 return m_fileDef;
5085}

References m_fileDef.

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

◆ getInstanceOutputFileBase()

QCString ClassDefImpl::getInstanceOutputFileBase ( ) const
overridevirtual

Implements ClassDef.

Definition at line 4329 of file classdef.cpp.

4330{
4331 return m_fileName;
4332}

References m_fileName.

◆ getMemberByName()

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

Returns the member with the given name.

Implements ClassDef.

Definition at line 4616 of file classdef.cpp.

4617{
4618 const MemberDef *xmd = nullptr;
4619 const MemberNameInfo *mni = m_allMemberNameInfoLinkedMap.find(name);
4620 if (mni)
4621 {
4622 const int maxInheritanceDepth = 100000;
4623 int mdist=maxInheritanceDepth;
4624 for (auto &mi : *mni)
4625 {
4626 const ClassDef *mcd=mi->memberDef()->getClassDef();
4627 int m=minClassDistance(this,mcd);
4628 //printf("found member in %s linkable=%d m=%d\n",
4629 // qPrint(mcd->name()),mcd->isLinkable(),m);
4630 if (m<mdist)
4631 {
4632 mdist=m;
4633 xmd=mi->memberDef();
4634 }
4635 }
4636 }
4637 //printf("getMemberByName(%s)=%p\n",qPrint(name),xmd);
4638 return xmd;
4639}
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 5212 of file classdef.cpp.

5213{
5214 return m_memberGroups;
5215}

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

4647{
4648 for (auto &ml : m_memberLists)
4649 {
4650 if (ml->listType()==lt)
4651 {
4652 return ml.get();
4653 }
4654 }
4655 return nullptr;
4656}

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

985{
987}

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

5208{
5209 return m_memberLists;
5210}

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

5088{
5089 return m_moduleDef;
5090}

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

4292{
4293 bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
4294 bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
4296 {
4297 Definition *scope=nullptr;
4298 if (inlineGroupedClasses && !partOfGroups().empty())
4299 {
4300 // point to the group that embeds this class
4301 return partOfGroups().front()->getOutputFileBase();
4302 }
4303 else if (inlineSimpleClasses && m_isSimple && !partOfGroups().empty())
4304 {
4305 // point to simple struct inside a group
4306 return partOfGroups().front()->getOutputFileBase();
4307 }
4308 else if (inlineSimpleClasses && m_isSimple && (scope=getOuterScope()))
4309 {
4310 if (scope==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) // simple struct embedded in file
4311 {
4312 return getFileDef()->getOutputFileBase();
4313 }
4314 else if (scope->isLinkableInProject()) // simple struct embedded in other container (namespace/group/class)
4315 {
4316 return getOuterScope()->getOutputFileBase();
4317 }
4318 }
4319 }
4320 AUTO_TRACE("name='{}' m_templateMaster={} m_implicitTemplateInstance={}",name(),(void*)m_templateMaster,m_implicitTemplateInstance);
4322 {
4323 // point to the template of which this class is an instance
4324 return m_templateMaster->getOutputFileBase();
4325 }
4326 return m_fileName;
4327}
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 5380 of file classdef.cpp.

5381{
5382 return m_qualifiers;
5383}

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

4513{
4515 {
4516 return m_templateMaster->getReference();
4517 }
4518 else
4519 {
4521 }
4522}
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 4334 of file classdef.cpp.

4335{
4337 {
4338 return m_templateMaster->getSourceFileBase();
4339 }
4340 else
4341 {
4343 }
4344}
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 4455 of file classdef.cpp.

4456{
4457 return m_templBaseClassNames;
4458}

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

5093{
5094 return m_templateInstances;
5095}

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

4537{
4538 ArgumentLists result;
4539 Definition *d=getOuterScope();
4540 while (d && d->definitionType()==Definition::TypeClass)
4541 {
4542 result.insert(result.begin(),toClassDef(d)->templateArguments());
4543 d = d->getOuterScope();
4544 }
4545 if (!templateArguments().empty())
4546 {
4547 result.push_back(templateArguments());
4548 }
4549 return result;
4550}
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 4811 of file classdef.cpp.

4813{
4814 SrcLangExt lang = getLanguage();
4815 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4816 {
4817 if (lde->kind()==LayoutDocEntry::MemberDecl)
4818 {
4819 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4820 if (lmd && lmd->type==type)
4821 {
4822 title = lmd->title(lang);
4823 subtitle = lmd->subtitle(lang);
4824 return;
4825 }
4826 }
4827 }
4828 title="";
4829 subtitle="";
4830}
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 5493 of file classdef.cpp.

5494{
5496}

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

1646{
1647 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
1648 bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
1649 return ((!briefDescription().isEmpty() && repeatBrief) ||
1650 (!documentation().isEmpty() || m_tempArgs.hasTemplateDocumentation()) ||
1651 (sourceBrowser && getStartBodyLine()!=-1 && getBodyDef()) ||
1653}
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 3702 of file classdef.cpp.

3703{
3705}
bool hasDocumentation() const override

References DefinitionMixin< Base >::hasDocumentation().

Referenced by isLinkableInProject(), and isVisibleInHierarchy().

◆ hasExamples()

bool ClassDefImpl::hasExamples ( ) const
overridevirtual

Implements ClassDef.

Definition at line 3418 of file classdef.cpp.

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

References m_examples.

Referenced by writeDetailedDocumentationBody(), and writeDocumentationContents().

◆ hasInheritanceGraph()

CLASS_GRAPH_t ClassDefImpl::hasInheritanceGraph ( ) const
overridevirtual

Implements ClassDefMutable.

Definition at line 5466 of file classdef.cpp.

5467{
5469}

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

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

References hasNonReferenceSuperClassRec().

Referenced by isVisibleInHierarchy().

◆ hideDerivedVariablesInPython()

void ClassDefImpl::hideDerivedVariablesInPython ( ClassDefMutable * cls)
private

Definition at line 4010 of file classdef.cpp.

4011{
4012 //printf("hideDerivedVariableInPython()\n");
4013 if (bClass)
4014 {
4015 const MemberNameInfoLinkedMap &srcMnd = bClass->memberNameInfoLinkedMap();
4016 MemberNameInfoLinkedMap &dstMnd = m_allMemberNameInfoLinkedMap;
4017
4018 // recurse up the inheritance hierarchy
4019 for (const auto &bcd : bClass->baseClasses())
4020 {
4022 }
4023
4024 for (auto &srcMni : srcMnd) // for each member in a base class
4025 {
4026 //printf(" candidate(%s)\n",qPrint(srcMni->memberName()));
4027 MemberNameInfo *dstMni=dstMnd.find(srcMni->memberName());
4028 if (dstMni) // that is also in this class
4029 {
4031 //printf("%s member in %s and %s\n",qPrint(name()),qPrint(bClass->name()),qPrint(name()));
4032 for (it=dstMni->begin();it!=dstMni->end();)
4033 {
4034 MemberDefMutable *dstMd = toMemberDefMutable((*it)->memberDef());
4035 if (dstMd && dstMd->isVariable() && !dstMd->name().startsWith("__"))
4036 {
4037 //printf(" hiding member %s\n",qPrint(dstMd->name()));
4038 // hide a member variable if it is already defined in a base class, unless
4039 // it is a __private variable
4040 removeMemberFromLists(dstMd);
4041 it = dstMni->erase(it);
4042 }
4043 else
4044 {
4045 ++it;
4046 }
4047 }
4048 if (dstMni->empty()) // if the list has become empty, remove the entry from the dictionary
4049 {
4050 dstMnd.del(srcMni->memberName());
4051 }
4052 }
4053 }
4054 }
4055}
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:511

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

5133{
5134 return m_incInfo.get();
5135}

References m_incInfo.

◆ inheritanceGraphFileName()

QCString ClassDefImpl::inheritanceGraphFileName ( ) const
overridevirtual

returns the file name to use for the inheritance graph

Implements ClassDef.

Definition at line 5456 of file classdef.cpp.

5457{
5458 return m_inheritFileName;
5459}

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

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

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

4445{
4446 AUTO_TRACE("this={} cd={} templSpec={}",name(),templateClass->name(),templSpec);
4447 m_templateInstances.emplace_back(templSpec,templateClass);
4448}

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

◆ insertMember()

void ClassDefImpl::insertMember ( MemberDef * md)
overridevirtual

Implements ClassDefMutable.

Definition at line 1341 of file classdef.cpp.

1342{
1344}
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 1004 of file classdef.cpp.

1006{
1007 //printf("*** insert sub class %s into %s\n",qPrint(cd->name()),qPrint(name()));
1008 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
1009 if (!extractPrivate && cd->protection()==Protection::Private) return;
1010 m_inheritedBy.emplace_back(cd,QCString(),p,s,t);
1011 m_isSimple = FALSE;
1012}
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 4381 of file classdef.cpp.

4383{
4384 freshInstance = FALSE;
4385 auto it = std::find_if(m_templateInstances.begin(),
4386 m_templateInstances.end(),
4387 [&templSpec](const auto &ti) { return templSpec==ti.templSpec; });
4388 ClassDefMutable *templateClass=nullptr;
4389 if (it!=m_templateInstances.end())
4390 {
4391 templateClass = toClassDefMutable((*it).classDef);
4392 }
4393 if (templateClass==nullptr)
4394 {
4395 QCString tcname = removeRedundantWhiteSpace(name()+templSpec);
4396 AUTO_TRACE("New template instance class name='{}' templSpec='{}' inside '{}' hidden={}",
4397 name(),templSpec,name(),isHidden());
4398
4399 ClassDef *foundCd = Doxygen::classLinkedMap->find(tcname);
4400 if (foundCd)
4401 {
4402 return foundCd;
4403 }
4404 templateClass =
4406 Doxygen::classLinkedMap->add(tcname,
4407 std::unique_ptr<ClassDef>(
4408 new ClassDefImpl(fileName,startLine,startColumn,tcname,ClassDef::Class))));
4409 if (templateClass)
4410 {
4411 templateClass->setTemplateMaster(this);
4412 ArgumentList tal = *stringToArgumentList(getLanguage(),templSpec);
4413 templateClass->setTemplateArguments(tal);
4414 templateClass->setOuterScope(getOuterScope());
4415 templateClass->setHidden(isHidden());
4416 templateClass->setArtificial(isArtificial());
4417 templateClass->setImplicitTemplateInstance(true);
4418 m_templateInstances.emplace_back(templSpec,templateClass);
4419
4420 // also add nested classes
4421 for (const auto &innerCd : m_innerClasses)
4422 {
4423 QCString innerName = tcname+"::"+innerCd->localName();
4424 ClassDefMutable *innerClass =
4426 Doxygen::classLinkedMap->add(innerName,
4427 std::unique_ptr<ClassDef>(
4428 new ClassDefImpl(fileName,startLine,startColumn,innerName,ClassDef::Class))));
4429 if (innerClass)
4430 {
4431 templateClass->addInnerCompound(innerClass);
4432 innerClass->setOuterScope(templateClass);
4433 innerClass->setHidden(isHidden());
4434 innerClass->setArtificial(TRUE);
4435 innerClass->setImplicitTemplateInstance(true);
4436 }
4437 }
4438 freshInstance=TRUE;
4439 }
4440 }
4441 return templateClass;
4442}
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 1391 of file classdef.cpp.

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

References m_files, m_templateInstances, and toClassDefMutable().

◆ internalInsertMember()

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

isReference()

Definition at line 1036 of file classdef.cpp.

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

References addMemberToList(), ClassDefMutable::addMemberToTemplateInstance(), MemberDef::argsString(), AUTO_TRACE, AUTO_TRACE_ADD, Class, Config_getBool, err, FALSE, QCString::find(), Definition::getDefFileName(), Definition::getDefLine(), DefinitionMixin< ClassDefMutable >::getLanguage(), getTemplateInstances(), MemberDef::getVhdlSpecifiers(), 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(), MemberDef::protection(), protectionLevelVisible(), MemberNameInfo::push_back(), templateArguments(), theTranslator, title(), toClassDefMutable(), TRUE, MemberDef::typeString(), 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 5157 of file classdef.cpp.

5158{
5159 return m_isAbstract || m_spec.isAbstract();
5160}

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

4642{
4643 return md->getClassDef() && isBaseClass(md->getClassDef(),TRUE,QCString());
4644}
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 3712 of file classdef.cpp.

3713{
3714 int distance=0;
3715 //printf("isBaseClass(cd=%s) looking for %s templSpec=%s\n",qPrint(name()),qPrint(bcd->name()),qPrint(templSpec));
3716 for (const auto &bclass : baseClasses())
3717 {
3718 const ClassDef *ccd = bclass.classDef;
3719 if (!followInstances && ccd->templateMaster())
3720 {
3721 ccd=ccd->templateMaster();
3722 }
3723 if (ccd==bcd && (templSpec.isEmpty() || templSpec==bclass.templSpecifiers))
3724 {
3725 distance=1;
3726 break; // no shorter path possible
3727 }
3728 else
3729 {
3730 int d = ccd->isBaseClass(bcd,followInstances,templSpec);
3731 if (d>256)
3732 {
3733 err("Possible recursive class relation while inside {} and looking for base class {}\n",name(),bcd->name());
3734 return 0;
3735 }
3736 else if (d>0) // path found
3737 {
3738 if (distance==0 || d+1<distance) // update if no path found yet or shorter path found
3739 {
3740 distance=d+1;
3741 }
3742 }
3743 }
3744 }
3745 return distance;
3746}
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 5197 of file classdef.cpp.

5198{
5199 return getLanguage()==SrcLangExt::CSharp;
5200}

References DefinitionMixin< ClassDefMutable >::getLanguage().

◆ isEmbeddedInOuterScope()

bool ClassDefImpl::isEmbeddedInOuterScope ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5315 of file classdef.cpp.

5316{
5317 bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
5318 bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
5319
5320 Definition *container = getOuterScope();
5321
5322 bool containerLinkable =
5323 container &&
5324 (
5325 (container==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) || // global class in documented file
5326 container->isLinkableInProject() // class in documented scope
5327 );
5328
5329 if (isAnonymous())
5330 {
5331 return false; // don't inline an anonymous class
5332 }
5333
5334 // inline because of INLINE_GROUPED_CLASSES=YES ?
5335 bool b1 = (inlineGroupedClasses && !partOfGroups().empty()); // a grouped class
5336 // inline because of INLINE_SIMPLE_STRUCTS=YES ?
5337 bool b2 = (inlineSimpleClasses && m_isSimple && // a simple class
5338 (containerLinkable || // in a documented container
5339 !partOfGroups().empty() // or part of a group
5340 )
5341 );
5342 //printf("%s::isEmbeddedInOuterScope(): inlineGroupedClasses=%d "
5343 // "inlineSimpleClasses=%d partOfGroups()=%p m_isSimple=%d "
5344 // "getOuterScope()=%s b1=%d b2=%d\n",
5345 // qPrint(name()),inlineGroupedClasses,inlineSimpleClasses,
5346 // partOfGroups().pointer(),m_isSimple,getOuterScope()?qPrint(getOuterScope()->name()):"<none>",b1,b2);
5347 return b1 || b2; // either reason will do
5348}

References Config_getBool, getFileDef(), DefinitionMixin< ClassDefMutable >::getOuterScope(), Doxygen::globalScope, DefinitionMixin< ClassDefMutable >::isAnonymous(), 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 5412 of file classdef.cpp.

5413{
5414 QCString n = name();
5415 int si = n.find('(');
5416 int ei = n.find(')');
5417 bool b = ei>si && n.mid(si+1,ei-si-1).stripWhiteSpace().isEmpty();
5418 return b;
5419}

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

5163{
5164 return m_spec.isFinal();
5165}

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

5193{
5194 return getLanguage()==SrcLangExt::Fortran;
5195}

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

5178{
5179 return m_spec.isForwardDecl();
5180}

References m_spec.

◆ isImplicitTemplateInstance()

bool ClassDefImpl::isImplicitTemplateInstance ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5102 of file classdef.cpp.

5103{
5105}

References m_implicitTemplateInstance.

◆ isInterface()

bool ClassDefImpl::isInterface ( ) const
overridevirtual

Returns TRUE if this class represents an interface.

Implements ClassDef.

Definition at line 5182 of file classdef.cpp.

5183{
5184 return m_spec.isInterface();
5185}

References m_spec.

◆ isJavaEnum()

bool ClassDefImpl::isJavaEnum ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5358 of file classdef.cpp.

5359{
5360 return m_isJavaEnum;
5361}

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

3665{
3667 {
3668 return m_templateMaster->isLinkable();
3669 }
3670 else
3671 {
3672 return isReference() || isLinkableInProject();
3673 }
3674}
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 3632 of file classdef.cpp.

3633{
3634 bool extractLocal = Config_getBool(EXTRACT_LOCAL_CLASSES);
3635 bool extractStatic = Config_getBool(EXTRACT_STATIC);
3636 bool hideUndoc = Config_getBool(HIDE_UNDOC_CLASSES);
3638 {
3639 return m_templateMaster->isLinkableInProject();
3640 }
3641 else
3642 {
3643 //printf("%s::isLinkableInProject() conditions: artificial=%d hidden=%d anonymous=%d protection=%d local=%d docs=%d static=%d ref=%d\n",
3644 // qPrint(name()),
3645 // !isArtificial(),
3646 // !isHidden(),
3647 // !isAnonymous(),
3648 // protectionLevelVisible(m_prot),
3649 // !m_isLocal || extractLocal,
3650 // hasDocumentation() || m_tempArgs.hasTemplateDocumentation() || !hideUndoc,
3651 // !m_isStatic || extractStatic,
3652 // !isReference());
3653 return
3654 !isArtificial() && !isHidden() && /* not hidden */
3655 !isAnonymous() && /* not anonymous */
3656 protectionLevelVisible(m_prot) && /* private/internal */
3657 (!m_isLocal || extractLocal) && /* local */
3658 (hasDocumentation() || m_tempArgs.hasTemplateDocumentation() || !hideUndoc) && /* documented */
3659 (!m_isStatic || extractStatic) && /* static */
3660 !isReference(); /* not an external reference */
3661 }
3662}
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 5022 of file classdef.cpp.

5023{
5024 return m_isLocal;
5025}

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

5188{
5189 return getLanguage()==SrcLangExt::ObjC;
5190}

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

5173{
5174 return m_spec.isPublished();
5175}

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

4525{
4527 {
4528 return m_templateMaster->isReference();
4529 }
4530 else
4531 {
4533 }
4534}
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 5167 of file classdef.cpp.

5168{
5169 return m_spec.isSealed();
5170}

References m_spec.

Referenced by addClassAttributes().

◆ isSimple()

bool ClassDefImpl::isSimple ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5277 of file classdef.cpp.

5278{
5279 return m_isSimple;
5280}

References m_isSimple.

Referenced by internalInsertMember(), and writeInlineDocumentation().

◆ isSliceLocal()

bool ClassDefImpl::isSliceLocal ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5441 of file classdef.cpp.

5442{
5443 return m_spec.isLocal();
5444}

References m_spec.

Referenced by title(), and writeDeclarationLink().

◆ isSmartPointer()

const MemberDef * ClassDefImpl::isSmartPointer ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5282 of file classdef.cpp.

5283{
5284 return m_arrowOperator;
5285}

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

3751{
3752 bool found=FALSE;
3753 if (level>256)
3754 {
3755 err("Possible recursive class relation while inside {} and looking for derived class {}\n",name(),cd->name());
3756 return FALSE;
3757 }
3758 for (const auto &iscd : subClasses())
3759 {
3760 ClassDef *ccd=iscd.classDef;
3761 found = (ccd==cd) || ccd->isSubClass(cd,level+1);
3762 if (found) break;
3763 }
3764 return found;
3765}
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 5127 of file classdef.cpp.

5128{
5129 return !m_tempArgs.empty();
5130}

References m_tempArgs.

◆ isTemplateArgument()

bool ClassDefImpl::isTemplateArgument ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5152 of file classdef.cpp.

5153{
5154 return m_isTemplArg;
5155}

References m_isTemplArg.

◆ isUsedOnly()

bool ClassDefImpl::isUsedOnly ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5272 of file classdef.cpp.

5273{
5274 return m_usedOnly;
5275}

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

3679{
3680 bool allExternals = Config_getBool(ALLEXTERNALS);
3681 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
3682 bool extractStatic = Config_getBool(EXTRACT_STATIC);
3683
3684 return // show all classes or a subclass is visible
3685 ((allExternals && !isArtificial()) || hasNonReferenceSuperClass()) &&
3686 // and not an anonymous compound
3687 !isAnonymous() &&
3688 // and not privately inherited
3690 // documented or shown anyway or documentation is external
3691 (hasDocumentation() ||
3692 !hideUndocClasses ||
3693 (m_templateMaster && m_templateMaster->hasDocumentation()) ||
3694 isReference()
3695 ) &&
3696 // if this is an implicit template instance then it most be part of the inheritance hierarchy
3697 (!m_implicitTemplateInstance || !m_inherits.empty() || !m_inheritedBy.empty()) &&
3698 // is not part of an unnamed namespace or shown anyway
3699 (!m_isStatic || extractStatic);
3700}
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 5257 of file classdef.cpp.

5258{
5259 m_isTemplArg = b;
5260}

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

5058{
5060}

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

4104{
4105 AUTO_TRACE();
4106 ClassDefMutable *category = toClassDefMutable(cat);
4107 if (category)
4108 {
4109 bool extractLocalMethods = Config_getBool(EXTRACT_LOCAL_METHODS);
4110 bool makePrivate = category->isLocal();
4111 // in case extract local methods is not enabled we don't add the methods
4112 // of the category in case it is defined in the .m file.
4113 if (makePrivate && !extractLocalMethods) return;
4114 bool isExtension = category->isExtension();
4115
4116 category->setCategoryOf(this);
4117 if (isExtension)
4118 {
4119 category->setArtificial(TRUE);
4120
4121 // copy base classes/protocols from extension
4122 for (const auto &bcd : category->baseClasses())
4123 {
4124 insertBaseClass(bcd.classDef,bcd.usedName,bcd.prot,bcd.virt,bcd.templSpecifiers);
4125 // correct bcd.classDef so that they do no longer derive from
4126 // category, but from this class!
4127 BaseClassList scl = bcd.classDef->subClasses();
4128 for (auto &scd : scl)
4129 {
4130 if (scd.classDef==category)
4131 {
4132 scd.classDef=this;
4133 }
4134 }
4135 bcd.classDef->updateSubClasses(scl);
4136 }
4137 }
4138 // make methods private for categories defined in the .m file
4139 //printf("%s::mergeCategory makePrivate=%d\n",qPrint(name()),makePrivate);
4140
4141 const MemberNameInfoLinkedMap &srcMnd = category->memberNameInfoLinkedMap();
4142 MemberNameInfoLinkedMap &dstMnd = m_allMemberNameInfoLinkedMap;
4143
4144 for (auto &srcMni : srcMnd)
4145 {
4146 MemberNameInfo *dstMni=dstMnd.find(srcMni->memberName());
4147 if (dstMni) // method is already defined in the class
4148 {
4149 AUTO_TRACE_ADD("Existing member {}",srcMni->memberName());
4150 const auto &dstMi = dstMni->front();
4151 const auto &srcMi = srcMni->front();
4152 if (srcMi && dstMi)
4153 {
4154 MemberDefMutable *smdm = toMemberDefMutable(srcMi->memberDef());
4155 MemberDefMutable *dmdm = toMemberDefMutable(dstMi->memberDef());
4156 if (smdm && dmdm)
4157 {
4159 dmdm->setCategory(category);
4160 dmdm->setCategoryRelation(smdm);
4161 smdm->setCategoryRelation(dmdm);
4162 }
4163 }
4164 }
4165 else // new method name
4166 {
4167 AUTO_TRACE_ADD("New member {}",srcMni->memberName());
4168 // create a deep copy of the list
4169 MemberNameInfo *newMni = dstMnd.add(srcMni->memberName());
4170
4171 // copy the member(s) from the category to this class
4172 for (auto &mi : *srcMni)
4173 {
4174 //printf("Adding '%s'\n",qPrint(mi->memberDef->name()));
4175 Protection prot = mi->prot();
4176 //if (makePrivate) prot = Private;
4177 auto newMd = mi->memberDef()->deepCopy();
4178 if (newMd)
4179 {
4180 auto mmd = toMemberDefMutable(newMd.get());
4181 AUTO_TRACE_ADD("Copying member {}",mmd->name());
4182 if (mmd)
4183 {
4184 mmd->moveTo(this);
4185 }
4186
4187 auto newMi=std::make_unique<MemberInfo>(newMd.get(),prot,mi->virt(),mi->inherited(),mi->virtualBaseClass());
4188 newMi->setScopePath(mi->scopePath());
4189 newMi->setAmbigClass(mi->ambigClass());
4190 newMi->setAmbiguityResolutionScope(mi->ambiguityResolutionScope());
4191 newMni->push_back(std::move(newMi));
4192
4193 // also add the newly created member to the global members list
4194
4195 QCString name = newMd->name();
4196 MemberName *mn = Doxygen::memberNameLinkedMap->add(name);
4197
4198 if (mmd)
4199 {
4200 mmd->setCategory(category);
4201 mmd->setCategoryRelation(mi->memberDef());
4202 }
4203 auto miMmd = toMemberDefMutable(mi->memberDef());
4204 if (miMmd) miMmd->setCategoryRelation(newMd.get());
4205
4206 if (mmd && (makePrivate || isExtension))
4207 {
4208 mmd->makeImplementationDetail();
4209 }
4210 internalInsertMember(newMd.get(),prot,FALSE);
4211 mn->push_back(std::move(newMd));
4212 }
4213 }
4214 }
4215 }
4216 }
4217}
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
virtual bool isLocal() const =0
Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES.
virtual bool isExtension() const =0
Returns TRUE if this class represents an Objective-C 2.0 extension (nameless category).
bool isExtension() const override
Returns TRUE if this class represents an Objective-C 2.0 extension (nameless category).
void insertBaseClass(ClassDef *, const QCString &name, Protection p, Specifier s, const QCString &t=QCString()) override
Definition classdef.cpp:995
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 4062 of file classdef.cpp.

4063{
4064 if (m_membersMerged) return;
4065 if (getLanguage()==SrcLangExt::Python)
4066 {
4067 for (const auto &bcd : baseClasses())
4068 {
4069 ClassDefMutable *bClass=toClassDefMutable(bcd.classDef);
4071 }
4072 }
4073
4074 //printf("> %s::mergeMembers()\n",qPrint(name()));
4075
4077
4078 // first merge the members of the base class recursively
4079 for (const auto &bcd : baseClasses())
4080 {
4081 ClassDefMutable *bClass=toClassDefMutable(bcd.classDef);
4082 if (bClass)
4083 {
4084 // merge the members in the base class of this inheritance branch first
4085 bClass->mergeMembers();
4086 }
4087 }
4088
4089 // first merge the member that are not inherited via a virtual base class
4090 // (as this can end up reimplemented via multiple paths, see #10717 for examples)
4092 // then process the member that are inherited via a virtual base class to add the
4093 // ones that are not reimplemented via any path
4095
4096 //printf("< %s::mergeMembers()\n",qPrint(name()));
4097}
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 3776 of file classdef.cpp.

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

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

971{
972 //printf("%s::moveTo(%s)\n",qPrint(name()),qPrint(scope->name()));
973 setOuterScope(scope);
975 {
976 m_fileDef = toFileDef(scope);
977 }
978 else if (scope->definitionType()==Definition::TypeModule)
979 {
980 m_moduleDef = toModuleDef(scope);
981 }
982}
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 5488 of file classdef.cpp.

5489{
5491}

References m_hasCollaborationGraph.

◆ overrideInheritanceGraph()

void ClassDefImpl::overrideInheritanceGraph ( CLASS_GRAPH_t e)
overridevirtual

Implements ClassDefMutable.

Definition at line 5461 of file classdef.cpp.

5462{
5464}

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

5073{
5074 return m_prot;
5075}

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

4554{
4555 return makeQualifiedNameWithTemplateParameters(this,actualParams,actualParamIndex);
4556}
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 5287 of file classdef.cpp.

5288{
5289 md->setMemberType(t);
5290 for (auto &ml : m_memberLists)
5291 {
5292 ml->remove(md);
5293 }
5294 insertMember(md);
5295}
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 5350 of file classdef.cpp.

5351{
5352 for (auto &ml : m_memberLists)
5353 {
5354 ml->remove(md);
5355 }
5356}

References m_memberLists.

Referenced by hideDerivedVariablesInPython().

◆ requiresClause()

QCString ClassDefImpl::requiresClause ( ) const
overridevirtual

Implements ClassDef.

Definition at line 3540 of file classdef.cpp.

3541{
3542 return m_requiresClause;
3543}

References m_requiresClause.

◆ setAnonymousEnumType()

void ClassDefImpl::setAnonymousEnumType ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4735 of file classdef.cpp.

4736{
4737 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4738 {
4739 if (lde->kind()==LayoutDocEntry::MemberDecl)
4740 {
4741 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4742 if (lmd)
4743 {
4744 MemberList * ml = getMemberList(lmd->type);
4745 if (ml)
4746 {
4748 }
4749 }
4750 }
4751 else if (lde->kind()==LayoutDocEntry::MemberGroups)
4752 {
4753 for (const auto &mg : m_memberGroups)
4754 {
4755 mg->setAnonymousEnumType();
4756 }
4757 }
4758 }
4759}
void setAnonymousEnumType()

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

◆ setAnonymousMemberPrefix()

void ClassDefImpl::setAnonymousMemberPrefix ( const QCString & prefix)
overridevirtual

Implements ClassDefMutable.

Definition at line 5112 of file classdef.cpp.

5113{
5114 for (const auto &mg : m_memberGroups)
5115 {
5116 mg->setAnonymousMemberPrefix(prefix);
5117 }
5118 for (auto &ml : m_memberLists)
5119 {
5120 if (ml->listType().isDetailed())
5121 {
5122 ml->setAnonymousMemberPrefix(prefix);
5123 }
5124 }
5125}
constexpr auto prefix
Definition anchor.cpp:44

References m_memberGroups, m_memberLists, and prefix.

◆ setCategoryOf()

void ClassDefImpl::setCategoryOf ( ClassDef * cd)
overridevirtual

Implements ClassDefMutable.

Definition at line 5262 of file classdef.cpp.

5263{
5264 m_categoryOf = cd;
5265}

References m_categoryOf.

◆ setClassName()

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

Implements ClassDefMutable.

Definition at line 4569 of file classdef.cpp.

4570{
4571 m_className = name;
4572}

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

◆ setClassSpecifier()

void ClassDefImpl::setClassSpecifier ( TypeSpecifier spec)
overridevirtual

Implements ClassDefMutable.

Definition at line 5363 of file classdef.cpp.

5364{
5365 m_spec = spec;
5366}

References m_spec.

◆ setCompoundType()

void ClassDefImpl::setCompoundType ( CompoundType t)
overridevirtual

Implements ClassDefMutable.

Definition at line 5246 of file classdef.cpp.

5247{
5248 m_compType = t;
5249}

References m_compType.

◆ setFileDef()

void ClassDefImpl::setFileDef ( FileDef * fd)
overridevirtual

Implements ClassDefMutable.

Definition at line 5217 of file classdef.cpp.

5218{
5219 m_fileDef = fd;
5220}

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

4347{
4348 gd->addClass(this);
4349 //printf("ClassDefImpl::setGroupDefForAllMembers(%s)\n",qPrint(gd->name()));
4350 for (auto &mni : m_allMemberNameInfoLinkedMap)
4351 {
4352 for (auto &mi : *mni)
4353 {
4354 MemberDefMutable *md = toMemberDefMutable(mi->memberDef());
4355 if (md)
4356 {
4357 md->setGroupDef(gd,pri,fileName,startLine,hasDocs);
4358 gd->insertMember(md,TRUE);
4359 ClassDefMutable *innerClass = toClassDefMutable(md->getClassDefOfAnonymousType());
4360 if (innerClass) innerClass->setGroupDefForAllMembers(gd,pri,fileName,startLine,hasDocs);
4361 }
4362 }
4363 }
4364}
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 5107 of file classdef.cpp.

5108{
5110}

References m_implicitTemplateInstance.

◆ setIncludeFile()

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

Implements ClassDefMutable.

Definition at line 1425 of file classdef.cpp.

1427{
1428 //printf("ClassDefImpl::setIncludeFile(%p,%s,%d,%d)\n",fd,includeName,local,force);
1429 if (!m_incInfo) m_incInfo = std::make_unique<IncludeInfo>();
1430 if ((!includeName.isEmpty() && m_incInfo->includeName.isEmpty()) ||
1431 (fd!=nullptr && m_incInfo->fileDef==nullptr)
1432 )
1433 {
1434 //printf("Setting file info\n");
1435 m_incInfo->fileDef = fd;
1436 m_incInfo->includeName = includeName;
1438 }
1439 if (force && !includeName.isEmpty())
1440 {
1441 m_incInfo->includeName = includeName;
1443 }
1444}
@ 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 5241 of file classdef.cpp.

5242{
5243 m_isStatic=b;
5244}

References m_isStatic.

◆ setMetaData()

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

Implements ClassDefMutable.

Definition at line 5446 of file classdef.cpp.

5447{
5448 m_metaData = md;
5449}

References m_metaData.

◆ setModuleDef()

void ClassDefImpl::setModuleDef ( ModuleDef * mod)
overridevirtual

Implements ClassDefMutable.

Definition at line 5222 of file classdef.cpp.

5223{
5224 m_moduleDef = mod;
5225}

References m_moduleDef.

◆ setPrimaryConstructorParams()

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

Implements ClassDefMutable.

Definition at line 3550 of file classdef.cpp.

3551{
3553}
ArgumentList m_primaryConstructorParams
Definition classdef.cpp:557

References m_primaryConstructorParams.

◆ setProtection()

void ClassDefImpl::setProtection ( Protection p)
overridevirtual

Implements ClassDefMutable.

Definition at line 5232 of file classdef.cpp.

5233{
5234 m_prot=p;
5235 if (getLanguage()==SrcLangExt::VHDL && VhdlDocGen::convert(p)==VhdlDocGen::ARCHITECTURECLASS)
5236 {
5237 m_className = name();
5238 }
5239}
@ 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 3545 of file classdef.cpp.

3546{
3547 m_requiresClause = req;
3548}

References m_requiresClause.

◆ setSubGrouping()

void ClassDefImpl::setSubGrouping ( bool enabled)
overridevirtual

Implements ClassDefMutable.

Definition at line 5227 of file classdef.cpp.

5228{
5229 m_subGrouping = enabled;
5230}

References m_subGrouping.

◆ setTemplateArguments()

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

Implements ClassDefMutable.

Definition at line 3492 of file classdef.cpp.

3493{
3494 m_tempArgs = al;
3495}

References m_tempArgs.

◆ setTemplateBaseClassNames()

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

Implements ClassDefMutable.

Definition at line 4450 of file classdef.cpp.

4451{
4452 m_templBaseClassNames = templateNames;
4453}

References m_templBaseClassNames.

◆ setTemplateMaster()

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

Implements ClassDefMutable.

Definition at line 5251 of file classdef.cpp.

5252{
5253 assert(tm!=this);
5255}

References m_templateMaster.

◆ setTypeConstraints()

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

Implements ClassDefMutable.

Definition at line 3487 of file classdef.cpp.

3488{
3489 m_typeConstraints = al;
3490}

References m_typeConstraints.

◆ setUsedOnly()

void ClassDefImpl::setUsedOnly ( bool b)
overridevirtual

Implements ClassDefMutable.

Definition at line 5267 of file classdef.cpp.

5268{
5269 m_usedOnly = b;
5270}

References m_usedOnly.

◆ showUsedFiles()

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

Definition at line 1724 of file classdef.cpp.

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

5063{
5064 std::stable_sort(m_allMemberNameInfoLinkedMap.begin(),
5066 [](const auto &m1,const auto &m2)
5067 {
5068 return qstricmp_sort(m1->memberName(),m2->memberName())<0;
5069 });
5070}

References m_allMemberNameInfoLinkedMap.

◆ sortMemberLists()

void ClassDefImpl::sortMemberLists ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4678 of file classdef.cpp.

4679{
4680 for (auto &ml : m_memberLists)
4681 {
4682 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
4683 }
4684 if (Config_getBool(SORT_BRIEF_DOCS))
4685 {
4686 std::stable_sort(m_innerClasses.begin(),
4687 m_innerClasses.end(),
4688 [](const auto &c1,const auto &c2)
4689 {
4690 return Config_getBool(SORT_BY_SCOPE_NAME) ?
4691 qstricmp_sort(c1->name(), c2->name() )<0 :
4692 qstricmp_sort(c1->className(), c2->className())<0 ;
4693 });
4694 }
4695}

References Config_getBool, FALSE, m_innerClasses, and m_memberLists.

◆ startMemberDeclarations()

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

Definition at line 2213 of file classdef.cpp.

2214{
2215 //printf("%s: ClassDefImpl::startMemberDeclarations()\n",qPrint(name()));
2217}
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 2193 of file classdef.cpp.

2194{
2195 //printf("%s: ClassDefImpl::startMemberDocumentation()\n",qPrint(name()));
2196 if (Config_getBool(SEPARATE_MEMBER_PAGES))
2197 {
2200 }
2201}

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

5048{
5049 return m_inheritedBy;
5050}

References m_inheritedBy.

Referenced by isSubClass().

◆ subGrouping()

bool ClassDefImpl::subGrouping ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5436 of file classdef.cpp.

5437{
5438 return m_subGrouping;
5439}

References m_subGrouping.

◆ templateArguments()

const ArgumentList & ClassDefImpl::templateArguments ( ) const
overridevirtual

Returns the template arguments of this class.

Implements ClassDef.

Definition at line 5077 of file classdef.cpp.

5078{
5079 return m_tempArgs;
5080}

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

5098{
5099 return m_templateMaster;
5100}

References m_templateMaster.

◆ templateTypeConstraints()

const ConstraintClassList & ClassDefImpl::templateTypeConstraints ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5147 of file classdef.cpp.

5148{
5149 return m_constraintClassList;
5150}

References m_constraintClassList.

◆ title()

QCString ClassDefImpl::title ( ) const
overridevirtual

Implements ClassDef.

Definition at line 2900 of file classdef.cpp.

2901{
2902 QCString pageTitle;
2903 SrcLangExt lang = getLanguage();
2904
2905 auto getReferenceTitle = [this](std::function<QCString()> translateFunc) -> QCString
2906 {
2907 return Config_getBool(HIDE_COMPOUND_REFERENCE) ? displayName() : translateFunc();
2908 };
2909
2910 if (lang==SrcLangExt::Fortran)
2911 {
2912 pageTitle = getReferenceTitle([this](){
2914 });
2915 }
2916 else if (lang==SrcLangExt::Slice)
2917 {
2918 pageTitle = getReferenceTitle([this](){
2920 });
2921 }
2922 else if (lang==SrcLangExt::VHDL)
2923 {
2924 pageTitle = getReferenceTitle([this](){
2926 });
2927 }
2928 else if (lang==SrcLangExt::CSharp && !m_primaryConstructorParams.empty())
2929 {
2930 pageTitle = getReferenceTitle([this](){
2932 m_compType,
2933 !m_tempArgs.empty());
2934 });
2935 }
2936 else if (isJavaEnum())
2937 {
2938 pageTitle = getReferenceTitle([this](){
2940 });
2941 }
2942 else if (m_compType==Service)
2943 {
2944 pageTitle = getReferenceTitle([this](){
2946 });
2947 }
2948 else if (m_compType==Singleton)
2949 {
2950 pageTitle = getReferenceTitle([this](){
2952 });
2953 }
2954 else
2955 {
2956 pageTitle = getReferenceTitle([this](){
2958 m_compType == Interface && getLanguage()==SrcLangExt::ObjC ? Class : m_compType,
2959 !m_tempArgs.empty());
2960 });
2961 }
2962 return pageTitle;
2963}
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 5426 of file classdef.cpp.

5427{
5428 return m_typeConstraints;
5429}

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

5043{
5044 m_inherits = bcd;
5045}

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

5053{
5054 m_inheritedBy = bcd;
5055}

References m_inheritedBy.

◆ usedByImplementationClasses()

const UsesClassList & ClassDefImpl::usedByImplementationClasses ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5142 of file classdef.cpp.

5143{
5144 return m_usedByImplClassList;
5145}

References m_usedByImplClassList.

◆ usedFiles()

const FileList & ClassDefImpl::usedFiles ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5421 of file classdef.cpp.

5422{
5423 return m_files;
5424}

References m_files.

◆ usedImplementationClasses()

const UsesClassList & ClassDefImpl::usedImplementationClasses ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5137 of file classdef.cpp.

5138{
5139 return m_usesImplClassList;
5140}

References m_usesImplClassList.

◆ visibleInParentsDeclList()

bool ClassDefImpl::visibleInParentsDeclList ( ) const
overridevirtual

show this class in the declaration section of its parent?

Implements ClassDef.

Definition at line 2590 of file classdef.cpp.

2591{
2592 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
2593 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
2594 bool extractLocalClasses = Config_getBool(EXTRACT_LOCAL_CLASSES);
2595 bool linkable = isLinkable();
2596 return (!isAnonymous() && !isExtension() &&
2597 (protection()!=Protection::Private || extractPrivate) &&
2598 (linkable || (!hideUndocClasses && (!isLocal() || extractLocalClasses)))
2599 );
2600}
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 4851 of file classdef.cpp.

4852{
4853 //printf("**** writeAdditionalInheritedMembers()\n");
4854 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4855 {
4856 if (lde->kind()==LayoutDocEntry::MemberDecl)
4857 {
4858 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4859 if (lmd && lmd->type!=MemberListType::Friends())
4860 {
4861 ClassDefSet visited;
4863 }
4864 }
4865 }
4866}
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 2233 of file classdef.cpp.

2234{
2235 ol.pushGeneratorState();
2237 ol.writeString("\n");
2238 ol.startGroupHeader();
2240 ol.endGroupHeader();
2242 ol.popGeneratorState();
2243}
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 1547 of file classdef.cpp.

1548{
1549 if (hasBriefDescription())
1550 {
1551 ol.startParagraph();
1552 ol.pushGeneratorState();
1554 ol.writeString(" - ");
1555 ol.popGeneratorState();
1557 briefLine(),
1558 this,
1559 nullptr,
1561 DocOptions()
1562 .setIndexWords(true)
1563 .setSingleLine(true));
1564 ol.pushGeneratorState();
1566 ol.writeString(" \n");
1568 ol.popGeneratorState();
1569
1570 if (hasDetailedDescription() || exampleFlag)
1571 {
1572 writeMoreLink(ol,anchor());
1573 }
1574
1575 ol.endParagraph();
1576 }
1577 ol.writeSynopsis();
1578}
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 1964 of file classdef.cpp.

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

3560{
3561 //printf("ClassName='%s' inGroup=%d\n",qPrint(name()),inGroup);
3562
3564 QCString cn = displayName(FALSE);
3565 if (!cn.isEmpty())
3566 {
3567 ol.docify(" ");
3568 if (md && isLinkable())
3569 {
3570 ol.writeObjectLink(QCString(),QCString(),md->anchor(),cn);
3571 }
3572 else
3573 {
3574 ol.startBold();
3575 ol.docify(cn);
3576 ol.endBold();
3577 }
3578 }
3579 ol.docify(" {");
3581 if (!briefDescription().isEmpty() &&
3582 Config_getBool(BRIEF_MEMBER_DESC)
3583 )
3584 {
3585 auto parser { createDocParser() };
3586 auto ast { validatingParseDoc(*parser.get(),
3587 briefFile(),
3588 briefLine(),
3589 this,
3590 nullptr,
3592 DocOptions()
3593 .setIndexWords(inheritedFrom==nullptr)
3594 .setSingleLine(true))
3595 };
3596 if (!ast->isEmpty())
3597 {
3598 ol.startMemberDescription(anchor(),inheritId);
3599 ol.writeDoc(ast.get(),this,nullptr);
3600
3601 // for RTF we need to add an extra empty paragraph
3602 ol.pushGeneratorState();
3604 ol.startParagraph();
3605 ol.endParagraph();
3606 ol.popGeneratorState();
3608 }
3609 }
3610 ol.endMemberDeclaration(md ? md->anchor() : QCString(),inheritId);
3611
3612 // write user defined member groups
3613 for (const auto &mg : m_memberGroups)
3614 {
3615 mg->writePlainDeclarations(ol,inGroup,this,nullptr,nullptr,nullptr,nullptr,indentLevel,inheritedFrom,inheritId);
3616 }
3617
3618 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
3619 {
3620 if (lde->kind()==LayoutDocEntry::MemberDecl)
3621 {
3622 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
3623 if (lmd)
3624 {
3625 writePlainMemberDeclaration(ol,lmd->type,inGroup,indentLevel,inheritedFrom,inheritId);
3626 }
3627 }
3628 }
3629}
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 writeDoc(const IDocNodeAST *ast, const Definition *ctx, const MemberDef *md, int sectionLevel=-1)
Definition outputlist.h:383
void endMemberDescription()
Definition outputlist.h:567
void startMemberDescription(const QCString &anchor, const QCString &inheritId=QCString(), bool typ=false)
Definition outputlist.h:565
void endMemberItem(OutputGenerator::MemberItemType type)
Definition outputlist.h:495
void endMemberDeclaration(const QCString &anchor, const QCString &inheritId)
Definition outputlist.h:571
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(), Definition::anchor(), OutputGenerator::AnonymousStart, DefinitionMixin< ClassDefMutable >::briefDescription(), DefinitionMixin< ClassDefMutable >::briefFile(), DefinitionMixin< ClassDefMutable >::briefLine(), compoundTypeString(), Config_getBool, createDocParser(), OutputList::disableAllBut(), displayName(), OutputList::docify(), OutputList::endBold(), OutputList::endMemberDeclaration(), OutputList::endMemberDescription(), OutputList::endMemberItem(), OutputList::endParagraph(), FALSE, LayoutDocManager::instance(), QCString::isEmpty(), isLinkable(), m_memberGroups, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, OutputList::startBold(), OutputList::startMemberDescription(), OutputList::startParagraph(), LayoutDocEntryMemberDecl::type, validatingParseDoc(), OutputList::writeDoc(), OutputList::writeObjectLink(), and writePlainMemberDeclaration().

◆ writeDeclarationLink()

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

Implements ClassDef.

Definition at line 2602 of file classdef.cpp.

2603{
2604 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
2605 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
2606 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2607 SrcLangExt lang = getLanguage();
2609 {
2610 if (!found) // first class
2611 {
2612 if (sliceOpt)
2613 {
2614 if (compoundType()==Interface)
2615 {
2616 ol.startMemberHeader("interfaces");
2617 }
2618 else if (compoundType()==Struct)
2619 {
2620 ol.startMemberHeader("structs");
2621 }
2622 else if (compoundType()==Exception)
2623 {
2624 ol.startMemberHeader("exceptions");
2625 }
2626 else // compoundType==Class
2627 {
2628 ol.startMemberHeader("nested-classes");
2629 }
2630 }
2631 else // non-Slice optimization: single header for class/struct/..
2632 {
2633 ol.startMemberHeader("nested-classes");
2634 }
2635 if (!header.isEmpty())
2636 {
2637 ol.parseText(header);
2638 }
2639 else if (lang==SrcLangExt::VHDL)
2640 {
2642 }
2643 else
2644 {
2645 ol.parseText(lang==SrcLangExt::Fortran ?
2648 }
2649 ol.endMemberHeader();
2650 ol.startMemberList();
2651 found=TRUE;
2652 }
2654 QCString ctype = compoundTypeString();
2655 QCString cname = displayName(!localNames);
2656 QCString anc = anchor();
2657 if (anc.isEmpty()) anc = cname; else anc.prepend(cname+"_");
2659
2660 if (lang!=SrcLangExt::VHDL) // for VHDL we swap the name and the type
2661 {
2662 if (isSliceLocal())
2663 {
2664 ol.writeString("local ");
2665 }
2666 ol.writeString(ctype);
2667 ol.writeString(" ");
2668 ol.insertMemberAlign();
2669 }
2670 if (isLinkable())
2671 {
2674 anchor(),
2675 cname
2676 );
2677 }
2678 else
2679 {
2680 ol.startBold();
2681 ol.docify(cname);
2682 ol.endBold();
2683 }
2684 if (lang==SrcLangExt::VHDL) // now write the type
2685 {
2686 ol.writeString(" ");
2687 ol.insertMemberAlign();
2689 }
2691
2692 // add the brief description if available
2693 if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
2694 {
2695 auto parser { createDocParser() };
2696 auto ast { validatingParseDoc(*parser.get(),
2697 briefFile(),
2698 briefLine(),
2699 this,
2700 nullptr,
2702 DocOptions()
2703 .setSingleLine(true))
2704 };
2705 if (!ast->isEmpty())
2706 {
2708 ol.writeDoc(ast.get(),this,nullptr);
2709 if (isLinkableInProject())
2710 {
2711 writeMoreLink(ol,anchor());
2712 }
2714 }
2715 }
2716 ol.endMemberDeclaration(anchor(),QCString());
2717 }
2718}
QCString getReference() const override
bool visibleInParentsDeclList() const override
show this class in the declaration section of its parent?
void startMemberDeclaration()
Definition outputlist.h:569
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)

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

1658{
1659 if (hasDetailedDescription() || exampleFlag)
1660 {
1661 ol.pushGeneratorState();
1663 ol.writeRuler();
1664 ol.popGeneratorState();
1665
1666 ol.pushGeneratorState();
1668 ol.writeAnchor(QCString(),anchor.isEmpty() ? QCString("details") : anchor);
1669 ol.popGeneratorState();
1670
1671 if (!anchor.isEmpty())
1672 {
1673 ol.pushGeneratorState();
1677 ol.popGeneratorState();
1678 }
1679
1680 ol.startGroupHeader("details");
1681 ol.parseText(title);
1682 ol.endGroupHeader();
1683
1685 }
1686 else
1687 {
1688 //writeTemplateSpec(ol,this,pageType);
1689 }
1690}
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 1580 of file classdef.cpp.

1581{
1582 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
1583
1584 ol.startTextBlock();
1585
1586 if (getLanguage()==SrcLangExt::Cpp)
1587 {
1588 writeTemplateSpec(ol,this,compoundTypeString(),SrcLangExt::Cpp);
1589 }
1590
1591 // repeat brief description
1592 if (!briefDescription().isEmpty() && repeatBrief)
1593 {
1595 briefLine(),
1596 this,
1597 nullptr,
1599 DocOptions());
1600 }
1601 if (!briefDescription().isEmpty() && repeatBrief &&
1602 !documentation().isEmpty())
1603 {
1604 ol.pushGeneratorState();
1606 ol.writeString("\n\n");
1607 ol.popGeneratorState();
1608 }
1609 // write documentation
1610 if (!documentation().isEmpty())
1611 {
1612 ol.generateDoc(docFile(),
1613 docLine(),
1614 this,
1615 nullptr,
1616 documentation(),
1617 DocOptions()
1618 .setIndexWords(true));
1619 }
1620 // write type constraints
1622
1623 ol.generateDoc(
1624 docFile(),docLine(),
1625 this,
1626 nullptr, // memberDef
1628 DocOptions()
1629 .setIndexWords(true));
1630
1631 // write examples
1632 if (hasExamples())
1633 {
1634 ol.startExamples();
1635 ol.startDescForItem();
1637 ol.endDescForItem();
1638 ol.endExamples();
1639 }
1640 writeSourceDef(ol);
1642 ol.endTextBlock();
1643}
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:5483
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 2966 of file classdef.cpp.

2967{
2968 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
2969 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
2970 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
2971 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2972 QCString pageTitle = title();
2973
2975 if (sliceOpt)
2976 {
2977 if (compoundType()==Interface)
2978 {
2980 }
2981 else if (compoundType()==Struct)
2982 {
2984 }
2985 else if (compoundType()==Exception)
2986 {
2988 }
2989 else
2990 {
2992 }
2993 }
2994 else
2995 {
2997 }
2998
2999 AUTO_TRACE("name='{}' getOutputFileBase='{}'",name(),getOutputFileBase());
3000 bool hasAllMembersLink=false;
3001 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
3002 {
3003 if (lde->kind()==LayoutDocEntry::ClassAllMembersLink)
3004 {
3005 hasAllMembersLink = true;
3006 break;
3007 }
3008 }
3009 QCString memListFile;
3010 if (hasAllMembersLink && !m_allMemberNameInfoLinkedMap.empty() && !Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
3011 {
3012 memListFile = getMemberListFileName();
3013 }
3014 startFile(ol,getOutputFileBase(),false,name(),pageTitle,hli,!generateTreeView,QCString(),0,memListFile);
3015 if (!generateTreeView)
3016 {
3018 {
3020 }
3021 ol.endQuickIndices();
3022 }
3023
3024 startTitle(ol,getOutputFileBase(),this);
3025 ol.parseText(pageTitle);
3027 addGroupListToTitle(ol,this);
3029 writeDocumentationContents(ol,pageTitle);
3030
3031 endFileWithNavPath(ol,this);
3032
3033 if (Config_getBool(SEPARATE_MEMBER_PAGES))
3034 {
3035 writeMemberPages(ol);
3036 }
3037}
void addClassAttributes(OutputList &ol) const
void writeMemberPages(OutputList &ol) const override
QCString getMemberListFileName() const override
Definition classdef.cpp:984
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:4936

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

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

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

References m_innerClasses, msg, and protectionLevelVisible().

◆ writeIncludeFiles()

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

Definition at line 2128 of file classdef.cpp.

2129{
2130 if (m_incInfo /*&& Config_getBool(SHOW_HEADERFILE)*/)
2131 {
2132 SrcLangExt lang = getLanguage();
2133 QCString nm=m_incInfo->includeName.isEmpty() ?
2134 (m_incInfo->fileDef ?
2135 m_incInfo->fileDef->docName() : QCString()
2136 ) :
2137 m_incInfo->includeName;
2138 if (!nm.isEmpty())
2139 {
2140 ol.startParagraph();
2141 ol.startTypewriter();
2142 ol.docify(::includeStatement(lang,m_incInfo->kind));
2143 ol.docify(::includeOpen(lang,m_incInfo->kind));
2144 ol.pushGeneratorState();
2146 ol.docify(nm);
2149 if (m_incInfo->fileDef)
2150 {
2151 ol.writeObjectLink(QCString(),m_incInfo->fileDef->includeName(),QCString(),nm);
2152 }
2153 else
2154 {
2155 ol.docify(nm);
2156 }
2157 ol.popGeneratorState();
2158 ol.docify(::includeClose(lang,m_incInfo->kind));
2159 ol.endTypewriter();
2160 ol.endParagraph();
2161 }
2162 }
2163}
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 1987 of file classdef.cpp.

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

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

4896{
4897 int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
4898 bool process = count>0;
4899 //printf("%s: writeInheritedMemberDec: lt=%s process=%d invert=%d always=%d\n",
4900 // qPrint(name()),qPrint(lt.to_string()),process,invert,showAlways);
4901 if ((process^invert) || showAlways)
4902 {
4903 for (const auto &ibcd : m_inherits)
4904 {
4905 ClassDefMutable *icd=toClassDefMutable(ibcd.classDef);
4906 if (icd && icd->isLinkable())
4907 {
4908 MemberListType lt1 = MemberListType::Invalid();
4909 MemberListType lt3 = MemberListType::Invalid();
4910 convertProtectionLevel(lt,ibcd.prot,&lt1,&lt3);
4911 if (lt2.isInvalid() && !lt3.isInvalid())
4912 {
4913 lt2=lt3;
4914 }
4915 //printf("%s:convert %s->(%s,%s) prot=%d\n",qPrint(icd->name()),qPrint(lt.to_string()),
4916 // qPrint(lt1.to_string()),qPrint(lt2.to_string()),ibcd.prot);
4917 if (visitedClasses.find(icd)==visitedClasses.end())
4918 {
4919 visitedClasses.insert(icd); // guard for multiple virtual inheritance
4920 if (!lt1.isInvalid())
4921 {
4922 //printf("--> writeMemberDeclarations for type %s\n",qPrint(lt1.to_string()));
4923 icd->writeMemberDeclarations(ol,visitedClasses,lt1,
4924 title,QCString(),FALSE,inheritedFrom,lt2,FALSE,TRUE);
4925 }
4926 }
4927 else
4928 {
4929 //printf("%s: class already visited!\n",qPrint(icd->name()));
4930 }
4931 }
4932 }
4933 }
4934}
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 2188 of file classdef.cpp.

2189{
2190 m_innerClasses.writeDocumentation(ol,this);
2191}

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

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

4940{
4941 //printf("%s: ClassDefImpl::writeMemberDeclarations lt=%s lt2=%s\n",qPrint(name()),qPrint(lt.to_string()),qPrint(lt2.to_string()));
4942 MemberList * ml = getMemberList(lt);
4943 MemberList * ml2 = getMemberList(lt2);
4944 if (getLanguage()==SrcLangExt::VHDL) // use specific declarations function
4945 {
4946 static const ClassDef *cdef;
4947 if (cdef!=this)
4948 { // only one inline link
4950 cdef=this;
4951 }
4952 if (ml)
4953 {
4954 VhdlDocGen::writeVhdlDeclarations(ml,ol,nullptr,this,nullptr,nullptr,nullptr);
4955 }
4956 }
4957 else
4958 {
4959 //printf("%s::writeMemberDeclarations(%s) ml=%p ml2=%p\n",qPrint(name()),qPrint(title),(void*)ml,(void*)ml2);
4960 QCString tt = title, st = subTitle;
4961 if (ml)
4962 {
4963 //printf(" writeDeclarations ml type=%s count=%d\n",qPrint(lt.to_string()),ml->numDecMembers(inheritedFrom));
4964 ml->writeDeclarations(ol,this,nullptr,nullptr,nullptr,nullptr,tt,st,FALSE,showInline,inheritedFrom,lt,true);
4965 tt.clear();
4966 st.clear();
4967 }
4968 if (ml2)
4969 {
4970 //printf(" writeDeclarations ml2 type=%s count=%d\n",qPrint(lt2.to_string()),ml2->numDecMembers(inheritedFrom));
4971 ml2->writeDeclarations(ol,this,nullptr,nullptr,nullptr,nullptr,tt,st,FALSE,showInline,inheritedFrom,lt,ml==nullptr);
4972 }
4973 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
4974 if (!inlineInheritedMembers) // show inherited members as separate lists
4975 {
4976 writeInheritedMemberDeclarations(ol,visitedClasses,lt,lt2,title,
4977 inheritedFrom ? inheritedFrom : this,
4978 invert,showAlways);
4979 }
4980 }
4981}
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:186
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 4996 of file classdef.cpp.

4997{
4998 //printf("%s: ClassDefImpl::writeMemberDocumentation()\n",qPrint(name()));
4999 MemberList * ml = getMemberList(lt);
5000 if (ml) ml->writeDocumentation(ol,displayName(),this,title,ml->listType().toLabel(),FALSE,showInline);
5001}
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 2165 of file classdef.cpp.

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

References m_memberGroups, and m_subGrouping.

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeMemberList()

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

Implements ClassDef.

Definition at line 3125 of file classdef.cpp.

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

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

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

2547{
2548 // TODO: clean up this mess by moving it to
2549 // the output generators...
2550 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
2551 bool rtfHyperlinks = Config_getBool(RTF_HYPERLINKS);
2552 bool usePDFLatex = Config_getBool(USE_PDFLATEX);
2553
2554 // HTML only
2555 ol.pushGeneratorState();
2557 ol.docify(" ");
2559 anchor.isEmpty() ? QCString("details") : anchor);
2561 ol.endTextLink();
2562 ol.popGeneratorState();
2563
2564 if (!anchor.isEmpty())
2565 {
2566 ol.pushGeneratorState();
2567 // LaTeX + RTF
2571 if (!(usePDFLatex && pdfHyperlinks))
2572 {
2574 }
2575 if (!rtfHyperlinks)
2576 {
2578 }
2579 ol.docify(" ");
2582 ol.endTextLink();
2583 // RTF only
2585 ol.writeString("\\par");
2586 ol.popGeneratorState();
2587 }
2588}
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 2182 of file classdef.cpp.

2183{
2184 // nested classes
2185 m_innerClasses.writeDeclaration(ol,nullptr,title,TRUE);
2186}

References m_innerClasses, title(), and TRUE.

Referenced by writeDocumentationContents().

◆ writePageNavigation()

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

Implements DefinitionMutable.

Definition at line 2315 of file classdef.cpp.

2316{
2317 ol.writePageOutline();
2318}
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 5010 of file classdef.cpp.

5013{
5014 //printf("%s: ClassDefImpl::writePlainMemberDeclaration()\n",qPrint(name()));
5015 MemberList * ml = getMemberList(lt);
5016 if (ml)
5017 {
5018 ml->writePlainDeclarations(ol,inGroup,this,nullptr,nullptr,nullptr,nullptr,indentLevel,inheritedFrom,inheritId);
5019 }
5020}
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 3059 of file classdef.cpp.

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

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

5004{
5005 //printf("%s: ClassDefImpl::writeSimpleMemberDocumentation()\n",qPrint(name()));
5006 MemberList * ml = getMemberList(lt);
5007 if (ml) ml->writeSimpleDocumentation(ol,this);
5008}
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 2246 of file classdef.cpp.

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

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

1501{
1502 ArgumentLists specs;
1503 QCString name;
1504 searchTemplateSpecs(d,specs,name,lang);
1505 if (!specs.empty()) // class has template scope specifiers
1506 {
1508 for (const ArgumentList &al : specs)
1509 {
1510 ol.docify("template<");
1511 auto it = al.begin();
1512 while (it!=al.end())
1513 {
1514 Argument a = *it;
1515 linkifyText(TextGeneratorOLImpl(ol), // out
1516 a.type, // text
1517 LinkifyTextOptions().setScope(d).setFileScope(getFileDef()).setSelf(this));
1518 if (!a.name.isEmpty())
1519 {
1520 ol.docify(" ");
1521 ol.docify(a.name);
1522 }
1523 if (a.defval.length()!=0)
1524 {
1525 ol.docify(" = ");
1526 ol.docify(a.defval);
1527 }
1528 ++it;
1529 if (it!=al.end()) ol.docify(", ");
1530 }
1531 ol.docify(">");
1532 ol.lineBreak();
1533 }
1534 if (!m_requiresClause.isEmpty())
1535 {
1536 ol.docify("requires ");
1537 linkifyText(TextGeneratorOLImpl(ol), // out
1538 m_requiresClause, // text
1539 LinkifyTextOptions().setScope(d).setFileScope(getFileDef()).setSelf(this));
1540 ol.lineBreak();
1541 }
1542 ol.docify(type.lower()+" "+name);
1544 }
1545}
void endCompoundTemplateParams()
Definition outputlist.h:503
void startCompoundTemplateParams()
Definition outputlist.h:501
QCString lower() const
Definition qcstring.h:253
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 538 of file classdef.cpp.

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

◆ m_categoryOf

ClassDef* ClassDefImpl::m_categoryOf = nullptr
private

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

Definition at line 501 of file classdef.cpp.

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

◆ m_className

QCString ClassDefImpl::m_className
private

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

Definition at line 496 of file classdef.cpp.

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

◆ m_collabFileName

QCString ClassDefImpl::m_collabFileName
private

file name used for the collaboration diagram

Definition at line 420 of file classdef.cpp.

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

◆ m_compType

ClassDef::CompoundType ClassDefImpl::m_compType
private

Holds the kind of "class" this is.

Definition at line 466 of file classdef.cpp.

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

◆ m_constraintClassList

ConstraintClassList ClassDefImpl::m_constraintClassList
private

Definition at line 483 of file classdef.cpp.

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

◆ m_examples

ExampleList ClassDefImpl::m_examples
private

Examples that use this class

Definition at line 463 of file classdef.cpp.

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

◆ m_fileDef

FileDef* ClassDefImpl::m_fileDef = nullptr
private

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

File this class is defined in

Definition at line 445 of file classdef.cpp.

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

◆ m_fileName

QCString ClassDefImpl::m_fileName
private

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

Definition at line 414 of file classdef.cpp.

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

◆ m_files

FileList ClassDefImpl::m_files
private

Files that were used for generating the class documentation.

Definition at line 460 of file classdef.cpp.

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

◆ m_hasCollaborationGraph

bool ClassDefImpl::m_hasCollaborationGraph = false
private

◆ m_implicitTemplateInstance

◆ m_incInfo

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

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

Definition at line 428 of file classdef.cpp.

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

◆ m_inheritedBy

BaseClassList ClassDefImpl::m_inheritedBy
private

List of sub-classes that directly derive from this class

Definition at line 437 of file classdef.cpp.

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

◆ m_inheritFileName

QCString ClassDefImpl::m_inheritFileName
private

file name used for the inheritance graph

Definition at line 423 of file classdef.cpp.

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

◆ m_inherits

BaseClassList ClassDefImpl::m_inherits
private

◆ m_innerClasses

ClassLinkedRefMap ClassDefImpl::m_innerClasses
private

◆ m_isAbstract

bool ClassDefImpl::m_isAbstract = false
private

Is this an abstract class?

Definition at line 509 of file classdef.cpp.

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

◆ m_isJavaEnum

bool ClassDefImpl::m_isJavaEnum = false
private

Does this class represent a Java style enum?

Definition at line 541 of file classdef.cpp.

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

◆ m_isLocal

bool ClassDefImpl::m_isLocal = false
private

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

Definition at line 518 of file classdef.cpp.

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

◆ m_isSimple

bool ClassDefImpl::m_isSimple = false
private

◆ m_isStatic

bool ClassDefImpl::m_isStatic = false
private

Is the class part of an unnamed namespace?

Definition at line 512 of file classdef.cpp.

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

◆ m_isTemplArg

bool ClassDefImpl::m_isTemplArg = false
private

Definition at line 520 of file classdef.cpp.

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

◆ m_memberGroups

◆ m_memberListFileName

QCString ClassDefImpl::m_memberListFileName
private

file name used for the list of all members

Definition at line 417 of file classdef.cpp.

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

◆ m_memberLists

◆ m_membersMerged

bool ClassDefImpl::m_membersMerged = false
private

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

Definition at line 515 of file classdef.cpp.

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

◆ m_metaData

QCString ClassDefImpl::m_metaData
private

Definition at line 545 of file classdef.cpp.

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

◆ m_moduleDef

ModuleDef* ClassDefImpl::m_moduleDef = nullptr
private

Module this class is defined in

Definition at line 448 of file classdef.cpp.

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

◆ m_primaryConstructorParams

ArgumentList ClassDefImpl::m_primaryConstructorParams
private

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

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

◆ m_qualifiers

StringVector ClassDefImpl::m_qualifiers
private

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

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

◆ m_spec

◆ m_subGrouping

bool ClassDefImpl::m_subGrouping = false
private

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

Definition at line 526 of file classdef.cpp.

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

◆ m_tempArgs

◆ m_templateInstances

TemplateInstanceList ClassDefImpl::m_templateInstances
private

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

Definition at line 488 of file classdef.cpp.

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

◆ m_templateMaster

const ClassDef* ClassDefImpl::m_templateMaster = nullptr
private

◆ m_templBaseClassNames

TemplateNameMap ClassDefImpl::m_templBaseClassNames
private

Definition at line 490 of file classdef.cpp.

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

◆ m_typeConstraints

ArgumentList ClassDefImpl::m_typeConstraints
private

Type constraints for template parameters

Definition at line 457 of file classdef.cpp.

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

◆ m_typeInheritanceGraph

CLASS_GRAPH_t ClassDefImpl::m_typeInheritanceGraph = CLASS_GRAPH_t::NO
private

◆ m_usedByImplClassList

UsesClassList ClassDefImpl::m_usedByImplClassList
private

Definition at line 481 of file classdef.cpp.

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

◆ m_usedOnly

bool ClassDefImpl::m_usedOnly = false
private

Reason of existence is a "use" relation.

Definition at line 529 of file classdef.cpp.

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

◆ m_usesImplClassList

UsesClassList ClassDefImpl::m_usesImplClassList
private

Definition at line 480 of file classdef.cpp.

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

◆ m_vhdlSummaryTitles

StringSet ClassDefImpl::m_vhdlSummaryTitles
private

List of titles to use for the summary.

Definition at line 532 of file classdef.cpp.

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


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