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

Implementation of the ClassDef interface. More...

Inheritance diagram for ClassDefImpl:
Collaboration diagram for ClassDefImpl:

Public Member Functions

 ClassDefImpl (const QCString &fileName, int startLine, int startColumn, const QCString &name, CompoundType ct, const QCString &ref=QCString(), const QCString &fName=QCString(), bool isSymbol=TRUE, bool isJavaEnum=FALSE)
DefType definitionType () const override
std::unique_ptr< ClassDefdeepCopy (const QCString &name) const override
void moveTo (Definition *) override
CodeSymbolType codeSymbolType () const override
QCString getOutputFileBase () const override
QCString getInstanceOutputFileBase () const override
QCString getSourceFileBase () const override
QCString getReference () const override
bool isReference () const override
bool isLocal () const override
 Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES.
ClassLinkedRefMap getClasses () const override
 returns the classes nested into this class
bool hasDocumentation () const override
bool hasDetailedDescription () const override
 returns TRUE if this class has a non-empty detailed description
QCString collaborationGraphFileName () const override
 returns the file name to use for the collaboration graph
QCString inheritanceGraphFileName () const override
 returns the file name to use for the inheritance graph
QCString displayName (bool includeScope=TRUE) const override
CompoundType compoundType () const override
 Returns the type of compound this is, i.e.
QCString compoundTypeString () const override
 Returns the type of compound as a string.
const BaseClassListbaseClasses () const override
 Returns the list of base classes from which this class directly inherits.
void updateBaseClasses (const BaseClassList &bcd) override
 Update the list of base classes to the one passed.
const BaseClassListsubClasses () const override
 Returns the list of sub classes that directly derive from this class.
void updateSubClasses (const BaseClassList &bcd) override
 Update the list of sub classes to the one passed.
const MemberNameInfoLinkedMapmemberNameInfoLinkedMap () const override
 Returns a dictionary of all members.
Protection protection () const override
 Return the protection level (Public,Protected,Private) in which this compound was found.
bool isLinkableInProject () const override
bool isLinkable () const override
bool isVisibleInHierarchy () const override
bool visibleInParentsDeclList () const override
 show this class in the declaration section of its parent?
const ArgumentListtemplateArguments () const override
 Returns the template arguments of this class.
FileDefgetFileDef () const override
 Returns the namespace this compound is in, or 0 if it has a global scope.
ModuleDefgetModuleDef () const override
 Returns the C++20 module in which this compound's definition can be found.
const MemberDefgetMemberByName (const QCString &) const override
 Returns the member with the given name.
int isBaseClass (const ClassDef *bcd, bool followInstances, const QCString &templSpec) const override
 Returns TRUE iff bcd is a direct or indirect base class of this class.
bool isSubClass (ClassDef *bcd, int level=0) const override
 Returns TRUE iff bcd is a direct or indirect sub class of this class.
bool isAccessibleMember (const MemberDef *md) const override
 returns TRUE iff md is a member of this class or of the the public/protected members of a base class
const TemplateInstanceListgetTemplateInstances () const override
 Returns a sorted dictionary with all template instances found for this template class.
const ClassDeftemplateMaster () const override
 Returns the template master of which this class is an instance.
bool isTemplate () const override
 Returns TRUE if this class is a template.
const IncludeInfoincludeInfo () const override
const UsesClassListusedImplementationClasses () const override
const UsesClassListusedByImplementationClasses () const override
const ConstraintClassListtemplateTypeConstraints () const override
bool isTemplateArgument () const override
const DefinitionfindInnerCompound (const QCString &name) const override
ArgumentLists getTemplateParameterLists () const override
 Returns the template parameter lists that form the template declaration of this class.
QCString qualifiedNameWithTemplateParameters (const ArgumentLists *actualParams=nullptr, uint32_t *actualParamIndex=nullptr) const override
bool isAbstract () const override
 Returns TRUE if there is at least one pure virtual member in this class.
bool isObjectiveC () const override
 Returns TRUE if this class is implemented in Objective-C.
bool isFortran () const override
 Returns TRUE if this class is implemented in Fortran.
bool isCSharp () const override
 Returns TRUE if this class is implemented in C#.
bool isFinal () const override
 Returns TRUE if this class is marked as final.
bool isSealed () const override
 Returns TRUE if this class is marked as sealed.
bool isPublished () const override
 Returns TRUE if this class is marked as published.
bool isExtension () const override
 Returns TRUE if this class represents an Objective-C 2.0 extension (nameless category)
bool isForwardDeclared () const override
 Returns TRUE if this class represents a forward declaration of a template class.
bool isInterface () const override
 Returns TRUE if this class represents an interface.
ClassDefcategoryOf () const override
 Returns the class of which this is a category (Objective-C only)
QCString className () const override
 Returns the name of the class including outer classes, but not including namespaces.
MemberListgetMemberList (MemberListType lt) const override
 Returns the members in the list identified by lt.
const MemberListsgetMemberLists () const override
 Returns the list containing the list of members sorted per type.
const MemberGroupListgetMemberGroups () const override
 Returns the member groups defined for this class.
const TemplateNameMapgetTemplateBaseClassNames () const override
bool isUsedOnly () const override
QCString anchor () const override
bool isEmbeddedInOuterScope () const override
bool isSimple () const override
const ClassDeftagLessReference () const override
const MemberDefisSmartPointer () const override
bool isJavaEnum () const override
QCString title () const override
QCString generatedFromFiles () const override
const FileListusedFiles () const override
const ArgumentListtypeConstraints () const override
const ExampleListgetExamples () const override
bool hasExamples () const override
QCString getMemberListFileName () const override
bool subGrouping () const override
bool isSliceLocal () const override
bool hasNonReferenceSuperClass () const override
QCString requiresClause () const override
StringVector getQualifiers () const override
bool containsOverload (const MemberDef *md) const override
bool isImplicitTemplateInstance () const override
ClassDefinsertTemplateInstance (const QCString &fileName, int startLine, int startColumn, const QCString &templSpec, bool &freshInstance) override
void insertBaseClass (ClassDef *, const QCString &name, Protection p, Specifier s, const QCString &t=QCString()) override
void insertSubClass (ClassDef *, Protection p, Specifier s, const QCString &t=QCString()) override
void insertExplicitTemplateInstance (ClassDef *instance, const QCString &spec) override
void setIncludeFile (FileDef *fd, const QCString &incName, bool local, bool force) override
void insertMember (MemberDef *) override
void insertUsedFile (const FileDef *) override
bool addExample (const QCString &anchor, const QCString &name, const QCString &file) override
void mergeCategory (ClassDef *category) override
void setFileDef (FileDef *fd) override
void setModuleDef (ModuleDef *mod) override
void setSubGrouping (bool enabled) override
void setProtection (Protection p) override
void setGroupDefForAllMembers (GroupDef *g, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs) override
void addInnerCompound (Definition *d) override
void addUsedClass (ClassDef *cd, const QCString &accessName, Protection prot) override
void addUsedByClass (ClassDef *cd, const QCString &accessName, Protection prot) override
void setIsStatic (bool b) override
void setCompoundType (CompoundType t) override
void setClassName (const QCString &name) override
void setClassSpecifier (TypeSpecifier spec) override
void addQualifiers (const StringVector &qualifiers) override
void setTemplateArguments (const ArgumentList &al) override
void setTemplateBaseClassNames (const TemplateNameMap &templateNames) override
void setTemplateMaster (const ClassDef *tm) override
void setImplicitTemplateInstance (bool b) override
void setTypeConstraints (const ArgumentList &al) override
void addMemberToTemplateInstance (const MemberDef *md, const ArgumentList &templateArguments, const QCString &templSpec) override
void addMembersToTemplateInstance (const ClassDef *cd, const ArgumentList &templateArguments, const QCString &templSpec) override
void makeTemplateArgument (bool b=TRUE) override
void setCategoryOf (ClassDef *cd) override
void setUsedOnly (bool b) override
void setTagLessReference (const ClassDef *cd) override
void setMetaData (const QCString &md) override
void findSectionsInDocumentation () override
void addMembersToMemberGroup () override
void addListReferences () override
void addTypeConstraints () override
void computeAnchors () override
void mergeMembers () override
void sortMemberLists () override
void distributeMemberGroupDocumentation () override
void writeDocumentation (OutputList &ol) const override
void writeDocumentationForInnerClasses (OutputList &ol) const override
void writeMemberPages (OutputList &ol) const override
void writeMemberList (OutputList &ol) const override
void writeDeclaration (OutputList &ol, const MemberDef *md, bool inGroup, int indentLevel, const ClassDef *inheritedFrom, const QCString &inheritId) const override
void writeQuickMemberLinks (OutputList &ol, const MemberDef *md) const override
void writeSummaryLinks (OutputList &ol) const override
void reclassifyMember (MemberDefMutable *md, MemberType t) override
void writeInlineDocumentation (OutputList &ol) const override
 Write class documentation inside another container (i.e.
void writeDeclarationLink (OutputList &ol, bool &found, const QCString &header, bool localNames) const override
void removeMemberFromLists (MemberDef *md) override
void setAnonymousEnumType () override
void countMembers () override
void sortAllMembersList () override
void addGroupedInheritedMembers (OutputList &ol, MemberListType lt, const ClassDef *inheritedFrom, const QCString &inheritId) const override
void writeTagFile (TextStream &) const override
int countMembersIncludingGrouped (MemberListType lt, const ClassDef *inheritedFrom, bool additional) const override
int countMemberDeclarations (MemberListType lt, const ClassDef *inheritedFrom, MemberListType lt2, bool invert, bool showAlways, ClassDefSet &visitedClasses) const override
void writeMemberDeclarations (OutputList &ol, ClassDefSet &visitedClasses, MemberListType lt, const QCString &title, const QCString &subTitle=QCString(), bool showInline=FALSE, const ClassDef *inheritedFrom=nullptr, MemberListType lt2=MemberListType::Invalid(), bool invert=FALSE, bool showAlways=FALSE) const override
void setRequiresClause (const QCString &req) override
CLASS_GRAPH_t hasInheritanceGraph () const override
void overrideInheritanceGraph (CLASS_GRAPH_t e) override
bool hasCollaborationGraph () const override
void overrideCollaborationGraph (bool e) override
Public Member Functions inherited from DefinitionMixin< ClassDefMutable >
 DefinitionMixin (const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
 DefinitionMixin (const DefinitionMixin &other)
 DefinitionMixin (DefinitionMixin &&)=delete
DefinitionMixinoperator= (const DefinitionMixin &other)
DefinitionMixinoperator= (DefinitionMixin &&)=delete
 ~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 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 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
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
QCString pathFragment () const override
void writeDocAnchorsToTagFile (TextStream &fs) const override
void setLocalName (const QCString &name) override
void writeToc (OutputList &ol, const LocalToc &lt) const override
void computeTooltip () override
void _setSymbolName (const QCString &name) override
QCString _symbolName () const override

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

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

Detailed Description

Implementation of the ClassDef interface.

Definition at line 184 of file classdef.cpp.

Constructor & Destructor Documentation

◆ ClassDefImpl()

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

Definition at line 797 of file classdef.cpp.

802 : DefinitionMixin(defFileName,defLine,defColumn,removeRedundantWhiteSpace(nm),nullptr,nullptr,isSymbol)
803{
804 AUTO_TRACE("name={}",name());
805 setReference(lref);
806 m_compType = ct;
808 QCString compTypeString = getCompoundTypeString(getLanguage(),ct,isJavaEnum);
809 if (!fName.isEmpty())
810 {
812 }
813 else
814 {
815 m_fileName=compTypeString+name();
816 }
817 m_prot=Protection::Public;
818 //nspace=nullptr;
819 m_fileDef=nullptr;
820 m_moduleDef=nullptr;
821 m_subGrouping=Config_getBool(SUBGROUPING);
822 m_templateMaster =nullptr;
827 m_categoryOf = nullptr;
829 m_isSimple = Config_getBool(INLINE_SIMPLE_STRUCTS);
830 m_arrowOperator = nullptr;
831 m_tagLessRef = nullptr;
832 m_spec=TypeSpecifier();
833 //QCString ns;
834 //extractNamespaceName(name,className,ns);
835 //printf("m_name=%s m_className=%s ns=%s\n",qPrint(m_name),qPrint(m_className),qPrint(ns));
836
837 // we cannot use getLanguage at this point, as setLanguage has not been called.
838 SrcLangExt lang = getLanguageFromFileName(defFileName);
839 if ((lang==SrcLangExt::Cpp || lang==SrcLangExt::ObjC) && guessSection(defFileName).isSource())
840 {
842 }
843 else
844 {
846 }
847 m_hasCollaborationGraph = Config_getBool(COLLABORATION_GRAPH);
849 m_memberListFileName = convertNameToFile(compTypeString+name()+"-members");
852 if (lref.isEmpty())
853 {
855 }
856 AUTO_TRACE_EXIT("m_fileName='{}'",m_fileName);
857}
QCString m_collabFileName
Definition classdef.cpp:418
QCString m_fileName
Definition classdef.cpp:412
const MemberDef * m_arrowOperator
Does this class overloaded the -> operator?
Definition classdef.cpp:536
TypeSpecifier m_spec
Definition classdef.cpp:543
ClassDef * m_categoryOf
Definition classdef.cpp:499
const ClassDef * m_tagLessRef
Definition classdef.cpp:538
Protection m_prot
Definition classdef.cpp:470
QCString m_inheritFileName
Definition classdef.cpp:421
const ClassDef * m_templateMaster
Definition classdef.cpp:491
bool m_membersMerged
Definition classdef.cpp:513
bool m_isJavaEnum
Does this class represent a Java style enum?
Definition classdef.cpp:541
ModuleDef * m_moduleDef
Definition classdef.cpp:446
bool isJavaEnum() const override
bool m_isSimple
Is this a simple (non-nested) C structure?
Definition classdef.cpp:533
CLASS_GRAPH_t m_typeInheritanceGraph
Definition classdef.cpp:553
bool m_isAbstract
Definition classdef.cpp:507
FileDef * m_fileDef
Definition classdef.cpp:443
ClassDef::CompoundType m_compType
Definition classdef.cpp:464
bool m_hasCollaborationGraph
Definition classdef.cpp:552
bool m_isTemplArg
Definition classdef.cpp:518
bool m_usedOnly
Reason of existence is a "use" relation.
Definition classdef.cpp:527
QCString m_memberListFileName
Definition classdef.cpp:415
bool m_subGrouping
Definition classdef.cpp:524
const QCString & name() const override
void setReference(const QCString &r) override
DefinitionMixin(const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
SrcLangExt getLanguage() const override
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
static QCString getCompoundTypeString(SrcLangExt lang, ClassDef::CompoundType compType, bool isJavaEnum)
Definition classdef.cpp:146
#define Config_getBool(name)
Definition config.h:33
#define Config_getEnum(name)
Definition config.h:35
#define AUTO_TRACE(...)
Definition docnode.cpp:46
#define AUTO_TRACE_EXIT(...)
Definition docnode.cpp:48
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
SrcLangExt
Definition types.h:207
QCString removeRedundantWhiteSpace(const QCString &s)
Definition util.cpp:578
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
Definition util.cpp:5714
QCString stripExtension(const QCString &fName)
Definition util.cpp:5430
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:4013
EntryType guessSection(const QCString &name)
Definition util.cpp:349

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

Referenced by addTypeConstraint(), and insertTemplateInstance().

Member Function Documentation

◆ addClassAttributes()

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

Definition at line 2703 of file classdef.cpp.

2704{
2705 StringVector sl;
2706 if (isFinal()) sl.emplace_back("final");
2707 if (isSealed()) sl.emplace_back("sealed");
2708 if (isAbstract()) sl.emplace_back("abstract");
2709 if (isExported()) sl.emplace_back("export");
2710 if (getLanguage()==SrcLangExt::IDL && isPublished()) sl.emplace_back("published");
2711
2712 for (const auto &sx : m_qualifiers)
2713 {
2714 bool alreadyAdded = std::find(sl.begin(), sl.end(), sx) != sl.end();
2715 if (!alreadyAdded)
2716 {
2717 sl.push_back(sx);
2718 }
2719 }
2720
2721 ol.pushGeneratorState();
2723 if (!sl.empty())
2724 {
2725 ol.startLabels();
2726 size_t i=0;
2727 for (const auto &s : sl)
2728 {
2729 i++;
2730 ol.writeLabel(s.c_str(),i==sl.size());
2731 }
2732 ol.endLabels();
2733 }
2734 ol.popGeneratorState();
2735}
bool isFinal() const override
Returns TRUE if this class is marked as final.
bool isPublished() const override
Returns TRUE if this class is marked as published.
StringVector m_qualifiers
Definition classdef.cpp:550
bool isAbstract() const override
Returns TRUE if there is at least one pure virtual member in this class.
bool isSealed() const override
Returns TRUE if this class is marked as sealed.
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void endLabels()
Definition outputlist.h:741
void writeLabel(const QCString &l, bool isLast)
Definition outputlist.h:739
void startLabels()
Definition outputlist.h:737
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 3372 of file classdef.cpp.

3373{
3374 return m_examples.inSort(Example(anchor,nameStr,file));
3375}
ExampleList m_examples
Definition classdef.cpp:461
QCString anchor() const override

References anchor(), and m_examples.

◆ addGroupedInheritedMembers()

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

Implements ClassDef.

Definition at line 4881 of file classdef.cpp.

4883{
4884 //printf("** %s::addGroupedInheritedMembers() inheritId=%s\n",qPrint(name()),qPrint(inheritId));
4885 for (const auto &mg : m_memberGroups)
4886 {
4887 if (!mg->allMembersInSameSection() || !m_subGrouping) // group is in its own section
4888 {
4889 mg->addGroupedInheritedMembers(ol,this,lt,inheritedFrom,inheritId);
4890 }
4891 }
4892}
MemberGroupList m_memberGroups
Definition classdef.cpp:504

References m_memberGroups, and m_subGrouping.

◆ addInnerCompound()

void ClassDefImpl::addInnerCompound ( Definition * d)
overridevirtual

Implements DefinitionMutable.

Definition at line 4286 of file classdef.cpp.

4287{
4288 //printf("**** %s::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
4289 if (d->definitionType()==Definition::TypeClass) // only classes can be
4290 // nested in classes.
4291 {
4292 m_innerClasses.add(d->localName(),toClassDef(d));
4293 }
4294}
ClassLinkedRefMap m_innerClasses
Definition classdef.cpp:475
virtual const QCString & localName() const =0
virtual DefType definitionType() const =0
ClassDef * toClassDef(Definition *d)

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

◆ addListReferences()

void ClassDefImpl::addListReferences ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4488 of file classdef.cpp.

4489{
4490 SrcLangExt lang = getLanguage();
4491 if (!isLinkableInProject()) return;
4492 //printf("ClassDef(%s)::addListReferences()\n",qPrint(name()));
4493 {
4494 const RefItemVector &xrefItems = xrefListItems();
4495 addRefItem(xrefItems,
4496 qualifiedName(),
4499 displayName(),
4500 QCString(),
4501 this
4502 );
4503 }
4504 for (const auto &mg : m_memberGroups)
4505 {
4506 mg->addListReferences(this);
4507 }
4508 for (auto &ml : m_memberLists)
4509 {
4510 if (ml->listType().isDetailed())
4511 {
4512 ml->addListReferences(this);
4513 }
4514 }
4515}
bool isLinkableInProject() const override
MemberLists m_memberLists
Definition classdef.cpp:501
QCString getOutputFileBase() const override
QCString displayName(bool includeScope=TRUE) const override
Definition classdef.cpp:986
CompoundType compoundType() const override
Returns the type of compound this is, i.e.
QCString qualifiedName() const override
const RefItemVector & xrefListItems() const override
virtual QCString trCompoundType(ClassDef::CompoundType compType, SrcLangExt lang)=0
Translator * theTranslator
Definition language.cpp:71
std::vector< RefItem * > RefItemVector
Definition reflist.h:133
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:5311

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

◆ addMembersToMemberGroup()

void ClassDefImpl::addMembersToMemberGroup ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1011 of file classdef.cpp.

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

4406{
4407 //printf("%s::addMembersToTemplateInstance(%s,%s)\n",qPrint(name()),qPrint(cd->name()),templSpec);
4408 for (const auto &mni : cd->memberNameInfoLinkedMap())
4409 {
4410 for (const auto &mi : *mni)
4411 {
4412 addMemberToTemplateInstance(mi->memberDef(),templateArguments,templSpec);
4413 }
4414 }
4415 // also instantatie members for nested classes
4416 for (const auto &innerCd : cd->getClasses())
4417 {
4418 ClassDefMutable *ncd = toClassDefMutable(m_innerClasses.find(innerCd->localName()));
4419 if (ncd)
4420 {
4421 ncd->addMembersToTemplateInstance(innerCd,cd->templateArguments(),templSpec);
4422 }
4423 }
4424}
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.
virtual void addMembersToTemplateInstance(const ClassDef *cd, const ArgumentList &templateArguments, const QCString &templSpec)=0
ClassDefMutable * toClassDefMutable(Definition *d)

References ClassDefMutable::addMembersToTemplateInstance(), addMemberToTemplateInstance(), ClassDef::getClasses(), m_innerClasses, ClassDef::memberNameInfoLinkedMap(), ClassDef::templateArguments(), templateArguments(), and toClassDefMutable().

◆ addMemberToList()

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

Definition at line 4559 of file classdef.cpp.

4560{
4561 AUTO_TRACE("{} md={} lt={} isBrief={}",name(),md->name(),lt,isBrief);
4562 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
4563 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
4564 const auto &ml = m_memberLists.get(lt,MemberListContainer::Class);
4565 ml->setNeedsSorting((isBrief && sortBriefDocs) || (!isBrief && sortMemberDocs));
4566 ml->push_back(md);
4567
4568 // for members in the declaration lists we set the section, needed for member grouping
4569 if (!ml->listType().isDetailed())
4570 {
4571 MemberDefMutable *mdm = toMemberDefMutable(md);
4572 if (mdm)
4573 {
4574 mdm->setSectionList(this,ml.get());
4575 }
4576 }
4577}
virtual const QCString & name() const =0
virtual void setSectionList(const Definition *container, const MemberList *sl)=0
MemberDefMutable * toMemberDefMutable(Definition *d)

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

Referenced by internalInsertMember().

◆ addMemberToTemplateInstance()

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

Implements ClassDefMutable.

Definition at line 4379 of file classdef.cpp.

4382{
4383 auto actualArguments_p = stringToArgumentList(getLanguage(),templSpec);
4384 auto imd = md->createTemplateInstanceMember(templateArguments,actualArguments_p);
4385 //printf("%s->setMemberClass(%p)\n",qPrint(imd->name()),this);
4386 auto mmd = toMemberDefMutable(imd.get());
4387 mmd->setMemberClass(this);
4388 mmd->setTemplateMaster(md);
4389 mmd->setDocumentation(md->documentation(),md->docFile(),md->docLine());
4390 mmd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine());
4391 mmd->setInbodyDocumentation(md->inbodyDocumentation(),md->inbodyFile(),md->inbodyLine());
4392 mmd->setMemberSpecifiers(md->getMemberSpecifiers());
4393 mmd->setMemberGroupId(md->getMemberGroupId());
4394 mmd->setArtificial(true);
4395 insertMember(imd.get());
4396 //printf("Adding member=%s %s%s to class %s templSpec %s\n",
4397 // imd->typeString(),qPrint(imd->name()),imd->argsString(),
4398 // qPrint(imd->getClassDef()->name()),templSpec);
4399 // insert imd in the list of all members
4400 //printf("Adding member=%s class=%s\n",qPrint(imd->name()),qPrint(name()));
4401 MemberName *mn = Doxygen::memberNameLinkedMap->add(imd->name());
4402 mn->push_back(std::move(imd));
4403}
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:814

References 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, MemberName::push_back(), stringToArgumentList(), templateArguments(), and toMemberDefMutable().

Referenced by addMembersToTemplateInstance().

◆ addQualifiers()

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

Implements ClassDefMutable.

Definition at line 5256 of file classdef.cpp.

5257{
5258 for (const auto &sx : qualifiers)
5259 {
5260 bool alreadyAdded = std::find(m_qualifiers.begin(), m_qualifiers.end(), sx) != m_qualifiers.end();
5261 if (!alreadyAdded)
5262 {
5263 m_qualifiers.push_back(sx);
5264 }
5265 }
5266}

References m_qualifiers.

◆ addTypeConstraint()

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

Definition at line 3383 of file classdef.cpp.

3384{
3385 //printf("addTypeConstraint(%s,%s)\n",qPrint(type),qPrint(typeConstraint));
3386 bool hideUndocRelation = Config_getBool(HIDE_UNDOC_RELATIONS);
3387 if (typeConstraint.isEmpty() || type.isEmpty()) return;
3388 SymbolResolver resolver(getFileDef());
3389 ClassDefMutable *cd = resolver.resolveClassMutable(this,typeConstraint);
3390 if (cd==nullptr && !hideUndocRelation)
3391 {
3392 cd = toClassDefMutable(
3393 Doxygen::hiddenClassLinkedMap->add(typeConstraint,
3394 std::unique_ptr<ClassDef>(
3395 new ClassDefImpl(
3397 getDefColumn(),
3398 typeConstraint,
3399 ClassDef::Class))));
3400 if (cd)
3401 {
3402 cd->setUsedOnly(TRUE);
3403 cd->setLanguage(getLanguage());
3404 //printf("Adding undocumented constraint '%s' to class %s on type %s\n",
3405 // qPrint(typeConstraint),qPrint(name()),qPrint(type));
3406 }
3407 }
3408 if (cd)
3409 {
3410 auto it = std::find_if(m_constraintClassList.begin(),
3412 [&cd](const auto &ccd) { return ccd.classDef==cd; });
3413
3414 if (it==m_constraintClassList.end())
3415 {
3416 m_constraintClassList.emplace_back(cd);
3417 it = m_constraintClassList.end()-1;
3418 }
3419 (*it).addAccessor(type);
3420 //printf("Adding constraint '%s' to class %s on type %s\n",
3421 // qPrint(typeConstraint),qPrint(name()),qPrint(type));
3422 }
3423}
FileDef * getFileDef() const override
Returns the namespace this compound is in, or 0 if it has a global scope.
ClassDefImpl(const QCString &fileName, int startLine, int startColumn, const QCString &name, CompoundType ct, const QCString &ref=QCString(), const QCString &fName=QCString(), bool isSymbol=TRUE, bool isJavaEnum=FALSE)
Definition classdef.cpp:797
ConstraintClassList m_constraintClassList
Definition classdef.cpp:481
virtual void setUsedOnly(bool b)=0
QCString getDefFileName() const override
virtual void setLanguage(SrcLangExt lang)=0
static ClassLinkedMap * hiddenClassLinkedMap
Definition doxygen.h:97

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

Referenced by addTypeConstraints().

◆ addTypeConstraints()

void ClassDefImpl::addTypeConstraints ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 3426 of file classdef.cpp.

3427{
3428 for (const Argument &a : m_tempArgs)
3429 {
3430 if (!a.typeConstraint.isEmpty())
3431 {
3432 QCString typeConstraint;
3433 int i=0,p=0;
3434 while ((i=a.typeConstraint.find('&',p))!=-1) // typeConstraint="A &I" for C<T extends A & I>
3435 {
3436 typeConstraint = a.typeConstraint.mid(p,i-p).stripWhiteSpace();
3437 addTypeConstraint(typeConstraint,a.type);
3438 p=i+1;
3439 }
3440 typeConstraint = a.typeConstraint.right(a.typeConstraint.length()-p).stripWhiteSpace();
3441 addTypeConstraint(typeConstraint,a.type);
3442 }
3443 }
3444}
void addTypeConstraint(const QCString &typeConstraint, const QCString &type)
ArgumentList m_tempArgs
Definition classdef.cpp:452
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:226
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition qcstring.h:245
QCString right(size_t len) const
Definition qcstring.h:219

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

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

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

4143{
4144 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
4145 bool umlLook = Config_getBool(UML_LOOK);
4146 if (prot==Protection::Private && !extractPrivate) return;
4147 //printf("%s::addUsedClass(%s,%s)\n",qPrint(name()),qPrint(cd->name()),accessName);
4148
4149 auto it = std::find_if(m_usesImplClassList.begin(),
4150 m_usesImplClassList.end(),
4151 [&cd](const auto &ucd) { return ucd.classDef==cd; });
4152 if (it==m_usesImplClassList.end())
4153 {
4154 m_usesImplClassList.emplace_back(cd);
4155 //printf("Adding used class %s to class %s via accessor %s\n",
4156 // qPrint(cd->name()),qPrint(name()),accessName);
4157 it = m_usesImplClassList.end()-1;
4158 }
4159 QCString acc = accessName;
4160 if (umlLook)
4161 {
4162 switch(prot)
4163 {
4164 case Protection::Public: acc.prepend("+"); break;
4165 case Protection::Private: acc.prepend("-"); break;
4166 case Protection::Protected: acc.prepend("#"); break;
4167 case Protection::Package: acc.prepend("~"); break;
4168 }
4169 }
4170 (*it).addAccessor(acc);
4171}
UsesClassList m_usesImplClassList
Definition classdef.cpp:478

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

◆ addUsedInterfaceClasses()

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

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

◆ anchor()

QCString ClassDefImpl::anchor ( ) const
overridevirtual

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

Implements Definition.

Definition at line 5180 of file classdef.cpp.

5181{
5182 QCString anc;
5184 {
5186 {
5187 // point to the template of which this class is an instance
5188 anc = m_templateMaster->getOutputFileBase();
5189 }
5190 else
5191 {
5192 anc = m_fileName;
5193 }
5194 }
5195 return anc;
5196}
bool m_implicitTemplateInstance
Definition classdef.cpp:555
bool isEmbeddedInOuterScope() const override
static bool generatingXmlOutput
Definition doxygen.h:136

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

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

◆ baseClasses()

const BaseClassList & ClassDefImpl::baseClasses ( ) const
overridevirtual

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

Implements ClassDef.

Definition at line 4935 of file classdef.cpp.

4936{
4937 return m_inherits;
4938}
BaseClassList m_inherits
Definition classdef.cpp:431

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

5086{
5087 return m_categoryOf;
5088}

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

4473{
4474 QCString name = m_className.isEmpty() ? localName() : m_className;
4475 auto lang = getLanguage();
4476 if (lang==SrcLangExt::CSharp)
4477 {
4479 }
4480 return name;
4481}
QCString m_className
Definition classdef.cpp:494
const QCString & localName() const override
QCString tempArgListToString(const ArgumentList &al, SrcLangExt lang, bool includeDefault)
Definition util.cpp:1246
QCString demangleCSharpGenericName(const QCString &name, const QCString &templArgs)
Definition util.cpp:7393

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

◆ codeSymbolType()

CodeSymbolType ClassDefImpl::codeSymbolType ( ) const
overridevirtual

Used for syntax highlighting symbol class

Implements Definition.

Definition at line 5359 of file classdef.cpp.

5360{
5361 switch (compoundType())
5362 {
5363 case Class: return CodeSymbolType::Class; break;
5364 case Struct: return CodeSymbolType::Struct; break;
5365 case Union: return CodeSymbolType::Union; break;
5366 case Interface: return CodeSymbolType::Interface; break;
5367 case Protocol: return CodeSymbolType::Protocol; break;
5368 case Category: return CodeSymbolType::Category; break;
5369 case Exception: return CodeSymbolType::Exception; break;
5370 case Service: return CodeSymbolType::Service; break;
5371 case Singleton: return CodeSymbolType::Singleton; break;
5372 }
5373 return CodeSymbolType::Class;
5374}
@ 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 5339 of file classdef.cpp.

5340{
5341 return m_collabFileName;
5342}

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

4931{
4932 return m_compType;
4933}

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

1343{
1344 for (auto &ml : m_memberLists)
1345 {
1346 if (!ml->listType().isDetailed())
1347 {
1348 ml->setAnchors();
1349 }
1350 }
1351
1352 for (const auto &mg : m_memberGroups)
1353 {
1354 mg->setAnchors();
1355 }
1356}

References m_memberGroups, and m_memberLists.

◆ containsOverload()

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

Implements ClassDef.

Definition at line 5273 of file classdef.cpp.

5274{
5275 AUTO_TRACE("name={}",md->name());
5276 const auto &mni = m_allMemberNameInfoLinkedMap.find(md->name());
5277 if (mni)
5278 {
5279 for (const auto &mi : *mni)
5280 {
5281 const MemberDef *classMd = mi->memberDef();
5282 const ArgumentList &classAl = classMd->argumentList();
5283 const ArgumentList &al = md->argumentList();
5284 bool found = matchArguments2(
5285 classMd->getOuterScope(),classMd->getFileDef(),&classAl,
5286 md->getOuterScope(),md->getFileDef(),&al,
5287 true,getLanguage()
5288 );
5289 if (found)
5290 {
5291 AUTO_TRACE_EXIT("true");
5292 return true;
5293 }
5294 }
5295 }
5296 AUTO_TRACE_EXIT("false");
5297 return false;
5298}
MemberNameInfoLinkedMap m_allMemberNameInfoLinkedMap
Definition classdef.cpp:449
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual Definition * getOuterScope() const =0
virtual const FileDef * getFileDef() const =0
virtual const ArgumentList & argumentList() const =0
bool found
Definition util.cpp:984
bool matchArguments2(const Definition *srcScope, const FileDef *srcFileScope, const ArgumentList *srcAl, const Definition *dstScope, const FileDef *dstFileScope, const ArgumentList *dstAl, bool checkCV, SrcLangExt lang)
Definition util.cpp:1958

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

◆ countAdditionalInheritedMembers()

int ClassDefImpl::countAdditionalInheritedMembers ( ) const
private

Definition at line 4730 of file classdef.cpp.

4731{
4732 int totalCount=0;
4733 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4734 {
4735 if (lde->kind()==LayoutDocEntry::MemberDecl)
4736 {
4737 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4738 if (lmd && lmd->type!=MemberListType::Friends()) // friendship is not inherited
4739 {
4740 ClassDefSet visited;
4741 totalCount+=countInheritedDecMembers(lmd->type,this,TRUE,FALSE,visited);
4742 }
4743 }
4744 }
4745 //printf("countAdditionalInheritedMembers()=%d\n",totalCount);
4746 return totalCount;
4747}
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:1435
std::unordered_set< const ClassDef * > ClassDefSet
Definition classdef.h:95
MemberListType type
Definition layout.h:118

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

Referenced by endMemberDeclarations().

◆ countInheritanceNodes()

int ClassDefImpl::countInheritanceNodes ( ) const
private

Definition at line 1819 of file classdef.cpp.

1820{
1822}
int countInheritsNodes() const
int countInheritedByNodes() const

References countInheritedByNodes(), and countInheritsNodes().

Referenced by writeInheritanceGraph().

◆ countInheritedByNodes()

int ClassDefImpl::countInheritedByNodes ( ) const
private

Definition at line 1797 of file classdef.cpp.

1798{
1799 int count=0;
1800 for (const auto &ibcd : m_inheritedBy)
1801 {
1802 const ClassDef *icd=ibcd.classDef;
1803 if ( icd->isVisibleInHierarchy()) count++;
1804 }
1805 return count;
1806}
virtual bool isVisibleInHierarchy() const =0
the class is visible in a class diagram, or class hierarchy
BaseClassList m_inheritedBy
Definition classdef.cpp:435

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

4676{
4677 int inhCount = 0;
4678 int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
4679 bool process = count>0;
4680 //printf("%s: countInheritedDecMembers: lt=%s process=%d count=%d invert=%d\n",
4681 // qPrint(name()),lt.to_string(),process,count,invert);
4682 if ((process^invert) || showAlways)
4683 {
4684 for (const auto &ibcd : m_inherits)
4685 {
4686 ClassDefMutable *icd = toClassDefMutable(ibcd.classDef);
4687 MemberListType lt1 = MemberListType::Invalid();
4688 MemberListType lt2 = MemberListType::Invalid();
4689 if (icd && icd->isLinkable())
4690 {
4691 convertProtectionLevel(lt,ibcd.prot,&lt1,&lt2);
4692 //printf("%s: convert %s->(%s,%s) prot=%d\n",
4693 // qPrint(icd->name()),lt.to_string(),lt1.to_string(),lt2.to_string(),ibcd.prot);
4694 if (visitedClasses.find(icd)==visitedClasses.end())
4695 {
4696 visitedClasses.insert(icd); // guard for multiple virtual inheritance
4697 if (!lt1.isInvalid())
4698 {
4699 inhCount+=icd->countMemberDeclarations(lt1,inheritedFrom,lt2,FALSE,TRUE,visitedClasses);
4700 }
4701 }
4702 }
4703 }
4704 }
4705 //printf("%s: count=%d\n",qPrint(name()),inhCount);
4706 return inhCount;
4707}
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
static MemberListType Invalid()
Definition types.h:371
constexpr bool isInvalid() const
Definition types.h:372
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:6699

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

Referenced by countAdditionalInheritedMembers(), and countMemberDeclarations().

◆ countInheritsNodes()

int ClassDefImpl::countInheritsNodes ( ) const
private

Definition at line 1808 of file classdef.cpp.

1809{
1810 int count=0;
1811 for (const auto &ibcd : m_inherits)
1812 {
1813 const ClassDef *icd=ibcd.classDef;
1814 if ( icd->isVisibleInHierarchy()) count++;
1815 }
1816 return count;
1817}

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

4597{
4598 //printf("%s: countMemberDeclarations for %s and %s\n",qPrint(name()),lt.to_string(),lt2.to_string());
4599 int count=0;
4600 MemberList * ml = getMemberList(lt);
4601 MemberList * ml2 = getMemberList(lt2);
4602 if (getLanguage()!=SrcLangExt::VHDL) // use specific declarations function
4603 {
4604 if (ml)
4605 {
4606 count+=ml->numDecMembers(inheritedFrom);
4607 //printf("-> ml=%d\n",ml->numDecMembers());
4608 }
4609 if (ml2)
4610 {
4611 count+=ml2->numDecMembers(inheritedFrom);
4612 //printf("-> ml2=%d\n",ml2->numDecMembers());
4613 }
4614 // also include grouped members that have their own section in the class (see bug 722759)
4615 if (inheritedFrom)
4616 {
4617 for (const auto &mg : m_memberGroups)
4618 {
4619 count+=mg->countGroupedInheritedMembers(lt);
4620 if (!lt2.isInvalid()) count+=mg->countGroupedInheritedMembers(lt2);
4621 }
4622 }
4623 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
4624 if (!inlineInheritedMembers) // show inherited members as separate lists
4625 {
4626 count+=countInheritedDecMembers(lt,inheritedFrom,invert,showAlways,visitedClasses);
4627 }
4628 }
4629 //printf("-> %d\n",count);
4630 return count;
4631}
MemberList * getMemberList(MemberListType lt) const override
Returns the members in the list identified by lt.
int numDecMembers(const ClassDef *inheritedFrom) const
Definition memberlist.h:117

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

4660{
4661 for (auto &ml : m_memberLists)
4662 {
4663 ml->countDecMembers();
4664 ml->countDocMembers();
4665 }
4666 for (const auto &mg : m_memberGroups)
4667 {
4668 mg->countDecMembers();
4669 mg->countDocMembers();
4670 }
4671}

References m_memberGroups, and m_memberLists.

◆ countMembersIncludingGrouped()

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

Implements ClassDef.

Definition at line 4766 of file classdef.cpp.

4768{
4769 int count=0;
4770 MemberList *ml = getMemberList(lt);
4771 if (ml)
4772 {
4773 count=ml->countInheritableMembers(inheritedFrom);
4774 }
4775 //printf("%s:countMembersIncludingGrouped: count=%d\n",qPrint(name()),count);
4776 for (const auto &mg : m_memberGroups)
4777 {
4778 bool hasOwnSection = !mg->allMembersInSameSection() ||
4779 !m_subGrouping; // group is in its own section
4780 if ((additional && hasOwnSection) || (!additional && !hasOwnSection))
4781 {
4782 count+=mg->countGroupedInheritedMembers(lt);
4783 }
4784 }
4785 //printf("%s:countMembersIncludingGrouped(lt=%s,%s)=%d\n",
4786 // qPrint(name()),qPrint(lt.to_string()),ml?qPrint(ml->listType().to_string()):"<none>",count);
4787 return count;
4788}
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 859 of file classdef.cpp.

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

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

◆ definitionType()

DefType ClassDefImpl::definitionType ( ) const
inlineoverridevirtual

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

Implements Definition.

Definition at line 192 of file classdef.cpp.

192{ return TypeClass; }

References Definition::TypeClass.

◆ displayName()

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

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

Implements Definition.

Definition at line 986 of file classdef.cpp.

987{
988 return makeDisplayName(this,includeScope);
989}
static QCString makeDisplayName(const ClassDef *cd, bool includeScope)
Definition classdef.cpp:107

References makeDisplayName().

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

◆ distributeMemberGroupDocumentation()

void ClassDefImpl::distributeMemberGroupDocumentation ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1358 of file classdef.cpp.

1359{
1360 for (const auto &mg : m_memberGroups)
1361 {
1362 mg->distributeMemberGroupDocumentation();
1363 }
1364}

References m_memberGroups.

◆ endMemberDeclarations()

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

Definition at line 2214 of file classdef.cpp.

2215{
2216 //printf("%s: ClassDefImpl::endMemberDeclarations()\n",qPrint(name()));
2217 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
2218 if (!inlineInheritedMembers && countAdditionalInheritedMembers()>0)
2219 {
2220 ol.startMemberHeader("inherited");
2222 ol.endMemberHeader();
2224 }
2225 ol.endMemberSections();
2226}
int countAdditionalInheritedMembers() const
void writeAdditionalInheritedMembers(OutputList &ol) const
void endMemberHeader()
Definition outputlist.h:472
void parseText(const QCString &textStr)
void startMemberHeader(const QCString &anchor, int typ=2)
Definition outputlist.h:470
void endMemberSections()
Definition outputlist.h:464
virtual QCString trAdditionalInheritedMembers()=0

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

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ endMemberDocumentation()

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

Definition at line 2198 of file classdef.cpp.

2199{
2200 //printf("%s: ClassDefImpl::endMemberDocumentation()\n",qPrint(name()));
2201 if (Config_getBool(SEPARATE_MEMBER_PAGES))
2202 {
2205 }
2206}
static bool suppressDocWarnings
Definition doxygen.h:132
void enable(OutputType o)

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

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ findInnerCompound()

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

Implements Definition.

Definition at line 4296 of file classdef.cpp.

4297{
4298 return m_innerClasses.find(name);
4299}

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

◆ findSectionsInDocumentation()

void ClassDefImpl::findSectionsInDocumentation ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1366 of file classdef.cpp.

1367{
1371 for (const auto &mg : m_memberGroups)
1372 {
1373 mg->findSectionsInDocumentation(this);
1374 }
1375 for (auto &ml : m_memberLists)
1376 {
1377 if (!ml->listType().isDetailed())
1378 {
1379 ml->findSectionsInDocumentation(this);
1380 }
1381 }
1382}
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 1687 of file classdef.cpp.

1688{
1689 QCString result;
1690 SrcLangExt lang = getLanguage();
1691 size_t numFiles = m_files.size();
1692 if (lang==SrcLangExt::Fortran)
1693 {
1695 getLanguage()==SrcLangExt::ObjC && m_compType==Interface ? Class : m_compType,
1696 numFiles==1);
1697 }
1698 else if (isJavaEnum())
1699 {
1700 result = theTranslator->trEnumGeneratedFromFiles(numFiles==1);
1701 }
1702 else if (m_compType==Service)
1703 {
1704 result = theTranslator->trServiceGeneratedFromFiles(numFiles==1);
1705 }
1706 else if (m_compType==Singleton)
1707 {
1708 result = theTranslator->trSingletonGeneratedFromFiles(numFiles==1);
1709 }
1710 else
1711 {
1713 getLanguage()==SrcLangExt::ObjC && m_compType==Interface ? Class : m_compType,
1714 numFiles==1);
1715 }
1716 return result;
1717}
virtual QCString trServiceGeneratedFromFiles(bool single)=0
virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, bool single)=0
virtual QCString trSingletonGeneratedFromFiles(bool single)=0
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool single)=0
virtual QCString trEnumGeneratedFromFiles(bool single)=0

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

Referenced by showUsedFiles().

◆ getClasses()

ClassLinkedRefMap ClassDefImpl::getClasses ( ) const
overridevirtual

returns the classes nested into this class

Implements ClassDef.

Definition at line 4925 of file classdef.cpp.

4926{
4927 return m_innerClasses;
4928}

References m_innerClasses.

◆ getExamples()

const ExampleList & ClassDefImpl::getExamples ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5319 of file classdef.cpp.

5320{
5321 return m_examples;
5322}

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

4981{
4982 return m_fileDef;
4983}

References m_fileDef.

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

◆ getInstanceOutputFileBase()

QCString ClassDefImpl::getInstanceOutputFileBase ( ) const
overridevirtual

Implements ClassDef.

Definition at line 4249 of file classdef.cpp.

4250{
4251 return m_fileName;
4252}

References m_fileName.

◆ getMemberByName()

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

Returns the member with the given name.

Implements ClassDef.

Definition at line 4517 of file classdef.cpp.

4518{
4519 const MemberDef *xmd = nullptr;
4520 const MemberNameInfo *mni = m_allMemberNameInfoLinkedMap.find(name);
4521 if (mni)
4522 {
4523 const int maxInheritanceDepth = 100000;
4524 int mdist=maxInheritanceDepth;
4525 for (auto &mi : *mni)
4526 {
4527 const ClassDef *mcd=mi->memberDef()->getClassDef();
4528 int m=minClassDistance(this,mcd);
4529 //printf("found member in %s linkable=%d m=%d\n",
4530 // qPrint(mcd->name()),mcd->isLinkable(),m);
4531 if (m<mdist)
4532 {
4533 mdist=m;
4534 xmd=mi->memberDef();
4535 }
4536 }
4537 }
4538 //printf("getMemberByName(%s)=%p\n",qPrint(name),xmd);
4539 return xmd;
4540}
int minClassDistance(const ClassDef *cd, const ClassDef *bcd, int level)
const int maxInheritanceDepth
Definition util.cpp:156

References m_allMemberNameInfoLinkedMap, maxInheritanceDepth, 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 5095 of file classdef.cpp.

5096{
5097 return m_memberGroups;
5098}

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

4548{
4549 for (auto &ml : m_memberLists)
4550 {
4551 if (ml->listType()==lt)
4552 {
4553 return ml.get();
4554 }
4555 }
4556 return nullptr;
4557}

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

982{
984}

References m_memberListFileName.

Referenced by 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 5090 of file classdef.cpp.

5091{
5092 return m_memberLists;
5093}

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

4986{
4987 return m_moduleDef;
4988}

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

4212{
4213 bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
4214 bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
4216 {
4217 Definition *scope=nullptr;
4218 if (inlineGroupedClasses && !partOfGroups().empty())
4219 {
4220 // point to the group that embeds this class
4221 return partOfGroups().front()->getOutputFileBase();
4222 }
4223 else if (inlineSimpleClasses && m_isSimple && !partOfGroups().empty())
4224 {
4225 // point to simple struct inside a group
4226 return partOfGroups().front()->getOutputFileBase();
4227 }
4228 else if (inlineSimpleClasses && m_isSimple && (scope=getOuterScope()))
4229 {
4230 if (scope==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) // simple struct embedded in file
4231 {
4232 return getFileDef()->getOutputFileBase();
4233 }
4234 else if (scope->isLinkableInProject()) // simple struct embedded in other container (namespace/group/class)
4235 {
4236 return getOuterScope()->getOutputFileBase();
4237 }
4238 }
4239 }
4240 AUTO_TRACE("name='{}' m_templateMaster={} m_implicitTemplateInstance={}",name(),(void*)m_templateMaster,m_implicitTemplateInstance);
4242 {
4243 // point to the template of which this class is an instance
4244 return m_templateMaster->getOutputFileBase();
4245 }
4246 return m_fileName;
4247}
virtual bool isLinkableInProject() const =0
virtual QCString getOutputFileBase() const =0
Definition * getOuterScope() const override
const GroupList & partOfGroups() const override
static NamespaceDefMutable * globalScope
Definition doxygen.h:121

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

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

◆ getQualifiers()

StringVector ClassDefImpl::getQualifiers ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5268 of file classdef.cpp.

5269{
5270 return m_qualifiers;
5271}

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

4427{
4429 {
4430 return m_templateMaster->getReference();
4431 }
4432 else
4433 {
4435 }
4436}
QCString getReference() const override

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

Referenced by writeDeclarationLink(), and writeMemberList().

◆ getSourceFileBase()

QCString ClassDefImpl::getSourceFileBase ( ) const
overridevirtual

Returns the name of the source listing of this definition.

Implements Definition.

Definition at line 4254 of file classdef.cpp.

4255{
4257 {
4258 return m_templateMaster->getSourceFileBase();
4259 }
4260 else
4261 {
4263 }
4264}
QCString getSourceFileBase() const override

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

◆ getTemplateBaseClassNames()

const TemplateNameMap & ClassDefImpl::getTemplateBaseClassNames ( ) const
overridevirtual

Implements ClassDef.

Definition at line 4374 of file classdef.cpp.

4375{
4376 return m_templBaseClassNames;
4377}

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

4991{
4992 return m_templateInstances;
4993}

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

4451{
4452 ArgumentLists result;
4453 Definition *d=getOuterScope();
4454 while (d && d->definitionType()==Definition::TypeClass)
4455 {
4456 result.insert(result.begin(),toClassDef(d)->templateArguments());
4457 d = d->getOuterScope();
4458 }
4459 if (!templateArguments().empty())
4460 {
4461 result.push_back(templateArguments());
4462 }
4463 return result;
4464}
std::vector< ArgumentList > ArgumentLists
Definition arguments.h:145

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

4711{
4712 SrcLangExt lang = getLanguage();
4713 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4714 {
4715 if (lde->kind()==LayoutDocEntry::MemberDecl)
4716 {
4717 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4718 if (lmd && lmd->type==type)
4719 {
4720 title = lmd->title(lang);
4721 subtitle = lmd->subtitle(lang);
4722 return;
4723 }
4724 }
4725 }
4726 title="";
4727 subtitle="";
4728}
QCString title() const override
QCString title(SrcLangExt lang) const
Definition layout.cpp:1786
QCString subtitle(SrcLangExt lang) const
Definition layout.cpp:1791

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

5382{
5384}

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

1642{
1643 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
1644 bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
1645 return ((!briefDescription().isEmpty() && repeatBrief) ||
1646 (!documentation().isEmpty() || m_tempArgs.hasTemplateDocumentation()) ||
1647 (sourceBrowser && getStartBodyLine()!=-1 && getBodyDef()));
1648}
virtual int getStartBodyLine() const =0

References DefinitionMixin< ClassDefMutable >::briefDescription(), Config_getBool, DefinitionMixin< ClassDefMutable >::documentation(), DefinitionMixin< ClassDefMutable >::getBodyDef(), DefinitionMixin< ClassDefMutable >::getStartBodyLine(), 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 3628 of file classdef.cpp.

3629{
3631}
bool hasDocumentation() const override

References DefinitionMixin< Base >::hasDocumentation().

Referenced by isLinkableInProject(), and isVisibleInHierarchy().

◆ hasExamples()

bool ClassDefImpl::hasExamples ( ) const
overridevirtual

Implements ClassDef.

Definition at line 3378 of file classdef.cpp.

3379{
3380 return !m_examples.empty();
3381}

References m_examples.

Referenced by writeDetailedDocumentationBody(), and writeDocumentationContents().

◆ hasInheritanceGraph()

CLASS_GRAPH_t ClassDefImpl::hasInheritanceGraph ( ) const
overridevirtual

Implements ClassDefMutable.

Definition at line 5354 of file classdef.cpp.

5355{
5357}

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

3496{
3497 return hasNonReferenceSuperClassRec(this,0);
3498}
static bool hasNonReferenceSuperClassRec(const ClassDef *cd, int level)

References hasNonReferenceSuperClassRec().

Referenced by isVisibleInHierarchy().

◆ hideDerivedVariablesInPython()

void ClassDefImpl::hideDerivedVariablesInPython ( ClassDefMutable * cls)
private

Definition at line 3936 of file classdef.cpp.

3937{
3938 //printf("hideDerivedVariableInPython()\n");
3939 if (bClass)
3940 {
3941 const MemberNameInfoLinkedMap &srcMnd = bClass->memberNameInfoLinkedMap();
3942 MemberNameInfoLinkedMap &dstMnd = m_allMemberNameInfoLinkedMap;
3943
3944 // recurse up the inheritance hierarchy
3945 for (const auto &bcd : bClass->baseClasses())
3946 {
3948 }
3949
3950 for (auto &srcMni : srcMnd) // for each member in a base class
3951 {
3952 //printf(" candidate(%s)\n",qPrint(srcMni->memberName()));
3953 MemberNameInfo *dstMni=dstMnd.find(srcMni->memberName());
3954 if (dstMni) // that is also in this class
3955 {
3957 //printf("%s member in %s and %s\n",qPrint(name()),qPrint(bClass->name()),qPrint(name()));
3958 for (it=dstMni->begin();it!=dstMni->end();)
3959 {
3960 MemberDefMutable *dstMd = toMemberDefMutable((*it)->memberDef());
3961 if (dstMd && dstMd->isVariable() && !dstMd->name().startsWith("__"))
3962 {
3963 //printf(" hiding member %s\n",qPrint(dstMd->name()));
3964 // hide a member variable if it is already defined in a base class, unless
3965 // it is a __private variable
3966 removeMemberFromLists(dstMd);
3967 it = dstMni->erase(it);
3968 }
3969 else
3970 {
3971 ++it;
3972 }
3973 }
3974 if (dstMni->empty()) // if the list has become empty, remove the entry from the dictionary
3975 {
3976 dstMnd.del(srcMni->memberName());
3977 }
3978 }
3979 }
3980 }
3981}
void hideDerivedVariablesInPython(ClassDefMutable *cls)
void removeMemberFromLists(MemberDef *md) override
bool del(const QCString &key)
Definition linkedmap.h:183
const T * find(const std::string &key) const
Definition linkedmap.h:47
virtual bool isVariable() const =0
bool empty() const
Definition membername.h:135
iterator begin()
Definition membername.h:131
iterator end()
Definition membername.h:132
typename Vec::iterator iterator
Definition membername.h:125
iterator erase(iterator pos)
Definition membername.h:142
bool startsWith(const char *s) const
Definition qcstring.h:492

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

5016{
5017 return m_incInfo.get();
5018}

References m_incInfo.

◆ inheritanceGraphFileName()

QCString ClassDefImpl::inheritanceGraphFileName ( ) const
overridevirtual

returns the file name to use for the inheritance graph

Implements ClassDef.

Definition at line 5344 of file classdef.cpp.

5345{
5346 return m_inheritFileName;
5347}

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

994{
995 //printf("*** insert base class %s into %s\n",qPrint(cd->name()),qPrint(name()));
996 m_inherits.emplace_back(cd,n,p,s,t);
998}

References FALSE, m_inherits, and m_isSimple.

Referenced by mergeCategory().

◆ insertExplicitTemplateInstance()

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

Implements ClassDefMutable.

Definition at line 4364 of file classdef.cpp.

4365{
4366 m_templateInstances.emplace_back(templSpec,templateClass);
4367}

References m_templateInstances.

◆ insertMember()

void ClassDefImpl::insertMember ( MemberDef * md)
overridevirtual

Implements ClassDefMutable.

Definition at line 1336 of file classdef.cpp.

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

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

Referenced by addMemberToTemplateInstance(), and reclassifyMember().

◆ insertSubClass()

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

Implements ClassDefMutable.

Definition at line 1001 of file classdef.cpp.

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

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

◆ insertTemplateInstance()

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

Implements ClassDefMutable.

Definition at line 4301 of file classdef.cpp.

4303{
4304 freshInstance = FALSE;
4305 auto it = std::find_if(m_templateInstances.begin(),
4306 m_templateInstances.end(),
4307 [&templSpec](const auto &ti) { return templSpec==ti.templSpec; });
4308 ClassDefMutable *templateClass=nullptr;
4309 if (it!=m_templateInstances.end())
4310 {
4311 templateClass = toClassDefMutable((*it).classDef);
4312 }
4313 if (templateClass==nullptr)
4314 {
4315 QCString tcname = removeRedundantWhiteSpace(name()+templSpec);
4316 AUTO_TRACE("New template instance class name='{}' templSpec='{}' inside '{}' hidden={}",
4317 name(),templSpec,name(),isHidden());
4318
4319 ClassDef *foundCd = Doxygen::classLinkedMap->find(tcname);
4320 if (foundCd)
4321 {
4322 return foundCd;
4323 }
4324 templateClass =
4326 Doxygen::classLinkedMap->add(tcname,
4327 std::unique_ptr<ClassDef>(
4328 new ClassDefImpl(fileName,startLine,startColumn,tcname,ClassDef::Class))));
4329 if (templateClass)
4330 {
4331 templateClass->setTemplateMaster(this);
4332 ArgumentList tal = *stringToArgumentList(getLanguage(),templSpec);
4333 templateClass->setTemplateArguments(tal);
4334 templateClass->setOuterScope(getOuterScope());
4335 templateClass->setHidden(isHidden());
4336 templateClass->setArtificial(isArtificial());
4337 templateClass->setImplicitTemplateInstance(true);
4338 m_templateInstances.emplace_back(templSpec,templateClass);
4339
4340 // also add nested classes
4341 for (const auto &innerCd : m_innerClasses)
4342 {
4343 QCString innerName = tcname+"::"+innerCd->localName();
4344 ClassDefMutable *innerClass =
4346 Doxygen::classLinkedMap->add(innerName,
4347 std::unique_ptr<ClassDef>(
4348 new ClassDefImpl(fileName,startLine,startColumn,innerName,ClassDef::Class))));
4349 if (innerClass)
4350 {
4351 templateClass->addInnerCompound(innerClass);
4352 innerClass->setOuterScope(templateClass);
4353 innerClass->setHidden(isHidden());
4354 innerClass->setArtificial(TRUE);
4355 innerClass->setImplicitTemplateInstance(true);
4356 }
4357 }
4358 freshInstance=TRUE;
4359 }
4360 }
4361 return templateClass;
4362}
virtual void setTemplateArguments(const ArgumentList &al)=0
virtual void setTemplateMaster(const ClassDef *tm)=0
virtual void setImplicitTemplateInstance(bool b)=0
virtual void setHidden(bool b)=0
virtual void addInnerCompound(Definition *d)=0
virtual void setArtificial(bool b)=0

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

◆ insertUsedFile()

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

Implements ClassDefMutable.

Definition at line 1386 of file classdef.cpp.

1387{
1388 if (fd==nullptr) return;
1389 auto it = std::find(m_files.begin(),m_files.end(),fd);
1390 if (it==m_files.end())
1391 {
1392 m_files.push_back(fd);
1393 }
1394 for (const auto &ti : m_templateInstances)
1395 {
1396 ClassDefMutable *cdm = toClassDefMutable(ti.classDef);
1397 if (cdm)
1398 {
1399 cdm->insertUsedFile(fd);
1400 }
1401 }
1402}
virtual void insertUsedFile(const FileDef *)=0

References ClassDefMutable::insertUsedFile(), m_files, m_templateInstances, and toClassDefMutable().

◆ internalInsertMember()

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

isReference()

Definition at line 1033 of file classdef.cpp.

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

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

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

◆ isAbstract()

bool ClassDefImpl::isAbstract ( ) const
overridevirtual

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

Implements ClassDef.

Definition at line 5040 of file classdef.cpp.

5041{
5042 return m_isAbstract || m_spec.isAbstract();
5043}

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

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

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

◆ isBaseClass()

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

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

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

Implements ClassDef.

Definition at line 3638 of file classdef.cpp.

3639{
3640 int distance=0;
3641 //printf("isBaseClass(cd=%s) looking for %s templSpec=%s\n",qPrint(name()),qPrint(bcd->name()),qPrint(templSpec));
3642 for (const auto &bclass : baseClasses())
3643 {
3644 const ClassDef *ccd = bclass.classDef;
3645 if (!followInstances && ccd->templateMaster())
3646 {
3647 ccd=ccd->templateMaster();
3648 }
3649 if (ccd==bcd && (templSpec.isEmpty() || templSpec==bclass.templSpecifiers))
3650 {
3651 distance=1;
3652 break; // no shorter path possible
3653 }
3654 else
3655 {
3656 int d = ccd->isBaseClass(bcd,followInstances,templSpec);
3657 if (d>256)
3658 {
3659 err("Possible recursive class relation while inside {} and looking for base class {}\n",name(),bcd->name());
3660 return 0;
3661 }
3662 else if (d>0) // path found
3663 {
3664 if (distance==0 || d+1<distance) // update if no path found yet or shorter path found
3665 {
3666 distance=d+1;
3667 }
3668 }
3669 }
3670 }
3671 return distance;
3672}
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 5080 of file classdef.cpp.

5081{
5082 return getLanguage()==SrcLangExt::CSharp;
5083}

References DefinitionMixin< ClassDefMutable >::getLanguage().

◆ isEmbeddedInOuterScope()

bool ClassDefImpl::isEmbeddedInOuterScope ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5198 of file classdef.cpp.

5199{
5200 bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
5201 bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
5202
5203 Definition *container = getOuterScope();
5204
5205 bool containerLinkable =
5206 container &&
5207 (
5208 (container==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) || // global class in documented file
5209 container->isLinkableInProject() // class in documented scope
5210 );
5211
5212 // inline because of INLINE_GROUPED_CLASSES=YES ?
5213 bool b1 = (inlineGroupedClasses && !partOfGroups().empty()); // a grouped class
5214 // inline because of INLINE_SIMPLE_STRUCTS=YES ?
5215 bool b2 = (inlineSimpleClasses && m_isSimple && // a simple class
5216 (containerLinkable || // in a documented container
5217 !partOfGroups().empty() // or part of a group
5218 )
5219 );
5220 //printf("%s::isEmbeddedInOuterScope(): inlineGroupedClasses=%d "
5221 // "inlineSimpleClasses=%d partOfGroups()=%p m_isSimple=%d "
5222 // "getOuterScope()=%s b1=%d b2=%d\n",
5223 // qPrint(name()),inlineGroupedClasses,inlineSimpleClasses,
5224 // partOfGroups().pointer(),m_isSimple,getOuterScope()?qPrint(getOuterScope()->name()):"<none>",b1,b2);
5225 return b1 || b2; // either reason will do
5226}

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

Referenced by anchor().

◆ isExtension()

bool ClassDefImpl::isExtension ( ) const
overridevirtual

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

Implements ClassDef.

Definition at line 5300 of file classdef.cpp.

5301{
5302 QCString n = name();
5303 int si = n.find('(');
5304 int ei = n.find(')');
5305 bool b = ei>si && n.mid(si+1,ei-si-1).stripWhiteSpace().isEmpty();
5306 return b;
5307}
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43

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

5046{
5047 return m_spec.isFinal();
5048}

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

5076{
5077 return getLanguage()==SrcLangExt::Fortran;
5078}

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

5061{
5062 return m_spec.isForwardDecl();
5063}

References m_spec.

◆ isImplicitTemplateInstance()

bool ClassDefImpl::isImplicitTemplateInstance ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5000 of file classdef.cpp.

5001{
5003}

References m_implicitTemplateInstance.

◆ isInterface()

bool ClassDefImpl::isInterface ( ) const
overridevirtual

Returns TRUE if this class represents an interface.

Implements ClassDef.

Definition at line 5065 of file classdef.cpp.

5066{
5067 return m_spec.isInterface();
5068}

References m_spec.

◆ isJavaEnum()

bool ClassDefImpl::isJavaEnum ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5246 of file classdef.cpp.

5247{
5248 return m_isJavaEnum;
5249}

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

3591{
3593 {
3594 return m_templateMaster->isLinkable();
3595 }
3596 else
3597 {
3598 return isReference() || isLinkableInProject();
3599 }
3600}
bool isReference() const override

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

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

◆ isLinkableInProject()

bool ClassDefImpl::isLinkableInProject ( ) const
overridevirtual

a link to this class is possible within this project

Implements Definition.

Definition at line 3558 of file classdef.cpp.

3559{
3560 bool extractLocal = Config_getBool(EXTRACT_LOCAL_CLASSES);
3561 bool extractStatic = Config_getBool(EXTRACT_STATIC);
3562 bool hideUndoc = Config_getBool(HIDE_UNDOC_CLASSES);
3564 {
3565 return m_templateMaster->isLinkableInProject();
3566 }
3567 else
3568 {
3569 //printf("%s::isLinkableInProject() conditions: artificial=%d hidden=%d anonymous=%d protection=%d local=%d docs=%d static=%d ref=%d\n",
3570 // qPrint(name()),
3571 // !isArtificial(),
3572 // !isHidden(),
3573 // !isAnonymous(),
3574 // m_prot,
3575 // !m_isLocal || extractLocal,
3576 // hasDocumentation() || m_tempArgs.hasTemplateDocumentation() || !hideUndoc,
3577 // !m_isStatic || extractStatic,
3578 // !isReference());
3579 return
3580 !isArtificial() && !isHidden() && /* not hidden */
3581 !isAnonymous() && /* not anonymous */
3582 protectionLevelVisible(m_prot) && /* private/internal */
3583 (!m_isLocal || extractLocal) && /* local */
3584 (hasDocumentation() || m_tempArgs.hasTemplateDocumentation() || !hideUndoc) && /* documented */
3585 (!m_isStatic || extractStatic) && /* static */
3586 !isReference(); /* not an external reference */
3587 }
3588}
bool hasDocumentation() const override

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

Referenced by addListReferences(), 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 4920 of file classdef.cpp.

4921{
4922 return m_isLocal;
4923}

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

5071{
5072 return getLanguage()==SrcLangExt::ObjC;
5073}

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

5056{
5057 return m_spec.isPublished();
5058}

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

4439{
4441 {
4442 return m_templateMaster->isReference();
4443 }
4444 else
4445 {
4447 }
4448}
bool isReference() const override

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

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

◆ isSealed()

bool ClassDefImpl::isSealed ( ) const
overridevirtual

Returns TRUE if this class is marked as sealed.

Implements ClassDef.

Definition at line 5050 of file classdef.cpp.

5051{
5052 return m_spec.isSealed();
5053}

References m_spec.

Referenced by addClassAttributes().

◆ isSimple()

bool ClassDefImpl::isSimple ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5160 of file classdef.cpp.

5161{
5162 return m_isSimple;
5163}

References m_isSimple.

Referenced by internalInsertMember(), and writeInlineDocumentation().

◆ isSliceLocal()

bool ClassDefImpl::isSliceLocal ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5329 of file classdef.cpp.

5330{
5331 return m_spec.isLocal();
5332}

References m_spec.

Referenced by title(), and writeDeclarationLink().

◆ isSmartPointer()

const MemberDef * ClassDefImpl::isSmartPointer ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5165 of file classdef.cpp.

5166{
5167 return m_arrowOperator;
5168}

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

3677{
3678 bool found=FALSE;
3679 if (level>256)
3680 {
3681 err("Possible recursive class relation while inside {} and looking for derived class {}\n",name(),cd->name());
3682 return FALSE;
3683 }
3684 for (const auto &iscd : subClasses())
3685 {
3686 ClassDef *ccd=iscd.classDef;
3687 found = (ccd==cd) || ccd->isSubClass(cd,level+1);
3688 if (found) break;
3689 }
3690 return found;
3691}
virtual bool isSubClass(ClassDef *bcd, int level=0) const =0
Returns TRUE iff bcd is a direct or indirect sub class of this class.
const BaseClassList & subClasses() const override
Returns the list of sub classes that directly derive from this class.

References err, FALSE, found, 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 5010 of file classdef.cpp.

5011{
5012 return !m_tempArgs.empty();
5013}

References m_tempArgs.

◆ isTemplateArgument()

bool ClassDefImpl::isTemplateArgument ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5035 of file classdef.cpp.

5036{
5037 return m_isTemplArg;
5038}

References m_isTemplArg.

◆ isUsedOnly()

bool ClassDefImpl::isUsedOnly ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5155 of file classdef.cpp.

5156{
5157 return m_usedOnly;
5158}

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

3605{
3606 bool allExternals = Config_getBool(ALLEXTERNALS);
3607 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
3608 bool extractStatic = Config_getBool(EXTRACT_STATIC);
3609
3610 return // show all classes or a subclass is visible
3611 ((allExternals && !isArtificial()) || hasNonReferenceSuperClass()) &&
3612 // and not an anonymous compound
3613 !isAnonymous() &&
3614 // and not privately inherited
3616 // documented or shown anyway or documentation is external
3617 (hasDocumentation() ||
3618 !hideUndocClasses ||
3619 (m_templateMaster && m_templateMaster->hasDocumentation()) ||
3620 isReference()
3621 ) &&
3622 // if this is an implicit template instance then it most be part of the inheritance hierarchy
3623 (!m_implicitTemplateInstance || !m_inherits.empty() || !m_inheritedBy.empty()) &&
3624 // is not part of an unnamed namespace or shown anyway
3625 (!m_isStatic || extractStatic);
3626}
bool hasNonReferenceSuperClass() const override

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

◆ makeTemplateArgument()

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

Implements ClassDefMutable.

Definition at line 5140 of file classdef.cpp.

5141{
5142 m_isTemplArg = b;
5143}

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

4956{
4958}

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

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

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

◆ mergeMembers()

void ClassDefImpl::mergeMembers ( )
overridevirtual

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

Implements ClassDefMutable.

Definition at line 3988 of file classdef.cpp.

3989{
3990 if (m_membersMerged) return;
3991 if (getLanguage()==SrcLangExt::Python)
3992 {
3993 for (const auto &bcd : baseClasses())
3994 {
3995 ClassDefMutable *bClass=toClassDefMutable(bcd.classDef);
3997 }
3998 }
3999
4000 //printf("> %s::mergeMembers()\n",qPrint(name()));
4001
4003
4004 // first merge the members of the base class recursively
4005 for (const auto &bcd : baseClasses())
4006 {
4007 ClassDefMutable *bClass=toClassDefMutable(bcd.classDef);
4008 if (bClass)
4009 {
4010 // merge the members in the base class of this inheritance branch first
4011 bClass->mergeMembers();
4012 }
4013 }
4014
4015 // first merge the member that are not inherited via a virtual base class
4016 // (as this can end up reimplemented via multiple paths, see #10717 for examples)
4018 // then process the member that are inherited via a virtual base class to add the
4019 // ones that are not reimplemented via any path
4021
4022 //printf("< %s::mergeMembers()\n",qPrint(name()));
4023}
void mergeMembersFromBaseClasses(bool mergeVirtualBaseClass)
virtual void mergeMembers()=0

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

◆ mergeMembersFromBaseClasses()

void ClassDefImpl::mergeMembersFromBaseClasses ( bool mergeVirtualBaseClass)
private

Definition at line 3702 of file classdef.cpp.

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

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

Referenced by mergeMembers().

◆ moveTo()

void ClassDefImpl::moveTo ( Definition * scope)
overridevirtual

Implements ClassDef.

Definition at line 967 of file classdef.cpp.

968{
969 //printf("%s::moveTo(%s)\n",qPrint(name()),qPrint(scope->name()));
970 setOuterScope(scope);
972 {
973 m_fileDef = toFileDef(scope);
974 }
975 else if (scope->definitionType()==Definition::TypeModule)
976 {
977 m_moduleDef = toModuleDef(scope);
978 }
979}
void setOuterScope(Definition *def) override
FileDef * toFileDef(Definition *d)
Definition filedef.cpp:1926
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 5376 of file classdef.cpp.

5377{
5379}

References m_hasCollaborationGraph.

◆ overrideInheritanceGraph()

void ClassDefImpl::overrideInheritanceGraph ( CLASS_GRAPH_t e)
overridevirtual

Implements ClassDefMutable.

Definition at line 5349 of file classdef.cpp.

5350{
5352}

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

4971{
4972 return m_prot;
4973}

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

4468{
4469 return makeQualifiedNameWithTemplateParameters(this,actualParams,actualParamIndex);
4470}
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 5170 of file classdef.cpp.

5171{
5172 md->setMemberType(t);
5173 for (auto &ml : m_memberLists)
5174 {
5175 ml->remove(md);
5176 }
5177 insertMember(md);
5178}
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 5238 of file classdef.cpp.

5239{
5240 for (auto &ml : m_memberLists)
5241 {
5242 ml->remove(md);
5243 }
5244}

References m_memberLists.

Referenced by hideDerivedVariablesInPython().

◆ requiresClause()

QCString ClassDefImpl::requiresClause ( ) const
overridevirtual

Implements ClassDef.

Definition at line 3500 of file classdef.cpp.

3501{
3502 return m_requiresClause;
3503}

References m_requiresClause.

◆ setAnonymousEnumType()

void ClassDefImpl::setAnonymousEnumType ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4633 of file classdef.cpp.

4634{
4635 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4636 {
4637 if (lde->kind()==LayoutDocEntry::MemberDecl)
4638 {
4639 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4640 if (lmd)
4641 {
4642 MemberList * ml = getMemberList(lmd->type);
4643 if (ml)
4644 {
4646 }
4647 }
4648 }
4649 else if (lde->kind()==LayoutDocEntry::MemberGroups)
4650 {
4651 for (const auto &mg : m_memberGroups)
4652 {
4653 mg->setAnonymousEnumType();
4654 }
4655 }
4656 }
4657}
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 5145 of file classdef.cpp.

5146{
5147 m_categoryOf = cd;
5148}

References m_categoryOf.

◆ setClassName()

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

Implements ClassDefMutable.

Definition at line 4483 of file classdef.cpp.

4484{
4485 m_className = name;
4486}

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

◆ setClassSpecifier()

void ClassDefImpl::setClassSpecifier ( TypeSpecifier spec)
overridevirtual

Implements ClassDefMutable.

Definition at line 5251 of file classdef.cpp.

5252{
5253 m_spec = spec;
5254}

References m_spec.

◆ setCompoundType()

void ClassDefImpl::setCompoundType ( CompoundType t)
overridevirtual

Implements ClassDefMutable.

Definition at line 5129 of file classdef.cpp.

5130{
5131 m_compType = t;
5132}

References m_compType.

◆ setFileDef()

void ClassDefImpl::setFileDef ( FileDef * fd)
overridevirtual

Implements ClassDefMutable.

Definition at line 5100 of file classdef.cpp.

5101{
5102 m_fileDef = fd;
5103}

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

4267{
4268 gd->addClass(this);
4269 //printf("ClassDefImpl::setGroupDefForAllMembers(%s)\n",qPrint(gd->name()));
4270 for (auto &mni : m_allMemberNameInfoLinkedMap)
4271 {
4272 for (auto &mi : *mni)
4273 {
4274 MemberDefMutable *md = toMemberDefMutable(mi->memberDef());
4275 if (md)
4276 {
4277 md->setGroupDef(gd,pri,fileName,startLine,hasDocs);
4278 gd->insertMember(md,TRUE);
4279 ClassDefMutable *innerClass = toClassDefMutable(md->getClassDefOfAnonymousType());
4280 if (innerClass) innerClass->setGroupDefForAllMembers(gd,pri,fileName,startLine,hasDocs);
4281 }
4282 }
4283 }
4284}
virtual void setGroupDefForAllMembers(GroupDef *g, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs)=0
virtual ClassDef * getClassDefOfAnonymousType() const =0
virtual void setGroupDef(GroupDef *gd, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs, MemberDef *member=nullptr)=0

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

◆ setImplicitTemplateInstance()

void ClassDefImpl::setImplicitTemplateInstance ( bool b)
overridevirtual

Implements ClassDefMutable.

Definition at line 5005 of file classdef.cpp.

5006{
5008}

References m_implicitTemplateInstance.

◆ setIncludeFile()

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

Implements ClassDefMutable.

Definition at line 1426 of file classdef.cpp.

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

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

◆ setIsStatic()

void ClassDefImpl::setIsStatic ( bool b)
overridevirtual

Implements ClassDefMutable.

Definition at line 5124 of file classdef.cpp.

5125{
5126 m_isStatic=b;
5127}

References m_isStatic.

◆ setMetaData()

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

Implements ClassDefMutable.

Definition at line 5334 of file classdef.cpp.

5335{
5336 m_metaData = md;
5337}

References m_metaData.

◆ setModuleDef()

void ClassDefImpl::setModuleDef ( ModuleDef * mod)
overridevirtual

Implements ClassDefMutable.

Definition at line 5105 of file classdef.cpp.

5106{
5107 m_moduleDef = mod;
5108}

References m_moduleDef.

◆ setProtection()

void ClassDefImpl::setProtection ( Protection p)
overridevirtual

Implements ClassDefMutable.

Definition at line 5115 of file classdef.cpp.

5116{
5117 m_prot=p;
5118 if (getLanguage()==SrcLangExt::VHDL && VhdlDocGen::convert(p)==VhdlDocGen::ARCHITECTURECLASS)
5119 {
5120 m_className = name();
5121 }
5122}
@ 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 3505 of file classdef.cpp.

3506{
3507 m_requiresClause = req;
3508}

References m_requiresClause.

◆ setSubGrouping()

void ClassDefImpl::setSubGrouping ( bool enabled)
overridevirtual

Implements ClassDefMutable.

Definition at line 5110 of file classdef.cpp.

5111{
5112 m_subGrouping = enabled;
5113}

References m_subGrouping.

◆ setTagLessReference()

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

Implements ClassDefMutable.

Definition at line 5233 of file classdef.cpp.

5234{
5235 m_tagLessRef = cd;
5236}

References m_tagLessRef.

◆ setTemplateArguments()

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

Implements ClassDefMutable.

Definition at line 3452 of file classdef.cpp.

3453{
3454 m_tempArgs = al;
3455}

References m_tempArgs.

◆ setTemplateBaseClassNames()

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

Implements ClassDefMutable.

Definition at line 4369 of file classdef.cpp.

4370{
4371 m_templBaseClassNames = templateNames;
4372}

References m_templBaseClassNames.

◆ setTemplateMaster()

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

Implements ClassDefMutable.

Definition at line 5134 of file classdef.cpp.

5135{
5136 assert(tm!=this);
5138}

References m_templateMaster.

◆ setTypeConstraints()

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

Implements ClassDefMutable.

Definition at line 3447 of file classdef.cpp.

3448{
3449 m_typeConstraints = al;
3450}

References m_typeConstraints.

◆ setUsedOnly()

void ClassDefImpl::setUsedOnly ( bool b)
overridevirtual

Implements ClassDefMutable.

Definition at line 5150 of file classdef.cpp.

5151{
5152 m_usedOnly = b;
5153}

References m_usedOnly.

◆ showUsedFiles()

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

Definition at line 1719 of file classdef.cpp.

1720{
1721 ol.pushGeneratorState();
1723
1724
1725 ol.writeRuler();
1726 ol.pushGeneratorState();
1728 ol.startParagraph();
1730 ol.endParagraph();
1731 ol.popGeneratorState();
1735
1736 bool first=TRUE;
1737 for (const auto &fd : m_files)
1738 {
1739 if (first)
1740 {
1741 first=FALSE;
1742 ol.startItemList();
1743 }
1744
1745 ol.startItemListItem();
1746 QCString path=fd->getPath();
1747 if (Config_getBool(FULL_PATH_NAMES))
1748 {
1749 ol.docify(stripFromPath(path));
1750 }
1751
1752 QCString fname = fd->name();
1753 if (!fd->getVersion().isEmpty()) // append version if available
1754 {
1755 fname += " (" + fd->getVersion() + ")";
1756 }
1757
1758 // for HTML
1759 ol.pushGeneratorState();
1761 if (fd->generateSourceFile())
1762 {
1763 ol.writeObjectLink(QCString(),fd->getSourceFileBase(),QCString(),fname);
1764 }
1765 else if (fd->isLinkable())
1766 {
1767 ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fname);
1768 }
1769 else
1770 {
1771 ol.startBold();
1772 ol.docify(fname);
1773 ol.endBold();
1774 }
1775 ol.popGeneratorState();
1776
1777 // for other output formats
1778 ol.pushGeneratorState();
1780 if (fd->isLinkable())
1781 {
1782 ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fname);
1783 }
1784 else
1785 {
1786 ol.docify(fname);
1787 }
1788 ol.popGeneratorState();
1789
1790 ol.endItemListItem();
1791 }
1792 if (!first) ol.endItemList();
1793
1794 ol.popGeneratorState();
1795}
QCString generatedFromFiles() const override
void startItemList()
Definition outputlist.h:430
void disable(OutputType o)
void writeRuler()
Definition outputlist.h:522
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition outputlist.h:440
void docify(const QCString &s)
Definition outputlist.h:438
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:408
void endParagraph()
Definition outputlist.h:410
void startItemListItem()
Definition outputlist.h:458
void endItemListItem()
Definition outputlist.h:460
void startBold()
Definition outputlist.h:562
void endBold()
Definition outputlist.h:564
void endItemList()
Definition outputlist.h:432
static QCString stripFromPath(const QCString &p, const StringVector &l)
Definition util.cpp:309

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

Referenced by writeDocumentationContents().

◆ sortAllMembersList()

void ClassDefImpl::sortAllMembersList ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4960 of file classdef.cpp.

4961{
4962 std::stable_sort(m_allMemberNameInfoLinkedMap.begin(),
4964 [](const auto &m1,const auto &m2)
4965 {
4966 return qstricmp_sort(m1->memberName(),m2->memberName())<0;
4967 });
4968}

References m_allMemberNameInfoLinkedMap.

◆ sortMemberLists()

void ClassDefImpl::sortMemberLists ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4579 of file classdef.cpp.

4580{
4581 for (auto &ml : m_memberLists)
4582 {
4583 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
4584 }
4585 std::stable_sort(m_innerClasses.begin(),
4586 m_innerClasses.end(),
4587 [](const auto &c1,const auto &c2)
4588 {
4589 return Config_getBool(SORT_BY_SCOPE_NAME) ?
4590 qstricmp_sort(c1->name(), c2->name() )<0 :
4591 qstricmp_sort(c1->className(), c2->className())<0 ;
4592 });
4593}

References FALSE, m_innerClasses, and m_memberLists.

◆ startMemberDeclarations()

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

Definition at line 2208 of file classdef.cpp.

2209{
2210 //printf("%s: ClassDefImpl::startMemberDeclarations()\n",qPrint(name()));
2212}
void startMemberSections()
Definition outputlist.h:462

References OutputList::startMemberSections().

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ startMemberDocumentation()

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

Definition at line 2188 of file classdef.cpp.

2189{
2190 //printf("%s: ClassDefImpl::startMemberDocumentation()\n",qPrint(name()));
2191 if (Config_getBool(SEPARATE_MEMBER_PAGES))
2192 {
2195 }
2196}

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

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ subClasses()

const BaseClassList & ClassDefImpl::subClasses ( ) const
overridevirtual

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

Implements ClassDef.

Definition at line 4945 of file classdef.cpp.

4946{
4947 return m_inheritedBy;
4948}

References m_inheritedBy.

Referenced by isSubClass().

◆ subGrouping()

bool ClassDefImpl::subGrouping ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5324 of file classdef.cpp.

5325{
5326 return m_subGrouping;
5327}

References m_subGrouping.

◆ tagLessReference()

const ClassDef * ClassDefImpl::tagLessReference ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5228 of file classdef.cpp.

5229{
5230 return m_tagLessRef;
5231}

References m_tagLessRef.

◆ templateArguments()

const ArgumentList & ClassDefImpl::templateArguments ( ) const
overridevirtual

Returns the template arguments of this class.

Implements ClassDef.

Definition at line 4975 of file classdef.cpp.

4976{
4977 return m_tempArgs;
4978}

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

4996{
4997 return m_templateMaster;
4998}

References m_templateMaster.

◆ templateTypeConstraints()

const ConstraintClassList & ClassDefImpl::templateTypeConstraints ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5030 of file classdef.cpp.

5031{
5032 return m_constraintClassList;
5033}

References m_constraintClassList.

◆ title()

QCString ClassDefImpl::title ( ) const
overridevirtual

Implements ClassDef.

Definition at line 2883 of file classdef.cpp.

2884{
2885 QCString pageTitle;
2886 SrcLangExt lang = getLanguage();
2887
2888 auto getReferenceTitle = [this](std::function<QCString()> translateFunc) -> QCString
2889 {
2890 return Config_getBool(HIDE_COMPOUND_REFERENCE) ? displayName() : translateFunc();
2891 };
2892
2893 if (lang==SrcLangExt::Fortran)
2894 {
2895 pageTitle = getReferenceTitle([this](){
2897 });
2898 }
2899 else if (lang==SrcLangExt::Slice)
2900 {
2901 pageTitle = getReferenceTitle([this](){
2903 });
2904 }
2905 else if (lang==SrcLangExt::VHDL)
2906 {
2907 pageTitle = getReferenceTitle([this](){
2909 });
2910 }
2911 else if (isJavaEnum())
2912 {
2913 pageTitle = getReferenceTitle([this](){
2915 });
2916 }
2917 else if (m_compType==Service)
2918 {
2919 pageTitle = getReferenceTitle([this](){
2921 });
2922 }
2923 else if (m_compType==Singleton)
2924 {
2925 pageTitle = getReferenceTitle([this](){
2927 });
2928 }
2929 else
2930 {
2931 pageTitle = getReferenceTitle([this](){
2933 m_compType == Interface && getLanguage()==SrcLangExt::ObjC ? Class : m_compType,
2934 !m_tempArgs.empty());
2935 });
2936 }
2937 return pageTitle;
2938}
bool isSliceLocal() const override
virtual QCString trCompoundReference(const QCString &clName, ClassDef::CompoundType compType, bool isTemplate)=0
virtual QCString trEnumReference(const QCString &name)=0
virtual QCString trSingletonReference(const QCString &sName)=0
virtual QCString trServiceReference(const QCString &sName)=0
virtual QCString trCustomReference(const QCString &name)=0
virtual QCString trCompoundReferenceFortran(const QCString &clName, ClassDef::CompoundType compType, bool isTemplate)=0
virtual QCString trCompoundReferenceSlice(const QCString &clName, ClassDef::CompoundType compType, bool isLocal)=0
static QCString getClassTitle(const ClassDef *)

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

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

◆ typeConstraints()

const ArgumentList & ClassDefImpl::typeConstraints ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5314 of file classdef.cpp.

5315{
5316 return m_typeConstraints;
5317}

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

4941{
4942 m_inherits = bcd;
4943}

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

4951{
4952 m_inheritedBy = bcd;
4953}

References m_inheritedBy.

◆ usedByImplementationClasses()

const UsesClassList & ClassDefImpl::usedByImplementationClasses ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5025 of file classdef.cpp.

5026{
5027 return m_usedByImplClassList;
5028}

References m_usedByImplClassList.

◆ usedFiles()

const FileList & ClassDefImpl::usedFiles ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5309 of file classdef.cpp.

5310{
5311 return m_files;
5312}

References m_files.

◆ usedImplementationClasses()

const UsesClassList & ClassDefImpl::usedImplementationClasses ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5020 of file classdef.cpp.

5021{
5022 return m_usesImplClassList;
5023}

References m_usesImplClassList.

◆ visibleInParentsDeclList()

bool ClassDefImpl::visibleInParentsDeclList ( ) const
overridevirtual

show this class in the declaration section of its parent?

Implements ClassDef.

Definition at line 2580 of file classdef.cpp.

2581{
2582 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
2583 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
2584 bool extractLocalClasses = Config_getBool(EXTRACT_LOCAL_CLASSES);
2585 bool linkable = isLinkable();
2586 return (!isAnonymous() && !isExtension() &&
2587 (protection()!=Protection::Private || extractPrivate) &&
2588 (linkable || (!hideUndocClasses && (!isLocal() || extractLocalClasses)))
2589 );
2590}
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 4749 of file classdef.cpp.

4750{
4751 //printf("**** writeAdditionalInheritedMembers()\n");
4752 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4753 {
4754 if (lde->kind()==LayoutDocEntry::MemberDecl)
4755 {
4756 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4757 if (lmd && lmd->type!=MemberListType::Friends())
4758 {
4759 ClassDefSet visited;
4761 }
4762 }
4763 }
4764}
void writeInheritedMemberDeclarations(OutputList &ol, ClassDefSet &visitedClasses, MemberListType lt, MemberListType lt2, const QCString &title, const ClassDef *inheritedFrom, bool invert, bool showAlways) const

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

Referenced by endMemberDeclarations().

◆ writeAuthorSection()

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

Definition at line 2228 of file classdef.cpp.

2229{
2230 ol.pushGeneratorState();
2232 ol.writeString("\n");
2233 ol.startGroupHeader();
2235 ol.endGroupHeader();
2237 ol.popGeneratorState();
2238}
void writeString(const QCString &text)
Definition outputlist.h:412
void startGroupHeader(int extraLevels=0)
Definition outputlist.h:454
void endGroupHeader(int extraLevels=0)
Definition outputlist.h:456
virtual QCString trGeneratedAutomatically(const QCString &s)=0
virtual QCString trAuthor(bool first_capital, bool singular)=0
#define Config_getString(name)
Definition config.h:32

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

Referenced by writeDocumentationContents().

◆ writeBriefDescription()

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

Definition at line 1556 of file classdef.cpp.

1557{
1558 if (hasBriefDescription())
1559 {
1560 ol.startParagraph();
1561 ol.pushGeneratorState();
1563 ol.writeString(" - ");
1564 ol.popGeneratorState();
1565 ol.generateDoc(briefFile(),briefLine(),this,nullptr,
1566 briefDescription(),TRUE,FALSE,QCString(),
1567 TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
1568 ol.pushGeneratorState();
1570 ol.writeString(" \n");
1572 ol.popGeneratorState();
1573
1574 if (hasDetailedDescription() || exampleFlag)
1575 {
1576 writeMoreLink(ol,anchor());
1577 }
1578
1579 ol.endParagraph();
1580 }
1581 ol.writeSynopsis();
1582}
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 writeSynopsis()
Definition outputlist.h:593
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)

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

Referenced by writeDocumentationContents().

◆ writeCollaborationGraph()

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

Definition at line 1959 of file classdef.cpp.

1960{
1961 if (Config_getBool(HAVE_DOT) && m_hasCollaborationGraph /*&& Config_getBool(COLLABORATION_GRAPH)*/)
1962 {
1963 DotClassGraph usageImplGraph(this,GraphType::Collaboration);
1964 if (usageImplGraph.isTooBig())
1965 {
1966 warn_uncond("Collaboration graph for '{}' not generated, too many nodes ({}), threshold is {}. Consider increasing DOT_GRAPH_MAX_NODES.\n",
1967 name(), usageImplGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
1968 }
1969 else if (!usageImplGraph.isTrivial())
1970 {
1971 ol.pushGeneratorState();
1973 ol.startDotGraph();
1975 ol.endDotGraph(usageImplGraph);
1976 ol.popGeneratorState();
1977 }
1978 }
1979}
void endDotGraph(DotClassGraph &g)
Definition outputlist.h:649
void startDotGraph()
Definition outputlist.h:647
virtual QCString trCollaborationDiagram(const QCString &clName)=0
#define Config_getInt(name)
Definition config.h:34
@ Collaboration
Definition dotgraph.h:31
#define warn_uncond(fmt,...)
Definition message.h:122

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

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeDeclaration()

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

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

Implements ClassDef.

Definition at line 3513 of file classdef.cpp.

3515{
3516 //printf("ClassName='%s' inGroup=%d\n",qPrint(name()),inGroup);
3517
3519 QCString cn = displayName(FALSE);
3520 if (!cn.isEmpty())
3521 {
3522 ol.docify(" ");
3523 if (md && isLinkable())
3524 {
3525 ol.writeObjectLink(QCString(),QCString(),md->anchor(),cn);
3526 }
3527 else
3528 {
3529 ol.startBold();
3530 ol.docify(cn);
3531 ol.endBold();
3532 }
3533 }
3534 ol.docify(" {");
3536 ol.endMemberDeclaration(md ? md->anchor() : QCString(),inheritId);
3537
3538 // write user defined member groups
3539 for (const auto &mg : m_memberGroups)
3540 {
3541 mg->writePlainDeclarations(ol,inGroup,this,nullptr,nullptr,nullptr,nullptr,indentLevel,inheritedFrom,inheritId);
3542 }
3543
3544 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
3545 {
3546 if (lde->kind()==LayoutDocEntry::MemberDecl)
3547 {
3548 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
3549 if (lmd)
3550 {
3551 writePlainMemberDeclaration(ol,lmd->type,inGroup,indentLevel,inheritedFrom,inheritId);
3552 }
3553 }
3554 }
3555}
QCString compoundTypeString() const override
Returns the type of compound as a string.
void writePlainMemberDeclaration(OutputList &ol, MemberListType lt, bool inGroup, int indentLevel, const ClassDef *inheritedFrom, const QCString &inheritId) const
virtual QCString anchor() const =0
void endMemberItem(OutputGenerator::MemberItemType type)
Definition outputlist.h:496
void endMemberDeclaration(const QCString &anchor, const QCString &inheritId)
Definition outputlist.h:572

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

◆ writeDeclarationLink()

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

Implements ClassDef.

Definition at line 2592 of file classdef.cpp.

2593{
2594 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
2595 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
2596 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2597 SrcLangExt lang = getLanguage();
2599 {
2600 if (!found) // first class
2601 {
2602 if (sliceOpt)
2603 {
2604 if (compoundType()==Interface)
2605 {
2606 ol.startMemberHeader("interfaces");
2607 }
2608 else if (compoundType()==Struct)
2609 {
2610 ol.startMemberHeader("structs");
2611 }
2612 else if (compoundType()==Exception)
2613 {
2614 ol.startMemberHeader("exceptions");
2615 }
2616 else // compoundType==Class
2617 {
2618 ol.startMemberHeader("nested-classes");
2619 }
2620 }
2621 else // non-Slice optimization: single header for class/struct/..
2622 {
2623 ol.startMemberHeader("nested-classes");
2624 }
2625 if (!header.isEmpty())
2626 {
2627 ol.parseText(header);
2628 }
2629 else if (lang==SrcLangExt::VHDL)
2630 {
2632 }
2633 else
2634 {
2635 ol.parseText(lang==SrcLangExt::Fortran ?
2638 }
2639 ol.endMemberHeader();
2640 ol.startMemberList();
2641 found=TRUE;
2642 }
2645 QCString ctype = compoundTypeString();
2646 QCString cname = displayName(!localNames);
2647
2648 if (lang!=SrcLangExt::VHDL) // for VHDL we swap the name and the type
2649 {
2650 if (isSliceLocal())
2651 {
2652 ol.writeString("local ");
2653 }
2654 ol.writeString(ctype);
2655 ol.writeString(" ");
2656 ol.insertMemberAlign();
2657 }
2658 if (isLinkable())
2659 {
2662 anchor(),
2663 cname
2664 );
2665 }
2666 else
2667 {
2668 ol.startBold();
2669 ol.docify(cname);
2670 ol.endBold();
2671 }
2672 if (lang==SrcLangExt::VHDL) // now write the type
2673 {
2674 ol.writeString(" ");
2675 ol.insertMemberAlign();
2677 }
2679
2680 // add the brief description if available
2681 if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
2682 {
2683 auto parser { createDocParser() };
2684 auto ast { validatingParseDoc(*parser.get(),
2685 briefFile(),briefLine(),this,nullptr,
2687 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
2688 if (!ast->isEmpty())
2689 {
2691 ol.writeDoc(ast.get(),this,nullptr);
2692 if (isLinkableInProject())
2693 {
2694 writeMoreLink(ol,anchor());
2695 }
2697 }
2698 }
2699 ol.endMemberDeclaration(anchor(),QCString());
2700 }
2701}
QCString getReference() const override
bool visibleInParentsDeclList() const override
show this class in the declaration section of its parent?
void startMemberDeclaration()
Definition outputlist.h:570
void endMemberDescription()
Definition outputlist.h:568
void writeDoc(const IDocNodeAST *ast, const Definition *ctx, const MemberDef *md)
Definition outputlist.h:384
void startMemberDescription(const QCString &anchor, const QCString &inheritId=QCString(), bool typ=false)
Definition outputlist.h:566
void startMemberList()
Definition outputlist.h:482
void insertMemberAlign(bool templ=FALSE)
Definition outputlist.h:518
void startMemberItem(const QCString &anchor, OutputGenerator::MemberItemType type, const QCString &id=QCString())
Definition outputlist.h:494
virtual QCString trDataTypes()=0
virtual QCString trCompounds()=0
static QCString getProtectionName(int prot)
IDocParserPtr createDocParser()
factory function to create a parser
Definition docparser.cpp:55
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)

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

◆ writeDetailedDescription()

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

Definition at line 1651 of file classdef.cpp.

1653{
1654 if (hasDetailedDescription() || exampleFlag)
1655 {
1656 ol.pushGeneratorState();
1658 ol.writeRuler();
1659 ol.popGeneratorState();
1660
1661 ol.pushGeneratorState();
1663 ol.writeAnchor(QCString(),anchor.isEmpty() ? QCString("details") : anchor);
1664 ol.popGeneratorState();
1665
1666 if (!anchor.isEmpty())
1667 {
1668 ol.pushGeneratorState();
1672 ol.popGeneratorState();
1673 }
1674
1675 ol.startGroupHeader();
1676 ol.parseText(title);
1677 ol.endGroupHeader();
1678
1680 }
1681 else
1682 {
1683 //writeTemplateSpec(ol,this,pageType);
1684 }
1685}
void writeDetailedDocumentationBody(OutputList &ol) const
void writeAnchor(const QCString &fileName, const QCString &name)
Definition outputlist.h:524

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

Referenced by writeDocumentationContents().

◆ writeDetailedDocumentationBody()

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

Definition at line 1584 of file classdef.cpp.

1585{
1586 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
1587
1588 ol.startTextBlock();
1589
1590 if (getLanguage()==SrcLangExt::Cpp)
1591 {
1593 }
1594
1595 // repeat brief description
1596 if (!briefDescription().isEmpty() && repeatBrief)
1597 {
1599 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
1600 }
1601 if (!briefDescription().isEmpty() && repeatBrief &&
1602 !documentation().isEmpty())
1603 {
1604 ol.pushGeneratorState();
1606 ol.writeString("\n\n");
1607 ol.popGeneratorState();
1608 }
1609 // write documentation
1610 if (!documentation().isEmpty())
1611 {
1612 ol.generateDoc(docFile(),docLine(),this,nullptr,documentation(),TRUE,FALSE,
1613 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
1614 }
1615 // write type constraints
1617
1618 ol.generateDoc(
1619 docFile(),docLine(),
1620 this,
1621 nullptr, // memberDef
1623 TRUE, // indexWords
1624 FALSE, // isExample
1625 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
1626 );
1627
1628 // write examples
1629 if (hasExamples())
1630 {
1631 ol.startExamples();
1632 ol.startDescForItem();
1634 ol.endDescForItem();
1635 ol.endExamples();
1636 }
1637 writeSourceDef(ol);
1638 ol.endTextBlock();
1639}
void writeTemplateSpec(OutputList &ol, const Definition *d, const QCString &type, SrcLangExt lang) const
bool hasExamples() const override
void writeSourceDef(OutputList &ol) const override
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:671
void endDescForItem()
Definition outputlist.h:550
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:669
void endExamples()
Definition outputlist.h:581
void startExamples()
Definition outputlist.h:579
void startDescForItem()
Definition outputlist.h:548
void writeTypeConstraints(OutputList &ol, const Definition *d, const ArgumentList &al)
Definition util.cpp:5920
QCString inlineTemplateArgListToDoc(const ArgumentList &al)
Definition util.cpp:1174
void writeExamples(OutputList &ol, const ExampleList &list)
Definition util.cpp:1127

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(), FALSE, OutputList::generateDoc(), DefinitionMixin< ClassDefMutable >::getLanguage(), hasExamples(), Html, inlineTemplateArgListToDoc(), m_examples, m_tempArgs, m_typeConstraints, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startDescForItem(), OutputList::startExamples(), OutputList::startTextBlock(), TRUE, writeExamples(), 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 2941 of file classdef.cpp.

2942{
2943 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
2944 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
2945 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
2946 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2947 QCString pageTitle = title();
2948
2950 if (sliceOpt)
2951 {
2952 if (compoundType()==Interface)
2953 {
2955 }
2956 else if (compoundType()==Struct)
2957 {
2959 }
2960 else if (compoundType()==Exception)
2961 {
2963 }
2964 else
2965 {
2967 }
2968 }
2969 else
2970 {
2972 }
2973
2974 AUTO_TRACE("name='{}' getOutputFileBase='{}'",name(),getOutputFileBase());
2975 startFile(ol,getOutputFileBase(),name(),pageTitle,hli,!generateTreeView);
2976 if (!generateTreeView)
2977 {
2979 {
2981 }
2982 ol.endQuickIndices();
2983 }
2984
2985 startTitle(ol,getOutputFileBase(),this);
2986 ol.parseText(pageTitle);
2988 addGroupListToTitle(ol,this);
2990 writeDocumentationContents(ol,pageTitle);
2991
2992 endFileWithNavPath(ol,this);
2993
2994 if (Config_getBool(SEPARATE_MEMBER_PAGES))
2995 {
2996 writeMemberPages(ol);
2997 }
2998}
void addClassAttributes(OutputList &ol) const
void writeMemberPages(OutputList &ol) const override
void writeDocumentationContents(OutputList &ol, const QCString &pageTitle) const
void writeNavigationPath(OutputList &ol) const override
void endQuickIndices()
Definition outputlist.h:605
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition index.cpp:384
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:393
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel)
Definition index.cpp:400
void endFileWithNavPath(OutputList &ol, const Definition *d)
Definition index.cpp:446
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:5398

References addClassAttributes(), addGroupListToTitle(), AUTO_TRACE, ClassVisible, compoundType(), Config_getBool, displayName(), endFileWithNavPath(), OutputList::endQuickIndices(), endTitle(), ClassDef::Exception, ExceptionVisible, DefinitionMixin< ClassDefMutable >::getOuterScope(), getOutputFileBase(), Doxygen::globalScope, ClassDef::Interface, InterfaceVisible, 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 2737 of file classdef.cpp.

2738{
2739 ol.startContents();
2740
2741 QCString pageType = " ";
2742 pageType += compoundTypeString();
2743
2744 bool exampleFlag=hasExamples();
2745
2746 //---------------------------------------- start flexible part -------------------------------
2747
2748 SrcLangExt lang = getLanguage();
2749
2750 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
2751 {
2752 switch (lde->kind())
2753 {
2754 case LayoutDocEntry::BriefDesc:
2755 writeBriefDescription(ol,exampleFlag);
2756 break;
2757 case LayoutDocEntry::ClassIncludes:
2758 if (lang==SrcLangExt::Slice)
2759 {
2761 }
2762 else
2763 {
2765 }
2766 break;
2767 case LayoutDocEntry::ClassInheritanceGraph:
2769 break;
2770 case LayoutDocEntry::ClassCollaborationGraph:
2772 break;
2773 case LayoutDocEntry::ClassAllMembersLink:
2774 //writeAllMembersLink(ol); // this is now part of the summary links
2775 break;
2776 case LayoutDocEntry::MemberDeclStart:
2778 break;
2779 case LayoutDocEntry::MemberGroups:
2781 break;
2782 case LayoutDocEntry::MemberDecl:
2783 {
2784 ClassDefSet visitedClasses;
2785 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
2786 if (lmd)
2787 {
2788 writeMemberDeclarations(ol,visitedClasses,lmd->type,lmd->title(lang),lmd->subtitle(lang));
2789 }
2790 }
2791 break;
2792 case LayoutDocEntry::ClassNestedClasses:
2793 {
2794 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
2795 if (ls)
2796 {
2797 writeNestedClasses(ol,ls->title(lang));
2798 }
2799 }
2800 break;
2801 case LayoutDocEntry::MemberDeclEnd:
2803 break;
2804 case LayoutDocEntry::DetailedDesc:
2805 {
2806 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
2807 if (ls)
2808 {
2809 writeDetailedDescription(ol,pageType,exampleFlag,ls->title(lang));
2810 }
2811 }
2812 break;
2813 case LayoutDocEntry::MemberDefStart:
2815 break;
2816 case LayoutDocEntry::ClassInlineClasses:
2818 break;
2819 case LayoutDocEntry::MemberDef:
2820 {
2821 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
2822 if (lmd)
2823 {
2824 writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
2825 }
2826 }
2827 break;
2828 case LayoutDocEntry::MemberDefEnd:
2830 break;
2831 case LayoutDocEntry::ClassUsedFiles:
2832 showUsedFiles(ol);
2833 break;
2834 case LayoutDocEntry::AuthorSection:
2836 break;
2837 case LayoutDocEntry::NamespaceNestedNamespaces:
2838 case LayoutDocEntry::NamespaceNestedConstantGroups:
2839 case LayoutDocEntry::NamespaceClasses:
2840 case LayoutDocEntry::NamespaceConcepts:
2841 case LayoutDocEntry::NamespaceInterfaces:
2842 case LayoutDocEntry::NamespaceStructs:
2843 case LayoutDocEntry::NamespaceExceptions:
2844 case LayoutDocEntry::NamespaceInlineClasses:
2845 case LayoutDocEntry::ConceptDefinition:
2846 case LayoutDocEntry::FileClasses:
2847 case LayoutDocEntry::FileConcepts:
2848 case LayoutDocEntry::FileInterfaces:
2849 case LayoutDocEntry::FileStructs:
2850 case LayoutDocEntry::FileExceptions:
2851 case LayoutDocEntry::FileNamespaces:
2852 case LayoutDocEntry::FileConstantGroups:
2853 case LayoutDocEntry::FileIncludes:
2854 case LayoutDocEntry::FileIncludeGraph:
2855 case LayoutDocEntry::FileIncludedByGraph:
2856 case LayoutDocEntry::FileSourceLink:
2857 case LayoutDocEntry::FileInlineClasses:
2858 case LayoutDocEntry::GroupClasses:
2859 case LayoutDocEntry::GroupConcepts:
2860 case LayoutDocEntry::GroupModules:
2861 case LayoutDocEntry::GroupInlineClasses:
2862 case LayoutDocEntry::GroupNamespaces:
2863 case LayoutDocEntry::GroupDirs:
2864 case LayoutDocEntry::GroupNestedGroups:
2865 case LayoutDocEntry::GroupFiles:
2866 case LayoutDocEntry::GroupGraph:
2867 case LayoutDocEntry::GroupPageDocs:
2868 case LayoutDocEntry::ModuleExports:
2869 case LayoutDocEntry::ModuleClasses:
2870 case LayoutDocEntry::ModuleConcepts:
2871 case LayoutDocEntry::ModuleUsedFiles:
2872 case LayoutDocEntry::DirSubDirs:
2873 case LayoutDocEntry::DirFiles:
2874 case LayoutDocEntry::DirGraph:
2875 err("Internal inconsistency: member '{}' should not be part of LayoutDocManager::Class entry list\n",lde->entryToString());
2876 break;
2877 }
2878 }
2879
2880 ol.endContents();
2881}
void writeIncludeFilesForSlice(OutputList &ol) const
void writeInheritanceGraph(OutputList &ol) const
void writeMemberDeclarations(OutputList &ol, ClassDefSet &visitedClasses, MemberListType lt, const QCString &title, const QCString &subTitle=QCString(), bool showInline=FALSE, const ClassDef *inheritedFrom=nullptr, MemberListType lt2=MemberListType::Invalid(), bool invert=FALSE, bool showAlways=FALSE) const override
void writeBriefDescription(OutputList &ol, bool exampleFlag) const
void writeInlineClasses(OutputList &ol) const
void endMemberDeclarations(OutputList &ol) const
void writeCollaborationGraph(OutputList &ol) const
void writeAuthorSection(OutputList &ol) const
void writeDetailedDescription(OutputList &ol, const QCString &pageType, bool exampleFlag, const QCString &title, const QCString &anchor=QCString()) const
void endMemberDocumentation(OutputList &ol) const
void writeIncludeFiles(OutputList &ol) const
void writeMemberGroups(OutputList &ol, bool showInline=FALSE) const
void writeNestedClasses(OutputList &ol, const QCString &title) const
void writeMemberDocumentation(OutputList &ol, MemberListType lt, const QCString &title, bool showInline=FALSE) const
void startMemberDeclarations(OutputList &ol) const
void showUsedFiles(OutputList &ol) const
void startMemberDocumentation(OutputList &ol) const
void endContents()
Definition outputlist.h:619
void startContents()
Definition outputlist.h:617
MemberListType type
Definition layout.h:137
QCString title(SrcLangExt lang) const
Definition layout.cpp:1798
QCString title(SrcLangExt lang) const
Definition layout.cpp:1779

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

3066{
3067 // write inner classes after the parent, so the tag files contain
3068 // the definition in proper order!
3069 for (const auto &innerCd : m_innerClasses)
3070 {
3071 if (
3072 innerCd->isLinkableInProject() && !innerCd->isImplicitTemplateInstance() &&
3073 protectionLevelVisible(innerCd->protection()) &&
3074 !innerCd->isEmbeddedInOuterScope()
3075 )
3076 {
3077 msg("Generating docs for nested compound {}...\n",innerCd->displayName());
3078 innerCd->writeDocumentation(ol);
3079 innerCd->writeMemberList(ol);
3080 }
3081 innerCd->writeDocumentationForInnerClasses(ol);
3082 }
3083}
#define msg(fmt,...)
Definition message.h:94

References m_innerClasses, msg, and protectionLevelVisible().

◆ writeIncludeFiles()

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

Definition at line 2123 of file classdef.cpp.

2124{
2125 if (m_incInfo /*&& Config_getBool(SHOW_HEADERFILE)*/)
2126 {
2127 SrcLangExt lang = getLanguage();
2128 QCString nm=m_incInfo->includeName.isEmpty() ?
2129 (m_incInfo->fileDef ?
2130 m_incInfo->fileDef->docName() : QCString()
2131 ) :
2132 m_incInfo->includeName;
2133 if (!nm.isEmpty())
2134 {
2135 ol.startParagraph();
2136 ol.startTypewriter();
2137 ol.docify(::includeStatement(lang,m_incInfo->kind));
2138 ol.docify(::includeOpen(lang,m_incInfo->kind));
2139 ol.pushGeneratorState();
2141 ol.docify(nm);
2144 if (m_incInfo->fileDef)
2145 {
2146 ol.writeObjectLink(QCString(),m_incInfo->fileDef->includeName(),QCString(),nm);
2147 }
2148 else
2149 {
2150 ol.docify(nm);
2151 }
2152 ol.popGeneratorState();
2153 ol.docify(::includeClose(lang,m_incInfo->kind));
2154 ol.endTypewriter();
2155 ol.endParagraph();
2156 }
2157 }
2158}
void startTypewriter()
Definition outputlist.h:450
void endTypewriter()
Definition outputlist.h:452
QCString includeClose(SrcLangExt lang, IncludeKind kind)
Definition filedef.cpp:86
QCString includeStatement(SrcLangExt lang, IncludeKind kind)
Definition filedef.cpp:56
QCString includeOpen(SrcLangExt lang, IncludeKind kind)
Definition filedef.cpp:73

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

Referenced by writeDocumentationContents().

◆ writeIncludeFilesForSlice()

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

Definition at line 1982 of file classdef.cpp.

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

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

Referenced by writeDocumentationContents().

◆ writeInheritanceGraph()

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

Definition at line 1824 of file classdef.cpp.

1825{
1826 bool haveDot = Config_getBool(HAVE_DOT);
1827 auto classGraph = m_typeInheritanceGraph;
1828
1829 if (classGraph == CLASS_GRAPH_t::NO) return;
1830 // count direct inheritance relations
1831 int count=countInheritanceNodes();
1832
1833 bool renderDiagram = FALSE;
1834 if (haveDot && (classGraph==CLASS_GRAPH_t::YES || classGraph==CLASS_GRAPH_t::GRAPH))
1835 // write class diagram using dot
1836 {
1837 DotClassGraph inheritanceGraph(this,GraphType::Inheritance);
1838 if (inheritanceGraph.isTooBig())
1839 {
1840 warn_uncond("Inheritance graph for '{}' not generated, too many nodes ({}), threshold is {}. Consider increasing DOT_GRAPH_MAX_NODES.\n",
1841 name(), inheritanceGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
1842 }
1843 else if (!inheritanceGraph.isTrivial())
1844 {
1845 ol.pushGeneratorState();
1847 ol.startDotGraph();
1849 ol.endDotGraph(inheritanceGraph);
1850 ol.popGeneratorState();
1851 renderDiagram = TRUE;
1852 }
1853 }
1854 else if ((classGraph==CLASS_GRAPH_t::YES || classGraph==CLASS_GRAPH_t::GRAPH || classGraph==CLASS_GRAPH_t::BUILTIN) && count>0)
1855 // write class diagram using built-in generator
1856 {
1857 ClassDiagram diagram(this); // create a diagram of this class.
1858 ol.startClassDiagram();
1863 renderDiagram = TRUE;
1864 }
1865
1866 if (renderDiagram) // if we already show the inheritance relations graphically,
1867 // then hide the text version
1868 {
1870 }
1871
1872 count = countInheritsNodes();
1873 if (count>0)
1874 {
1875 auto replaceFunc = [this,&ol](size_t entryIndex)
1876 {
1877 for (size_t index=0; index<m_inherits.size() ; index++)
1878 {
1879 const BaseClassDef &bcd=m_inherits[index];
1880 const ClassDef *cd=bcd.classDef;
1881
1882 if (cd->isVisibleInHierarchy()) // filter on the class we want to show
1883 {
1884 if (index==entryIndex) // found the requested index
1885 {
1886 // use the class name but with the template arguments as given
1887 // in the inheritance relation
1889 cd->displayName(),bcd.templSpecifiers);
1890
1891 if (cd->isLinkable())
1892 {
1894 cd->getOutputFileBase(),
1895 cd->anchor(),
1896 displayName);
1897 }
1898 else
1899 {
1900 ol.docify(displayName);
1901 }
1902 return;
1903 }
1904 }
1905 }
1906 };
1907
1908 ol.startParagraph();
1909 writeMarkerList(ol,
1911 static_cast<size_t>(count),
1912 replaceFunc);
1913 ol.endParagraph();
1914 }
1915
1916 // write subclasses
1917 count = countInheritedByNodes();
1918 if (count>0)
1919 {
1920 auto replaceFunc = [this,&ol](size_t entryIndex)
1921 {
1922 for (size_t index=0; index<m_inheritedBy.size() ; index++)
1923 {
1924 const BaseClassDef &bcd=m_inheritedBy[index];
1925 const ClassDef *cd=bcd.classDef;
1926 if (cd->isVisibleInHierarchy()) // filter on the class we want to show
1927 {
1928 if (index==entryIndex) // found the requested index
1929 {
1930 if (cd->isLinkable())
1931 {
1934 }
1935 else
1936 {
1937 ol.docify(cd->displayName());
1938 }
1939 return;
1940 }
1941 }
1942 }
1943 };
1944
1945 ol.startParagraph();
1946 writeMarkerList(ol,
1948 static_cast<size_t>(count),
1949 replaceFunc);
1950 ol.endParagraph();
1951 }
1952
1953 if (renderDiagram)
1954 {
1955 ol.enableAll();
1956 }
1957}
int countInheritanceNodes() const
virtual QCString getReference() const =0
virtual QCString displayName(bool includeScope=TRUE) const =0
void startClassDiagram()
Definition outputlist.h:595
void endClassDiagram(const ClassDiagram &d, const QCString &f, const QCString &n)
Definition outputlist.h:597
void enableAll()
const std::string & str() const
Definition qcstring.h:537
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:4255
void writeMarkerList(OutputList &ol, const std::string &markerText, size_t numMarkers, std::function< void(size_t)> replaceFunc)
Definition util.cpp:1103

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

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeInheritedMemberDeclarations()

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

Definition at line 4791 of file classdef.cpp.

4794{
4795 int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
4796 bool process = count>0;
4797 //printf("%s: writeInheritedMemberDec: lt=%s process=%d invert=%d always=%d\n",
4798 // qPrint(name()),qPrint(lt.to_string()),process,invert,showAlways);
4799 if ((process^invert) || showAlways)
4800 {
4801 for (const auto &ibcd : m_inherits)
4802 {
4803 ClassDefMutable *icd=toClassDefMutable(ibcd.classDef);
4804 if (icd && icd->isLinkable())
4805 {
4806 MemberListType lt1 = MemberListType::Invalid();
4807 MemberListType lt3 = MemberListType::Invalid();
4808 convertProtectionLevel(lt,ibcd.prot,&lt1,&lt3);
4809 if (lt2.isInvalid() && !lt3.isInvalid())
4810 {
4811 lt2=lt3;
4812 }
4813 //printf("%s:convert %s->(%s,%s) prot=%d\n",qPrint(icd->name()),qPrint(lt.to_string()),
4814 // qPrint(lt1.to_string()),qPrint(lt2.to_string()),ibcd.prot);
4815 if (visitedClasses.find(icd)==visitedClasses.end())
4816 {
4817 visitedClasses.insert(icd); // guard for multiple virtual inheritance
4818 if (!lt1.isInvalid())
4819 {
4820 //printf("--> writeMemberDeclarations for type %s\n",qPrint(lt1.to_string()));
4821 icd->writeMemberDeclarations(ol,visitedClasses,lt1,
4822 title,QCString(),FALSE,inheritedFrom,lt2,FALSE,TRUE);
4823 }
4824 }
4825 else
4826 {
4827 //printf("%s: class already visited!\n",qPrint(icd->name()));
4828 }
4829 }
4830 }
4831 }
4832}
virtual void writeMemberDeclarations(OutputList &ol, ClassDefSet &visitedClasses, MemberListType lt, const QCString &title, const QCString &subTitle=QCString(), bool showInline=FALSE, const ClassDef *inheritedFrom=nullptr, MemberListType lt2=MemberListType::Invalid(), bool invert=FALSE, bool showAlways=FALSE) const =0

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

Referenced by writeAdditionalInheritedMembers(), and writeMemberDeclarations().

◆ writeInlineClasses()

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

Definition at line 2183 of file classdef.cpp.

2184{
2185 m_innerClasses.writeDocumentation(ol,this);
2186}

References m_innerClasses.

Referenced by writeDocumentationContents().

◆ writeInlineDocumentation()

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

Write class documentation inside another container (i.e.

a group)

Implements ClassDef.

Definition at line 2415 of file classdef.cpp.

2416{
2417 bool isSimple = m_isSimple;
2418
2419 ol.addIndexItem(name(),QCString());
2420 //printf("ClassDefImpl::writeInlineDocumentation(%s)\n",qPrint(name()));
2421
2422 // part 1: anchor and title
2423 QCString s = compoundTypeString()+" "+name();
2424
2425 // part 1a
2426 ol.pushGeneratorState();
2428 { // only HTML only
2429 ol.writeAnchor(QCString(),anchor());
2430 ol.startMemberDoc(QCString(),QCString(),anchor(),name(),1,1,FALSE);
2432 ol.parseText(s);
2433 ol.endMemberDocName();
2434 ol.endMemberDoc(FALSE);
2435 ol.writeString("</div>");
2436 ol.startIndent();
2437 }
2438 ol.popGeneratorState();
2439
2440 // part 1b
2441 ol.pushGeneratorState();
2444 { // for LaTeX/RTF only
2446 }
2447 ol.popGeneratorState();
2448
2449 // part 1c
2450 ol.pushGeneratorState();
2452 {
2453 // for LaTeX/RTF/Man
2454 ol.startGroupHeader(1);
2455 ol.parseText(s);
2456 ol.endGroupHeader(1);
2457 }
2458 ol.popGeneratorState();
2459
2460 SrcLangExt lang=getLanguage();
2461
2462 // part 2: the header and detailed description
2463 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
2464 {
2465 switch (lde->kind())
2466 {
2467 case LayoutDocEntry::BriefDesc:
2468 {
2469 // since we already shown the brief description in the
2470 // declaration part of the container, so we use this to
2471 // show the details on top.
2473 }
2474 break;
2475 case LayoutDocEntry::ClassInheritanceGraph:
2477 break;
2478 case LayoutDocEntry::ClassCollaborationGraph:
2480 break;
2481 case LayoutDocEntry::MemberDeclStart:
2483 break;
2484 case LayoutDocEntry::MemberDecl:
2485 {
2486 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
2487 if (lmd)
2488 {
2489 ClassDefSet visitedClasses;
2490 if (!isSimple) writeMemberDeclarations(ol,visitedClasses,lmd->type,lmd->title(lang),lmd->subtitle(lang),TRUE);
2491 }
2492 }
2493 break;
2494 case LayoutDocEntry::MemberGroups:
2496 break;
2497 case LayoutDocEntry::MemberDeclEnd:
2499 break;
2500 case LayoutDocEntry::MemberDefStart:
2502 break;
2503 case LayoutDocEntry::MemberDef:
2504 {
2505 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
2506 if (lmd)
2507 {
2508 if (isSimple)
2509 {
2511 }
2512 else
2513 {
2514 writeMemberDocumentation(ol,lmd->type,lmd->title(lang),TRUE);
2515 }
2516 }
2517 }
2518 break;
2519 case LayoutDocEntry::MemberDefEnd:
2521 break;
2522 default:
2523 break;
2524 }
2525 }
2526
2527 // part 3: close the block
2528 ol.pushGeneratorState();
2530 { // HTML only
2531 ol.endIndent();
2532 }
2533 ol.popGeneratorState();
2534}
void writeSimpleMemberDocumentation(OutputList &ol, MemberListType lt) const
void endIndent()
Definition outputlist.h:585
void startMemberDoc(const QCString &clName, const QCString &memName, const QCString &anchor, const QCString &title, int memCount, int memTotal, bool showInline)
Definition outputlist.h:532
void startMemberDocName(bool align)
Definition outputlist.h:679
void endMemberDocName()
Definition outputlist.h:681
void endMemberDoc(bool hasArgs)
Definition outputlist.h:536
void startIndent()
Definition outputlist.h:583
void addIndexItem(const QCString &s1, const QCString &s2)
Definition outputlist.h:591

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

◆ writeMemberDeclarations()

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

Implements ClassDef.

Definition at line 4834 of file classdef.cpp.

4838{
4839 //printf("%s: ClassDefImpl::writeMemberDeclarations lt=%s lt2=%s\n",qPrint(name()),qPrint(lt.to_string()),qPrint(lt2.to_string()));
4840 MemberList * ml = getMemberList(lt);
4841 MemberList * ml2 = getMemberList(lt2);
4842 if (getLanguage()==SrcLangExt::VHDL) // use specific declarations function
4843 {
4844 static const ClassDef *cdef;
4845 if (cdef!=this)
4846 { // only one inline link
4848 cdef=this;
4849 }
4850 if (ml)
4851 {
4852 VhdlDocGen::writeVhdlDeclarations(ml,ol,nullptr,this,nullptr,nullptr,nullptr);
4853 }
4854 }
4855 else
4856 {
4857 //printf("%s::writeMemberDeclarations(%s) ml=%p ml2=%p\n",qPrint(name()),qPrint(title),(void*)ml,(void*)ml2);
4858 QCString tt = title, st = subTitle;
4859 if (ml)
4860 {
4861 //printf(" writeDeclarations ml type=%s count=%d\n",qPrint(lt.to_string()),ml->numDecMembers(inheritedFrom));
4862 ml->writeDeclarations(ol,this,nullptr,nullptr,nullptr,nullptr,tt,st,FALSE,showInline,inheritedFrom,lt,true);
4863 tt.clear();
4864 st.clear();
4865 }
4866 if (ml2)
4867 {
4868 //printf(" writeDeclarations ml2 type=%s count=%d\n",qPrint(lt2.to_string()),ml2->numDecMembers(inheritedFrom));
4869 ml2->writeDeclarations(ol,this,nullptr,nullptr,nullptr,nullptr,tt,st,FALSE,showInline,inheritedFrom,lt,ml==nullptr);
4870 }
4871 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
4872 if (!inlineInheritedMembers) // show inherited members as separate lists
4873 {
4874 writeInheritedMemberDeclarations(ol,visitedClasses,lt,lt2,title,
4875 inheritedFrom ? inheritedFrom : this,
4876 invert,showAlways);
4877 }
4878 }
4879}
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:169
static void writeInlineClassLink(const ClassDef *, OutputList &ol)
static void writeVhdlDeclarations(const MemberList *, OutputList &, const GroupDef *, const ClassDef *, const FileDef *, const NamespaceDef *, const ModuleDef *)

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

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeMemberDocumentation()

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

Definition at line 4894 of file classdef.cpp.

4895{
4896 //printf("%s: ClassDefImpl::writeMemberDocumentation()\n",qPrint(name()));
4897 MemberList * ml = getMemberList(lt);
4898 if (ml) ml->writeDocumentation(ol,displayName(),this,title,FALSE,showInline);
4899}
void writeDocumentation(OutputList &ol, const QCString &scopeName, const Definition *container, const QCString &title, bool showEnumValues=FALSE, bool showInline=FALSE) const

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

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeMemberGroups()

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

Definition at line 2160 of file classdef.cpp.

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

References m_memberGroups, and m_subGrouping.

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeMemberList()

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

Implements ClassDef.

Definition at line 3086 of file classdef.cpp.

3087{
3088 bool cOpt = Config_getBool(OPTIMIZE_OUTPUT_FOR_C);
3089 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3090 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3091 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3092 if (m_allMemberNameInfoLinkedMap.empty() || cOpt) return;
3093 // only for HTML
3094 ol.pushGeneratorState();
3096
3098 if (sliceOpt)
3099 {
3100 if (compoundType()==Interface)
3101 {
3103 }
3104 else if (compoundType()==Struct)
3105 {
3107 }
3108 else if (compoundType()==Exception)
3109 {
3111 }
3112 else
3113 {
3115 }
3116 }
3117 else
3118 {
3120 }
3121
3122 QCString memListFile = getMemberListFileName();
3123 startFile(ol,memListFile,memListFile,theTranslator->trMemberList(),hli,!generateTreeView,getOutputFileBase());
3124 if (!generateTreeView)
3125 {
3127 {
3129 }
3130 ol.endQuickIndices();
3131 }
3132 startTitle(ol,QCString());
3134 endTitle(ol,QCString(),QCString());
3135 ol.startContents();
3136 ol.startParagraph();
3138 ol.docify(" ");
3141 ol.endParagraph();
3142
3143 //ol.startItemList();
3144
3145 bool first = true; // to prevent empty table
3146 int idx=0;
3147 for (auto &mni : m_allMemberNameInfoLinkedMap)
3148 {
3149 for (auto &mi : *mni)
3150 {
3151 const MemberDef *md=mi->memberDef();
3152 const ClassDef *cd=md->getClassDef();
3153 Protection prot = mi->prot();
3154 Specifier virt=md->virtualness();
3155
3156 //printf("%s: Member %s of class %s md->protection()=%d mi->prot=%d prot=%d inherited=%d\n",
3157 // qPrint(name()),qPrint(md->name()),qPrint(cd->name()),md->protection(),mi->prot,prot,mi->inherited);
3158
3159 if (cd && !md->name().isEmpty() && !md->isAnonymous())
3160 {
3161 bool memberWritten=FALSE;
3162 if (cd->isLinkable() && md->isLinkable())
3163 // create a link to the documentation
3164 {
3165 QCString name=mi->ambiguityResolutionScope()+md->name();
3166 //ol.writeListItem();
3167 if (first)
3168 {
3169 ol.writeString("<table class=\"directory\">\n");
3170 first = false;
3171 }
3172 ol.writeString(" <tr");
3173 if ((idx&1)==0) ol.writeString(" class=\"even\""); else ol.writeString(" class=\"odd\"");
3174 idx++;
3175 ol.writeString("><td class=\"entry\">");
3176 if (cd->isObjectiveC())
3177 {
3178 if (md->isObjCMethod())
3179 {
3180 if (md->isStatic())
3181 ol.writeString("+&#160;</td><td>");
3182 else
3183 ol.writeString("-&#160;</td><td>");
3184 }
3185 else
3186 ol.writeString("</td><td class=\"entry\">");
3187 }
3188 if (md->isObjCMethod())
3189 {
3191 md->getOutputFileBase(),
3192 md->anchor(),md->name());
3193 }
3194 else
3195 {
3196 //Definition *bd = md->getGroupDef();
3197 //if (bd==nullptr) bd=cd;
3199 md->getOutputFileBase(),
3200 md->anchor(),name);
3201
3202 if ( md->isFunction() || md->isSignal() || md->isSlot() ||
3203 (md->isFriend() && !md->argsString().isEmpty()))
3204 ol.docify(md->argsString());
3205 else if (md->isEnumerate())
3207 else if (md->isEnumValue())
3209 else if (md->isTypedef())
3210 ol.docify(" typedef");
3211 else if (md->isFriend() && md->typeString()=="friend class")
3212 ol.docify(" class");
3213 //ol.writeString("\n");
3214 }
3215 ol.writeString("</td>");
3216 memberWritten=TRUE;
3217 }
3218 else if (!cd->isArtificial() &&
3219 !Config_getBool(HIDE_UNDOC_MEMBERS) &&
3221 ) // no documentation,
3222 // generate link to the class instead.
3223 {
3224 //ol.writeListItem();
3225 if (first)
3226 {
3227 ol.writeString("<table class=\"directory\">\n");
3228 first = false;
3229 }
3230 ol.writeString(" <tr bgcolor=\"#f0f0f0\"");
3231 if ((idx&1)==0) ol.writeString(" class=\"even\""); else ol.writeString(" class=\"odd\"");
3232 idx++;
3233 ol.writeString("><td class=\"entry\">");
3234 if (cd->isObjectiveC())
3235 {
3236 if (md->isObjCMethod())
3237 {
3238 if (md->isStatic())
3239 ol.writeString("+&#160;</td><td class=\"entry\">");
3240 else
3241 ol.writeString("-&#160;</td><td class=\"entry\">");
3242 }
3243 else
3244 ol.writeString("</td><td class=\"entry\">");
3245 }
3246 ol.startBold();
3247 ol.docify(md->name());
3248 ol.endBold();
3249 if (!md->isObjCMethod())
3250 {
3251 if ( md->isFunction() || md->isSignal() || md->isSlot() )
3252 ol.docify(md->argsString());
3253 else if (md->isEnumerate())
3255 else if (md->isEnumValue())
3257 else if (md->isTypedef())
3258 ol.docify(" typedef");
3259 }
3260 ol.writeString(" (");
3262 if (cd->isLinkable())
3263 {
3264 ol.writeObjectLink(
3265 cd->getReference(),
3266 cd->getOutputFileBase(),
3267 cd->anchor(),
3268 cd->displayName());
3269 }
3270 else
3271 {
3272 ol.startBold();
3273 ol.docify(cd->displayName());
3274 ol.endBold();
3275 }
3276 ol.writeString(")");
3277 ol.writeString("</td>");
3278 memberWritten=TRUE;
3279 }
3280 if (memberWritten)
3281 {
3282 ol.writeString("<td class=\"entry\">");
3284 cd->getOutputFileBase(),
3285 cd->anchor(),
3286 md->category() ?
3287 md->category()->displayName() :
3288 cd->displayName());
3289 ol.writeString("</td>");
3290 ol.writeString("<td class=\"entry\">");
3291 }
3292 SrcLangExt lang = md->getLanguage();
3293 if (
3294 (prot!=Protection::Public || (virt!=Specifier::Normal && getLanguage()!=SrcLangExt::ObjC) ||
3295 md->isFriend() || md->isRelated() || md->isExplicit() ||
3296 md->isMutable() || (md->isInline() && Config_getBool(INLINE_INFO)) ||
3297 md->isSignal() || md->isSlot() ||
3298 (getLanguage()==SrcLangExt::IDL &&
3299 (md->isOptional() || md->isAttribute() || md->isUNOProperty())) ||
3300 md->isStatic() || lang==SrcLangExt::VHDL
3301 )
3302 && memberWritten)
3303 {
3304 StringVector sl;
3305 if (lang==SrcLangExt::VHDL)
3306 {
3307 sl.push_back(theTranslator->trVhdlType(md->getVhdlSpecifiers(),TRUE).str()); //append vhdl type
3308 }
3309 else if (md->isFriend()) sl.emplace_back("friend");
3310 else if (md->isRelated()) sl.emplace_back("related");
3311 else
3312 {
3313 if (Config_getBool(INLINE_INFO) && md->isInline())
3314 sl.emplace_back("inline");
3315 if (md->isExplicit()) sl.emplace_back("explicit");
3316 if (md->isMutable()) sl.emplace_back("mutable");
3317 if (prot==Protection::Protected) sl.emplace_back("protected");
3318 else if (prot==Protection::Private) sl.emplace_back("private");
3319 else if (prot==Protection::Package) sl.emplace_back("package");
3320 if (virt==Specifier::Virtual && getLanguage()!=SrcLangExt::ObjC)
3321 sl.emplace_back("virtual");
3322 else if (virt==Specifier::Pure) sl.emplace_back("pure virtual");
3323 if (md->isStatic()) sl.emplace_back("static");
3324 if (md->isSignal()) sl.emplace_back("signal");
3325 if (md->isSlot()) sl.emplace_back("slot");
3326// this is the extra member page
3327 if (md->isOptional()) sl.emplace_back("optional");
3328 if (md->isAttribute()) sl.emplace_back("attribute");
3329 if (md->isUNOProperty()) sl.emplace_back("property");
3330 if (md->isReadonly()) sl.emplace_back("readonly");
3331 if (md->isBound()) sl.emplace_back("bound");
3332 if (md->isRemovable()) sl.emplace_back("removable");
3333 if (md->isConstrained()) sl.emplace_back("constrained");
3334 if (md->isTransient()) sl.emplace_back("transient");
3335 if (md->isMaybeVoid()) sl.emplace_back("maybevoid");
3336 if (md->isMaybeDefault()) sl.emplace_back("maybedefault");
3337 if (md->isMaybeAmbiguous()) sl.emplace_back("maybeambiguous");
3338 }
3339 bool firstSpan=true;
3340 for (const auto &s : sl)
3341 {
3342 if (!firstSpan)
3343 {
3344 ol.writeString("</span><span class=\"mlabel\">");
3345 }
3346 else
3347 {
3348 ol.writeString("<span class=\"mlabel\">");
3349 firstSpan=false;
3350 }
3351 ol.docify(s.c_str());
3352 }
3353 if (!firstSpan) ol.writeString("</span>");
3354 }
3355 if (memberWritten)
3356 {
3357 ol.writeString("</td>");
3358 ol.writeString("</tr>\n");
3359 }
3360 }
3361 }
3362 }
3363 //ol.endItemList();
3364
3365 if (!first) ol.writeString("</table>");
3366
3367 endFile(ol);
3368 ol.popGeneratorState();
3369}
virtual bool isObjectiveC() const =0
Returns TRUE if this class is implemented in Objective-C.
QCString getMemberListFileName() const override
Definition classdef.cpp:981
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 isTransient() const =0
virtual bool isOptional() const =0
virtual QCString argsString() 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:426

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

◆ writeMemberPages()

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

Implements ClassDef.

Definition at line 3000 of file classdef.cpp.

3001{
3002 ///////////////////////////////////////////////////////////////////////////
3003 //// Member definitions on separate pages
3004 ///////////////////////////////////////////////////////////////////////////
3005
3006 ol.pushGeneratorState();
3008
3009 for (const auto &ml : m_memberLists)
3010 {
3011 if (ml->numDocMembers()>ml->numDocEnumValues() && ml->listType().isDetailed())
3012 {
3013 ml->writeDocumentationPage(ol,displayName(),this);
3014 }
3015 }
3016
3017 ol.popGeneratorState();
3018}

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

2537{
2538 // TODO: clean up this mess by moving it to
2539 // the output generators...
2540 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
2541 bool rtfHyperlinks = Config_getBool(RTF_HYPERLINKS);
2542 bool usePDFLatex = Config_getBool(USE_PDFLATEX);
2543
2544 // HTML only
2545 ol.pushGeneratorState();
2547 ol.docify(" ");
2549 anchor.isEmpty() ? QCString("details") : anchor);
2551 ol.endTextLink();
2552 ol.popGeneratorState();
2553
2554 if (!anchor.isEmpty())
2555 {
2556 ol.pushGeneratorState();
2557 // LaTeX + RTF
2561 if (!(usePDFLatex && pdfHyperlinks))
2562 {
2564 }
2565 if (!rtfHyperlinks)
2566 {
2568 }
2569 ol.docify(" ");
2572 ol.endTextLink();
2573 // RTF only
2575 ol.writeString("\\par");
2576 ol.popGeneratorState();
2577 }
2578}
void endTextLink()
Definition outputlist.h:445
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:443
virtual QCString trMore()=0

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

Referenced by writeBriefDescription(), and writeDeclarationLink().

◆ writeNestedClasses()

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

Definition at line 2177 of file classdef.cpp.

2178{
2179 // nested classes
2180 m_innerClasses.writeDeclaration(ol,nullptr,title,TRUE);
2181}

References m_innerClasses, title(), and TRUE.

Referenced by writeDocumentationContents().

◆ writePlainMemberDeclaration()

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

Definition at line 4908 of file classdef.cpp.

4911{
4912 //printf("%s: ClassDefImpl::writePlainMemberDeclaration()\n",qPrint(name()));
4913 MemberList * ml = getMemberList(lt);
4914 if (ml)
4915 {
4916 ml->writePlainDeclarations(ol,inGroup,this,nullptr,nullptr,nullptr,nullptr,indentLevel,inheritedFrom,inheritId);
4917 }
4918}
void writePlainDeclarations(OutputList &ol, bool inGroup, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, int indentLevel, const ClassDef *inheritedFrom, const QCString &inheritId) const

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

Referenced by writeDeclaration().

◆ writeQuickMemberLinks()

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

Implements DefinitionMutable.

Definition at line 3020 of file classdef.cpp.

3021{
3022 bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
3023
3024 ol.writeString(" <div class=\"navtab\">\n");
3025 ol.writeString(" <table>\n");
3026
3027 for (auto &mni : m_allMemberNameInfoLinkedMap)
3028 {
3029 for (auto &mi : *mni)
3030 {
3031 const MemberDef *md=mi->memberDef();
3032 if (md->getClassDef()==this && md->isLinkable() && !md->isEnumValue())
3033 {
3034 if (md->isLinkableInProject())
3035 {
3036 if (md==currentMd) // selected item => highlight
3037 {
3038 ol.writeString(" <tr><td class=\"navtabHL\">");
3039 }
3040 else
3041 {
3042 ol.writeString(" <tr><td class=\"navtab\">");
3043 }
3044 ol.writeString("<span class=\"label\"><a ");
3045 ol.writeString("href=\"");
3046 if (createSubDirs) ol.writeString("../../");
3047 QCString url = md->getOutputFileBase();
3049 ol.writeString(url+"#"+md->anchor());
3050 ol.writeString("\">");
3051 ol.writeString(convertToHtml(md->name()));
3052 ol.writeString("</a></span>");
3053 ol.writeString("</td></tr>\n");
3054 }
3055 }
3056 }
3057 }
3058
3059 ol.writeString(" </table>\n");
3060 ol.writeString(" </div>\n");
3061}
QCString convertToHtml(const QCString &s, bool keepEntities)
Definition util.cpp:4472
void createSubDirs(const Dir &d)
Definition util.cpp:4149
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5408

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

4902{
4903 //printf("%s: ClassDefImpl::writeSimpleMemberDocumentation()\n",qPrint(name()));
4904 MemberList * ml = getMemberList(lt);
4905 if (ml) ml->writeSimpleDocumentation(ol,this);
4906}
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 2241 of file classdef.cpp.

2242{
2243 static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
2244 ol.pushGeneratorState();
2246 bool first=TRUE;
2247 SrcLangExt lang = getLanguage();
2248
2249 if (lang!=SrcLangExt::VHDL)
2250 {
2251 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
2252 {
2253 if (lde->kind()==LayoutDocEntry::ClassNestedClasses &&
2254 m_innerClasses.declVisible()
2255 )
2256 {
2257 for (const auto &innerCd : m_innerClasses)
2258 {
2259 if (!innerCd->isAnonymous() &&
2260 !innerCd->isExtension() &&
2261 (innerCd->protection()!=Protection::Private || extractPrivate) &&
2262 innerCd->visibleInParentsDeclList()
2263 )
2264 {
2265 const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
2266 ol.writeSummaryLink(QCString(),"nested-classes",ls->title(lang),first);
2267 first=FALSE;
2268 break;
2269 }
2270 }
2271 }
2272 else if (lde->kind()==LayoutDocEntry::ClassAllMembersLink &&
2274 !Config_getBool(OPTIMIZE_OUTPUT_FOR_C)
2275 )
2276 {
2278 first=FALSE;
2279 }
2280 else if (lde->kind()==LayoutDocEntry::MemberDecl)
2281 {
2282 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
2283 if (lmd)
2284 {
2285 MemberList * ml = getMemberList(lmd->type);
2286 if (ml && ml->declVisible())
2287 {
2288 ol.writeSummaryLink(QCString(),ml->listType().toLabel(),lmd->title(lang),first);
2289 first=FALSE;
2290 }
2291 }
2292 }
2293 }
2294 }
2295 else // VDHL only
2296 {
2297 for (const auto &s : m_vhdlSummaryTitles)
2298 {
2299 ol.writeSummaryLink(QCString(),convertToId(QCString(s)),QCString(s),first);
2300 first=FALSE;
2301 }
2302 }
2303 if (!first)
2304 {
2305 ol.writeString(" </div>\n");
2306 }
2307 ol.popGeneratorState();
2308}
MemberListType listType() const
Definition memberlist.h:114
bool declVisible() const
constexpr const char * toLabel() const
Definition types.h:402
void writeSummaryLink(const QCString &file, const QCString &anchor, const QCString &title, bool first)
Definition outputlist.h:615
virtual QCString trListOfAllMembers()=0
QCString convertToId(const QCString &s)
Definition util.cpp:4381

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

◆ writeTagFile()

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

Implements ClassDef.

Definition at line 2310 of file classdef.cpp.

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

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

◆ writeTemplateSpec()

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

Definition at line 1500 of file classdef.cpp.

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

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

Referenced by writeDetailedDocumentationBody().

Member Data Documentation

◆ m_allMemberNameInfoLinkedMap

◆ m_arrowOperator

const MemberDef* ClassDefImpl::m_arrowOperator = nullptr
private

Does this class overloaded the -> operator?

Definition at line 536 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 499 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 494 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 418 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 464 of file classdef.cpp.

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

◆ m_constraintClassList

ConstraintClassList ClassDefImpl::m_constraintClassList
private

Definition at line 481 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 461 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 443 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 412 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 458 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 426 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 435 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 421 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 507 of file classdef.cpp.

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

◆ m_isJavaEnum

bool ClassDefImpl::m_isJavaEnum = false
private

Does this class represent a Java style enum?

Definition at line 541 of file classdef.cpp.

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

◆ m_isLocal

bool ClassDefImpl::m_isLocal = false
private

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

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

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

◆ m_isTemplArg

bool ClassDefImpl::m_isTemplArg = false
private

Definition at line 518 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 415 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 513 of file classdef.cpp.

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

◆ m_metaData

QCString ClassDefImpl::m_metaData
private

Definition at line 545 of file classdef.cpp.

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

◆ m_moduleDef

ModuleDef* ClassDefImpl::m_moduleDef = nullptr
private

Module this class is defined in

Definition at line 446 of file classdef.cpp.

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

◆ m_prot

Protection ClassDefImpl::m_prot
private

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

Definition at line 470 of file classdef.cpp.

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

◆ m_qualifiers

StringVector ClassDefImpl::m_qualifiers
private

Definition at line 550 of file classdef.cpp.

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

◆ m_requiresClause

QCString ClassDefImpl::m_requiresClause
private

C++20 requires clause.

Definition at line 548 of file classdef.cpp.

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

◆ m_spec

◆ m_subGrouping

bool ClassDefImpl::m_subGrouping = false
private

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

Definition at line 524 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 538 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 486 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 488 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 455 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 479 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 527 of file classdef.cpp.

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

◆ m_usesImplClassList

UsesClassList ClassDefImpl::m_usesImplClassList
private

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

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


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