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 writePageNavigation (OutputList &ol) const override
void writeSummaryLinks (OutputList &ol) const override
void reclassifyMember (MemberDefMutable *md, MemberType t) override
void writeInlineDocumentation (OutputList &ol) const override
 Write class documentation inside another container (i.e.
void writeDeclarationLink (OutputList &ol, bool &found, const QCString &header, bool localNames) const override
void removeMemberFromLists (MemberDef *md) override
void setAnonymousEnumType () override
void countMembers () override
void sortAllMembersList () override
void addGroupedInheritedMembers (OutputList &ol, MemberListType lt, const ClassDef *inheritedFrom, const QCString &inheritId) const override
void writeTagFile (TextStream &) const override
int countMembersIncludingGrouped (MemberListType lt, const ClassDef *inheritedFrom, bool additional) const override
int countMemberDeclarations (MemberListType lt, const ClassDef *inheritedFrom, MemberListType lt2, bool invert, bool showAlways, ClassDefSet &visitedClasses) const override
void writeMemberDeclarations (OutputList &ol, ClassDefSet &visitedClasses, MemberListType lt, const QCString &title, const QCString &subTitle=QCString(), bool showInline=FALSE, const ClassDef *inheritedFrom=nullptr, MemberListType lt2=MemberListType::Invalid(), bool invert=FALSE, bool showAlways=FALSE) const override
void setRequiresClause (const QCString &req) override
CLASS_GRAPH_t hasInheritanceGraph () const override
void overrideInheritanceGraph (CLASS_GRAPH_t e) override
bool hasCollaborationGraph () const override
void overrideCollaborationGraph (bool e) override
Public Member Functions inherited from DefinitionMixin< ClassDefMutable >
 DefinitionMixin (const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
DefinitionMixinoperator= (const DefinitionMixin &other)
 ~DefinitionMixin () override=default
bool isAlias () const override
const QCStringname () const override
bool isAnonymous () const override
const QCStringlocalName () const override
QCString qualifiedName () const override
QCString symbolName () const override
QCString getSourceFileBase () const override
QCString getSourceAnchor () const override
QCString documentation () const override
int docLine () const override
QCString docFile () const override
QCString briefDescription (bool abbreviate=FALSE) const override
QCString briefDescriptionAsTooltip () const override
int briefLine () const override
QCString inbodyDocumentation () const override
QCString inbodyFile () const override
int inbodyLine () const override
QCString briefFile () const override
QCString getDefFileName () const override
QCString getDefFileExtension () const override
int getDefLine () const override
int getDefColumn () const override
bool hasDocumentation () const override
bool hasUserDocumentation () const override
bool isVisibleInProject () const override
bool isVisible () const override
bool isHidden () const override
bool isArtificial () const override
bool isExported () const override
QCString getReference () const override
bool isReference () const override
QCString externalReference (const QCString &relPath) const override
int getStartDefLine () const override
int getStartBodyLine () const override
int getEndBodyLine () const override
const FileDefgetBodyDef () const override
SrcLangExt getLanguage () const override
const GroupListpartOfGroups () const override
bool isLinkableViaGroup () const override
const RefItemVectorxrefListItems () const override
const 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
void writePageNavigation (OutputList &ol) const override
QCString pathFragment () const override
void writeDocAnchorsToTagFile (TextStream &fs) const override
void setLocalName (const QCString &name) override
void writeToc (OutputList &ol, const LocalToc &lt) const override
void computeTooltip () override
void _setSymbolName (const QCString &name) override
QCString _symbolName () const override

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

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

Detailed Description

Implementation of the ClassDef interface.

Definition at line 184 of file classdef.cpp.

Constructor & Destructor Documentation

◆ ClassDefImpl()

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

Definition at line 800 of file classdef.cpp.

805 : DefinitionMixin(defFileName,defLine,defColumn,removeRedundantWhiteSpace(nm),nullptr,nullptr,isSymbol)
806{
807 AUTO_TRACE("name={}",name());
808 setReference(lref);
809 m_compType = ct;
811 QCString compTypeString = getCompoundTypeString(getLanguage(),ct,isJavaEnum);
812 if (!fName.isEmpty())
813 {
815 }
816 else
817 {
818 m_fileName=compTypeString+name();
819 }
820 m_prot=Protection::Public;
821 //nspace=nullptr;
822 m_fileDef=nullptr;
823 m_moduleDef=nullptr;
824 m_subGrouping=Config_getBool(SUBGROUPING);
825 m_templateMaster =nullptr;
830 m_categoryOf = nullptr;
832 m_isSimple = Config_getBool(INLINE_SIMPLE_STRUCTS);
833 m_arrowOperator = nullptr;
834 m_tagLessRef = nullptr;
835 m_spec=TypeSpecifier();
836 //QCString ns;
837 //extractNamespaceName(name,className,ns);
838 //printf("m_name=%s m_className=%s ns=%s\n",qPrint(m_name),qPrint(m_className),qPrint(ns));
839
840 // we cannot use getLanguage at this point, as setLanguage has not been called.
841 SrcLangExt lang = getLanguageFromFileName(defFileName);
842 if ((lang==SrcLangExt::Cpp || lang==SrcLangExt::ObjC) && guessSection(defFileName).isSource())
843 {
845 }
846 else
847 {
849 }
850 m_hasCollaborationGraph = Config_getBool(COLLABORATION_GRAPH);
852 m_memberListFileName = convertNameToFile(compTypeString+name()+"-members");
855 if (lref.isEmpty())
856 {
858 }
859 AUTO_TRACE_EXIT("m_fileName='{}'",m_fileName);
860}
QCString m_collabFileName
Definition classdef.cpp:419
QCString m_fileName
Definition classdef.cpp:413
const MemberDef * m_arrowOperator
Does this class overloaded the -> operator?
Definition classdef.cpp:537
TypeSpecifier m_spec
Definition classdef.cpp:544
ClassDef * m_categoryOf
Definition classdef.cpp:500
const ClassDef * m_tagLessRef
Definition classdef.cpp:539
Protection m_prot
Definition classdef.cpp:471
QCString m_inheritFileName
Definition classdef.cpp:422
const ClassDef * m_templateMaster
Definition classdef.cpp:492
bool m_membersMerged
Definition classdef.cpp:514
bool m_isJavaEnum
Does this class represent a Java style enum?
Definition classdef.cpp:542
ModuleDef * m_moduleDef
Definition classdef.cpp:447
bool isJavaEnum() const override
bool m_isSimple
Is this a simple (non-nested) C structure?
Definition classdef.cpp:534
CLASS_GRAPH_t m_typeInheritanceGraph
Definition classdef.cpp:554
bool m_isAbstract
Definition classdef.cpp:508
FileDef * m_fileDef
Definition classdef.cpp:444
ClassDef::CompoundType m_compType
Definition classdef.cpp:465
bool m_hasCollaborationGraph
Definition classdef.cpp:553
bool m_isTemplArg
Definition classdef.cpp:519
bool m_usedOnly
Reason of existence is a "use" relation.
Definition classdef.cpp:528
QCString m_memberListFileName
Definition classdef.cpp:416
bool m_subGrouping
Definition classdef.cpp:525
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:5721
QCString stripExtension(const QCString &fName)
Definition util.cpp:5437
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:4020
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 2713 of file classdef.cpp.

2714{
2715 StringVector sl;
2716 if (isFinal()) sl.emplace_back("final");
2717 if (isSealed()) sl.emplace_back("sealed");
2718 if (isAbstract()) sl.emplace_back("abstract");
2719 if (isExported()) sl.emplace_back("export");
2720 if (getLanguage()==SrcLangExt::IDL && isPublished()) sl.emplace_back("published");
2721
2722 for (const auto &sx : m_qualifiers)
2723 {
2724 bool alreadyAdded = std::find(sl.begin(), sl.end(), sx) != sl.end();
2725 if (!alreadyAdded)
2726 {
2727 sl.push_back(sx);
2728 }
2729 }
2730
2731 ol.pushGeneratorState();
2733 if (!sl.empty())
2734 {
2735 ol.startLabels();
2736 size_t i=0;
2737 for (const auto &s : sl)
2738 {
2739 i++;
2740 ol.writeLabel(s.c_str(),i==sl.size());
2741 }
2742 ol.endLabels();
2743 }
2744 ol.popGeneratorState();
2745}
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:551
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:743
void writeLabel(const QCString &l, bool isLast)
Definition outputlist.h:741
void startLabels()
Definition outputlist.h:739
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 3396 of file classdef.cpp.

3397{
3398 return m_examples.inSort(Example(anchor,nameStr,file));
3399}
ExampleList m_examples
Definition classdef.cpp:462
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 4909 of file classdef.cpp.

4911{
4912 //printf("** %s::addGroupedInheritedMembers() inheritId=%s\n",qPrint(name()),qPrint(inheritId));
4913 for (const auto &mg : m_memberGroups)
4914 {
4915 if (!mg->allMembersInSameSection() || !m_subGrouping) // group is in its own section
4916 {
4917 mg->addGroupedInheritedMembers(ol,this,lt,inheritedFrom,inheritId);
4918 }
4919 }
4920}
MemberGroupList m_memberGroups
Definition classdef.cpp:505

References m_memberGroups, and m_subGrouping.

◆ addInnerCompound()

void ClassDefImpl::addInnerCompound ( Definition * d)
overridevirtual

Implements DefinitionMutable.

Definition at line 4310 of file classdef.cpp.

4311{
4312 //printf("**** %s::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
4313 if (d->definitionType()==Definition::TypeClass) // only classes can be
4314 // nested in classes.
4315 {
4316 m_innerClasses.add(d->localName(),toClassDef(d));
4317 }
4318}
ClassLinkedRefMap m_innerClasses
Definition classdef.cpp:476
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 4516 of file classdef.cpp.

4517{
4518 SrcLangExt lang = getLanguage();
4519 if (!isLinkableInProject()) return;
4520 //printf("ClassDef(%s)::addListReferences()\n",qPrint(name()));
4521 {
4522 const RefItemVector &xrefItems = xrefListItems();
4523 addRefItem(xrefItems,
4524 qualifiedName(),
4527 displayName(),
4528 QCString(),
4529 this
4530 );
4531 }
4532 for (const auto &mg : m_memberGroups)
4533 {
4534 mg->addListReferences(this);
4535 }
4536 for (auto &ml : m_memberLists)
4537 {
4538 if (ml->listType().isDetailed())
4539 {
4540 ml->addListReferences(this);
4541 }
4542 }
4543}
bool isLinkableInProject() const override
MemberLists m_memberLists
Definition classdef.cpp:502
QCString getOutputFileBase() const override
QCString displayName(bool includeScope=TRUE) const override
Definition classdef.cpp:989
CompoundType compoundType() const override
Returns the type of compound this is, i.e.
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:5318

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

◆ addMembersToMemberGroup()

void ClassDefImpl::addMembersToMemberGroup ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1014 of file classdef.cpp.

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

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

Referenced by addMembersToMemberGroup().

◆ addMembersToTemplateInstance()

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

Implements ClassDefMutable.

Definition at line 4429 of file classdef.cpp.

4430{
4431 //printf("%s::addMembersToTemplateInstance(%s,%s)\n",qPrint(name()),qPrint(cd->name()),templSpec);
4432 for (const auto &mni : cd->memberNameInfoLinkedMap())
4433 {
4434 for (const auto &mi : *mni)
4435 {
4436 const MemberDef *md = mi->memberDef();
4437 if (m_allMemberNameInfoLinkedMap.find(md->name())==nullptr) // only insert the member if not hidden by one with the same name (#11541)
4438 {
4440 }
4441 }
4442 }
4443 // also instantatie members for nested classes
4444 for (const auto &innerCd : cd->getClasses())
4445 {
4446 ClassDefMutable *ncd = toClassDefMutable(m_innerClasses.find(innerCd->localName()));
4447 if (ncd)
4448 {
4449 ncd->addMembersToTemplateInstance(innerCd,cd->templateArguments(),templSpec);
4450 }
4451 }
4452}
virtual const ArgumentList & templateArguments() const =0
Returns the template arguments of this class.
virtual const MemberNameInfoLinkedMap & memberNameInfoLinkedMap() const =0
Returns a dictionary of all members.
virtual ClassLinkedRefMap getClasses() const =0
returns the classes nested into this class
void addMemberToTemplateInstance(const MemberDef *md, const ArgumentList &templateArguments, const QCString &templSpec) override
const ArgumentList & templateArguments() const override
Returns the template arguments of this class.
MemberNameInfoLinkedMap m_allMemberNameInfoLinkedMap
Definition classdef.cpp:450
virtual void addMembersToTemplateInstance(const ClassDef *cd, const ArgumentList &templateArguments, const QCString &templSpec)=0
virtual const QCString & name() const =0
ClassDefMutable * toClassDefMutable(Definition *d)

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

◆ addMemberToList()

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

Definition at line 4587 of file classdef.cpp.

4588{
4589 AUTO_TRACE("{} md={} lt={} isBrief={}",name(),md->name(),lt,isBrief);
4590 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
4591 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
4592 const auto &ml = m_memberLists.get(lt,MemberListContainer::Class);
4593 ml->setNeedsSorting((isBrief && sortBriefDocs) || (!isBrief && sortMemberDocs));
4594 ml->push_back(md);
4595
4596 // for members in the declaration lists we set the section, needed for member grouping
4597 if (!ml->listType().isDetailed())
4598 {
4599 MemberDefMutable *mdm = toMemberDefMutable(md);
4600 if (mdm)
4601 {
4602 mdm->setSectionList(this,ml.get());
4603 }
4604 }
4605}
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 4403 of file classdef.cpp.

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

5285{
5286 for (const auto &sx : qualifiers)
5287 {
5288 bool alreadyAdded = std::find(m_qualifiers.begin(), m_qualifiers.end(), sx) != m_qualifiers.end();
5289 if (!alreadyAdded)
5290 {
5291 m_qualifiers.push_back(sx);
5292 }
5293 }
5294}

References m_qualifiers.

◆ addTypeConstraint()

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

Definition at line 3407 of file classdef.cpp.

3408{
3409 //printf("addTypeConstraint(%s,%s)\n",qPrint(type),qPrint(typeConstraint));
3410 bool hideUndocRelation = Config_getBool(HIDE_UNDOC_RELATIONS);
3411 if (typeConstraint.isEmpty() || type.isEmpty()) return;
3412 SymbolResolver resolver(getFileDef());
3413 ClassDefMutable *cd = resolver.resolveClassMutable(this,typeConstraint);
3414 if (cd==nullptr && !hideUndocRelation)
3415 {
3416 cd = toClassDefMutable(
3417 Doxygen::hiddenClassLinkedMap->add(typeConstraint,
3418 std::unique_ptr<ClassDef>(
3419 new ClassDefImpl(
3421 getDefColumn(),
3422 typeConstraint,
3423 ClassDef::Class))));
3424 if (cd)
3425 {
3426 cd->setUsedOnly(TRUE);
3427 cd->setLanguage(getLanguage());
3428 //printf("Adding undocumented constraint '%s' to class %s on type %s\n",
3429 // qPrint(typeConstraint),qPrint(name()),qPrint(type));
3430 }
3431 }
3432 if (cd)
3433 {
3434 auto it = std::find_if(m_constraintClassList.begin(),
3436 [&cd](const auto &ccd) { return ccd.classDef==cd; });
3437
3438 if (it==m_constraintClassList.end())
3439 {
3440 m_constraintClassList.emplace_back(cd);
3441 it = m_constraintClassList.end()-1;
3442 }
3443 (*it).addAccessor(type);
3444 //printf("Adding constraint '%s' to class %s on type %s\n",
3445 // qPrint(typeConstraint),qPrint(name()),qPrint(type));
3446 }
3447}
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:800
ConstraintClassList m_constraintClassList
Definition classdef.cpp:482
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 3450 of file classdef.cpp.

3451{
3452 for (const Argument &a : m_tempArgs)
3453 {
3454 if (!a.typeConstraint.isEmpty())
3455 {
3456 QCString typeConstraint;
3457 int i=0,p=0;
3458 while ((i=a.typeConstraint.find('&',p))!=-1) // typeConstraint="A &I" for C<T extends A & I>
3459 {
3460 typeConstraint = a.typeConstraint.mid(p,i-p).stripWhiteSpace();
3461 addTypeConstraint(typeConstraint,a.type);
3462 p=i+1;
3463 }
3464 typeConstraint = a.typeConstraint.right(a.typeConstraint.length()-p).stripWhiteSpace();
3465 addTypeConstraint(typeConstraint,a.type);
3466 }
3467 }
3468}
void addTypeConstraint(const QCString &typeConstraint, const QCString &type)
ArgumentList m_tempArgs
Definition classdef.cpp:453
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 4197 of file classdef.cpp.

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

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

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

5209{
5210 QCString anc;
5212 {
5214 {
5215 // point to the template of which this class is an instance
5216 anc = m_templateMaster->getOutputFileBase();
5217 }
5218 else
5219 {
5220 anc = m_fileName;
5221 }
5222 }
5223 return anc;
5224}
bool m_implicitTemplateInstance
Definition classdef.cpp:556
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 4963 of file classdef.cpp.

4964{
4965 return m_inherits;
4966}
BaseClassList m_inherits
Definition classdef.cpp:432

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

5114{
5115 return m_categoryOf;
5116}

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

4501{
4502 QCString name = m_className.isEmpty() ? localName() : m_className;
4503 auto lang = getLanguage();
4504 if (lang==SrcLangExt::CSharp)
4505 {
4507 }
4508 return name;
4509}
QCString m_className
Definition classdef.cpp:495
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:7400

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

5388{
5389 switch (compoundType())
5390 {
5391 case Class: return CodeSymbolType::Class; break;
5392 case Struct: return CodeSymbolType::Struct; break;
5393 case Union: return CodeSymbolType::Union; break;
5394 case Interface: return CodeSymbolType::Interface; break;
5395 case Protocol: return CodeSymbolType::Protocol; break;
5396 case Category: return CodeSymbolType::Category; break;
5397 case Exception: return CodeSymbolType::Exception; break;
5398 case Service: return CodeSymbolType::Service; break;
5399 case Singleton: return CodeSymbolType::Singleton; break;
5400 }
5401 return CodeSymbolType::Class;
5402}
@ 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 5367 of file classdef.cpp.

5368{
5369 return m_collabFileName;
5370}

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

4959{
4960 return m_compType;
4961}

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

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

References m_memberGroups, and m_memberLists.

◆ containsOverload()

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

Implements ClassDef.

Definition at line 5301 of file classdef.cpp.

5302{
5303 AUTO_TRACE("name={}",md->name());
5304 const auto &mni = m_allMemberNameInfoLinkedMap.find(md->name());
5305 if (mni)
5306 {
5307 for (const auto &mi : *mni)
5308 {
5309 const MemberDef *classMd = mi->memberDef();
5310 const ArgumentList &classAl = classMd->argumentList();
5311 const ArgumentList &al = md->argumentList();
5312 bool found = matchArguments2(
5313 classMd->getOuterScope(),classMd->getFileDef(),&classAl,
5314 md->getOuterScope(),md->getFileDef(),&al,
5315 true,getLanguage()
5316 );
5317 if (found)
5318 {
5319 AUTO_TRACE_EXIT("true");
5320 return true;
5321 }
5322 }
5323 }
5324 AUTO_TRACE_EXIT("false");
5325 return false;
5326}
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 4758 of file classdef.cpp.

4759{
4760 int totalCount=0;
4761 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4762 {
4763 if (lde->kind()==LayoutDocEntry::MemberDecl)
4764 {
4765 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4766 if (lmd && lmd->type!=MemberListType::Friends()) // friendship is not inherited
4767 {
4768 ClassDefSet visited;
4769 totalCount+=countInheritedDecMembers(lmd->type,this,TRUE,FALSE,visited);
4770 }
4771 }
4772 }
4773 //printf("countAdditionalInheritedMembers()=%d\n",totalCount);
4774 return totalCount;
4775}
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 1822 of file classdef.cpp.

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

References countInheritedByNodes(), and countInheritsNodes().

Referenced by writeInheritanceGraph().

◆ countInheritedByNodes()

int ClassDefImpl::countInheritedByNodes ( ) const
private

Definition at line 1800 of file classdef.cpp.

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

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

4704{
4705 int inhCount = 0;
4706 int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
4707 bool process = count>0;
4708 //printf("%s: countInheritedDecMembers: lt=%s process=%d count=%d invert=%d\n",
4709 // qPrint(name()),lt.to_string(),process,count,invert);
4710 if ((process^invert) || showAlways)
4711 {
4712 for (const auto &ibcd : m_inherits)
4713 {
4714 ClassDefMutable *icd = toClassDefMutable(ibcd.classDef);
4715 MemberListType lt1 = MemberListType::Invalid();
4716 MemberListType lt2 = MemberListType::Invalid();
4717 if (icd && icd->isLinkable())
4718 {
4719 convertProtectionLevel(lt,ibcd.prot,&lt1,&lt2);
4720 //printf("%s: convert %s->(%s,%s) prot=%d\n",
4721 // qPrint(icd->name()),lt.to_string(),lt1.to_string(),lt2.to_string(),ibcd.prot);
4722 if (visitedClasses.find(icd)==visitedClasses.end())
4723 {
4724 visitedClasses.insert(icd); // guard for multiple virtual inheritance
4725 if (!lt1.isInvalid())
4726 {
4727 inhCount+=icd->countMemberDeclarations(lt1,inheritedFrom,lt2,FALSE,TRUE,visitedClasses);
4728 }
4729 }
4730 }
4731 }
4732 }
4733 //printf("%s: count=%d\n",qPrint(name()),inhCount);
4734 return inhCount;
4735}
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:6706

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

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

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

4625{
4626 //printf("%s: countMemberDeclarations for %s and %s\n",qPrint(name()),lt.to_string(),lt2.to_string());
4627 int count=0;
4628 MemberList * ml = getMemberList(lt);
4629 MemberList * ml2 = getMemberList(lt2);
4630 if (getLanguage()!=SrcLangExt::VHDL) // use specific declarations function
4631 {
4632 if (ml)
4633 {
4634 count+=ml->numDecMembers(inheritedFrom);
4635 //printf("-> ml=%d\n",ml->numDecMembers());
4636 }
4637 if (ml2)
4638 {
4639 count+=ml2->numDecMembers(inheritedFrom);
4640 //printf("-> ml2=%d\n",ml2->numDecMembers());
4641 }
4642 // also include grouped members that have their own section in the class (see bug 722759)
4643 if (inheritedFrom)
4644 {
4645 for (const auto &mg : m_memberGroups)
4646 {
4647 count+=mg->countGroupedInheritedMembers(lt);
4648 if (!lt2.isInvalid()) count+=mg->countGroupedInheritedMembers(lt2);
4649 }
4650 }
4651 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
4652 if (!inlineInheritedMembers) // show inherited members as separate lists
4653 {
4654 count+=countInheritedDecMembers(lt,inheritedFrom,invert,showAlways,visitedClasses);
4655 }
4656 }
4657 //printf("-> %d\n",count);
4658 return count;
4659}
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 4687 of file classdef.cpp.

4688{
4689 for (auto &ml : m_memberLists)
4690 {
4691 ml->countDecMembers();
4692 ml->countDocMembers();
4693 }
4694 for (const auto &mg : m_memberGroups)
4695 {
4696 mg->countDecMembers();
4697 mg->countDocMembers();
4698 }
4699}

References m_memberGroups, and m_memberLists.

◆ countMembersIncludingGrouped()

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

Implements ClassDef.

Definition at line 4794 of file classdef.cpp.

4796{
4797 int count=0;
4798 MemberList *ml = getMemberList(lt);
4799 if (ml)
4800 {
4801 count=ml->countInheritableMembers(inheritedFrom);
4802 }
4803 //printf("%s:countMembersIncludingGrouped: count=%d\n",qPrint(name()),count);
4804 for (const auto &mg : m_memberGroups)
4805 {
4806 bool hasOwnSection = !mg->allMembersInSameSection() ||
4807 !m_subGrouping; // group is in its own section
4808 if ((additional && hasOwnSection) || (!additional && !hasOwnSection))
4809 {
4810 count+=mg->countGroupedInheritedMembers(lt);
4811 }
4812 }
4813 //printf("%s:countMembersIncludingGrouped(lt=%s,%s)=%d\n",
4814 // qPrint(name()),qPrint(lt.to_string()),ml?qPrint(ml->listType().to_string()):"<none>",count);
4815 return count;
4816}
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 862 of file classdef.cpp.

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

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

References makeDisplayName().

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

◆ distributeMemberGroupDocumentation()

void ClassDefImpl::distributeMemberGroupDocumentation ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1361 of file classdef.cpp.

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

References m_memberGroups.

◆ endMemberDeclarations()

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

Definition at line 2217 of file classdef.cpp.

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

2202{
2203 //printf("%s: ClassDefImpl::endMemberDocumentation()\n",qPrint(name()));
2204 if (Config_getBool(SEPARATE_MEMBER_PAGES))
2205 {
2208 }
2209}
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 4320 of file classdef.cpp.

4321{
4322 return m_innerClasses.find(name);
4323}

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

◆ findSectionsInDocumentation()

void ClassDefImpl::findSectionsInDocumentation ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 1369 of file classdef.cpp.

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

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

4954{
4955 return m_innerClasses;
4956}

References m_innerClasses.

◆ getExamples()

const ExampleList & ClassDefImpl::getExamples ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5347 of file classdef.cpp.

5348{
5349 return m_examples;
5350}

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

5009{
5010 return m_fileDef;
5011}

References m_fileDef.

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

◆ getInstanceOutputFileBase()

QCString ClassDefImpl::getInstanceOutputFileBase ( ) const
overridevirtual

Implements ClassDef.

Definition at line 4273 of file classdef.cpp.

4274{
4275 return m_fileName;
4276}

References m_fileName.

◆ getMemberByName()

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

Returns the member with the given name.

Implements ClassDef.

Definition at line 4545 of file classdef.cpp.

4546{
4547 const MemberDef *xmd = nullptr;
4548 const MemberNameInfo *mni = m_allMemberNameInfoLinkedMap.find(name);
4549 if (mni)
4550 {
4551 const int maxInheritanceDepth = 100000;
4552 int mdist=maxInheritanceDepth;
4553 for (auto &mi : *mni)
4554 {
4555 const ClassDef *mcd=mi->memberDef()->getClassDef();
4556 int m=minClassDistance(this,mcd);
4557 //printf("found member in %s linkable=%d m=%d\n",
4558 // qPrint(mcd->name()),mcd->isLinkable(),m);
4559 if (m<mdist)
4560 {
4561 mdist=m;
4562 xmd=mi->memberDef();
4563 }
4564 }
4565 }
4566 //printf("getMemberByName(%s)=%p\n",qPrint(name),xmd);
4567 return xmd;
4568}
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 5123 of file classdef.cpp.

5124{
5125 return m_memberGroups;
5126}

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

4576{
4577 for (auto &ml : m_memberLists)
4578 {
4579 if (ml->listType()==lt)
4580 {
4581 return ml.get();
4582 }
4583 }
4584 return nullptr;
4585}

References m_memberLists.

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

◆ getMemberListFileName()

QCString ClassDefImpl::getMemberListFileName ( ) const
overridevirtual

Implements ClassDef.

Definition at line 984 of file classdef.cpp.

985{
987}

References m_memberListFileName.

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

◆ getMemberLists()

const MemberLists & ClassDefImpl::getMemberLists ( ) const
overridevirtual

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

Implements ClassDef.

Definition at line 5118 of file classdef.cpp.

5119{
5120 return m_memberLists;
5121}

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

5014{
5015 return m_moduleDef;
5016}

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

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

5297{
5298 return m_qualifiers;
5299}

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

4455{
4457 {
4458 return m_templateMaster->getReference();
4459 }
4460 else
4461 {
4463 }
4464}
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 4278 of file classdef.cpp.

4279{
4281 {
4282 return m_templateMaster->getSourceFileBase();
4283 }
4284 else
4285 {
4287 }
4288}
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 4398 of file classdef.cpp.

4399{
4400 return m_templBaseClassNames;
4401}

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

5019{
5020 return m_templateInstances;
5021}

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

4479{
4480 ArgumentLists result;
4481 Definition *d=getOuterScope();
4482 while (d && d->definitionType()==Definition::TypeClass)
4483 {
4484 result.insert(result.begin(),toClassDef(d)->templateArguments());
4485 d = d->getOuterScope();
4486 }
4487 if (!templateArguments().empty())
4488 {
4489 result.push_back(templateArguments());
4490 }
4491 return result;
4492}
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 4737 of file classdef.cpp.

4739{
4740 SrcLangExt lang = getLanguage();
4741 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4742 {
4743 if (lde->kind()==LayoutDocEntry::MemberDecl)
4744 {
4745 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4746 if (lmd && lmd->type==type)
4747 {
4748 title = lmd->title(lang);
4749 subtitle = lmd->subtitle(lang);
4750 return;
4751 }
4752 }
4753 }
4754 title="";
4755 subtitle="";
4756}
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 5409 of file classdef.cpp.

5410{
5412}

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

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

3653{
3655}
bool hasDocumentation() const override

References DefinitionMixin< Base >::hasDocumentation().

Referenced by isLinkableInProject(), and isVisibleInHierarchy().

◆ hasExamples()

bool ClassDefImpl::hasExamples ( ) const
overridevirtual

Implements ClassDef.

Definition at line 3402 of file classdef.cpp.

3403{
3404 return !m_examples.empty();
3405}

References m_examples.

Referenced by writeDetailedDocumentationBody(), and writeDocumentationContents().

◆ hasInheritanceGraph()

CLASS_GRAPH_t ClassDefImpl::hasInheritanceGraph ( ) const
overridevirtual

Implements ClassDefMutable.

Definition at line 5382 of file classdef.cpp.

5383{
5385}

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

3520{
3521 return hasNonReferenceSuperClassRec(this,0);
3522}
static bool hasNonReferenceSuperClassRec(const ClassDef *cd, int level)

References hasNonReferenceSuperClassRec().

Referenced by isVisibleInHierarchy().

◆ hideDerivedVariablesInPython()

void ClassDefImpl::hideDerivedVariablesInPython ( ClassDefMutable * cls)
private

Definition at line 3960 of file classdef.cpp.

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

5044{
5045 return m_incInfo.get();
5046}

References m_incInfo.

◆ inheritanceGraphFileName()

QCString ClassDefImpl::inheritanceGraphFileName ( ) const
overridevirtual

returns the file name to use for the inheritance graph

Implements ClassDef.

Definition at line 5372 of file classdef.cpp.

5373{
5374 return m_inheritFileName;
5375}

References m_inheritFileName.

◆ insertBaseClass()

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

Implements ClassDefMutable.

Definition at line 995 of file classdef.cpp.

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

References FALSE, m_inherits, and m_isSimple.

Referenced by mergeCategory().

◆ insertExplicitTemplateInstance()

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

Implements ClassDefMutable.

Definition at line 4388 of file classdef.cpp.

4389{
4390 m_templateInstances.emplace_back(templSpec,templateClass);
4391}

References m_templateInstances.

◆ insertMember()

void ClassDefImpl::insertMember ( MemberDef * md)
overridevirtual

Implements ClassDefMutable.

Definition at line 1339 of file classdef.cpp.

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

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

Referenced by addMemberToTemplateInstance(), and reclassifyMember().

◆ insertSubClass()

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

Implements ClassDefMutable.

Definition at line 1004 of file classdef.cpp.

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

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

◆ insertTemplateInstance()

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

Implements ClassDefMutable.

Definition at line 4325 of file classdef.cpp.

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

1390{
1391 if (fd==nullptr) return;
1392 auto it = std::find(m_files.begin(),m_files.end(),fd);
1393 if (it==m_files.end())
1394 {
1395 m_files.push_back(fd);
1396 }
1397 for (const auto &ti : m_templateInstances)
1398 {
1399 ClassDefMutable *cdm = toClassDefMutable(ti.classDef);
1400 if (cdm)
1401 {
1402 cdm->insertUsedFile(fd);
1403 }
1404 }
1405}
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 1036 of file classdef.cpp.

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

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

5069{
5070 return m_isAbstract || m_spec.isAbstract();
5071}

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

4571{
4572 return md->getClassDef() && isBaseClass(md->getClassDef(),TRUE,QCString());
4573}
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 3662 of file classdef.cpp.

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

5109{
5110 return getLanguage()==SrcLangExt::CSharp;
5111}

References DefinitionMixin< ClassDefMutable >::getLanguage().

◆ isEmbeddedInOuterScope()

bool ClassDefImpl::isEmbeddedInOuterScope ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5226 of file classdef.cpp.

5227{
5228 bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
5229 bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
5230
5231 Definition *container = getOuterScope();
5232
5233 bool containerLinkable =
5234 container &&
5235 (
5236 (container==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) || // global class in documented file
5237 container->isLinkableInProject() // class in documented scope
5238 );
5239
5240 // inline because of INLINE_GROUPED_CLASSES=YES ?
5241 bool b1 = (inlineGroupedClasses && !partOfGroups().empty()); // a grouped class
5242 // inline because of INLINE_SIMPLE_STRUCTS=YES ?
5243 bool b2 = (inlineSimpleClasses && m_isSimple && // a simple class
5244 (containerLinkable || // in a documented container
5245 !partOfGroups().empty() // or part of a group
5246 )
5247 );
5248 //printf("%s::isEmbeddedInOuterScope(): inlineGroupedClasses=%d "
5249 // "inlineSimpleClasses=%d partOfGroups()=%p m_isSimple=%d "
5250 // "getOuterScope()=%s b1=%d b2=%d\n",
5251 // qPrint(name()),inlineGroupedClasses,inlineSimpleClasses,
5252 // partOfGroups().pointer(),m_isSimple,getOuterScope()?qPrint(getOuterScope()->name()):"<none>",b1,b2);
5253 return b1 || b2; // either reason will do
5254}

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

5329{
5330 QCString n = name();
5331 int si = n.find('(');
5332 int ei = n.find(')');
5333 bool b = ei>si && n.mid(si+1,ei-si-1).stripWhiteSpace().isEmpty();
5334 return b;
5335}
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 5073 of file classdef.cpp.

5074{
5075 return m_spec.isFinal();
5076}

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

5104{
5105 return getLanguage()==SrcLangExt::Fortran;
5106}

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

5089{
5090 return m_spec.isForwardDecl();
5091}

References m_spec.

◆ isImplicitTemplateInstance()

bool ClassDefImpl::isImplicitTemplateInstance ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5028 of file classdef.cpp.

5029{
5031}

References m_implicitTemplateInstance.

◆ isInterface()

bool ClassDefImpl::isInterface ( ) const
overridevirtual

Returns TRUE if this class represents an interface.

Implements ClassDef.

Definition at line 5093 of file classdef.cpp.

5094{
5095 return m_spec.isInterface();
5096}

References m_spec.

◆ isJavaEnum()

bool ClassDefImpl::isJavaEnum ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5274 of file classdef.cpp.

5275{
5276 return m_isJavaEnum;
5277}

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

3615{
3617 {
3618 return m_templateMaster->isLinkable();
3619 }
3620 else
3621 {
3622 return isReference() || isLinkableInProject();
3623 }
3624}
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 3582 of file classdef.cpp.

3583{
3584 bool extractLocal = Config_getBool(EXTRACT_LOCAL_CLASSES);
3585 bool extractStatic = Config_getBool(EXTRACT_STATIC);
3586 bool hideUndoc = Config_getBool(HIDE_UNDOC_CLASSES);
3588 {
3589 return m_templateMaster->isLinkableInProject();
3590 }
3591 else
3592 {
3593 //printf("%s::isLinkableInProject() conditions: artificial=%d hidden=%d anonymous=%d protection=%d local=%d docs=%d static=%d ref=%d\n",
3594 // qPrint(name()),
3595 // !isArtificial(),
3596 // !isHidden(),
3597 // !isAnonymous(),
3598 // m_prot,
3599 // !m_isLocal || extractLocal,
3600 // hasDocumentation() || m_tempArgs.hasTemplateDocumentation() || !hideUndoc,
3601 // !m_isStatic || extractStatic,
3602 // !isReference());
3603 return
3604 !isArtificial() && !isHidden() && /* not hidden */
3605 !isAnonymous() && /* not anonymous */
3606 protectionLevelVisible(m_prot) && /* private/internal */
3607 (!m_isLocal || extractLocal) && /* local */
3608 (hasDocumentation() || m_tempArgs.hasTemplateDocumentation() || !hideUndoc) && /* documented */
3609 (!m_isStatic || extractStatic) && /* static */
3610 !isReference(); /* not an external reference */
3611 }
3612}
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 4948 of file classdef.cpp.

4949{
4950 return m_isLocal;
4951}

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

5099{
5100 return getLanguage()==SrcLangExt::ObjC;
5101}

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

5084{
5085 return m_spec.isPublished();
5086}

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

4467{
4469 {
4470 return m_templateMaster->isReference();
4471 }
4472 else
4473 {
4475 }
4476}
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 5078 of file classdef.cpp.

5079{
5080 return m_spec.isSealed();
5081}

References m_spec.

Referenced by addClassAttributes().

◆ isSimple()

bool ClassDefImpl::isSimple ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5188 of file classdef.cpp.

5189{
5190 return m_isSimple;
5191}

References m_isSimple.

Referenced by internalInsertMember(), and writeInlineDocumentation().

◆ isSliceLocal()

bool ClassDefImpl::isSliceLocal ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5357 of file classdef.cpp.

5358{
5359 return m_spec.isLocal();
5360}

References m_spec.

Referenced by title(), and writeDeclarationLink().

◆ isSmartPointer()

const MemberDef * ClassDefImpl::isSmartPointer ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5193 of file classdef.cpp.

5194{
5195 return m_arrowOperator;
5196}

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

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

5039{
5040 return !m_tempArgs.empty();
5041}

References m_tempArgs.

◆ isTemplateArgument()

bool ClassDefImpl::isTemplateArgument ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5063 of file classdef.cpp.

5064{
5065 return m_isTemplArg;
5066}

References m_isTemplArg.

◆ isUsedOnly()

bool ClassDefImpl::isUsedOnly ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5183 of file classdef.cpp.

5184{
5185 return m_usedOnly;
5186}

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

3629{
3630 bool allExternals = Config_getBool(ALLEXTERNALS);
3631 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
3632 bool extractStatic = Config_getBool(EXTRACT_STATIC);
3633
3634 return // show all classes or a subclass is visible
3635 ((allExternals && !isArtificial()) || hasNonReferenceSuperClass()) &&
3636 // and not an anonymous compound
3637 !isAnonymous() &&
3638 // and not privately inherited
3640 // documented or shown anyway or documentation is external
3641 (hasDocumentation() ||
3642 !hideUndocClasses ||
3643 (m_templateMaster && m_templateMaster->hasDocumentation()) ||
3644 isReference()
3645 ) &&
3646 // if this is an implicit template instance then it most be part of the inheritance hierarchy
3647 (!m_implicitTemplateInstance || !m_inherits.empty() || !m_inheritedBy.empty()) &&
3648 // is not part of an unnamed namespace or shown anyway
3649 (!m_isStatic || extractStatic);
3650}
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 5168 of file classdef.cpp.

5169{
5170 m_isTemplArg = b;
5171}

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

4984{
4986}

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

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

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

◆ mergeMembers()

void ClassDefImpl::mergeMembers ( )
overridevirtual

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

Implements ClassDefMutable.

Definition at line 4012 of file classdef.cpp.

4013{
4014 if (m_membersMerged) return;
4015 if (getLanguage()==SrcLangExt::Python)
4016 {
4017 for (const auto &bcd : baseClasses())
4018 {
4019 ClassDefMutable *bClass=toClassDefMutable(bcd.classDef);
4021 }
4022 }
4023
4024 //printf("> %s::mergeMembers()\n",qPrint(name()));
4025
4027
4028 // first merge the members of the base class recursively
4029 for (const auto &bcd : baseClasses())
4030 {
4031 ClassDefMutable *bClass=toClassDefMutable(bcd.classDef);
4032 if (bClass)
4033 {
4034 // merge the members in the base class of this inheritance branch first
4035 bClass->mergeMembers();
4036 }
4037 }
4038
4039 // first merge the member that are not inherited via a virtual base class
4040 // (as this can end up reimplemented via multiple paths, see #10717 for examples)
4042 // then process the member that are inherited via a virtual base class to add the
4043 // ones that are not reimplemented via any path
4045
4046 //printf("< %s::mergeMembers()\n",qPrint(name()));
4047}
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 3726 of file classdef.cpp.

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

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

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

5405{
5407}

References m_hasCollaborationGraph.

◆ overrideInheritanceGraph()

void ClassDefImpl::overrideInheritanceGraph ( CLASS_GRAPH_t e)
overridevirtual

Implements ClassDefMutable.

Definition at line 5377 of file classdef.cpp.

5378{
5380}

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

4999{
5000 return m_prot;
5001}

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

4496{
4497 return makeQualifiedNameWithTemplateParameters(this,actualParams,actualParamIndex);
4498}
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 5198 of file classdef.cpp.

5199{
5200 md->setMemberType(t);
5201 for (auto &ml : m_memberLists)
5202 {
5203 ml->remove(md);
5204 }
5205 insertMember(md);
5206}
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 5266 of file classdef.cpp.

5267{
5268 for (auto &ml : m_memberLists)
5269 {
5270 ml->remove(md);
5271 }
5272}

References m_memberLists.

Referenced by hideDerivedVariablesInPython().

◆ requiresClause()

QCString ClassDefImpl::requiresClause ( ) const
overridevirtual

Implements ClassDef.

Definition at line 3524 of file classdef.cpp.

3525{
3526 return m_requiresClause;
3527}

References m_requiresClause.

◆ setAnonymousEnumType()

void ClassDefImpl::setAnonymousEnumType ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4661 of file classdef.cpp.

4662{
4663 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4664 {
4665 if (lde->kind()==LayoutDocEntry::MemberDecl)
4666 {
4667 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4668 if (lmd)
4669 {
4670 MemberList * ml = getMemberList(lmd->type);
4671 if (ml)
4672 {
4674 }
4675 }
4676 }
4677 else if (lde->kind()==LayoutDocEntry::MemberGroups)
4678 {
4679 for (const auto &mg : m_memberGroups)
4680 {
4681 mg->setAnonymousEnumType();
4682 }
4683 }
4684 }
4685}
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 5173 of file classdef.cpp.

5174{
5175 m_categoryOf = cd;
5176}

References m_categoryOf.

◆ setClassName()

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

Implements ClassDefMutable.

Definition at line 4511 of file classdef.cpp.

4512{
4513 m_className = name;
4514}

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

◆ setClassSpecifier()

void ClassDefImpl::setClassSpecifier ( TypeSpecifier spec)
overridevirtual

Implements ClassDefMutable.

Definition at line 5279 of file classdef.cpp.

5280{
5281 m_spec = spec;
5282}

References m_spec.

◆ setCompoundType()

void ClassDefImpl::setCompoundType ( CompoundType t)
overridevirtual

Implements ClassDefMutable.

Definition at line 5157 of file classdef.cpp.

5158{
5159 m_compType = t;
5160}

References m_compType.

◆ setFileDef()

void ClassDefImpl::setFileDef ( FileDef * fd)
overridevirtual

Implements ClassDefMutable.

Definition at line 5128 of file classdef.cpp.

5129{
5130 m_fileDef = fd;
5131}

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

4291{
4292 gd->addClass(this);
4293 //printf("ClassDefImpl::setGroupDefForAllMembers(%s)\n",qPrint(gd->name()));
4294 for (auto &mni : m_allMemberNameInfoLinkedMap)
4295 {
4296 for (auto &mi : *mni)
4297 {
4298 MemberDefMutable *md = toMemberDefMutable(mi->memberDef());
4299 if (md)
4300 {
4301 md->setGroupDef(gd,pri,fileName,startLine,hasDocs);
4302 gd->insertMember(md,TRUE);
4303 ClassDefMutable *innerClass = toClassDefMutable(md->getClassDefOfAnonymousType());
4304 if (innerClass) innerClass->setGroupDefForAllMembers(gd,pri,fileName,startLine,hasDocs);
4305 }
4306 }
4307 }
4308}
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 5033 of file classdef.cpp.

5034{
5036}

References m_implicitTemplateInstance.

◆ setIncludeFile()

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

Implements ClassDefMutable.

Definition at line 1429 of file classdef.cpp.

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

5153{
5154 m_isStatic=b;
5155}

References m_isStatic.

◆ setMetaData()

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

Implements ClassDefMutable.

Definition at line 5362 of file classdef.cpp.

5363{
5364 m_metaData = md;
5365}

References m_metaData.

◆ setModuleDef()

void ClassDefImpl::setModuleDef ( ModuleDef * mod)
overridevirtual

Implements ClassDefMutable.

Definition at line 5133 of file classdef.cpp.

5134{
5135 m_moduleDef = mod;
5136}

References m_moduleDef.

◆ setProtection()

void ClassDefImpl::setProtection ( Protection p)
overridevirtual

Implements ClassDefMutable.

Definition at line 5143 of file classdef.cpp.

5144{
5145 m_prot=p;
5146 if (getLanguage()==SrcLangExt::VHDL && VhdlDocGen::convert(p)==VhdlDocGen::ARCHITECTURECLASS)
5147 {
5148 m_className = name();
5149 }
5150}
@ 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 3529 of file classdef.cpp.

3530{
3531 m_requiresClause = req;
3532}

References m_requiresClause.

◆ setSubGrouping()

void ClassDefImpl::setSubGrouping ( bool enabled)
overridevirtual

Implements ClassDefMutable.

Definition at line 5138 of file classdef.cpp.

5139{
5140 m_subGrouping = enabled;
5141}

References m_subGrouping.

◆ setTagLessReference()

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

Implements ClassDefMutable.

Definition at line 5261 of file classdef.cpp.

5262{
5263 m_tagLessRef = cd;
5264}

References m_tagLessRef.

◆ setTemplateArguments()

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

Implements ClassDefMutable.

Definition at line 3476 of file classdef.cpp.

3477{
3478 m_tempArgs = al;
3479}

References m_tempArgs.

◆ setTemplateBaseClassNames()

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

Implements ClassDefMutable.

Definition at line 4393 of file classdef.cpp.

4394{
4395 m_templBaseClassNames = templateNames;
4396}

References m_templBaseClassNames.

◆ setTemplateMaster()

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

Implements ClassDefMutable.

Definition at line 5162 of file classdef.cpp.

5163{
5164 assert(tm!=this);
5166}

References m_templateMaster.

◆ setTypeConstraints()

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

Implements ClassDefMutable.

Definition at line 3471 of file classdef.cpp.

3472{
3473 m_typeConstraints = al;
3474}

References m_typeConstraints.

◆ setUsedOnly()

void ClassDefImpl::setUsedOnly ( bool b)
overridevirtual

Implements ClassDefMutable.

Definition at line 5178 of file classdef.cpp.

5179{
5180 m_usedOnly = b;
5181}

References m_usedOnly.

◆ showUsedFiles()

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

Definition at line 1722 of file classdef.cpp.

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

4989{
4990 std::stable_sort(m_allMemberNameInfoLinkedMap.begin(),
4992 [](const auto &m1,const auto &m2)
4993 {
4994 return qstricmp_sort(m1->memberName(),m2->memberName())<0;
4995 });
4996}

References m_allMemberNameInfoLinkedMap.

◆ sortMemberLists()

void ClassDefImpl::sortMemberLists ( )
overridevirtual

Implements ClassDefMutable.

Definition at line 4607 of file classdef.cpp.

4608{
4609 for (auto &ml : m_memberLists)
4610 {
4611 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
4612 }
4613 std::stable_sort(m_innerClasses.begin(),
4614 m_innerClasses.end(),
4615 [](const auto &c1,const auto &c2)
4616 {
4617 return Config_getBool(SORT_BY_SCOPE_NAME) ?
4618 qstricmp_sort(c1->name(), c2->name() )<0 :
4619 qstricmp_sort(c1->className(), c2->className())<0 ;
4620 });
4621}

References FALSE, m_innerClasses, and m_memberLists.

◆ startMemberDeclarations()

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

Definition at line 2211 of file classdef.cpp.

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

2192{
2193 //printf("%s: ClassDefImpl::startMemberDocumentation()\n",qPrint(name()));
2194 if (Config_getBool(SEPARATE_MEMBER_PAGES))
2195 {
2198 }
2199}

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

4974{
4975 return m_inheritedBy;
4976}

References m_inheritedBy.

Referenced by isSubClass().

◆ subGrouping()

bool ClassDefImpl::subGrouping ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5352 of file classdef.cpp.

5353{
5354 return m_subGrouping;
5355}

References m_subGrouping.

◆ tagLessReference()

const ClassDef * ClassDefImpl::tagLessReference ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5256 of file classdef.cpp.

5257{
5258 return m_tagLessRef;
5259}

References m_tagLessRef.

◆ templateArguments()

const ArgumentList & ClassDefImpl::templateArguments ( ) const
overridevirtual

Returns the template arguments of this class.

Implements ClassDef.

Definition at line 5003 of file classdef.cpp.

5004{
5005 return m_tempArgs;
5006}

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

5024{
5025 return m_templateMaster;
5026}

References m_templateMaster.

◆ templateTypeConstraints()

const ConstraintClassList & ClassDefImpl::templateTypeConstraints ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5058 of file classdef.cpp.

5059{
5060 return m_constraintClassList;
5061}

References m_constraintClassList.

◆ title()

QCString ClassDefImpl::title ( ) const
overridevirtual

Implements ClassDef.

Definition at line 2893 of file classdef.cpp.

2894{
2895 QCString pageTitle;
2896 SrcLangExt lang = getLanguage();
2897
2898 auto getReferenceTitle = [this](std::function<QCString()> translateFunc) -> QCString
2899 {
2900 return Config_getBool(HIDE_COMPOUND_REFERENCE) ? displayName() : translateFunc();
2901 };
2902
2903 if (lang==SrcLangExt::Fortran)
2904 {
2905 pageTitle = getReferenceTitle([this](){
2907 });
2908 }
2909 else if (lang==SrcLangExt::Slice)
2910 {
2911 pageTitle = getReferenceTitle([this](){
2913 });
2914 }
2915 else if (lang==SrcLangExt::VHDL)
2916 {
2917 pageTitle = getReferenceTitle([this](){
2919 });
2920 }
2921 else if (isJavaEnum())
2922 {
2923 pageTitle = getReferenceTitle([this](){
2925 });
2926 }
2927 else if (m_compType==Service)
2928 {
2929 pageTitle = getReferenceTitle([this](){
2931 });
2932 }
2933 else if (m_compType==Singleton)
2934 {
2935 pageTitle = getReferenceTitle([this](){
2937 });
2938 }
2939 else
2940 {
2941 pageTitle = getReferenceTitle([this](){
2943 m_compType == Interface && getLanguage()==SrcLangExt::ObjC ? Class : m_compType,
2944 !m_tempArgs.empty());
2945 });
2946 }
2947 return pageTitle;
2948}
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 5342 of file classdef.cpp.

5343{
5344 return m_typeConstraints;
5345}

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

4969{
4970 m_inherits = bcd;
4971}

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

4979{
4980 m_inheritedBy = bcd;
4981}

References m_inheritedBy.

◆ usedByImplementationClasses()

const UsesClassList & ClassDefImpl::usedByImplementationClasses ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5053 of file classdef.cpp.

5054{
5055 return m_usedByImplClassList;
5056}

References m_usedByImplClassList.

◆ usedFiles()

const FileList & ClassDefImpl::usedFiles ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5337 of file classdef.cpp.

5338{
5339 return m_files;
5340}

References m_files.

◆ usedImplementationClasses()

const UsesClassList & ClassDefImpl::usedImplementationClasses ( ) const
overridevirtual

Implements ClassDef.

Definition at line 5048 of file classdef.cpp.

5049{
5050 return m_usesImplClassList;
5051}

References m_usesImplClassList.

◆ visibleInParentsDeclList()

bool ClassDefImpl::visibleInParentsDeclList ( ) const
overridevirtual

show this class in the declaration section of its parent?

Implements ClassDef.

Definition at line 2588 of file classdef.cpp.

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

4778{
4779 //printf("**** writeAdditionalInheritedMembers()\n");
4780 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4781 {
4782 if (lde->kind()==LayoutDocEntry::MemberDecl)
4783 {
4784 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4785 if (lmd && lmd->type!=MemberListType::Friends())
4786 {
4787 ClassDefSet visited;
4789 }
4790 }
4791 }
4792}
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 2231 of file classdef.cpp.

2232{
2233 ol.pushGeneratorState();
2235 ol.writeString("\n");
2236 ol.startGroupHeader();
2238 ol.endGroupHeader();
2240 ol.popGeneratorState();
2241}
void writeString(const QCString &text)
Definition outputlist.h:412
void startGroupHeader(const QCString &id=QCString(), 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 1559 of file classdef.cpp.

1560{
1561 if (hasBriefDescription())
1562 {
1563 ol.startParagraph();
1564 ol.pushGeneratorState();
1566 ol.writeString(" - ");
1567 ol.popGeneratorState();
1568 ol.generateDoc(briefFile(),briefLine(),this,nullptr,
1569 briefDescription(),TRUE,FALSE,QCString(),
1570 TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
1571 ol.pushGeneratorState();
1573 ol.writeString(" \n");
1575 ol.popGeneratorState();
1576
1577 if (hasDetailedDescription() || exampleFlag)
1578 {
1579 writeMoreLink(ol,anchor());
1580 }
1581
1582 ol.endParagraph();
1583 }
1584 ol.writeSynopsis();
1585}
void writeMoreLink(OutputList &ol, const QCString &anchor) const
bool hasDetailedDescription() const override
returns TRUE if this class has a non-empty detailed description
bool hasBriefDescription() const override
void 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 1962 of file classdef.cpp.

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

3539{
3540 //printf("ClassName='%s' inGroup=%d\n",qPrint(name()),inGroup);
3541
3543 QCString cn = displayName(FALSE);
3544 if (!cn.isEmpty())
3545 {
3546 ol.docify(" ");
3547 if (md && isLinkable())
3548 {
3549 ol.writeObjectLink(QCString(),QCString(),md->anchor(),cn);
3550 }
3551 else
3552 {
3553 ol.startBold();
3554 ol.docify(cn);
3555 ol.endBold();
3556 }
3557 }
3558 ol.docify(" {");
3560 ol.endMemberDeclaration(md ? md->anchor() : QCString(),inheritId);
3561
3562 // write user defined member groups
3563 for (const auto &mg : m_memberGroups)
3564 {
3565 mg->writePlainDeclarations(ol,inGroup,this,nullptr,nullptr,nullptr,nullptr,indentLevel,inheritedFrom,inheritId);
3566 }
3567
3568 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
3569 {
3570 if (lde->kind()==LayoutDocEntry::MemberDecl)
3571 {
3572 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
3573 if (lmd)
3574 {
3575 writePlainMemberDeclaration(ol,lmd->type,inGroup,indentLevel,inheritedFrom,inheritId);
3576 }
3577 }
3578 }
3579}
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 2600 of file classdef.cpp.

2601{
2602 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
2603 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
2604 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2605 SrcLangExt lang = getLanguage();
2607 {
2608 if (!found) // first class
2609 {
2610 if (sliceOpt)
2611 {
2612 if (compoundType()==Interface)
2613 {
2614 ol.startMemberHeader("interfaces");
2615 }
2616 else if (compoundType()==Struct)
2617 {
2618 ol.startMemberHeader("structs");
2619 }
2620 else if (compoundType()==Exception)
2621 {
2622 ol.startMemberHeader("exceptions");
2623 }
2624 else // compoundType==Class
2625 {
2626 ol.startMemberHeader("nested-classes");
2627 }
2628 }
2629 else // non-Slice optimization: single header for class/struct/..
2630 {
2631 ol.startMemberHeader("nested-classes");
2632 }
2633 if (!header.isEmpty())
2634 {
2635 ol.parseText(header);
2636 }
2637 else if (lang==SrcLangExt::VHDL)
2638 {
2640 }
2641 else
2642 {
2643 ol.parseText(lang==SrcLangExt::Fortran ?
2646 }
2647 ol.endMemberHeader();
2648 ol.startMemberList();
2649 found=TRUE;
2650 }
2652 QCString ctype = compoundTypeString();
2653 QCString cname = displayName(!localNames);
2654 QCString anc = anchor();
2655 if (anc.isEmpty()) anc = cname; else anc.prepend(cname+"_");
2657
2658 if (lang!=SrcLangExt::VHDL) // for VHDL we swap the name and the type
2659 {
2660 if (isSliceLocal())
2661 {
2662 ol.writeString("local ");
2663 }
2664 ol.writeString(ctype);
2665 ol.writeString(" ");
2666 ol.insertMemberAlign();
2667 }
2668 if (isLinkable())
2669 {
2672 anchor(),
2673 cname
2674 );
2675 }
2676 else
2677 {
2678 ol.startBold();
2679 ol.docify(cname);
2680 ol.endBold();
2681 }
2682 if (lang==SrcLangExt::VHDL) // now write the type
2683 {
2684 ol.writeString(" ");
2685 ol.insertMemberAlign();
2687 }
2689
2690 // add the brief description if available
2691 if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
2692 {
2693 auto parser { createDocParser() };
2694 auto ast { validatingParseDoc(*parser.get(),
2695 briefFile(),briefLine(),this,nullptr,
2697 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
2698 if (!ast->isEmpty())
2699 {
2701 ol.writeDoc(ast.get(),this,nullptr);
2702 if (isLinkableInProject())
2703 {
2704 writeMoreLink(ol,anchor());
2705 }
2707 }
2708 }
2709 ol.endMemberDeclaration(anchor(),QCString());
2710 }
2711}
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(), QCString::prepend(), protection(), OutputList::startBold(), OutputList::startMemberDeclaration(), OutputList::startMemberDescription(), OutputList::startMemberHeader(), OutputList::startMemberItem(), OutputList::startMemberList(), ClassDef::Struct, theTranslator, TRUE, validatingParseDoc(), visibleInParentsDeclList(), OutputList::writeDoc(), writeMoreLink(), OutputList::writeObjectLink(), and OutputList::writeString().

◆ writeDetailedDescription()

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

Definition at line 1654 of file classdef.cpp.

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

1588{
1589 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
1590
1591 ol.startTextBlock();
1592
1593 if (getLanguage()==SrcLangExt::Cpp)
1594 {
1596 }
1597
1598 // repeat brief description
1599 if (!briefDescription().isEmpty() && repeatBrief)
1600 {
1602 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
1603 }
1604 if (!briefDescription().isEmpty() && repeatBrief &&
1605 !documentation().isEmpty())
1606 {
1607 ol.pushGeneratorState();
1609 ol.writeString("\n\n");
1610 ol.popGeneratorState();
1611 }
1612 // write documentation
1613 if (!documentation().isEmpty())
1614 {
1615 ol.generateDoc(docFile(),docLine(),this,nullptr,documentation(),TRUE,FALSE,
1616 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
1617 }
1618 // write type constraints
1620
1621 ol.generateDoc(
1622 docFile(),docLine(),
1623 this,
1624 nullptr, // memberDef
1626 TRUE, // indexWords
1627 FALSE, // isExample
1628 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)
1629 );
1630
1631 // write examples
1632 if (hasExamples())
1633 {
1634 ol.startExamples();
1635 ol.startDescForItem();
1637 ol.endDescForItem();
1638 ol.endExamples();
1639 }
1640 writeSourceDef(ol);
1641 ol.endTextBlock();
1642}
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:673
void endDescForItem()
Definition outputlist.h:550
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:671
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:5927
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 2951 of file classdef.cpp.

2952{
2953 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
2954 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
2955 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
2956 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2957 QCString pageTitle = title();
2958
2960 if (sliceOpt)
2961 {
2962 if (compoundType()==Interface)
2963 {
2965 }
2966 else if (compoundType()==Struct)
2967 {
2969 }
2970 else if (compoundType()==Exception)
2971 {
2973 }
2974 else
2975 {
2977 }
2978 }
2979 else
2980 {
2982 }
2983
2984 AUTO_TRACE("name='{}' getOutputFileBase='{}'",name(),getOutputFileBase());
2985 bool hasAllMembersLink=false;
2986 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
2987 {
2988 if (lde->kind()==LayoutDocEntry::ClassAllMembersLink)
2989 {
2990 hasAllMembersLink = true;
2991 break;
2992 }
2993 }
2994 QCString memListFile;
2995 if (hasAllMembersLink && !m_allMemberNameInfoLinkedMap.empty() && !Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
2996 {
2997 memListFile = getMemberListFileName();
2998 }
2999 startFile(ol,getOutputFileBase(),name(),pageTitle,hli,!generateTreeView,QCString(),0,memListFile);
3000 if (!generateTreeView)
3001 {
3003 {
3005 }
3006 ol.endQuickIndices();
3007 }
3008
3009 startTitle(ol,getOutputFileBase(),this);
3010 ol.parseText(pageTitle);
3012 addGroupListToTitle(ol,this);
3014 writeDocumentationContents(ol,pageTitle);
3015
3016 endFileWithNavPath(ol,this);
3017
3018 if (Config_getBool(SEPARATE_MEMBER_PAGES))
3019 {
3020 writeMemberPages(ol);
3021 }
3022}
void addClassAttributes(OutputList &ol) const
void writeMemberPages(OutputList &ol) const override
QCString getMemberListFileName() const override
Definition classdef.cpp:984
void writeDocumentationContents(OutputList &ol, const QCString &pageTitle) const
void writeNavigationPath(OutputList &ol) const override
void endQuickIndices()
Definition outputlist.h: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:394
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
Definition index.cpp:401
void endFileWithNavPath(OutputList &ol, const DefinitionMutable *d, bool showPageNavigation)
Definition index.cpp:448
HighlightedItem
Definition index.h:59
@ InterfaceVisible
Definition index.h:89
@ ExceptionVisible
Definition index.h:91
void addGroupListToTitle(OutputList &ol, const Definition *d)
Definition util.cpp:5405

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

◆ writeDocumentationContents()

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

Definition at line 2747 of file classdef.cpp.

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

3090{
3091 // write inner classes after the parent, so the tag files contain
3092 // the definition in proper order!
3093 for (const auto &innerCd : m_innerClasses)
3094 {
3095 if (
3096 innerCd->isLinkableInProject() && !innerCd->isImplicitTemplateInstance() &&
3097 protectionLevelVisible(innerCd->protection()) &&
3098 !innerCd->isEmbeddedInOuterScope()
3099 )
3100 {
3101 msg("Generating docs for nested compound {}...\n",innerCd->displayName());
3102 innerCd->writeDocumentation(ol);
3103 innerCd->writeMemberList(ol);
3104 }
3105 innerCd->writeDocumentationForInnerClasses(ol);
3106 }
3107}
#define msg(fmt,...)
Definition message.h:94

References m_innerClasses, msg, and protectionLevelVisible().

◆ writeIncludeFiles()

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

Definition at line 2126 of file classdef.cpp.

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

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

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

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

4822{
4823 int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
4824 bool process = count>0;
4825 //printf("%s: writeInheritedMemberDec: lt=%s process=%d invert=%d always=%d\n",
4826 // qPrint(name()),qPrint(lt.to_string()),process,invert,showAlways);
4827 if ((process^invert) || showAlways)
4828 {
4829 for (const auto &ibcd : m_inherits)
4830 {
4831 ClassDefMutable *icd=toClassDefMutable(ibcd.classDef);
4832 if (icd && icd->isLinkable())
4833 {
4834 MemberListType lt1 = MemberListType::Invalid();
4835 MemberListType lt3 = MemberListType::Invalid();
4836 convertProtectionLevel(lt,ibcd.prot,&lt1,&lt3);
4837 if (lt2.isInvalid() && !lt3.isInvalid())
4838 {
4839 lt2=lt3;
4840 }
4841 //printf("%s:convert %s->(%s,%s) prot=%d\n",qPrint(icd->name()),qPrint(lt.to_string()),
4842 // qPrint(lt1.to_string()),qPrint(lt2.to_string()),ibcd.prot);
4843 if (visitedClasses.find(icd)==visitedClasses.end())
4844 {
4845 visitedClasses.insert(icd); // guard for multiple virtual inheritance
4846 if (!lt1.isInvalid())
4847 {
4848 //printf("--> writeMemberDeclarations for type %s\n",qPrint(lt1.to_string()));
4849 icd->writeMemberDeclarations(ol,visitedClasses,lt1,
4850 title,QCString(),FALSE,inheritedFrom,lt2,FALSE,TRUE);
4851 }
4852 }
4853 else
4854 {
4855 //printf("%s: class already visited!\n",qPrint(icd->name()));
4856 }
4857 }
4858 }
4859 }
4860}
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 2186 of file classdef.cpp.

2187{
2188 m_innerClasses.writeDocumentation(ol,this);
2189}

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

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

4866{
4867 //printf("%s: ClassDefImpl::writeMemberDeclarations lt=%s lt2=%s\n",qPrint(name()),qPrint(lt.to_string()),qPrint(lt2.to_string()));
4868 MemberList * ml = getMemberList(lt);
4869 MemberList * ml2 = getMemberList(lt2);
4870 if (getLanguage()==SrcLangExt::VHDL) // use specific declarations function
4871 {
4872 static const ClassDef *cdef;
4873 if (cdef!=this)
4874 { // only one inline link
4876 cdef=this;
4877 }
4878 if (ml)
4879 {
4880 VhdlDocGen::writeVhdlDeclarations(ml,ol,nullptr,this,nullptr,nullptr,nullptr);
4881 }
4882 }
4883 else
4884 {
4885 //printf("%s::writeMemberDeclarations(%s) ml=%p ml2=%p\n",qPrint(name()),qPrint(title),(void*)ml,(void*)ml2);
4886 QCString tt = title, st = subTitle;
4887 if (ml)
4888 {
4889 //printf(" writeDeclarations ml type=%s count=%d\n",qPrint(lt.to_string()),ml->numDecMembers(inheritedFrom));
4890 ml->writeDeclarations(ol,this,nullptr,nullptr,nullptr,nullptr,tt,st,FALSE,showInline,inheritedFrom,lt,true);
4891 tt.clear();
4892 st.clear();
4893 }
4894 if (ml2)
4895 {
4896 //printf(" writeDeclarations ml2 type=%s count=%d\n",qPrint(lt2.to_string()),ml2->numDecMembers(inheritedFrom));
4897 ml2->writeDeclarations(ol,this,nullptr,nullptr,nullptr,nullptr,tt,st,FALSE,showInline,inheritedFrom,lt,ml==nullptr);
4898 }
4899 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
4900 if (!inlineInheritedMembers) // show inherited members as separate lists
4901 {
4902 writeInheritedMemberDeclarations(ol,visitedClasses,lt,lt2,title,
4903 inheritedFrom ? inheritedFrom : this,
4904 invert,showAlways);
4905 }
4906 }
4907}
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 4922 of file classdef.cpp.

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

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

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeMemberGroups()

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

Definition at line 2163 of file classdef.cpp.

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

References m_memberGroups, and m_subGrouping.

Referenced by writeDocumentationContents(), and writeInlineDocumentation().

◆ writeMemberList()

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

Implements ClassDef.

Definition at line 3110 of file classdef.cpp.

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

References anchor(), Definition::anchor(), MemberDef::argsString(), MemberDef::category(), ClassVisible, compoundType(), Config_getBool, OutputList::disableAllBut(), displayName(), Definition::displayName(), OutputList::docify(), OutputList::endBold(), endFile(), OutputList::endParagraph(), OutputList::endQuickIndices(), endTitle(), ClassDef::Exception, ExceptionVisible, FALSE, MemberDef::getClassDef(), Definition::getLanguage(), DefinitionMixin< ClassDefMutable >::getLanguage(), getMemberListFileName(), DefinitionMixin< ClassDefMutable >::getOuterScope(), getOutputFileBase(), Definition::getOutputFileBase(), getReference(), Definition::getReference(), MemberDef::getVhdlSpecifiers(), Doxygen::globalScope, Html, ClassDef::Interface, InterfaceVisible, Definition::isAnonymous(), Definition::isArtificial(), MemberDef::isAttribute(), MemberDef::isBound(), MemberDef::isConstrained(), QCString::isEmpty(), MemberDef::isEnumerate(), MemberDef::isEnumValue(), MemberDef::isExplicit(), MemberDef::isFriend(), MemberDef::isFunction(), MemberDef::isInline(), Definition::isLinkable(), MemberDef::isMaybeAmbiguous(), MemberDef::isMaybeDefault(), MemberDef::isMaybeVoid(), MemberDef::isMutable(), MemberDef::isObjCMethod(), ClassDef::isObjectiveC(), MemberDef::isOptional(), MemberDef::isReadonly(), MemberDef::isRelated(), MemberDef::isRemovable(), MemberDef::isSignal(), MemberDef::isSlot(), MemberDef::isStatic(), MemberDef::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 3024 of file classdef.cpp.

3025{
3026 ///////////////////////////////////////////////////////////////////////////
3027 //// Member definitions on separate pages
3028 ///////////////////////////////////////////////////////////////////////////
3029
3030 ol.pushGeneratorState();
3032
3033 for (const auto &ml : m_memberLists)
3034 {
3035 if (ml->numDocMembers()>ml->numDocEnumValues() && ml->listType().isDetailed())
3036 {
3037 ml->writeDocumentationPage(ol,displayName(),this);
3038 }
3039 }
3040
3041 ol.popGeneratorState();
3042}

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

2545{
2546 // TODO: clean up this mess by moving it to
2547 // the output generators...
2548 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
2549 bool rtfHyperlinks = Config_getBool(RTF_HYPERLINKS);
2550 bool usePDFLatex = Config_getBool(USE_PDFLATEX);
2551
2552 // HTML only
2553 ol.pushGeneratorState();
2555 ol.docify(" ");
2557 anchor.isEmpty() ? QCString("details") : anchor);
2559 ol.endTextLink();
2560 ol.popGeneratorState();
2561
2562 if (!anchor.isEmpty())
2563 {
2564 ol.pushGeneratorState();
2565 // LaTeX + RTF
2569 if (!(usePDFLatex && pdfHyperlinks))
2570 {
2572 }
2573 if (!rtfHyperlinks)
2574 {
2576 }
2577 ol.docify(" ");
2580 ol.endTextLink();
2581 // RTF only
2583 ol.writeString("\\par");
2584 ol.popGeneratorState();
2585 }
2586}
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 2180 of file classdef.cpp.

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

References m_innerClasses, title(), and TRUE.

Referenced by writeDocumentationContents().

◆ writePageNavigation()

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

Implements DefinitionMutable.

Definition at line 2313 of file classdef.cpp.

2314{
2315 ol.writePageOutline();
2316}
void writePageOutline()
Definition outputlist.h:617

References OutputList::writePageOutline().

◆ writePlainMemberDeclaration()

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

Definition at line 4936 of file classdef.cpp.

4939{
4940 //printf("%s: ClassDefImpl::writePlainMemberDeclaration()\n",qPrint(name()));
4941 MemberList * ml = getMemberList(lt);
4942 if (ml)
4943 {
4944 ml->writePlainDeclarations(ol,inGroup,this,nullptr,nullptr,nullptr,nullptr,indentLevel,inheritedFrom,inheritId);
4945 }
4946}
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 3044 of file classdef.cpp.

3045{
3046 bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
3047
3048 ol.writeString(" <div class=\"navtab\">\n");
3049 ol.writeString(" <table>\n");
3050
3051 for (auto &mni : m_allMemberNameInfoLinkedMap)
3052 {
3053 for (auto &mi : *mni)
3054 {
3055 const MemberDef *md=mi->memberDef();
3056 if (md->getClassDef()==this && md->isLinkable() && !md->isEnumValue())
3057 {
3058 if (md->isLinkableInProject())
3059 {
3060 if (md==currentMd) // selected item => highlight
3061 {
3062 ol.writeString(" <tr><td class=\"navtabHL\">");
3063 }
3064 else
3065 {
3066 ol.writeString(" <tr><td class=\"navtab\">");
3067 }
3068 ol.writeString("<span class=\"label\"><a ");
3069 ol.writeString("href=\"");
3070 if (createSubDirs) ol.writeString("../../");
3071 QCString url = md->getOutputFileBase();
3073 ol.writeString(url+"#"+md->anchor());
3074 ol.writeString("\">");
3075 ol.writeString(convertToHtml(md->name()));
3076 ol.writeString("</a></span>");
3077 ol.writeString("</td></tr>\n");
3078 }
3079 }
3080 }
3081 }
3082
3083 ol.writeString(" </table>\n");
3084 ol.writeString(" </div>\n");
3085}
QCString convertToHtml(const QCString &s, bool keepEntities)
Definition util.cpp:4479
void createSubDirs(const Dir &d)
Definition util.cpp:4156
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5415

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

4930{
4931 //printf("%s: ClassDefImpl::writeSimpleMemberDocumentation()\n",qPrint(name()));
4932 MemberList * ml = getMemberList(lt);
4933 if (ml) ml->writeSimpleDocumentation(ol,this);
4934}
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 2244 of file classdef.cpp.

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

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

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

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

1505{
1506 ArgumentLists specs;
1507 QCString name;
1508 searchTemplateSpecs(d,specs,name,lang);
1509 if (!specs.empty()) // class has template scope specifiers
1510 {
1512 for (const ArgumentList &al : specs)
1513 {
1514 ol.docify("template<");
1515 auto it = al.begin();
1516 while (it!=al.end())
1517 {
1518 Argument a = *it;
1519 linkifyText(TextGeneratorOLImpl(ol), // out
1520 d, // scope
1521 getFileDef(), // fileScope
1522 this, // self
1523 a.type, // text
1524 FALSE // autoBreak
1525 );
1526 if (!a.name.isEmpty())
1527 {
1528 ol.docify(" ");
1529 ol.docify(a.name);
1530 }
1531 if (a.defval.length()!=0)
1532 {
1533 ol.docify(" = ");
1534 ol.docify(a.defval);
1535 }
1536 ++it;
1537 if (it!=al.end()) ol.docify(", ");
1538 }
1539 ol.docify(">");
1540 ol.lineBreak();
1541 }
1542 if (!m_requiresClause.isEmpty())
1543 {
1544 ol.docify("requires ");
1545 linkifyText(TextGeneratorOLImpl(ol), // out
1546 d, // scope
1547 getFileDef(), // fileScope
1548 this, // self
1549 m_requiresClause, // text
1550 FALSE // autoBreak
1551 );
1552 ol.lineBreak();
1553 }
1554 ol.docify(type.lower()+" "+name);
1556 }
1557}
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 537 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 500 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 495 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 419 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 465 of file classdef.cpp.

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

◆ m_constraintClassList

ConstraintClassList ClassDefImpl::m_constraintClassList
private

Definition at line 482 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 462 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 444 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 413 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 459 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 427 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 436 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 422 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 508 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 542 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 517 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 511 of file classdef.cpp.

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

◆ m_isTemplArg

bool ClassDefImpl::m_isTemplArg = false
private

Definition at line 519 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 416 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 514 of file classdef.cpp.

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

◆ m_metaData

QCString ClassDefImpl::m_metaData
private

Definition at line 546 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 447 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 471 of file classdef.cpp.

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

◆ m_qualifiers

StringVector ClassDefImpl::m_qualifiers
private

Definition at line 551 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 549 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 525 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 539 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 487 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 489 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 456 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 480 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 528 of file classdef.cpp.

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

◆ m_usesImplClassList

UsesClassList ClassDefImpl::m_usesImplClassList
private

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

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


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