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 ClassDeftagLessReference () const override
const MemberDefisSmartPointer () const override
bool isJavaEnum () const override
QCString title () const override
QCString generatedFromFiles () const override
const FileListusedFiles () const override
const ArgumentListtypeConstraints () const override
const ExampleListgetExamples () const override
bool hasExamples () const override
QCString getMemberListFileName () const override
bool subGrouping () const override
bool isSliceLocal () const override
bool hasNonReferenceSuperClass () const override
QCString requiresClause () const override
StringVector getQualifiers () const override
bool containsOverload (const MemberDef *md) const override
bool isImplicitTemplateInstance () const override
ClassDefinsertTemplateInstance (const QCString &fileName, int startLine, int startColumn, const QCString &templSpec, bool &freshInstance) override
void insertBaseClass (ClassDef *, const QCString &name, Protection p, Specifier s, const QCString &t=QCString()) override
void insertSubClass (ClassDef *, Protection p, Specifier s, const QCString &t=QCString()) override
void insertExplicitTemplateInstance (ClassDef *instance, const QCString &spec) override
void setIncludeFile (FileDef *fd, const QCString &incName, bool local, bool force) override
void insertMember (MemberDef *) override
void insertUsedFile (const FileDef *) override
bool addExample (const QCString &anchor, const QCString &name, const QCString &file) override
void mergeCategory (ClassDef *category) override
void setFileDef (FileDef *fd) override
void setModuleDef (ModuleDef *mod) override
void setSubGrouping (bool enabled) override
void setProtection (Protection p) override
void setGroupDefForAllMembers (GroupDef *g, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs) override
void addInnerCompound (Definition *d) override
void addUsedClass (ClassDef *cd, const QCString &accessName, Protection prot) override
void addUsedByClass (ClassDef *cd, const QCString &accessName, Protection prot) override
void setIsStatic (bool b) override
void setCompoundType (CompoundType t) override
void setClassName (const QCString &name) override
void setClassSpecifier (TypeSpecifier spec) override
void addQualifiers (const StringVector &qualifiers) override
void setTemplateArguments (const ArgumentList &al) override
void setTemplateBaseClassNames (const TemplateNameMap &templateNames) override
void setTemplateMaster (const ClassDef *tm) override
void setImplicitTemplateInstance (bool b) override
void setTypeConstraints (const ArgumentList &al) override
void addMemberToTemplateInstance (const MemberDef *md, const ArgumentList &templateArguments, const QCString &templSpec) override
void addMembersToTemplateInstance (const ClassDef *cd, const ArgumentList &templateArguments, const QCString &templSpec) override
void makeTemplateArgument (bool b=true) override
void setCategoryOf (ClassDef *cd) override
void setUsedOnly (bool b) override
void setTagLessReference (const ClassDef *cd) override
void setMetaData (const QCString &md) override
void findSectionsInDocumentation () override
void addMembersToMemberGroup () override
void addListReferences () override
void addRequirementReferences () override
void addTypeConstraints () override
void computeAnchors () override
void mergeMembers () override
void sortMemberLists () override
void distributeMemberGroupDocumentation () override
void writeDocumentation (OutputList &ol) const override
void writeDocumentationForInnerClasses (OutputList &ol) const override
void writeMemberPages (OutputList &ol) const override
void writeMemberList (OutputList &ol) const override
void 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?
const ClassDefm_tagLessRef = nullptr
bool m_isJavaEnum = false
 Does this class represent a Java style enum?
TypeSpecifier m_spec
QCString m_metaData
QCString m_requiresClause
 C++20 requires clause.
StringVector m_qualifiers
bool m_hasCollaborationGraph = false
CLASS_GRAPH_t m_typeInheritanceGraph = CLASS_GRAPH_t::NO
bool m_implicitTemplateInstance = false
ArgumentList m_primaryConstructorParams

Additional Inherited Members

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

Detailed Description

Implementation of the ClassDef interface.

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

816 : DefinitionMixin(defFileName,defLine,defColumn,removeRedundantWhiteSpace(nm),nullptr,nullptr,isSymbol)
817{
818 AUTO_TRACE("name={}",name());
819 setReference(lref);
820 m_compType = ct;
822 QCString compTypeString = getCompoundTypeString(getLanguage(),ct,isJavaEnum);
823 if (!fName.isEmpty())
824 {
826 }
827 else
828 {
829 m_fileName=compTypeString+name();
830 }
831 m_prot=Protection::Public;
832 //nspace=nullptr;
833 m_fileDef=nullptr;
834 m_moduleDef=nullptr;
835 m_subGrouping=Config_getBool(SUBGROUPING);
836 m_templateMaster =nullptr;
837 m_isAbstract = false;
838 m_isStatic = false;
839 m_isTemplArg = false;
840 m_membersMerged = false;
841 m_categoryOf = nullptr;
842 m_usedOnly = false;
843 m_isSimple = Config_getBool(INLINE_SIMPLE_STRUCTS);
844 m_arrowOperator = nullptr;
845 m_tagLessRef = nullptr;
846 m_spec=TypeSpecifier();
847 //QCString ns;
848 //extractNamespaceName(name,className,ns);
849 //printf("m_name=%s m_className=%s ns=%s\n",qPrint(m_name),qPrint(m_className),qPrint(ns));
850
851 // we cannot use getLanguage at this point, as setLanguage has not been called.
852 SrcLangExt lang = getLanguageFromFileName(defFileName);
853 if ((lang==SrcLangExt::Cpp || lang==SrcLangExt::ObjC) && guessSection(defFileName).isSource())
854 {
855 m_isLocal=true;
856 }
857 else
858 {
859 m_isLocal=false;
860 }
861 m_hasCollaborationGraph = Config_getBool(COLLABORATION_GRAPH);
863 m_memberListFileName = convertNameToFile(compTypeString+name()+"-members");
866 if (lref.isEmpty())
867 {
869 }
870 AUTO_TRACE_EXIT("m_fileName='{}'",m_fileName);
871}
QCString m_collabFileName
Definition classdef.cpp:431
QCString m_fileName
Definition classdef.cpp:425
const MemberDef * m_arrowOperator
Does this class overloaded the -> operator?
Definition classdef.cpp:549
TypeSpecifier m_spec
Definition classdef.cpp:556
ClassDef * m_categoryOf
Definition classdef.cpp:512
const ClassDef * m_tagLessRef
Definition classdef.cpp:551
Protection m_prot
Definition classdef.cpp:483
QCString m_inheritFileName
Definition classdef.cpp:434
const ClassDef * m_templateMaster
Definition classdef.cpp:504
bool m_membersMerged
Definition classdef.cpp:526
bool m_isJavaEnum
Does this class represent a Java style enum?
Definition classdef.cpp:554
ModuleDef * m_moduleDef
Definition classdef.cpp:459
bool isJavaEnum() const override
bool m_isSimple
Is this a simple (non-nested) C structure?
Definition classdef.cpp:546
CLASS_GRAPH_t m_typeInheritanceGraph
Definition classdef.cpp:566
bool m_isAbstract
Definition classdef.cpp:520
FileDef * m_fileDef
Definition classdef.cpp:456
ClassDef::CompoundType m_compType
Definition classdef.cpp:477
bool m_hasCollaborationGraph
Definition classdef.cpp:565
bool m_isTemplArg
Definition classdef.cpp:531
bool m_usedOnly
Reason of existence is a "use" relation.
Definition classdef.cpp:540
QCString m_memberListFileName
Definition classdef.cpp:428
bool m_subGrouping
Definition classdef.cpp:537
const QCString & name() const override
DefinitionMixin(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=true)
void setReference(const QCString &r) override
SrcLangExt getLanguage() const override
bool isEmpty() const
Returns true iff the string is empty.
Definition qcstring.h:161
static QCString getCompoundTypeString(SrcLangExt lang, ClassDef::CompoundType compType, bool isJavaEnum)
Definition classdef.cpp:158
#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
SrcLangExt
Definition types.h:207
QCString removeRedundantWhiteSpace(const QCString &s)
Definition util.cpp:567
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
Definition util.cpp:5253
QCString stripExtension(const QCString &fName)
Definition util.cpp:4986
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3543
EntryType guessSection(const QCString &name)
Definition util.cpp:338

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

Referenced by addTypeConstraint(), and insertTemplateInstance().

Member Function Documentation

◆ addClassAttributes()

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

Definition at line 2734 of file classdef.cpp.

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

3427{
3428 return m_examples.inSort(Example(anchor,nameStr,file));
3429}
ExampleList m_examples
Definition classdef.cpp:474
QCString anchor() const override
bool inSort(const Example &ex)
Definition example.h:39

References anchor(), ExampleList::inSort(), and m_examples.

◆ addGroupedInheritedMembers()

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

Implements ClassDef.

Definition at line 4931 of file classdef.cpp.

4933{
4934 //printf("** %s::addGroupedInheritedMembers() inheritId=%s\n",qPrint(name()),qPrint(inheritId));
4935 for (const auto &mg : m_memberGroups)
4936 {
4937 if (!mg->allMembersInSameSection() || !m_subGrouping) // group is in its own section
4938 {
4939 mg->addGroupedInheritedMembers(ol,this,lt,inheritedFrom,inheritId);
4940 }
4941 }
4942}
MemberGroupList m_memberGroups
Definition classdef.cpp:517

References m_memberGroups, and m_subGrouping.

◆ addInnerCompound()

void ClassDefImpl::addInnerCompound ( Definition * d)
overridevirtual

Implements DefinitionMutable.

Definition at line 4314 of file classdef.cpp.

4315{
4316 //printf("**** %s::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
4317 if (d->definitionType()==Definition::TypeClass) // only classes can be
4318 // nested in classes.
4319 {
4321 }
4322}
ClassLinkedRefMap m_innerClasses
Definition classdef.cpp:488
virtual const QCString & localName() const =0
virtual DefType definitionType() const =0
bool add(const char *k, T *obj)
Definition linkedmap.h:284
ClassDef * toClassDef(Definition *d)

References LinkedRefMap< T, Hash, KeyEqual, Map >::add(), Definition::definitionType(), Definition::localName(), m_innerClasses, toClassDef(), and Definition::TypeClass.

◆ addListReferences()

void ClassDefImpl::addListReferences ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4522 of file classdef.cpp.

4523{
4524 if (!isLinkableInProject()) return;
4525 SrcLangExt lang = getLanguage();
4527 qualifiedName(),
4530 displayName(),
4531 QCString(),
4532 this
4533 );
4534 for (const auto &mg : m_memberGroups)
4535 {
4536 mg->addListReferences(this);
4537 }
4538 for (auto &ml : m_memberLists)
4539 {
4540 if (ml->listType().isDetailed())
4541 {
4542 ml->addListReferences(this);
4543 }
4544 }
4545}
bool isLinkableInProject() const override
MemberLists m_memberLists
Definition classdef.cpp:514
QCString displayName(bool includeScope=true) const override
QCString getOutputFileBase() const override
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:4867

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

◆ addMembersToMemberGroup()

void ClassDefImpl::addMembersToMemberGroup ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1028 of file classdef.cpp.

1029{
1030 for (auto &ml : m_memberLists)
1031 {
1032 if (!ml->listType().isDetailed())
1033 {
1035 }
1036 }
1037
1038 // add members inside sections to their groups
1039 for (const auto &mg : m_memberGroups)
1040 {
1041 if (mg->allMembersInSameSection() && m_subGrouping)
1042 {
1043 //printf("addToDeclarationSection(%s)\n",qPrint(mg->header()));
1044 mg->addToDeclarationSection();
1045 }
1046 }
1047}
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 4434 of file classdef.cpp.

4435{
4436 AUTO_TRACE("this={} cd={} templSpec={}",name(),cd->name(),templSpec);
4437 //printf("%s::addMembersToTemplateInstance(%s,%s)\n",qPrint(name()),qPrint(cd->name()),templSpec);
4438 for (const auto &mni : cd->memberNameInfoLinkedMap())
4439 {
4440 for (const auto &mi : *mni)
4441 {
4442 const MemberDef *md = mi->memberDef();
4443 if (m_allMemberNameInfoLinkedMap.find(md->name())==nullptr) // only insert the member if not hidden by one with the same name (#11541)
4444 {
4446 }
4447 }
4448 }
4449 // also instantatie members for nested classes
4450 for (const auto &innerCd : cd->getClasses())
4451 {
4452 ClassDefMutable *ncd = toClassDefMutable(m_innerClasses.find(innerCd->localName()));
4453 if (ncd)
4454 {
4455 ncd->addMembersToTemplateInstance(innerCd,cd->templateArguments(),templSpec);
4456 }
4457 }
4458}
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:462
virtual void addMembersToTemplateInstance(const ClassDef *cd, const ArgumentList &templateArguments, const QCString &templSpec)=0
virtual const QCString & name() const =0
const T * find(const std::string &key) const
Definition linkedmap.h:47
const T * find(const std::string &key) const
Definition linkedmap.h:243
ClassDefMutable * toClassDefMutable(Definition *d)

References ClassDefMutable::addMembersToTemplateInstance(), addMemberToTemplateInstance(), AUTO_TRACE, LinkedMap< T, Hash, KeyEqual, Map >::find(), LinkedRefMap< T, Hash, KeyEqual, Map >::find(), 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 4606 of file classdef.cpp.

4607{
4608 AUTO_TRACE("{} md={} lt={} isBrief={}",name(),md->name(),lt,isBrief);
4609 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
4610 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
4611 const auto &ml = m_memberLists.get(lt,MemberListContainer::Class);
4612 ml->setNeedsSorting((isBrief && sortBriefDocs) || (!isBrief && sortMemberDocs));
4613 ml->push_back(md);
4614
4615 // for members in the declaration lists we set the section, needed for member grouping
4616 if (!ml->listType().isDetailed())
4617 {
4618 MemberDefMutable *mdm = toMemberDefMutable(md);
4619 if (mdm)
4620 {
4621 mdm->setSectionList(this,ml.get());
4622 }
4623 }
4624}
virtual void setSectionList(const Definition *container, const MemberList *sl)=0
const std::unique_ptr< MemberList > & get(MemberListType lt, MemberListContainer con)
Definition memberlist.h:191
MemberDefMutable * toMemberDefMutable(Definition *d)

References AUTO_TRACE, Class, Config_getBool, MemberLists::get(), 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 4408 of file classdef.cpp.

4411{
4412 AUTO_TRACE("this={} md={}",name(),md->name());
4413 auto actualArguments_p = stringToArgumentList(getLanguage(),templSpec);
4414 auto imd = md->createTemplateInstanceMember(templateArguments,actualArguments_p);
4415 auto mmd = toMemberDefMutable(imd.get());
4416 mmd->setMemberClass(this);
4417 mmd->setTemplateMaster(md);
4418 mmd->setDocumentation(md->documentation(),md->docFile(),md->docLine());
4419 mmd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine());
4420 mmd->setInbodyDocumentation(md->inbodyDocumentation(),md->inbodyFile(),md->inbodyLine());
4421 mmd->setMemberSpecifiers(md->getMemberSpecifiers());
4422 mmd->setMemberGroupId(md->getMemberGroupId());
4423 mmd->setArtificial(true);
4424 insertMember(imd.get());
4425 //printf("Adding member=%s %s%s to class %s templSpec %s\n",
4426 // imd->typeString(),qPrint(imd->name()),imd->argsString(),
4427 // qPrint(imd->getClassDef()->name()),templSpec);
4428 // insert imd in the list of all members
4429 //printf("Adding member=%s class=%s\n",qPrint(imd->name()),qPrint(name()));
4430 MemberName *mn = Doxygen::memberNameLinkedMap->add(imd->name());
4431 mn->push_back(std::move(imd));
4432}
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 LinkedMap< T, Hash, KeyEqual, Map >::add(), 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 5311 of file classdef.cpp.

5312{
5313 for (const auto &sx : qualifiers)
5314 {
5315 bool alreadyAdded = std::find(m_qualifiers.begin(), m_qualifiers.end(), sx) != m_qualifiers.end();
5316 if (!alreadyAdded)
5317 {
5318 m_qualifiers.push_back(sx);
5319 }
5320 }
5321}

References m_qualifiers.

◆ addRequirementReferences()

void ClassDefImpl::addRequirementReferences ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4547 of file classdef.cpp.

4548{
4549 if (!isLinkableInProject()) return;
4551 for (const auto &mg : m_memberGroups)
4552 {
4553 mg->addRequirementReferences(this);
4554 }
4555 for (auto &ml : m_memberLists)
4556 {
4557 if (ml->listType().isDetailed())
4558 {
4559 ml->addRequirementReferences(this);
4560 }
4561 }
4562}
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 3437 of file classdef.cpp.

3438{
3439 //printf("addTypeConstraint(%s,%s)\n",qPrint(type),qPrint(typeConstraint));
3440 bool hideUndocRelation = Config_getBool(HIDE_UNDOC_RELATIONS);
3441 if (typeConstraint.isEmpty() || type.isEmpty()) return;
3442 SymbolResolver resolver(getFileDef());
3443 ClassDefMutable *cd = resolver.resolveClassMutable(this,typeConstraint);
3444 if (cd==nullptr && !hideUndocRelation)
3445 {
3446 cd = toClassDefMutable(
3447 Doxygen::hiddenClassLinkedMap->add(typeConstraint,
3448 std::unique_ptr<ClassDef>(
3449 new ClassDefImpl(
3451 getDefColumn(),
3452 typeConstraint,
3453 ClassDef::Class))));
3454 if (cd)
3455 {
3456 cd->setUsedOnly(true);
3457 cd->setLanguage(getLanguage());
3458 //printf("Adding undocumented constraint '%s' to class %s on type %s\n",
3459 // qPrint(typeConstraint),qPrint(name()),qPrint(type));
3460 }
3461 }
3462 if (cd)
3463 {
3464 auto it = std::find_if(m_constraintClassList.begin(),
3466 [&cd](const auto &ccd) { return ccd.classDef==cd; });
3467
3468 if (it==m_constraintClassList.end())
3469 {
3470 m_constraintClassList.emplace_back(cd);
3471 it = m_constraintClassList.end()-1;
3472 }
3473 (*it).addAccessor(type);
3474 //printf("Adding constraint '%s' to class %s on type %s\n",
3475 // qPrint(typeConstraint),qPrint(name()),qPrint(type));
3476 }
3477}
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:811
FileDef * getFileDef() const override
Returns the namespace this compound is in, or 0 if it has a global scope.
ConstraintClassList m_constraintClassList
Definition classdef.cpp:494
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(), and toClassDefMutable().

Referenced by addTypeConstraints().

◆ addTypeConstraints()

void ClassDefImpl::addTypeConstraints ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 3480 of file classdef.cpp.

3481{
3482 for (const Argument &a : m_tempArgs)
3483 {
3484 if (!a.typeConstraint.isEmpty())
3485 {
3486 QCString typeConstraint;
3487 int i=0,p=0;
3488 while ((i=a.typeConstraint.find('&',p))!=-1) // typeConstraint="A &I" for C<T extends A & I>
3489 {
3490 typeConstraint = a.typeConstraint.mid(p,i-p).stripWhiteSpace();
3491 addTypeConstraint(typeConstraint,a.type);
3492 p=i+1;
3493 }
3494 typeConstraint = a.typeConstraint.right(a.typeConstraint.length()-p).stripWhiteSpace();
3495 addTypeConstraint(typeConstraint,a.type);
3496 }
3497 }
3498}
void addTypeConstraint(const QCString &typeConstraint, const QCString &type)
ArgumentList m_tempArgs
Definition classdef.cpp:465
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:239
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition qcstring.h:258
QCString right(size_t len) const
Definition qcstring.h:232

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

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

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

4171{
4172 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
4173 bool umlLook = Config_getBool(UML_LOOK);
4174 if (prot==Protection::Private && !extractPrivate) return;
4175 //printf("%s::addUsedClass(%s,%s)\n",qPrint(name()),qPrint(cd->name()),accessName);
4176
4177 auto it = std::find_if(m_usesImplClassList.begin(),
4178 m_usesImplClassList.end(),
4179 [&cd](const auto &ucd) { return ucd.classDef==cd; });
4180 if (it==m_usesImplClassList.end())
4181 {
4182 m_usesImplClassList.emplace_back(cd);
4183 //printf("Adding used class %s to class %s via accessor %s\n",
4184 // qPrint(cd->name()),qPrint(name()),accessName);
4185 it = m_usesImplClassList.end()-1;
4186 }
4187 QCString acc = accessName;
4188 if (umlLook)
4189 {
4190 switch(prot)
4191 {
4192 case Protection::Public: acc.prepend("+"); break;
4193 case Protection::Private: acc.prepend("-"); break;
4194 case Protection::Protected: acc.prepend("#"); break;
4195 case Protection::Package: acc.prepend("~"); break;
4196 }
4197 }
4198 (*it).addAccessor(acc);
4199}
UsesClassList m_usesImplClassList
Definition classdef.cpp:491

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

◆ addUsedInterfaceClasses()

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

References anchor(), 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 5230 of file classdef.cpp.

5231{
5232 QCString anc;
5234 {
5236 {
5237 // point to the template of which this class is an instance
5239 }
5240 else
5241 {
5242 anc = m_fileName;
5243 }
5244 }
5245 return anc;
5246}
bool m_implicitTemplateInstance
Definition classdef.cpp:568
bool isEmbeddedInOuterScope() const override
virtual QCString getOutputFileBase() const =0
static bool generatingXmlOutput
Definition doxygen.h:134

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

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

◆ baseClasses()

const BaseClassList & ClassDefImpl::baseClasses ( ) const
overridevirtual

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

Implements ClassDef.

Definition at line 4985 of file classdef.cpp.

4986{
4987 return m_inherits;
4988}
BaseClassList m_inherits
Definition classdef.cpp:444

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

5136{
5137 return m_categoryOf;
5138}

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

4507{
4508 QCString name = m_className.isEmpty() ? localName() : m_className;
4509 auto lang = getLanguage();
4510 if (lang==SrcLangExt::CSharp)
4511 {
4513 }
4514 return name;
4515}
QCString m_className
Definition classdef.cpp:507
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:6963

References demangleCSharpGenericName(), DefinitionMixin< ClassDefMutable >::getLanguage(), QCString::isEmpty(), 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 5414 of file classdef.cpp.

5415{
5416 switch (compoundType())
5417 {
5418 case Class: return CodeSymbolType::Class; break;
5419 case Struct: return CodeSymbolType::Struct; break;
5420 case Union: return CodeSymbolType::Union; break;
5421 case Interface: return CodeSymbolType::Interface; break;
5422 case Protocol: return CodeSymbolType::Protocol; break;
5423 case Category: return CodeSymbolType::Category; break;
5424 case Exception: return CodeSymbolType::Exception; break;
5425 case Service: return CodeSymbolType::Service; break;
5426 case Singleton: return CodeSymbolType::Singleton; break;
5427 }
5428 return CodeSymbolType::Class;
5429}
@ 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 5394 of file classdef.cpp.

5395{
5396 return m_collabFileName;
5397}

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

4981{
4982 return m_compType;
4983}

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

1362{
1363 for (auto &ml : m_memberLists)
1364 {
1365 if (!ml->listType().isDetailed())
1366 {
1367 ml->setAnchors();
1368 }
1369 }
1370
1371 for (const auto &mg : m_memberGroups)
1372 {
1373 mg->setAnchors();
1374 }
1375}

References m_memberGroups, and m_memberLists.

◆ containsOverload()

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

Implements ClassDef.

Definition at line 5328 of file classdef.cpp.

5329{
5330 AUTO_TRACE("name={}",md->name());
5331 const auto &mni = m_allMemberNameInfoLinkedMap.find(md->name());
5332 if (mni)
5333 {
5334 for (const auto &mi : *mni)
5335 {
5336 const MemberDef *classMd = mi->memberDef();
5337 const ArgumentList &classAl = classMd->argumentList();
5338 const ArgumentList &al = md->argumentList();
5339 bool found = matchArguments2(
5340 classMd->getOuterScope(),classMd->getFileDef(),classMd->typeString(),&classAl,
5341 md->getOuterScope(),md->getFileDef(),md->typeString(),&al,
5342 true,getLanguage()
5343 );
5344 if (found)
5345 {
5346 AUTO_TRACE_EXIT("true");
5347 return true;
5348 }
5349 }
5350 }
5351 AUTO_TRACE_EXIT("false");
5352 return false;
5353}
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, LinkedMap< T, Hash, KeyEqual, Map >::find(), MemberDef::getFileDef(), DefinitionMixin< ClassDefMutable >::getLanguage(), Definition::getOuterScope(), m_allMemberNameInfoLinkedMap, matchArguments2(), Definition::name(), and MemberDef::typeString().

◆ countAdditionalInheritedMembers()

int ClassDefImpl::countAdditionalInheritedMembers ( ) const
private

Definition at line 4780 of file classdef.cpp.

4781{
4782 int totalCount=0;
4783 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4784 {
4785 if (lde->kind()==LayoutDocEntry::MemberDecl)
4786 {
4787 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4788 if (lmd && lmd->type!=MemberListType::Friends()) // friendship is not inherited
4789 {
4790 ClassDefSet visited;
4791 totalCount+=countInheritedDecMembers(lmd->type,this,true,false,visited);
4792 }
4793 }
4794 }
4795 //printf("countAdditionalInheritedMembers()=%d\n",totalCount);
4796 return totalCount;
4797}
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(), LayoutDocManager::instance(), and LayoutDocEntryMemberDecl::type.

Referenced by endMemberDeclarations().

◆ countInheritanceNodes()

int ClassDefImpl::countInheritanceNodes ( ) const
private

Definition at line 1838 of file classdef.cpp.

1839{
1841}
int countInheritsNodes() const
int countInheritedByNodes() const

References countInheritedByNodes(), and countInheritsNodes().

Referenced by writeInheritanceGraph().

◆ countInheritedByNodes()

int ClassDefImpl::countInheritedByNodes ( ) const
private

Definition at line 1816 of file classdef.cpp.

1817{
1818 int count=0;
1819 for (const auto &ibcd : m_inheritedBy)
1820 {
1821 const ClassDef *icd=ibcd.classDef;
1822 if ( icd->isVisibleInHierarchy()) count++;
1823 }
1824 return count;
1825}
virtual bool isVisibleInHierarchy() const =0
the class is visible in a class diagram, or class hierarchy
BaseClassList m_inheritedBy
Definition classdef.cpp:448

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

4726{
4727 int inhCount = 0;
4728 int count = countMembersIncludingGrouped(lt,inheritedFrom,false);
4729 bool process = count>0;
4730 //printf("%s: countInheritedDecMembers: lt=%s process=%d count=%d invert=%d\n",
4731 // qPrint(name()),lt.to_string(),process,count,invert);
4732 if ((process^invert) || showAlways)
4733 {
4734 for (const auto &ibcd : m_inherits)
4735 {
4736 ClassDefMutable *icd = toClassDefMutable(ibcd.classDef);
4737 MemberListType lt1 = MemberListType::Invalid();
4738 MemberListType lt2 = MemberListType::Invalid();
4739 if (icd && icd->isLinkable())
4740 {
4741 convertProtectionLevel(lt,ibcd.prot,&lt1,&lt2);
4742 //printf("%s: convert %s->(%s,%s) prot=%d\n",
4743 // qPrint(icd->name()),lt.to_string(),lt1.to_string(),lt2.to_string(),ibcd.prot);
4744 if (visitedClasses.find(icd)==visitedClasses.end())
4745 {
4746 visitedClasses.insert(icd); // guard for multiple virtual inheritance
4747 if (!lt1.isInvalid())
4748 {
4749 inhCount+=icd->countMemberDeclarations(lt1,inheritedFrom,lt2,false,true,visitedClasses);
4750 }
4751 }
4752 }
4753 }
4754 }
4755 //printf("%s: count=%d\n",qPrint(name()),inhCount);
4756 return inhCount;
4757}
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:6269

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

Referenced by countAdditionalInheritedMembers(), and countMemberDeclarations().

◆ countInheritsNodes()

int ClassDefImpl::countInheritsNodes ( ) const
private

Definition at line 1827 of file classdef.cpp.

1828{
1829 int count=0;
1830 for (const auto &ibcd : m_inherits)
1831 {
1832 const ClassDef *icd=ibcd.classDef;
1833 if ( icd->isVisibleInHierarchy()) count++;
1834 }
1835 return count;
1836}

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

4647{
4648 //printf("%s: countMemberDeclarations for %s and %s\n",qPrint(name()),lt.to_string(),lt2.to_string());
4649 int count=0;
4650 MemberList * ml = getMemberList(lt);
4651 MemberList * ml2 = getMemberList(lt2);
4652 if (getLanguage()!=SrcLangExt::VHDL) // use specific declarations function
4653 {
4654 if (ml)
4655 {
4656 count+=ml->numDecMembers(inheritedFrom);
4657 //printf("-> ml=%d\n",ml->numDecMembers());
4658 }
4659 if (ml2)
4660 {
4661 count+=ml2->numDecMembers(inheritedFrom);
4662 //printf("-> ml2=%d\n",ml2->numDecMembers());
4663 }
4664 // also include grouped members that have their own section in the class (see bug 722759)
4665 if (inheritedFrom)
4666 {
4667 for (const auto &mg : m_memberGroups)
4668 {
4669 count+=mg->countGroupedInheritedMembers(lt);
4670 if (!lt2.isInvalid()) count+=mg->countGroupedInheritedMembers(lt2);
4671 }
4672 }
4673 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
4674 if (!inlineInheritedMembers) // show inherited members as separate lists
4675 {
4676 count+=countInheritedDecMembers(lt,inheritedFrom,invert,showAlways,visitedClasses);
4677 }
4678 }
4679 //printf("-> %d\n",count);
4680 return count;
4681}
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 4709 of file classdef.cpp.

4710{
4711 for (auto &ml : m_memberLists)
4712 {
4713 ml->countDecMembers();
4714 ml->countDocMembers();
4715 }
4716 for (const auto &mg : m_memberGroups)
4717 {
4718 mg->countDecMembers();
4719 mg->countDocMembers();
4720 }
4721}

References m_memberGroups, and m_memberLists.

◆ countMembersIncludingGrouped()

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

Implements ClassDef.

Definition at line 4816 of file classdef.cpp.

4818{
4819 int count=0;
4820 MemberList *ml = getMemberList(lt);
4821 if (ml)
4822 {
4823 count=ml->countInheritableMembers(inheritedFrom);
4824 }
4825 //printf("%s:countMembersIncludingGrouped: count=%d\n",qPrint(name()),count);
4826 for (const auto &mg : m_memberGroups)
4827 {
4828 bool hasOwnSection = !mg->allMembersInSameSection() ||
4829 !m_subGrouping; // group is in its own section
4830 if ((additional && hasOwnSection) || (!additional && !hasOwnSection))
4831 {
4832 count+=mg->countGroupedInheritedMembers(lt);
4833 }
4834 }
4835 //printf("%s:countMembersIncludingGrouped(lt=%s,%s)=%d\n",
4836 // qPrint(name()),qPrint(lt.to_string()),ml?qPrint(ml->listType().to_string()):"<none>",count);
4837 return count;
4838}
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 873 of file classdef.cpp.

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

◆ definitionType()

DefType ClassDefImpl::definitionType ( ) const
inlineoverridevirtual

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

Implements Definition.

Definition at line 204 of file classdef.cpp.

204{ 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 1003 of file classdef.cpp.

1004{
1005 return makeDisplayName(this,includeScope);
1006}
static QCString makeDisplayName(const ClassDef *cd, bool includeScope)
Definition classdef.cpp:107

References makeDisplayName().

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

◆ distributeMemberGroupDocumentation()

void ClassDefImpl::distributeMemberGroupDocumentation ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1377 of file classdef.cpp.

1378{
1379 for (const auto &mg : m_memberGroups)
1380 {
1381 mg->distributeMemberGroupDocumentation();
1382 }
1383}

References m_memberGroups.

◆ endMemberDeclarations()

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

Definition at line 2233 of file classdef.cpp.

2234{
2235 //printf("%s: ClassDefImpl::endMemberDeclarations()\n",qPrint(name()));
2236 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
2237 if (!inlineInheritedMembers && countAdditionalInheritedMembers()>0)
2238 {
2239 ol.startMemberHeader("inherited");
2241 ol.endMemberHeader();
2243 }
2244 ol.endMemberSections();
2245}
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, Translator::trAdditionalInheritedMembers(), and writeAdditionalInheritedMembers().

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ endMemberDocumentation()

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

Definition at line 2217 of file classdef.cpp.

2218{
2219 //printf("%s: ClassDefImpl::endMemberDocumentation()\n",qPrint(name()));
2220 if (Config_getBool(SEPARATE_MEMBER_PAGES))
2221 {
2224 }
2225}
static bool suppressDocWarnings
Definition doxygen.h:130
void enable(OutputType o)

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

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ findInnerCompound()

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

◆ findSectionsInDocumentation()

void ClassDefImpl::findSectionsInDocumentation ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1385 of file classdef.cpp.

1386{
1390 for (const auto &mg : m_memberGroups)
1391 {
1392 mg->findSectionsInDocumentation(this);
1393 }
1394 for (auto &ml : m_memberLists)
1395 {
1396 if (!ml->listType().isDetailed())
1397 {
1398 ml->findSectionsInDocumentation(this);
1399 }
1400 }
1401}
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 1706 of file classdef.cpp.

1707{
1708 QCString result;
1709 SrcLangExt lang = getLanguage();
1710 size_t numFiles = m_files.size();
1711 if (lang==SrcLangExt::Fortran)
1712 {
1714 getLanguage()==SrcLangExt::ObjC && m_compType==Interface ? Class : m_compType,
1715 numFiles==1);
1716 }
1717 else if (isJavaEnum())
1718 {
1719 result = theTranslator->trEnumGeneratedFromFiles(numFiles==1);
1720 }
1721 else if (m_compType==Service)
1722 {
1723 result = theTranslator->trServiceGeneratedFromFiles(numFiles==1);
1724 }
1725 else if (m_compType==Singleton)
1726 {
1727 result = theTranslator->trSingletonGeneratedFromFiles(numFiles==1);
1728 }
1729 else
1730 {
1732 getLanguage()==SrcLangExt::ObjC && m_compType==Interface ? Class : m_compType,
1733 numFiles==1);
1734 }
1735 return result;
1736}
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, theTranslator, Translator::trEnumGeneratedFromFiles(), Translator::trGeneratedFromFiles(), Translator::trGeneratedFromFilesFortran(), Translator::trServiceGeneratedFromFiles(), and Translator::trSingletonGeneratedFromFiles().

Referenced by showUsedFiles().

◆ getClasses()

ClassLinkedRefMap ClassDefImpl::getClasses ( ) const
overridevirtual

returns the classes nested into this class

Implements ClassDef.

Definition at line 4975 of file classdef.cpp.

4976{
4977 return m_innerClasses;
4978}

References m_innerClasses.

◆ getExamples()

const ExampleList & ClassDefImpl::getExamples ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5374 of file classdef.cpp.

5375{
5376 return m_examples;
5377}

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

5031{
5032 return m_fileDef;
5033}

References m_fileDef.

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

◆ getInstanceOutputFileBase()

QCString ClassDefImpl::getInstanceOutputFileBase ( ) const
overridevirtual

Implements ClassDef.

Definition at line 4277 of file classdef.cpp.

4278{
4279 return m_fileName;
4280}

References m_fileName.

◆ getMemberByName()

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

Returns the member with the given name.

Implements ClassDef.

Definition at line 4564 of file classdef.cpp.

4565{
4566 const MemberDef *xmd = nullptr;
4567 const MemberNameInfo *mni = m_allMemberNameInfoLinkedMap.find(name);
4568 if (mni)
4569 {
4570 const int maxInheritanceDepth = 100000;
4571 int mdist=maxInheritanceDepth;
4572 for (auto &mi : *mni)
4573 {
4574 const ClassDef *mcd=mi->memberDef()->getClassDef();
4575 int m=minClassDistance(this,mcd);
4576 //printf("found member in %s linkable=%d m=%d\n",
4577 // qPrint(mcd->name()),mcd->isLinkable(),m);
4578 if (m<mdist)
4579 {
4580 mdist=m;
4581 xmd=mi->memberDef();
4582 }
4583 }
4584 }
4585 //printf("getMemberByName(%s)=%p\n",qPrint(name),xmd);
4586 return xmd;
4587}
int minClassDistance(const ClassDef *cd, const ClassDef *bcd, int level)

References LinkedMap< T, Hash, KeyEqual, Map >::find(), 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 5145 of file classdef.cpp.

5146{
5147 return m_memberGroups;
5148}

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

4595{
4596 for (auto &ml : m_memberLists)
4597 {
4598 if (ml->listType()==lt)
4599 {
4600 return ml.get();
4601 }
4602 }
4603 return nullptr;
4604}

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

999{
1000 return m_memberListFileName;
1001}

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

5141{
5142 return m_memberLists;
5143}

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

5036{
5037 return m_moduleDef;
5038}

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

4240{
4241 bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
4242 bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
4244 {
4245 Definition *scope=nullptr;
4246 if (inlineGroupedClasses && !partOfGroups().empty())
4247 {
4248 // point to the group that embeds this class
4249 return partOfGroups().front()->getOutputFileBase();
4250 }
4251 else if (inlineSimpleClasses && m_isSimple && !partOfGroups().empty())
4252 {
4253 // point to simple struct inside a group
4254 return partOfGroups().front()->getOutputFileBase();
4255 }
4256 else if (inlineSimpleClasses && m_isSimple && (scope=getOuterScope()))
4257 {
4258 if (scope==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) // simple struct embedded in file
4259 {
4260 return getFileDef()->getOutputFileBase();
4261 }
4262 else if (scope->isLinkableInProject()) // simple struct embedded in other container (namespace/group/class)
4263 {
4264 return getOuterScope()->getOutputFileBase();
4265 }
4266 }
4267 }
4268 AUTO_TRACE("name='{}' m_templateMaster={} m_implicitTemplateInstance={}",name(),(void*)m_templateMaster,m_implicitTemplateInstance);
4270 {
4271 // point to the template of which this class is an instance
4273 }
4274 return m_fileName;
4275}
virtual bool isLinkableInProject() 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 5323 of file classdef.cpp.

5324{
5325 return m_qualifiers;
5326}

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

4461{
4463 {
4465 }
4466 else
4467 {
4469 }
4470}
virtual QCString getReference() const =0
QCString getReference() const override

References Definition::getReference(), 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 4282 of file classdef.cpp.

4283{
4285 {
4287 }
4288 else
4289 {
4291 }
4292}
virtual QCString getSourceFileBase() const =0
QCString getSourceFileBase() const override

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

◆ getTemplateBaseClassNames()

const TemplateNameMap & ClassDefImpl::getTemplateBaseClassNames ( ) const
overridevirtual

Implements ClassDef.

Definition at line 4403 of file classdef.cpp.

4404{
4405 return m_templBaseClassNames;
4406}

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

5041{
5042 return m_templateInstances;
5043}

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

4485{
4486 ArgumentLists result;
4487 Definition *d=getOuterScope();
4488 while (d && d->definitionType()==Definition::TypeClass)
4489 {
4490 result.insert(result.begin(),toClassDef(d)->templateArguments());
4491 d = d->getOuterScope();
4492 }
4493 if (!templateArguments().empty())
4494 {
4495 result.push_back(templateArguments());
4496 }
4497 return result;
4498}
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 4759 of file classdef.cpp.

4761{
4762 SrcLangExt lang = getLanguage();
4763 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4764 {
4765 if (lde->kind()==LayoutDocEntry::MemberDecl)
4766 {
4767 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4768 if (lmd && lmd->type==type)
4769 {
4770 title = lmd->title(lang);
4771 subtitle = lmd->subtitle(lang);
4772 return;
4773 }
4774 }
4775 }
4776 title="";
4777 subtitle="";
4778}
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 5436 of file classdef.cpp.

5437{
5439}

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

1660{
1661 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
1662 bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
1663 return ((!briefDescription().isEmpty() && repeatBrief) ||
1665 (sourceBrowser && getStartBodyLine()!=-1 && getBodyDef()) ||
1667}
bool hasTemplateDocumentation() const
Definition arguments.cpp:30
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(), ArgumentList::hasTemplateDocumentation(), 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 3649 of file classdef.cpp.

3650{
3652}
bool hasDocumentation() const override

References DefinitionMixin< Base >::hasDocumentation().

Referenced by isLinkableInProject(), and isVisibleInHierarchy().

◆ hasExamples()

bool ClassDefImpl::hasExamples ( ) const
overridevirtual

Implements ClassDef.

Definition at line 3432 of file classdef.cpp.

3433{
3434 return !m_examples.empty();
3435}

References m_examples.

Referenced by writeDetailedDocumentationBody(), and writeDocumentationContents().

◆ hasInheritanceGraph()

CLASS_GRAPH_t ClassDefImpl::hasInheritanceGraph ( ) const
overridevirtual

Implements ClassDefMutable.

Definition at line 5409 of file classdef.cpp.

5410{
5412}

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

3550{
3551 return hasNonReferenceSuperClassRec(this,0);
3552}
static bool hasNonReferenceSuperClassRec(const ClassDef *cd, int level)

References hasNonReferenceSuperClassRec().

Referenced by isVisibleInHierarchy().

◆ hideDerivedVariablesInPython()

void ClassDefImpl::hideDerivedVariablesInPython ( ClassDefMutable * cls)
private

Definition at line 3958 of file classdef.cpp.

3959{
3960 //printf("hideDerivedVariableInPython()\n");
3961 if (bClass)
3962 {
3963 const MemberNameInfoLinkedMap &srcMnd = bClass->memberNameInfoLinkedMap();
3964 MemberNameInfoLinkedMap &dstMnd = m_allMemberNameInfoLinkedMap;
3965
3966 // recurse up the inheritance hierarchy
3967 for (const auto &bcd : bClass->baseClasses())
3968 {
3970 }
3971
3972 for (auto &srcMni : srcMnd) // for each member in a base class
3973 {
3974 //printf(" candidate(%s)\n",qPrint(srcMni->memberName()));
3975 MemberNameInfo *dstMni=dstMnd.find(srcMni->memberName());
3976 if (dstMni) // that is also in this class
3977 {
3979 //printf("%s member in %s and %s\n",qPrint(name()),qPrint(bClass->name()),qPrint(name()));
3980 for (it=dstMni->begin();it!=dstMni->end();)
3981 {
3982 MemberDefMutable *dstMd = toMemberDefMutable((*it)->memberDef());
3983 if (dstMd && dstMd->isVariable() && !dstMd->name().startsWith("__"))
3984 {
3985 //printf(" hiding member %s\n",qPrint(dstMd->name()));
3986 // hide a member variable if it is already defined in a base class, unless
3987 // it is a __private variable
3988 removeMemberFromLists(dstMd);
3989 it = dstMni->erase(it);
3990 }
3991 else
3992 {
3993 ++it;
3994 }
3995 }
3996 if (dstMni->empty()) // if the list has become empty, remove the entry from the dictionary
3997 {
3998 dstMnd.del(srcMni->memberName());
3999 }
4000 }
4001 }
4002 }
4003}
void hideDerivedVariablesInPython(ClassDefMutable *cls)
void removeMemberFromLists(MemberDef *md) override
bool del(const QCString &key)
Definition linkedmap.h:183
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:505

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

5066{
5067 return m_incInfo.get();
5068}

References m_incInfo.

◆ inheritanceGraphFileName()

QCString ClassDefImpl::inheritanceGraphFileName ( ) const
overridevirtual

returns the file name to use for the inheritance graph

Implements ClassDef.

Definition at line 5399 of file classdef.cpp.

5400{
5401 return m_inheritFileName;
5402}

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

1011{
1012 //printf("*** insert base class %s into %s\n",qPrint(cd->name()),qPrint(name()));
1013 m_inherits.emplace_back(cd,n,p,s,t);
1014 m_isSimple = false;
1015}

References m_inherits, and m_isSimple.

Referenced by mergeCategory().

◆ insertExplicitTemplateInstance()

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

Implements ClassDefMutable.

Definition at line 4392 of file classdef.cpp.

4393{
4394 AUTO_TRACE("this={} cd={} templSpec={}",name(),templateClass->name(),templSpec);
4395 m_templateInstances.emplace_back(templSpec,templateClass);
4396}

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

◆ insertMember()

void ClassDefImpl::insertMember ( MemberDef * md)
overridevirtual

Implements ClassDefMutable.

Definition at line 1355 of file classdef.cpp.

1356{
1357 internalInsertMember(md,md->protection(),true);
1358}
void internalInsertMember(MemberDef *md, Protection prot, bool addToAllList)
virtual Protection protection() const =0

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

Referenced by addMemberToTemplateInstance(), mergeMembersFromBaseClasses(), and reclassifyMember().

◆ insertSubClass()

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

Implements ClassDefMutable.

Definition at line 1018 of file classdef.cpp.

1020{
1021 //printf("*** insert sub class %s into %s\n",qPrint(cd->name()),qPrint(name()));
1022 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
1023 if (!extractPrivate && cd->protection()==Protection::Private) return;
1024 m_inheritedBy.emplace_back(cd,QCString(),p,s,t);
1025 m_isSimple = false;
1026}
virtual Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.

References Config_getBool, 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 4329 of file classdef.cpp.

4331{
4332 freshInstance = false;
4333 auto it = std::find_if(m_templateInstances.begin(),
4334 m_templateInstances.end(),
4335 [&templSpec](const auto &ti) { return templSpec==ti.templSpec; });
4336 ClassDefMutable *templateClass=nullptr;
4337 if (it!=m_templateInstances.end())
4338 {
4339 templateClass = toClassDefMutable((*it).classDef);
4340 }
4341 if (templateClass==nullptr)
4342 {
4343 QCString tcname = removeRedundantWhiteSpace(name()+templSpec);
4344 AUTO_TRACE("New template instance class name='{}' templSpec='{}' inside '{}' hidden={}",
4345 name(),templSpec,name(),isHidden());
4346
4347 ClassDef *foundCd = Doxygen::classLinkedMap->find(tcname);
4348 if (foundCd)
4349 {
4350 return foundCd;
4351 }
4352 templateClass =
4354 Doxygen::classLinkedMap->add(tcname,
4355 std::unique_ptr<ClassDef>(
4356 new ClassDefImpl(fileName,startLine,startColumn,tcname,ClassDef::Class))));
4357 if (templateClass)
4358 {
4359 templateClass->setTemplateMaster(this);
4360 ArgumentList tal = *stringToArgumentList(getLanguage(),templSpec);
4361 templateClass->setTemplateArguments(tal);
4362 templateClass->setOuterScope(getOuterScope());
4363 templateClass->setHidden(isHidden());
4364 templateClass->setArtificial(isArtificial());
4365 templateClass->setImplicitTemplateInstance(true);
4366 m_templateInstances.emplace_back(templSpec,templateClass);
4367
4368 // also add nested classes
4369 for (const auto &innerCd : m_innerClasses)
4370 {
4371 QCString innerName = tcname+"::"+innerCd->localName();
4372 ClassDefMutable *innerClass =
4374 Doxygen::classLinkedMap->add(innerName,
4375 std::unique_ptr<ClassDef>(
4376 new ClassDefImpl(fileName,startLine,startColumn,innerName,ClassDef::Class))));
4377 if (innerClass)
4378 {
4379 templateClass->addInnerCompound(innerClass);
4380 innerClass->setOuterScope(templateClass);
4381 innerClass->setHidden(isHidden());
4382 innerClass->setArtificial(true);
4383 innerClass->setImplicitTemplateInstance(true);
4384 }
4385 }
4386 freshInstance=true;
4387 }
4388 }
4389 return templateClass;
4390}
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, LinkedMap< T, Hash, KeyEqual, Map >::find(), 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(), and toClassDefMutable().

◆ insertUsedFile()

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

Implements ClassDefMutable.

Definition at line 1405 of file classdef.cpp.

1406{
1407 if (fd == nullptr) return;
1408
1409 if (std::find(m_files.begin(), m_files.end(), fd) == m_files.end()) m_files.push_back(fd);
1410
1411 for (const auto &ti : m_templateInstances)
1412 {
1413 if (ClassDefMutable *cdm = toClassDefMutable(ti.classDef)) cdm->insertUsedFile(fd);
1414 }
1415}

References m_files, m_templateInstances, and toClassDefMutable().

◆ internalInsertMember()

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

isReference()

Definition at line 1050 of file classdef.cpp.

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

References LinkedMap< T, Hash, KeyEqual, Map >::add(), addMemberToList(), ClassDefMutable::addMemberToTemplateInstance(), MemberDef::argsString(), AUTO_TRACE, AUTO_TRACE_ADD, Class, Config_getBool, err, QCString::find(), MemberLists::get(), 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(), QCString::str(), templateArguments(), theTranslator, title(), toClassDefMutable(), Translator::trVhdlType(), 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 5090 of file classdef.cpp.

5091{
5092 return m_isAbstract || m_spec.isAbstract();
5093}

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

4590{
4591 return md->getClassDef() && isBaseClass(md->getClassDef(),true,QCString());
4592}
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(), and isBaseClass().

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

3660{
3661 int distance=0;
3662 //printf("isBaseClass(cd=%s) looking for %s templSpec=%s\n",qPrint(name()),qPrint(bcd->name()),qPrint(templSpec));
3663 for (const auto &bclass : baseClasses())
3664 {
3665 const ClassDef *ccd = bclass.classDef;
3666 if (!followInstances && ccd->templateMaster())
3667 {
3668 ccd=ccd->templateMaster();
3669 }
3670 if (ccd==bcd && (templSpec.isEmpty() || templSpec==bclass.templSpecifiers))
3671 {
3672 distance=1;
3673 break; // no shorter path possible
3674 }
3675 else
3676 {
3677 int d = ccd->isBaseClass(bcd,followInstances,templSpec);
3678 if (d>256)
3679 {
3680 err("Possible recursive class relation while inside {} and looking for base class {}\n",name(),bcd->name());
3681 return 0;
3682 }
3683 else if (d>0) // path found
3684 {
3685 if (distance==0 || d+1<distance) // update if no path found yet or shorter path found
3686 {
3687 distance=d+1;
3688 }
3689 }
3690 }
3691 }
3692 return distance;
3693}
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 5130 of file classdef.cpp.

5131{
5132 return getLanguage()==SrcLangExt::CSharp;
5133}

References DefinitionMixin< ClassDefMutable >::getLanguage().

◆ isEmbeddedInOuterScope()

bool ClassDefImpl::isEmbeddedInOuterScope ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5248 of file classdef.cpp.

5249{
5250 bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
5251 bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
5252
5253 Definition *container = getOuterScope();
5254
5255 bool containerLinkable =
5256 container &&
5257 (
5258 (container==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) || // global class in documented file
5259 container->isLinkableInProject() // class in documented scope
5260 );
5261
5262 if (isAnonymous())
5263 {
5264 return false; // don't inline an anonymous class
5265 }
5266
5267 // inline because of INLINE_GROUPED_CLASSES=YES ?
5268 bool b1 = (inlineGroupedClasses && !partOfGroups().empty()); // a grouped class
5269 // inline because of INLINE_SIMPLE_STRUCTS=YES ?
5270 bool b2 = (inlineSimpleClasses && m_isSimple && // a simple class
5271 (containerLinkable || // in a documented container
5272 !partOfGroups().empty() // or part of a group
5273 )
5274 );
5275 //printf("%s::isEmbeddedInOuterScope(): inlineGroupedClasses=%d "
5276 // "inlineSimpleClasses=%d partOfGroups()=%p m_isSimple=%d "
5277 // "getOuterScope()=%s b1=%d b2=%d\n",
5278 // qPrint(name()),inlineGroupedClasses,inlineSimpleClasses,
5279 // partOfGroups().pointer(),m_isSimple,getOuterScope()?qPrint(getOuterScope()->name()):"<none>",b1,b2);
5280 return b1 || b2; // either reason will do
5281}

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

5356{
5357 QCString n = name();
5358 int si = n.find('(');
5359 int ei = n.find(')');
5360 bool b = ei>si && n.mid(si+1,ei-si-1).stripWhiteSpace().isEmpty();
5361 return b;
5362}

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

5096{
5097 return m_spec.isFinal();
5098}

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

5126{
5127 return getLanguage()==SrcLangExt::Fortran;
5128}

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

5111{
5112 return m_spec.isForwardDecl();
5113}

References m_spec.

◆ isImplicitTemplateInstance()

bool ClassDefImpl::isImplicitTemplateInstance ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5050 of file classdef.cpp.

5051{
5053}

References m_implicitTemplateInstance.

◆ isInterface()

bool ClassDefImpl::isInterface ( ) const
overridevirtual

Returns true if this class represents an interface.

Implements ClassDef.

Definition at line 5115 of file classdef.cpp.

5116{
5117 return m_spec.isInterface();
5118}

References m_spec.

◆ isJavaEnum()

bool ClassDefImpl::isJavaEnum ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5301 of file classdef.cpp.

5302{
5303 return m_isJavaEnum;
5304}

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

3603{
3605 {
3606 return m_templateMaster->isLinkable();
3607 }
3608 else
3609 {
3610 return isReference() || isLinkableInProject();
3611 }
3612}
bool isReference() const override

References Definition::isLinkable(), isLinkableInProject(), isReference(), m_implicitTemplateInstance, and m_templateMaster.

Referenced by visibleInParentsDeclList(), and writeDeclarationLink().

◆ isLinkableInProject()

bool ClassDefImpl::isLinkableInProject ( ) const
overridevirtual

a link to this class is possible within this project

Implements Definition.

Definition at line 3570 of file classdef.cpp.

3571{
3572 bool extractLocal = Config_getBool(EXTRACT_LOCAL_CLASSES);
3573 bool extractStatic = Config_getBool(EXTRACT_STATIC);
3574 bool hideUndoc = Config_getBool(HIDE_UNDOC_CLASSES);
3576 {
3578 }
3579 else
3580 {
3581 //printf("%s::isLinkableInProject() conditions: artificial=%d hidden=%d anonymous=%d protection=%d local=%d docs=%d static=%d ref=%d\n",
3582 // qPrint(name()),
3583 // !isArtificial(),
3584 // !isHidden(),
3585 // !isAnonymous(),
3586 // protectionLevelVisible(m_prot),
3587 // !m_isLocal || extractLocal,
3588 // hasDocumentation() || m_tempArgs.hasTemplateDocumentation() || !hideUndoc,
3589 // !m_isStatic || extractStatic,
3590 // !isReference());
3591 return
3592 !isArtificial() && !isHidden() && /* not hidden */
3593 !isAnonymous() && /* not anonymous */
3594 protectionLevelVisible(m_prot) && /* private/internal */
3595 (!m_isLocal || extractLocal) && /* local */
3596 (hasDocumentation() || m_tempArgs.hasTemplateDocumentation() || !hideUndoc) && /* documented */
3597 (!m_isStatic || extractStatic) && /* static */
3598 !isReference(); /* not an external reference */
3599 }
3600}
bool hasDocumentation() const override

References Config_getBool, hasDocumentation(), ArgumentList::hasTemplateDocumentation(), DefinitionMixin< ClassDefMutable >::isAnonymous(), DefinitionMixin< ClassDefMutable >::isArtificial(), DefinitionMixin< ClassDefMutable >::isHidden(), Definition::isLinkableInProject(), 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 4970 of file classdef.cpp.

4971{
4972 return m_isLocal;
4973}

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

5121{
5122 return getLanguage()==SrcLangExt::ObjC;
5123}

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

5106{
5107 return m_spec.isPublished();
5108}

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

4473{
4475 {
4476 return m_templateMaster->isReference();
4477 }
4478 else
4479 {
4481 }
4482}
virtual bool isReference() const =0
bool isReference() const override

References Definition::isReference(), 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 5100 of file classdef.cpp.

5101{
5102 return m_spec.isSealed();
5103}

References m_spec.

Referenced by addClassAttributes().

◆ isSimple()

bool ClassDefImpl::isSimple ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5210 of file classdef.cpp.

5211{
5212 return m_isSimple;
5213}

References m_isSimple.

Referenced by internalInsertMember(), and writeInlineDocumentation().

◆ isSliceLocal()

bool ClassDefImpl::isSliceLocal ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5384 of file classdef.cpp.

5385{
5386 return m_spec.isLocal();
5387}

References m_spec.

Referenced by title(), and writeDeclarationLink().

◆ isSmartPointer()

const MemberDef * ClassDefImpl::isSmartPointer ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5215 of file classdef.cpp.

5216{
5217 return m_arrowOperator;
5218}

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

3698{
3699 bool found=false;
3700 if (level>256)
3701 {
3702 err("Possible recursive class relation while inside {} and looking for derived class {}\n",name(),cd->name());
3703 return false;
3704 }
3705 for (const auto &iscd : subClasses())
3706 {
3707 ClassDef *ccd=iscd.classDef;
3708 found = (ccd==cd) || ccd->isSubClass(cd,level+1);
3709 if (found) break;
3710 }
3711 return found;
3712}
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, 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 5060 of file classdef.cpp.

5061{
5062 return !m_tempArgs.empty();
5063}
bool empty() const
Definition arguments.h:99

References ArgumentList::empty(), and m_tempArgs.

◆ isTemplateArgument()

bool ClassDefImpl::isTemplateArgument ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5085 of file classdef.cpp.

5086{
5087 return m_isTemplArg;
5088}

References m_isTemplArg.

◆ isUsedOnly()

bool ClassDefImpl::isUsedOnly ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5205 of file classdef.cpp.

5206{
5207 return m_usedOnly;
5208}

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

3617{
3618 bool allExternals = Config_getBool(ALLEXTERNALS);
3619 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
3620 bool extractStatic = Config_getBool(EXTRACT_STATIC);
3621
3622 //printf("%s: isArtificial=%d isAnonymous=%d protectionLevelVisible=%d hasDocumentation=%d templateInstance=%d static=%d\n",
3623 // qPrint(name()),
3624 // (allExternals && !isArtificial()) || hasNonReferenceSuperClass(),
3625 // !isAnonymous(),
3626 // protectionLevelVisible(m_prot),
3627 // (hasDocumentation() || !hideUndocClasses || (m_templateMaster && m_templateMaster->hasDocumentation()) || isReference()),
3628 // !m_implicitTemplateInstance || !m_inherits.empty() || !m_inheritedBy.empty(),
3629 // !m_isStatic || extractStatic);
3630
3631 return // show all classes or a subclass is visible
3632 ((allExternals && !isArtificial()) || hasNonReferenceSuperClass()) &&
3633 // and not an anonymous compound
3634 !isAnonymous() &&
3635 // and not privately inherited
3637 // documented or shown anyway or documentation is external
3638 (hasDocumentation() ||
3639 !hideUndocClasses ||
3641 isReference()
3642 ) &&
3643 // if this is an implicit template instance then it most be part of the inheritance hierarchy
3644 (!m_implicitTemplateInstance || !m_inherits.empty() || !m_inheritedBy.empty()) &&
3645 // is not part of an unnamed namespace or shown anyway
3646 (!m_isStatic || extractStatic);
3647}
bool hasNonReferenceSuperClass() const override
virtual bool hasDocumentation() const =0

References Config_getBool, hasDocumentation(), Definition::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 5190 of file classdef.cpp.

5191{
5192 m_isTemplArg = b;
5193}

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

5006{
5008}

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

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

References LinkedMap< T, Hash, KeyEqual, Map >::add(), AUTO_TRACE, AUTO_TRACE_ADD, ClassDef::baseClasses(), combineDeclarationAndDefinition(), Config_getBool, 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(), and toMemberDefMutable().

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

4011{
4012 if (m_membersMerged) return;
4013 if (getLanguage()==SrcLangExt::Python)
4014 {
4015 for (const auto &bcd : baseClasses())
4016 {
4017 ClassDefMutable *bClass=toClassDefMutable(bcd.classDef);
4019 }
4020 }
4021
4022 //printf("> %s::mergeMembers()\n",qPrint(name()));
4023
4024 m_membersMerged=true;
4025
4026 // first merge the members of the base class recursively
4027 for (const auto &bcd : baseClasses())
4028 {
4029 ClassDefMutable *bClass=toClassDefMutable(bcd.classDef);
4030 if (bClass)
4031 {
4032 // merge the members in the base class of this inheritance branch first
4033 bClass->mergeMembers();
4034 }
4035 }
4036
4037 // first merge the member that are not inherited via a virtual base class
4038 // (as this can end up reimplemented via multiple paths, see #10717 for examples)
4040 // then process the member that are inherited via a virtual base class to add the
4041 // ones that are not reimplemented via any path
4043
4044 //printf("< %s::mergeMembers()\n",qPrint(name()));
4045}
void mergeMembersFromBaseClasses(bool mergeVirtualBaseClass)
virtual void mergeMembers()=0

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

◆ mergeMembersFromBaseClasses()

void ClassDefImpl::mergeMembersFromBaseClasses ( bool mergeVirtualBaseClass)
private

Definition at line 3723 of file classdef.cpp.

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

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

Referenced by mergeMembers().

◆ moveTo()

void ClassDefImpl::moveTo ( Definition * scope)
overridevirtual

Implements ClassDef.

Definition at line 984 of file classdef.cpp.

985{
986 //printf("%s::moveTo(%s)\n",qPrint(name()),qPrint(scope->name()));
987 setOuterScope(scope);
989 {
990 m_fileDef = toFileDef(scope);
991 }
992 else if (scope->definitionType()==Definition::TypeModule)
993 {
994 m_moduleDef = toModuleDef(scope);
995 }
996}
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 5431 of file classdef.cpp.

5432{
5434}

References m_hasCollaborationGraph.

◆ overrideInheritanceGraph()

void ClassDefImpl::overrideInheritanceGraph ( CLASS_GRAPH_t e)
overridevirtual

Implements ClassDefMutable.

Definition at line 5404 of file classdef.cpp.

5405{
5407}

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

5021{
5022 return m_prot;
5023}

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

4502{
4503 return makeQualifiedNameWithTemplateParameters(this,actualParams,actualParamIndex);
4504}
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 5220 of file classdef.cpp.

5221{
5222 md->setMemberType(t);
5223 for (auto &ml : m_memberLists)
5224 {
5225 ml->remove(md);
5226 }
5227 insertMember(md);
5228}
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 5293 of file classdef.cpp.

5294{
5295 for (auto &ml : m_memberLists)
5296 {
5297 ml->remove(md);
5298 }
5299}

References m_memberLists.

Referenced by hideDerivedVariablesInPython().

◆ requiresClause()

QCString ClassDefImpl::requiresClause ( ) const
overridevirtual

Implements ClassDef.

Definition at line 3554 of file classdef.cpp.

3555{
3556 return m_requiresClause;
3557}

References m_requiresClause.

◆ setAnonymousEnumType()

void ClassDefImpl::setAnonymousEnumType ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4683 of file classdef.cpp.

4684{
4685 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4686 {
4687 if (lde->kind()==LayoutDocEntry::MemberDecl)
4688 {
4689 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4690 if (lmd)
4691 {
4692 MemberList * ml = getMemberList(lmd->type);
4693 if (ml)
4694 {
4696 }
4697 }
4698 }
4699 else if (lde->kind()==LayoutDocEntry::MemberGroups)
4700 {
4701 for (const auto &mg : m_memberGroups)
4702 {
4703 mg->setAnonymousEnumType();
4704 }
4705 }
4706 }
4707}
void setAnonymousEnumType()

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

◆ setCategoryOf()

void ClassDefImpl::setCategoryOf ( ClassDef * cd)
overridevirtual

Implements ClassDefMutable.

Definition at line 5195 of file classdef.cpp.

5196{
5197 m_categoryOf = cd;
5198}

References m_categoryOf.

◆ setClassName()

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

Implements ClassDefMutable.

Definition at line 4517 of file classdef.cpp.

4518{
4519 m_className = name;
4520}

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

◆ setClassSpecifier()

void ClassDefImpl::setClassSpecifier ( TypeSpecifier spec)
overridevirtual

Implements ClassDefMutable.

Definition at line 5306 of file classdef.cpp.

5307{
5308 m_spec = spec;
5309}

References m_spec.

◆ setCompoundType()

void ClassDefImpl::setCompoundType ( CompoundType t)
overridevirtual

Implements ClassDefMutable.

Definition at line 5179 of file classdef.cpp.

5180{
5181 m_compType = t;
5182}

References m_compType.

◆ setFileDef()

void ClassDefImpl::setFileDef ( FileDef * fd)
overridevirtual

Implements ClassDefMutable.

Definition at line 5150 of file classdef.cpp.

5151{
5152 m_fileDef = fd;
5153}

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

4295{
4296 gd->addClass(this);
4297 //printf("ClassDefImpl::setGroupDefForAllMembers(%s)\n",qPrint(gd->name()));
4298 for (auto &mni : m_allMemberNameInfoLinkedMap)
4299 {
4300 for (auto &mi : *mni)
4301 {
4302 MemberDefMutable *md = toMemberDefMutable(mi->memberDef());
4303 if (md)
4304 {
4305 md->setGroupDef(gd,pri,fileName,startLine,hasDocs);
4306 gd->insertMember(md,true);
4307 ClassDefMutable *innerClass = toClassDefMutable(const_cast<ClassDef*>(md->getClassDefOfAnonymousType()));
4308 if (innerClass) innerClass->setGroupDefForAllMembers(gd,pri,fileName,startLine,hasDocs);
4309 }
4310 }
4311 }
4312}
virtual void setGroupDefForAllMembers(GroupDef *g, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs)=0
virtual const 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(), and toMemberDefMutable().

◆ setImplicitTemplateInstance()

void ClassDefImpl::setImplicitTemplateInstance ( bool b)
overridevirtual

Implements ClassDefMutable.

Definition at line 5055 of file classdef.cpp.

5056{
5058}

References m_implicitTemplateInstance.

◆ setIncludeFile()

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

Implements ClassDefMutable.

Definition at line 1439 of file classdef.cpp.

1441{
1442 //printf("ClassDefImpl::setIncludeFile(%p,%s,%d,%d)\n",fd,includeName,local,force);
1443 if (!m_incInfo) m_incInfo = std::make_unique<IncludeInfo>();
1444 if ((!includeName.isEmpty() && m_incInfo->includeName.isEmpty()) ||
1445 (fd!=nullptr && m_incInfo->fileDef==nullptr)
1446 )
1447 {
1448 //printf("Setting file info\n");
1449 m_incInfo->fileDef = fd;
1450 m_incInfo->includeName = includeName;
1452 }
1453 if (force && !includeName.isEmpty())
1454 {
1455 m_incInfo->includeName = includeName;
1457 }
1458}
@ 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 5174 of file classdef.cpp.

5175{
5176 m_isStatic=b;
5177}

References m_isStatic.

◆ setMetaData()

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

Implements ClassDefMutable.

Definition at line 5389 of file classdef.cpp.

5390{
5391 m_metaData = md;
5392}

References m_metaData.

◆ setModuleDef()

void ClassDefImpl::setModuleDef ( ModuleDef * mod)
overridevirtual

Implements ClassDefMutable.

Definition at line 5155 of file classdef.cpp.

5156{
5157 m_moduleDef = mod;
5158}

References m_moduleDef.

◆ setPrimaryConstructorParams()

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

Implements ClassDefMutable.

Definition at line 3564 of file classdef.cpp.

3565{
3567}
ArgumentList m_primaryConstructorParams
Definition classdef.cpp:570

References m_primaryConstructorParams.

◆ setProtection()

void ClassDefImpl::setProtection ( Protection p)
overridevirtual

Implements ClassDefMutable.

Definition at line 5165 of file classdef.cpp.

5166{
5167 m_prot=p;
5168 if (getLanguage()==SrcLangExt::VHDL && VhdlDocGen::convert(p)==VhdlDocGen::ARCHITECTURECLASS)
5169 {
5170 m_className = name();
5171 }
5172}
@ 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 3559 of file classdef.cpp.

3560{
3561 m_requiresClause = req;
3562}

References m_requiresClause.

◆ setSubGrouping()

void ClassDefImpl::setSubGrouping ( bool enabled)
overridevirtual

Implements ClassDefMutable.

Definition at line 5160 of file classdef.cpp.

5161{
5162 m_subGrouping = enabled;
5163}

References m_subGrouping.

◆ setTagLessReference()

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

Implements ClassDefMutable.

Definition at line 5288 of file classdef.cpp.

5289{
5290 m_tagLessRef = cd;
5291}

References m_tagLessRef.

◆ setTemplateArguments()

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

Implements ClassDefMutable.

Definition at line 3506 of file classdef.cpp.

3507{
3508 m_tempArgs = al;
3509}

References m_tempArgs.

◆ setTemplateBaseClassNames()

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

Implements ClassDefMutable.

Definition at line 4398 of file classdef.cpp.

4399{
4400 m_templBaseClassNames = templateNames;
4401}

References m_templBaseClassNames.

◆ setTemplateMaster()

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

Implements ClassDefMutable.

Definition at line 5184 of file classdef.cpp.

5185{
5186 assert(tm!=this);
5188}

References m_templateMaster.

◆ setTypeConstraints()

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

Implements ClassDefMutable.

Definition at line 3501 of file classdef.cpp.

3502{
3503 m_typeConstraints = al;
3504}

References m_typeConstraints.

◆ setUsedOnly()

void ClassDefImpl::setUsedOnly ( bool b)
overridevirtual

Implements ClassDefMutable.

Definition at line 5200 of file classdef.cpp.

5201{
5202 m_usedOnly = b;
5203}

References m_usedOnly.

◆ showUsedFiles()

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

Definition at line 1738 of file classdef.cpp.

1739{
1740 ol.pushGeneratorState();
1742
1743
1744 ol.writeRuler();
1745 ol.pushGeneratorState();
1747 ol.startParagraph();
1749 ol.endParagraph();
1750 ol.popGeneratorState();
1754
1755 bool first=true;
1756 for (const auto &fd : m_files)
1757 {
1758 if (first)
1759 {
1760 first=false;
1761 ol.startItemList();
1762 }
1763
1764 ol.startItemListItem();
1765 QCString path=fd->getPath();
1766 if (Config_getBool(FULL_PATH_NAMES))
1767 {
1768 ol.docify(stripFromPath(path));
1769 }
1770
1771 QCString fname = fd->name();
1772 if (!fd->getVersion().isEmpty()) // append version if available
1773 {
1774 fname += " (" + fd->getVersion() + ")";
1775 }
1776
1777 // for HTML
1778 ol.pushGeneratorState();
1780 if (fd->generateSourceFile())
1781 {
1782 ol.writeObjectLink(QCString(),fd->getSourceFileBase(),QCString(),fname);
1783 }
1784 else if (fd->isLinkable())
1785 {
1786 ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fname);
1787 }
1788 else
1789 {
1790 ol.startBold();
1791 ol.docify(fname);
1792 ol.endBold();
1793 }
1794 ol.popGeneratorState();
1795
1796 // for other output formats
1797 ol.pushGeneratorState();
1799 if (fd->isLinkable())
1800 {
1801 ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fname);
1802 }
1803 else
1804 {
1805 ol.docify(fname);
1806 }
1807 ol.popGeneratorState();
1808
1809 ol.endItemListItem();
1810 }
1811 if (!first) ol.endItemList();
1812
1813 ol.popGeneratorState();
1814}
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
QCString stripFromPath(const QCString &path)
Definition util.cpp:321

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

Referenced by writeDocumentationContents().

◆ sortAllMembersList()

void ClassDefImpl::sortAllMembersList ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 5010 of file classdef.cpp.

5011{
5012 std::stable_sort(m_allMemberNameInfoLinkedMap.begin(),
5014 [](const auto &m1,const auto &m2)
5015 {
5016 return qstricmp_sort(m1->memberName(),m2->memberName())<0;
5017 });
5018}
iterator begin()
Definition linkedmap.h:201
iterator end()
Definition linkedmap.h:202

References LinkedMap< T, Hash, KeyEqual, Map >::begin(), LinkedMap< T, Hash, KeyEqual, Map >::end(), and m_allMemberNameInfoLinkedMap.

◆ sortMemberLists()

void ClassDefImpl::sortMemberLists ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4626 of file classdef.cpp.

4627{
4628 for (auto &ml : m_memberLists)
4629 {
4630 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(false); }
4631 }
4632 if (Config_getBool(SORT_BRIEF_DOCS))
4633 {
4634 std::stable_sort(m_innerClasses.begin(),
4636 [](const auto &c1,const auto &c2)
4637 {
4638 return Config_getBool(SORT_BY_SCOPE_NAME) ?
4639 qstricmp_sort(c1->name(), c2->name() )<0 :
4640 qstricmp_sort(c1->className(), c2->className())<0 ;
4641 });
4642 }
4643}
iterator end()
Definition linkedmap.h:367
iterator begin()
Definition linkedmap.h:366

References LinkedRefMap< T, Hash, KeyEqual, Map >::begin(), Config_getBool, LinkedRefMap< T, Hash, KeyEqual, Map >::end(), m_innerClasses, and m_memberLists.

◆ startMemberDeclarations()

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

Definition at line 2227 of file classdef.cpp.

2228{
2229 //printf("%s: ClassDefImpl::startMemberDeclarations()\n",qPrint(name()));
2231}
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 2207 of file classdef.cpp.

2208{
2209 //printf("%s: ClassDefImpl::startMemberDocumentation()\n",qPrint(name()));
2210 if (Config_getBool(SEPARATE_MEMBER_PAGES))
2211 {
2214 }
2215}

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

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

4996{
4997 return m_inheritedBy;
4998}

References m_inheritedBy.

Referenced by isSubClass().

◆ subGrouping()

bool ClassDefImpl::subGrouping ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5379 of file classdef.cpp.

5380{
5381 return m_subGrouping;
5382}

References m_subGrouping.

◆ tagLessReference()

const ClassDef * ClassDefImpl::tagLessReference ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5283 of file classdef.cpp.

5284{
5285 return m_tagLessRef;
5286}

References m_tagLessRef.

◆ templateArguments()

const ArgumentList & ClassDefImpl::templateArguments ( ) const
overridevirtual

Returns the template arguments of this class.

Implements ClassDef.

Definition at line 5025 of file classdef.cpp.

5026{
5027 return m_tempArgs;
5028}

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

5046{
5047 return m_templateMaster;
5048}

References m_templateMaster.

◆ templateTypeConstraints()

const ConstraintClassList & ClassDefImpl::templateTypeConstraints ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5080 of file classdef.cpp.

5081{
5082 return m_constraintClassList;
5083}

References m_constraintClassList.

◆ title()

QCString ClassDefImpl::title ( ) const
overridevirtual

Implements ClassDef.

Definition at line 2914 of file classdef.cpp.

2915{
2916 QCString pageTitle;
2917 SrcLangExt lang = getLanguage();
2918
2919 auto getReferenceTitle = [this](std::function<QCString()> translateFunc) -> QCString
2920 {
2921 return Config_getBool(HIDE_COMPOUND_REFERENCE) ? displayName() : translateFunc();
2922 };
2923
2924 if (lang==SrcLangExt::Fortran)
2925 {
2926 pageTitle = getReferenceTitle([this](){
2928 });
2929 }
2930 else if (lang==SrcLangExt::Slice)
2931 {
2932 pageTitle = getReferenceTitle([this](){
2934 });
2935 }
2936 else if (lang==SrcLangExt::VHDL)
2937 {
2938 pageTitle = getReferenceTitle([this](){
2940 });
2941 }
2942 else if (lang==SrcLangExt::CSharp && !m_primaryConstructorParams.empty())
2943 {
2944 pageTitle = getReferenceTitle([this](){
2946 m_compType,
2947 !m_tempArgs.empty());
2948 });
2949 }
2950 else if (isJavaEnum())
2951 {
2952 pageTitle = getReferenceTitle([this](){
2954 });
2955 }
2956 else if (m_compType==Service)
2957 {
2958 pageTitle = getReferenceTitle([this](){
2960 });
2961 }
2962 else if (m_compType==Singleton)
2963 {
2964 pageTitle = getReferenceTitle([this](){
2966 });
2967 }
2968 else
2969 {
2970 pageTitle = getReferenceTitle([this](){
2972 m_compType == Interface && getLanguage()==SrcLangExt::ObjC ? Class : m_compType,
2973 !m_tempArgs.empty());
2974 });
2975 }
2976 return pageTitle;
2977}
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(), ArgumentList::empty(), VhdlDocGen::getClassTitle(), DefinitionMixin< ClassDefMutable >::getLanguage(), ClassDef::Interface, isJavaEnum(), isSliceLocal(), m_compType, m_primaryConstructorParams, m_tempArgs, ClassDef::Service, ClassDef::Singleton, theTranslator, Translator::trCompoundReference(), Translator::trCompoundReferenceFortran(), Translator::trCompoundReferenceSlice(), Translator::trCustomReference(), Translator::trEnumReference(), Translator::trServiceReference(), and Translator::trSingletonReference().

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

◆ typeConstraints()

const ArgumentList & ClassDefImpl::typeConstraints ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5369 of file classdef.cpp.

5370{
5371 return m_typeConstraints;
5372}

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

4991{
4992 m_inherits = bcd;
4993}

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

5001{
5002 m_inheritedBy = bcd;
5003}

References m_inheritedBy.

◆ usedByImplementationClasses()

const UsesClassList & ClassDefImpl::usedByImplementationClasses ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5075 of file classdef.cpp.

5076{
5077 return m_usedByImplClassList;
5078}

References m_usedByImplClassList.

◆ usedFiles()

const FileList & ClassDefImpl::usedFiles ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5364 of file classdef.cpp.

5365{
5366 return m_files;
5367}

References m_files.

◆ usedImplementationClasses()

const UsesClassList & ClassDefImpl::usedImplementationClasses ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5070 of file classdef.cpp.

5071{
5072 return m_usesImplClassList;
5073}

References m_usesImplClassList.

◆ visibleInParentsDeclList()

bool ClassDefImpl::visibleInParentsDeclList ( ) const
overridevirtual

show this class in the declaration section of its parent?

Implements ClassDef.

Definition at line 2604 of file classdef.cpp.

2605{
2606 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
2607 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
2608 bool extractLocalClasses = Config_getBool(EXTRACT_LOCAL_CLASSES);
2609 bool linkable = isLinkable();
2610 return (!isAnonymous() && !isExtension() &&
2611 (protection()!=Protection::Private || extractPrivate) &&
2612 (linkable || (!hideUndocClasses && (!isLocal() || extractLocalClasses)))
2613 );
2614}
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 4799 of file classdef.cpp.

4800{
4801 //printf("**** writeAdditionalInheritedMembers()\n");
4802 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4803 {
4804 if (lde->kind()==LayoutDocEntry::MemberDecl)
4805 {
4806 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4807 if (lmd && lmd->type!=MemberListType::Friends())
4808 {
4809 ClassDefSet visited;
4810 writeInheritedMemberDeclarations(ol,visited,lmd->type,MemberListType::Invalid(),lmd->title(getLanguage()),this,true,false);
4811 }
4812 }
4813 }
4814}
void writeInheritedMemberDeclarations(OutputList &ol, ClassDefSet &visitedClasses, MemberListType lt, MemberListType lt2, const QCString &title, const ClassDef *inheritedFrom, bool invert, bool showAlways) const

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

Referenced by endMemberDeclarations().

◆ writeAuthorSection()

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

Definition at line 2247 of file classdef.cpp.

2248{
2249 ol.pushGeneratorState();
2251 ol.writeString("\n");
2252 ol.startGroupHeader();
2253 ol.parseText(theTranslator->trAuthor(true,true));
2254 ol.endGroupHeader();
2256 ol.popGeneratorState();
2257}
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, Translator::trAuthor(), Translator::trGeneratedAutomatically(), and OutputList::writeString().

Referenced by writeDocumentationContents().

◆ writeBriefDescription()

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

Definition at line 1561 of file classdef.cpp.

1562{
1563 if (hasBriefDescription())
1564 {
1565 ol.startParagraph();
1566 ol.pushGeneratorState();
1568 ol.writeString(" - ");
1569 ol.popGeneratorState();
1571 briefLine(),
1572 this,
1573 nullptr,
1575 DocOptions()
1576 .setIndexWords(true)
1577 .setSingleLine(true));
1578 ol.pushGeneratorState();
1580 ol.writeString(" \n");
1582 ol.popGeneratorState();
1583
1584 if (hasDetailedDescription() || exampleFlag)
1585 {
1586 writeMoreLink(ol,anchor());
1587 }
1588
1589 ol.endParagraph();
1590 }
1591 ol.writeSynopsis();
1592}
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 1978 of file classdef.cpp.

1979{
1980 if (Config_getBool(HAVE_DOT) && m_hasCollaborationGraph /*&& Config_getBool(COLLABORATION_GRAPH)*/)
1981 {
1982 DotClassGraph usageImplGraph(this,GraphType::Collaboration);
1983 if (usageImplGraph.isTooBig())
1984 {
1985 warn_uncond("Collaboration graph for '{}' not generated, too many nodes ({}), threshold is {}. Consider increasing DOT_GRAPH_MAX_NODES.\n",
1986 name(), usageImplGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
1987 }
1988 else if (!usageImplGraph.isTrivial())
1989 {
1990 ol.pushGeneratorState();
1992 ol.startDotGraph();
1994 ol.endDotGraph(usageImplGraph);
1995 ol.popGeneratorState();
1996 }
1997 }
1998}
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, Translator::trCollaborationDiagram(), and warn_uncond.

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeDeclarationLink()

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

Implements ClassDef.

Definition at line 2616 of file classdef.cpp.

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

References anchor(), ARCHITECTURE, DefinitionMixin< ClassDefMutable >::briefDescription(), DefinitionMixin< ClassDefMutable >::briefFile(), DefinitionMixin< ClassDefMutable >::briefLine(), compoundType(), compoundTypeString(), Config_getBool, VhdlDocGen::convert(), createDocParser(), displayName(), OutputList::docify(), OutputList::endBold(), OutputList::endMemberDeclaration(), OutputList::endMemberDescription(), OutputList::endMemberHeader(), OutputList::endMemberItem(), ClassDef::Exception, 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, Translator::trCompounds(), Translator::trDataTypes(), Translator::trVhdlType(), 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 1670 of file classdef.cpp.

1672{
1673 if (hasDetailedDescription() || exampleFlag)
1674 {
1675 ol.pushGeneratorState();
1677 ol.writeRuler();
1678 ol.popGeneratorState();
1679
1680 ol.pushGeneratorState();
1682 ol.writeAnchor(QCString(),anchor.isEmpty() ? QCString("details") : anchor);
1683 ol.popGeneratorState();
1684
1685 if (!anchor.isEmpty())
1686 {
1687 ol.pushGeneratorState();
1691 ol.popGeneratorState();
1692 }
1693
1694 ol.startGroupHeader("details");
1695 ol.parseText(title);
1696 ol.endGroupHeader();
1697
1699 }
1700 else
1701 {
1702 //writeTemplateSpec(ol,this,pageType);
1703 }
1704}
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, QCString::isEmpty(), 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 1594 of file classdef.cpp.

1595{
1596 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
1597
1598 ol.startTextBlock();
1599
1600 if (getLanguage()==SrcLangExt::Cpp)
1601 {
1602 writeTemplateSpec(ol,this,compoundTypeString(),SrcLangExt::Cpp);
1603 }
1604
1605 // repeat brief description
1606 if (!briefDescription().isEmpty() && repeatBrief)
1607 {
1609 briefLine(),
1610 this,
1611 nullptr,
1613 DocOptions());
1614 }
1615 if (!briefDescription().isEmpty() && repeatBrief &&
1616 !documentation().isEmpty())
1617 {
1618 ol.pushGeneratorState();
1620 ol.writeString("\n\n");
1621 ol.popGeneratorState();
1622 }
1623 // write documentation
1624 if (!documentation().isEmpty())
1625 {
1626 ol.generateDoc(docFile(),
1627 docLine(),
1628 this,
1629 nullptr,
1630 documentation(),
1631 DocOptions()
1632 .setIndexWords(true));
1633 }
1634 // write type constraints
1636
1637 ol.generateDoc(
1638 docFile(),docLine(),
1639 this,
1640 nullptr, // memberDef
1642 DocOptions()
1643 .setIndexWords(true));
1644
1645 // write examples
1646 if (hasExamples())
1647 {
1648 ol.startExamples();
1649 ol.startDescForItem();
1651 ol.endDescForItem();
1652 ol.endExamples();
1653 }
1654 writeSourceDef(ol);
1656 ol.endTextBlock();
1657}
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 endExamples()
Definition outputlist.h:580
void startExamples()
Definition outputlist.h:578
void startDescForItem()
Definition outputlist.h:547
void startTextBlock(bool dense=false)
Definition outputlist.h:670
void writeTypeConstraints(OutputList &ol, const Definition *d, const ArgumentList &al)
Definition util.cpp:5501
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 2980 of file classdef.cpp.

2981{
2982 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
2983 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
2984 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
2985 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2986 QCString pageTitle = title();
2987
2989 if (sliceOpt)
2990 {
2991 if (compoundType()==Interface)
2992 {
2994 }
2995 else if (compoundType()==Struct)
2996 {
2998 }
2999 else if (compoundType()==Exception)
3000 {
3002 }
3003 else
3004 {
3006 }
3007 }
3008 else
3009 {
3011 }
3012
3013 AUTO_TRACE("name='{}' getOutputFileBase='{}'",name(),getOutputFileBase());
3014 bool hasAllMembersLink=false;
3015 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
3016 {
3017 if (lde->kind()==LayoutDocEntry::ClassAllMembersLink)
3018 {
3019 hasAllMembersLink = true;
3020 break;
3021 }
3022 }
3023 QCString memListFile;
3024 if (hasAllMembersLink && !m_allMemberNameInfoLinkedMap.empty() && !Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
3025 {
3026 memListFile = getMemberListFileName();
3027 }
3028 startFile(ol,getOutputFileBase(),false,name(),pageTitle,hli,!generateTreeView,QCString(),0,memListFile);
3029 if (!generateTreeView)
3030 {
3032 {
3034 }
3035 ol.endQuickIndices();
3036 }
3037
3038 startTitle(ol,getOutputFileBase(),this);
3039 ol.parseText(pageTitle);
3041 addGroupListToTitle(ol,this);
3043 writeDocumentationContents(ol,pageTitle);
3044
3045 endFileWithNavPath(ol,this);
3046
3047 if (Config_getBool(SEPARATE_MEMBER_PAGES))
3048 {
3049 writeMemberPages(ol);
3050 }
3051}
void addClassAttributes(OutputList &ol) const
void writeMemberPages(OutputList &ol) const override
QCString getMemberListFileName() const override
Definition classdef.cpp:998
void writeDocumentationContents(OutputList &ol, const QCString &pageTitle) const
void writeNavigationPath(OutputList &ol) const override
bool empty() const
Definition linkedmap.h:209
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:4954

References addClassAttributes(), addGroupListToTitle(), AUTO_TRACE, ClassVisible, compoundType(), Config_getBool, displayName(), LinkedMap< T, Hash, KeyEqual, Map >::empty(), 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 2768 of file classdef.cpp.

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

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

References m_innerClasses, msg, and protectionLevelVisible().

◆ writeIncludeFiles()

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

Definition at line 2142 of file classdef.cpp.

2143{
2144 if (m_incInfo /*&& Config_getBool(SHOW_HEADERFILE)*/)
2145 {
2146 SrcLangExt lang = getLanguage();
2147 QCString nm=m_incInfo->includeName.isEmpty() ?
2148 (m_incInfo->fileDef ?
2149 m_incInfo->fileDef->docName() : QCString()
2150 ) :
2151 m_incInfo->includeName;
2152 if (!nm.isEmpty())
2153 {
2154 ol.startParagraph();
2155 ol.startTypewriter();
2156 ol.docify(::includeStatement(lang,m_incInfo->kind));
2157 ol.docify(::includeOpen(lang,m_incInfo->kind));
2158 ol.pushGeneratorState();
2160 ol.docify(nm);
2163 if (m_incInfo->fileDef)
2164 {
2165 ol.writeObjectLink(QCString(),m_incInfo->fileDef->includeName(),QCString(),nm);
2166 }
2167 else
2168 {
2169 ol.docify(nm);
2170 }
2171 ol.popGeneratorState();
2172 ol.docify(::includeClose(lang,m_incInfo->kind));
2173 ol.endTypewriter();
2174 ol.endParagraph();
2175 }
2176 }
2177}
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 2001 of file classdef.cpp.

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

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, Translator::trDefinedIn(), and OutputList::writeObjectLink().

Referenced by writeDocumentationContents().

◆ writeInheritanceGraph()

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

Definition at line 1843 of file classdef.cpp.

1844{
1845 bool haveDot = Config_getBool(HAVE_DOT);
1846 auto classGraph = m_typeInheritanceGraph;
1847
1848 if (classGraph == CLASS_GRAPH_t::NO) return;
1849 // count direct inheritance relations
1850 int count=countInheritanceNodes();
1851
1852 bool renderDiagram = false;
1853 if (haveDot && (classGraph==CLASS_GRAPH_t::YES || classGraph==CLASS_GRAPH_t::GRAPH))
1854 // write class diagram using dot
1855 {
1856 DotClassGraph inheritanceGraph(this,GraphType::Inheritance);
1857 if (inheritanceGraph.isTooBig())
1858 {
1859 warn_uncond("Inheritance graph for '{}' not generated, too many nodes ({}), threshold is {}. Consider increasing DOT_GRAPH_MAX_NODES.\n",
1860 name(), inheritanceGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
1861 }
1862 else if (!inheritanceGraph.isTrivial())
1863 {
1864 ol.pushGeneratorState();
1866 ol.startDotGraph();
1868 ol.endDotGraph(inheritanceGraph);
1869 ol.popGeneratorState();
1870 renderDiagram = true;
1871 }
1872 }
1873 else if ((classGraph==CLASS_GRAPH_t::YES || classGraph==CLASS_GRAPH_t::GRAPH || classGraph==CLASS_GRAPH_t::BUILTIN) && count>0)
1874 // write class diagram using built-in generator
1875 {
1876 ClassDiagram diagram(this); // create a diagram of this class.
1877 ol.startClassDiagram();
1882 renderDiagram = true;
1883 }
1884
1885 if (renderDiagram) // if we already show the inheritance relations graphically,
1886 // then hide the text version
1887 {
1889 }
1890
1891 count = countInheritsNodes();
1892 if (count>0)
1893 {
1894 auto replaceFunc = [this,&ol](size_t entryIndex)
1895 {
1896 for (size_t index=0; index<m_inherits.size() ; index++)
1897 {
1898 const BaseClassDef &bcd=m_inherits[index];
1899 const ClassDef *cd=bcd.classDef;
1900
1901 if (cd->isVisibleInHierarchy()) // filter on the class we want to show
1902 {
1903 if (index==entryIndex) // found the requested index
1904 {
1905 // use the class name but with the template arguments as given
1906 // in the inheritance relation
1908 cd->displayName(),bcd.templSpecifiers);
1909
1910 if (cd->isLinkable())
1911 {
1913 cd->getOutputFileBase(),
1914 cd->anchor(),
1915 displayName);
1916 }
1917 else
1918 {
1919 ol.docify(displayName);
1920 }
1921 return;
1922 }
1923 }
1924 }
1925 };
1926
1927 ol.startParagraph();
1928 writeMarkerList(ol,
1930 static_cast<size_t>(count),
1931 replaceFunc);
1932 ol.endParagraph();
1933 }
1934
1935 // write subclasses
1936 count = countInheritedByNodes();
1937 if (count>0)
1938 {
1939 auto replaceFunc = [this,&ol](size_t entryIndex)
1940 {
1941 for (size_t index=0; index<m_inheritedBy.size() ; index++)
1942 {
1943 const BaseClassDef &bcd=m_inheritedBy[index];
1944 const ClassDef *cd=bcd.classDef;
1945 if (cd->isVisibleInHierarchy()) // filter on the class we want to show
1946 {
1947 if (index==entryIndex) // found the requested index
1948 {
1949 if (cd->isLinkable())
1950 {
1953 }
1954 else
1955 {
1956 ol.docify(cd->displayName());
1957 }
1958 return;
1959 }
1960 }
1961 }
1962 };
1963
1964 ol.startParagraph();
1965 writeMarkerList(ol,
1967 static_cast<size_t>(count),
1968 replaceFunc);
1969 ol.endParagraph();
1970 }
1971
1972 if (renderDiagram)
1973 {
1974 ol.enableAll();
1975 }
1976}
int countInheritanceNodes() const
virtual QCString anchor() 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()
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:3785
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(), 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(), QCString::str(), BaseClassDef::templSpecifiers, theTranslator, Translator::trClassDiagram(), Translator::trInheritedByList(), Translator::trInheritsList(), 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 4841 of file classdef.cpp.

4844{
4845 int count = countMembersIncludingGrouped(lt,inheritedFrom,false);
4846 bool process = count>0;
4847 //printf("%s: writeInheritedMemberDec: lt=%s process=%d invert=%d always=%d\n",
4848 // qPrint(name()),qPrint(lt.to_string()),process,invert,showAlways);
4849 if ((process^invert) || showAlways)
4850 {
4851 for (const auto &ibcd : m_inherits)
4852 {
4853 ClassDefMutable *icd=toClassDefMutable(ibcd.classDef);
4854 if (icd && icd->isLinkable())
4855 {
4856 MemberListType lt1 = MemberListType::Invalid();
4857 MemberListType lt3 = MemberListType::Invalid();
4858 convertProtectionLevel(lt,ibcd.prot,&lt1,&lt3);
4859 if (lt2.isInvalid() && !lt3.isInvalid())
4860 {
4861 lt2=lt3;
4862 }
4863 //printf("%s:convert %s->(%s,%s) prot=%d\n",qPrint(icd->name()),qPrint(lt.to_string()),
4864 // qPrint(lt1.to_string()),qPrint(lt2.to_string()),ibcd.prot);
4865 if (visitedClasses.find(icd)==visitedClasses.end())
4866 {
4867 visitedClasses.insert(icd); // guard for multiple virtual inheritance
4868 if (!lt1.isInvalid())
4869 {
4870 //printf("--> writeMemberDeclarations for type %s\n",qPrint(lt1.to_string()));
4871 icd->writeMemberDeclarations(ol,visitedClasses,lt1,
4872 title,QCString(),false,inheritedFrom,lt2,false,true);
4873 }
4874 }
4875 else
4876 {
4877 //printf("%s: class already visited!\n",qPrint(icd->name()));
4878 }
4879 }
4880 }
4881 }
4882}
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(), MemberListType::Invalid(), MemberListType::isInvalid(), Definition::isLinkable(), m_inherits, title(), toClassDefMutable(), and ClassDef::writeMemberDeclarations().

Referenced by writeAdditionalInheritedMembers(), and writeMemberDeclarations().

◆ writeInlineClasses()

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

Definition at line 2202 of file classdef.cpp.

2203{
2205}
void writeDocumentation(OutputList &ol, const Definition *container=nullptr) const
Definition classlist.cpp:74

References m_innerClasses, and ClassLinkedRefMap::writeDocumentation().

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

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

4888{
4889 //printf("%s: ClassDefImpl::writeMemberDeclarations lt=%s lt2=%s\n",qPrint(name()),qPrint(lt.to_string()),qPrint(lt2.to_string()));
4890 MemberList * ml = getMemberList(lt);
4891 MemberList * ml2 = getMemberList(lt2);
4892 if (getLanguage()==SrcLangExt::VHDL) // use specific declarations function
4893 {
4894 static const ClassDef *cdef;
4895 if (cdef!=this)
4896 { // only one inline link
4898 cdef=this;
4899 }
4900 if (ml)
4901 {
4902 VhdlDocGen::writeVhdlDeclarations(ml,ol,nullptr,this,nullptr,nullptr,nullptr);
4903 }
4904 }
4905 else
4906 {
4907 //printf("%s::writeMemberDeclarations(%s) ml=%p ml2=%p\n",qPrint(name()),qPrint(title),(void*)ml,(void*)ml2);
4908 QCString tt = title, st = subTitle;
4909 if (ml)
4910 {
4911 //printf(" writeDeclarations ml type=%s count=%d\n",qPrint(lt.to_string()),ml->numDecMembers(inheritedFrom));
4912 ml->writeDeclarations(ol,this,nullptr,nullptr,nullptr,nullptr,tt,st,false,showInline,inheritedFrom,lt,true);
4913 tt.clear();
4914 st.clear();
4915 }
4916 if (ml2)
4917 {
4918 //printf(" writeDeclarations ml2 type=%s count=%d\n",qPrint(lt2.to_string()),ml2->numDecMembers(inheritedFrom));
4919 ml2->writeDeclarations(ol,this,nullptr,nullptr,nullptr,nullptr,tt,st,false,showInline,inheritedFrom,lt,ml==nullptr);
4920 }
4921 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
4922 if (!inlineInheritedMembers) // show inherited members as separate lists
4923 {
4924 writeInheritedMemberDeclarations(ol,visitedClasses,lt,lt2,title,
4925 inheritedFrom ? inheritedFrom : this,
4926 invert,showAlways);
4927 }
4928 }
4929}
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:180
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, 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 4944 of file classdef.cpp.

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

References displayName(), 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 2179 of file classdef.cpp.

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

References m_memberGroups, and m_subGrouping.

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeMemberList()

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

Implements ClassDef.

Definition at line 3139 of file classdef.cpp.

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

3054{
3055 ///////////////////////////////////////////////////////////////////////////
3056 //// Member definitions on separate pages
3057 ///////////////////////////////////////////////////////////////////////////
3058
3059 ol.pushGeneratorState();
3061
3062 for (const auto &ml : m_memberLists)
3063 {
3064 if (ml->numDocMembers()>ml->numDocEnumValues() && ml->listType().isDetailed())
3065 {
3066 ml->writeDocumentationPage(ol,displayName(),this);
3067 }
3068 }
3069
3070 ol.popGeneratorState();
3071}

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

2561{
2562 // TODO: clean up this mess by moving it to
2563 // the output generators...
2564 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
2565 bool rtfHyperlinks = Config_getBool(RTF_HYPERLINKS);
2566 bool usePDFLatex = Config_getBool(USE_PDFLATEX);
2567
2568 // HTML only
2569 ol.pushGeneratorState();
2571 ol.docify(" ");
2573 anchor.isEmpty() ? QCString("details") : anchor);
2575 ol.endTextLink();
2576 ol.popGeneratorState();
2577
2578 if (!anchor.isEmpty())
2579 {
2580 ol.pushGeneratorState();
2581 // LaTeX + RTF
2585 if (!(usePDFLatex && pdfHyperlinks))
2586 {
2588 }
2589 if (!rtfHyperlinks)
2590 {
2592 }
2593 ol.docify(" ");
2596 ol.endTextLink();
2597 // RTF only
2599 ol.writeString("\\par");
2600 ol.popGeneratorState();
2601 }
2602}
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, QCString::isEmpty(), Latex, Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, OutputList::startTextLink(), theTranslator, Translator::trMore(), and OutputList::writeString().

Referenced by writeBriefDescription(), and writeDeclarationLink().

◆ writeNestedClasses()

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

Definition at line 2196 of file classdef.cpp.

2197{
2198 // nested classes
2199 m_innerClasses.writeDeclaration(ol,nullptr,title,true);
2200}
void writeDeclaration(OutputList &ol, const ClassDef::CompoundType *filter, const QCString &header, bool localNames) const
Definition classlist.cpp:53

References m_innerClasses, title(), and ClassLinkedRefMap::writeDeclaration().

Referenced by writeDocumentationContents().

◆ writePageNavigation()

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

Implements DefinitionMutable.

Definition at line 2329 of file classdef.cpp.

2330{
2331 ol.writePageOutline();
2332}
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 4958 of file classdef.cpp.

4961{
4962 //printf("%s: ClassDefImpl::writePlainMemberDeclaration()\n",qPrint(name()));
4963 MemberList * ml = getMemberList(lt);
4964 if (ml)
4965 {
4966 ml->writePlainDeclarations(ol,inGroup,this,nullptr,nullptr,nullptr,nullptr,indentLevel,inheritedFrom,inheritId);
4967 }
4968}
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().

◆ writeQuickMemberLinks()

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

Implements DefinitionMutable.

Definition at line 3073 of file classdef.cpp.

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

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

4952{
4953 //printf("%s: ClassDefImpl::writeSimpleMemberDocumentation()\n",qPrint(name()));
4954 MemberList * ml = getMemberList(lt);
4955 if (ml) ml->writeSimpleDocumentation(ol,this);
4956}
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 2260 of file classdef.cpp.

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

References Config_getBool, convertToId(), ClassLinkedRefMap::declVisible(), MemberList::declVisible(), OutputList::disableAllBut(), LinkedMap< T, Hash, KeyEqual, Map >::empty(), 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(), Translator::trListOfAllMembers(), LayoutDocEntryMemberDecl::type, OutputList::writeString(), and OutputList::writeSummaryLink().

◆ writeTagFile()

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

Implements ClassDef.

Definition at line 2334 of file classdef.cpp.

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

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

1515{
1516 ArgumentLists specs;
1517 QCString name;
1518 searchTemplateSpecs(d,specs,name,lang);
1519 if (!specs.empty()) // class has template scope specifiers
1520 {
1522 for (const ArgumentList &al : specs)
1523 {
1524 ol.docify("template<");
1525 auto it = al.begin();
1526 while (it!=al.end())
1527 {
1528 Argument a = *it;
1529 linkifyText(TextGeneratorOLImpl(ol), // out
1530 a.type, // text
1531 LinkifyTextOptions().setScope(d).setFileScope(getFileDef()).setSelf(this));
1532 if (!a.name.isEmpty())
1533 {
1534 ol.docify(" ");
1535 ol.docify(a.name);
1536 }
1537 if (a.defval.length()!=0)
1538 {
1539 ol.docify(" = ");
1540 ol.docify(a.defval);
1541 }
1542 ++it;
1543 if (it!=al.end()) ol.docify(", ");
1544 }
1545 ol.docify(">");
1546 ol.lineBreak();
1547 }
1549 {
1550 ol.docify("requires ");
1551 linkifyText(TextGeneratorOLImpl(ol), // out
1552 m_requiresClause, // text
1553 LinkifyTextOptions().setScope(d).setFileScope(getFileDef()).setSelf(this));
1554 ol.lineBreak();
1555 }
1556 ol.docify(type.lower()+" "+name);
1558 }
1559}
void endCompoundTemplateParams()
Definition outputlist.h:503
void startCompoundTemplateParams()
Definition outputlist.h:501
QCString lower() const
Definition qcstring.h:247
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 549 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 512 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 507 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 431 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 477 of file classdef.cpp.

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

◆ m_constraintClassList

ConstraintClassList ClassDefImpl::m_constraintClassList
private

Definition at line 494 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 474 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 456 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 425 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 471 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 439 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 448 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 434 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 520 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 554 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 529 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 523 of file classdef.cpp.

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

◆ m_isTemplArg

bool ClassDefImpl::m_isTemplArg = false
private

Definition at line 531 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 428 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 526 of file classdef.cpp.

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

◆ m_metaData

QCString ClassDefImpl::m_metaData
private

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

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

◆ m_primaryConstructorParams

ArgumentList ClassDefImpl::m_primaryConstructorParams
private

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

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

◆ m_qualifiers

StringVector ClassDefImpl::m_qualifiers
private

Definition at line 563 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 561 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 537 of file classdef.cpp.

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

◆ m_tagLessRef

const ClassDef* ClassDefImpl::m_tagLessRef = nullptr
private

Definition at line 551 of file classdef.cpp.

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

◆ m_tempArgs

◆ m_templateInstances

TemplateInstanceList ClassDefImpl::m_templateInstances
private

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

Definition at line 499 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 501 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 468 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 492 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 540 of file classdef.cpp.

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

◆ m_usesImplClassList

UsesClassList ClassDefImpl::m_usesImplClassList
private

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

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


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