Skip to main content

The ClassDefImpl Class Reference

Implementation of the ClassDef interface. More...

Declaration

class ClassDefImpl { ... }

Base class

classDefinitionMixin<Base>

Public Constructors Index

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)

Public Member Functions Index

DefTypedefinitionType () const override
std::unique_ptr< ClassDef >deepCopy (const QCString &name) const override
voidmoveTo (Definition *) override
CodeSymbolTypecodeSymbolType () const override
QCStringgetOutputFileBase () const override
QCStringgetInstanceOutputFileBase () const override
QCStringgetSourceFileBase () const override
QCStringgetReference () const override
boolisReference () const override
boolisLocal () const override

Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES. More...

ClassLinkedRefMapgetClasses () const override

returns the classes nested into this class More...

boolhasDocumentation () const override
boolhasDetailedDescription () const override

returns TRUE if this class has a non-empty detailed description More...

QCStringcollaborationGraphFileName () const override

returns the file name to use for the collaboration graph More...

QCStringinheritanceGraphFileName () const override

returns the file name to use for the inheritance graph More...

QCStringdisplayName (bool includeScope=TRUE) const override
CompoundTypecompoundType () const override

Returns the type of compound this is, i.e. More...

QCStringcompoundTypeString () const override

Returns the type of compound as a string. More...

const BaseClassList &baseClasses () const override

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

voidupdateBaseClasses (const BaseClassList &bcd) override

Update the list of base classes to the one passed. More...

const BaseClassList &subClasses () const override

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

voidupdateSubClasses (const BaseClassList &bcd) override

Update the list of sub classes to the one passed. More...

const MemberNameInfoLinkedMap &memberNameInfoLinkedMap () const override

Returns a dictionary of all members. More...

Protectionprotection () const override

Return the protection level (Public,Protected,Private) in which this compound was found. More...

boolisLinkableInProject () const override
boolisLinkable () const override
boolisVisibleInHierarchy () const override
boolvisibleInParentsDeclList () const override

show this class in the declaration section of its parent? More...

const ArgumentList &templateArguments () const override

Returns the template arguments of this class. More...

FileDef *getFileDef () const override

Returns the namespace this compound is in, or 0 if it has a global scope. More...

ModuleDef *getModuleDef () const override

Returns the C++20 module in which this compound's definition can be found. More...

const MemberDef *getMemberByName (const QCString &) const override

Returns the member with the given name. More...

intisBaseClass (const ClassDef *bcd, bool followInstances, const QCString &templSpec) const override

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

boolisSubClass (ClassDef *bcd, int level=0) const override

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

boolisAccessibleMember (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 More...

const TemplateInstanceList &getTemplateInstances () const override

Returns a sorted dictionary with all template instances found for this template class. More...

const ClassDef *templateMaster () const override

Returns the template master of which this class is an instance. More...

boolisTemplate () const override

Returns TRUE if this class is a template. More...

const IncludeInfo *includeInfo () const override
const UsesClassList &usedImplementationClasses () const override
const UsesClassList &usedByImplementationClasses () const override
const ConstraintClassList &templateTypeConstraints () const override
boolisTemplateArgument () const override
const Definition *findInnerCompound (const QCString &name) const override
ArgumentListsgetTemplateParameterLists () const override

Returns the template parameter lists that form the template declaration of this class. More...

QCStringqualifiedNameWithTemplateParameters (const ArgumentLists *actualParams=nullptr, uint32_t *actualParamIndex=nullptr) const override
boolisAbstract () const override

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

boolisObjectiveC () const override

Returns TRUE if this class is implemented in Objective-C. More...

boolisFortran () const override

Returns TRUE if this class is implemented in Fortran. More...

boolisCSharp () const override

Returns TRUE if this class is implemented in C#. More...

boolisFinal () const override

Returns TRUE if this class is marked as final. More...

boolisSealed () const override

Returns TRUE if this class is marked as sealed. More...

boolisPublished () const override

Returns TRUE if this class is marked as published. More...

boolisExtension () const override

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

boolisForwardDeclared () const override

Returns TRUE if this class represents a forward declaration of a template class. More...

boolisInterface () const override

Returns TRUE if this class represents an interface. More...

ClassDef *categoryOf () const override

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

QCStringclassName () const override

Returns the name of the class including outer classes, but not including namespaces. More...

MemberList *getMemberList (MemberListType lt) const override

Returns the members in the list identified by lt. More...

const MemberLists &getMemberLists () const override

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

const MemberGroupList &getMemberGroups () const override

Returns the member groups defined for this class. More...

const TemplateNameMap &getTemplateBaseClassNames () const override
boolisUsedOnly () const override
QCStringanchor () const override
boolisEmbeddedInOuterScope () const override
boolisSimple () const override
const ClassDef *tagLessReference () const override
const MemberDef *isSmartPointer () const override
boolisJavaEnum () const override
QCStringtitle () const override
QCStringgeneratedFromFiles () const override
const FileList &usedFiles () const override
const ArgumentList &typeConstraints () const override
const ExampleList &getExamples () const override
boolhasExamples () const override
QCStringgetMemberListFileName () const override
boolsubGrouping () const override
boolisSliceLocal () const override
boolhasNonReferenceSuperClass () const override
QCStringrequiresClause () const override
StringVectorgetQualifiers () const override
boolcontainsOverload (const MemberDef *md) const override
boolisImplicitTemplateInstance () const override
ClassDef *insertTemplateInstance (const QCString &fileName, int startLine, int startColumn, const QCString &templSpec, bool &freshInstance) override
voidinsertBaseClass (ClassDef *, const QCString &name, Protection p, Specifier s, const QCString &t=QCString()) override
voidinsertSubClass (ClassDef *, Protection p, Specifier s, const QCString &t=QCString()) override
voidinsertExplicitTemplateInstance (ClassDef *instance, const QCString &spec) override
voidsetIncludeFile (FileDef *fd, const QCString &incName, bool local, bool force) override
voidinsertMember (MemberDef *) override
voidinsertUsedFile (const FileDef *) override
booladdExample (const QCString &anchor, const QCString &name, const QCString &file) override
voidmergeCategory (ClassDef *category) override
voidsetFileDef (FileDef *fd) override
voidsetModuleDef (ModuleDef *mod) override
voidsetSubGrouping (bool enabled) override
voidsetProtection (Protection p) override
voidsetGroupDefForAllMembers (GroupDef *g, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs) override
voidaddInnerCompound (Definition *d) override
voidaddUsedClass (ClassDef *cd, const QCString &accessName, Protection prot) override
voidaddUsedByClass (ClassDef *cd, const QCString &accessName, Protection prot) override
voidsetIsStatic (bool b) override
voidsetCompoundType (CompoundType t) override
voidsetClassName (const QCString &name) override
voidsetClassSpecifier (TypeSpecifier spec) override
voidaddQualifiers (const StringVector &qualifiers) override
voidsetTemplateArguments (const ArgumentList &al) override
voidsetTemplateBaseClassNames (const TemplateNameMap &templateNames) override
voidsetTemplateMaster (const ClassDef *tm) override
voidsetImplicitTemplateInstance (bool b) override
voidsetTypeConstraints (const ArgumentList &al) override
voidaddMemberToTemplateInstance (const MemberDef *md, const ArgumentList &templateArguments, const QCString &templSpec) override
voidaddMembersToTemplateInstance (const ClassDef *cd, const ArgumentList &templateArguments, const QCString &templSpec) override
voidmakeTemplateArgument (bool b=TRUE) override
voidsetCategoryOf (ClassDef *cd) override
voidsetUsedOnly (bool b) override
voidsetTagLessReference (const ClassDef *cd) override
voidsetMetaData (const QCString &md) override
voidfindSectionsInDocumentation () override
voidaddMembersToMemberGroup () override
voidaddListReferences () override
voidaddTypeConstraints () override
voidcomputeAnchors () override
voidmergeMembers () override
voidsortMemberLists () override
voiddistributeMemberGroupDocumentation () override
voidwriteDocumentation (OutputList &ol) const override
voidwriteDocumentationForInnerClasses (OutputList &ol) const override
voidwriteMemberPages (OutputList &ol) const override
voidwriteMemberList (OutputList &ol) const override
voidwriteDeclaration (OutputList &ol, const MemberDef *md, bool inGroup, int indentLevel, const ClassDef *inheritedFrom, const QCString &inheritId) const override
voidwriteQuickMemberLinks (OutputList &ol, const MemberDef *md) const override
voidwritePageNavigation (OutputList &ol) const override
voidwriteSummaryLinks (OutputList &ol) const override
voidreclassifyMember (MemberDefMutable *md, MemberType t) override
voidwriteInlineDocumentation (OutputList &ol) const override

Write class documentation inside another container (i.e. More...

voidwriteDeclarationLink (OutputList &ol, bool &found, const QCString &header, bool localNames) const override
voidremoveMemberFromLists (MemberDef *md) override
voidsetAnonymousEnumType () override
voidcountMembers () override
voidsortAllMembersList () override
voidaddGroupedInheritedMembers (OutputList &ol, MemberListType lt, const ClassDef *inheritedFrom, const QCString &inheritId) const override
voidwriteTagFile (TextStream &) const override
intcountMembersIncludingGrouped (MemberListType lt, const ClassDef *inheritedFrom, bool additional) const override
intcountMemberDeclarations (MemberListType lt, const ClassDef *inheritedFrom, MemberListType lt2, bool invert, bool showAlways, ClassDefSet &visitedClasses) const override
voidwriteMemberDeclarations (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
voidsetRequiresClause (const QCString &req) override
CLASS_GRAPH_thasInheritanceGraph () const override
voidoverrideInheritanceGraph (CLASS_GRAPH_t e) override
boolhasCollaborationGraph () const override
voidoverrideCollaborationGraph (bool e) override

Private Member Functions Index

intcountInheritedByNodes () const
intcountInheritsNodes () const
intcountInheritanceNodes () const
voidaddUsedInterfaceClasses (MemberDef *md, const QCString &typeStr)
voidshowUsedFiles (OutputList &ol) const
voidwriteDocumentationContents (OutputList &ol, const QCString &pageTitle) const
voidinternalInsertMember (MemberDef *md, Protection prot, bool addToAllList)
voidaddMemberToList (MemberListType lt, MemberDef *md, bool isBrief)
voidwriteInheritedMemberDeclarations (OutputList &ol, ClassDefSet &visitedClasses, MemberListType lt, MemberListType lt2, const QCString &title, const ClassDef *inheritedFrom, bool invert, bool showAlways) const
voidwriteMemberDocumentation (OutputList &ol, MemberListType lt, const QCString &title, bool showInline=FALSE) const
voidwriteSimpleMemberDocumentation (OutputList &ol, MemberListType lt) const
voidwritePlainMemberDeclaration (OutputList &ol, MemberListType lt, bool inGroup, int indentLevel, const ClassDef *inheritedFrom, const QCString &inheritId) const
voidwriteBriefDescription (OutputList &ol, bool exampleFlag) const
voidwriteDetailedDescription (OutputList &ol, const QCString &pageType, bool exampleFlag, const QCString &title, const QCString &anchor=QCString()) const
voidwriteIncludeFiles (OutputList &ol) const
voidwriteIncludeFilesForSlice (OutputList &ol) const
voidwriteInheritanceGraph (OutputList &ol) const
voidwriteCollaborationGraph (OutputList &ol) const
voidwriteMemberGroups (OutputList &ol, bool showInline=FALSE) const
voidwriteNestedClasses (OutputList &ol, const QCString &title) const
voidwriteInlineClasses (OutputList &ol) const
voidstartMemberDeclarations (OutputList &ol) const
voidendMemberDeclarations (OutputList &ol) const
voidstartMemberDocumentation (OutputList &ol) const
voidendMemberDocumentation (OutputList &ol) const
voidwriteAuthorSection (OutputList &ol) const
voidwriteMoreLink (OutputList &ol, const QCString &anchor) const
voidwriteDetailedDocumentationBody (OutputList &ol) const
intcountAdditionalInheritedMembers () const
voidwriteAdditionalInheritedMembers (OutputList &ol) const
voidaddClassAttributes (OutputList &ol) const
intcountInheritedDecMembers (MemberListType lt, const ClassDef *inheritedFrom, bool invert, bool showAlways, ClassDefSet &visitedClasses) const
voidgetTitleForMemberListType (MemberListType type, QCString &title, QCString &subtitle) const
voidaddTypeConstraint (const QCString &typeConstraint, const QCString &type)
voidwriteTemplateSpec (OutputList &ol, const Definition *d, const QCString &type, SrcLangExt lang) const
voidmergeMembersFromBaseClasses (bool mergeVirtualBaseClass)
voidhideDerivedVariablesInPython (ClassDefMutable *cls)

Private Member Attributes Index

QCStringm_fileName
QCStringm_memberListFileName
QCStringm_collabFileName
QCStringm_inheritFileName
std::unique_ptr< IncludeInfo >m_incInfo
BaseClassListm_inherits
BaseClassListm_inheritedBy
FileDef *m_fileDef = nullptr
ModuleDef *m_moduleDef = nullptr
MemberNameInfoLinkedMapm_allMemberNameInfoLinkedMap
ArgumentListm_tempArgs
ArgumentListm_typeConstraints
FileListm_files
ExampleListm_examples
ClassDef::CompoundTypem_compType
Protectionm_prot
ClassLinkedRefMapm_innerClasses
UsesClassListm_usesImplClassList
UsesClassListm_usedByImplClassList
ConstraintClassListm_constraintClassList
TemplateInstanceListm_templateInstances
TemplateNameMapm_templBaseClassNames
const ClassDef *m_templateMaster = nullptr
QCStringm_className
ClassDef *m_categoryOf = nullptr
MemberListsm_memberLists
MemberGroupListm_memberGroups
boolm_isAbstract = false
boolm_isStatic = false
boolm_membersMerged = false
boolm_isLocal = false
boolm_isTemplArg = false
boolm_subGrouping = false
boolm_usedOnly = false

Reason of existence is a "use" relation. More...

StringSetm_vhdlSummaryTitles

List of titles to use for the summary. More...

boolm_isSimple = false

Is this a simple (non-nested) C structure? More...

const MemberDef *m_arrowOperator = nullptr

Does this class overloaded the -> operator? More...

const ClassDef *m_tagLessRef = nullptr
boolm_isJavaEnum = false

Does this class represent a Java style enum? More...

TypeSpecifierm_spec
QCStringm_metaData
QCStringm_requiresClause

C++20 requires clause. More...

StringVectorm_qualifiers
boolm_hasCollaborationGraph = false
CLASS_GRAPH_tm_typeInheritanceGraph = CLASS_GRAPH_t::NO
boolm_implicitTemplateInstance = false

Description

Implementation of the ClassDef interface.

Definition at line 184 of file classdef.cpp.

Public Constructors

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

801 const QCString &defFileName,int defLine,int defColumn,
802 const QCString &nm,CompoundType ct,
803 const QCString &lref,const QCString &fName,
804 bool isSymbol,bool isJavaEnum)
805 : DefinitionMixin(defFileName,defLine,defColumn,removeRedundantWhiteSpace(nm),nullptr,nullptr,isSymbol)
806{
807 AUTO_TRACE("name={}",name());
808 setReference(lref);
809 m_compType = ct;
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;
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}

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.

Public Member Functions

addExample()

bool ClassDefImpl::addExample (const QCString & anchor, const QCString & name, const QCString & file)
virtual

Definition at line 285 of file classdef.cpp.

3395bool ClassDefImpl::addExample(const QCString &anchor,const QCString &nameStr, const QCString &file)
3396{
3397 return m_examples.inSort(Example(anchor,nameStr,file));
3398}

References anchor and m_examples.

addGroupedInheritedMembers()

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

Definition at line 338 of file classdef.cpp.

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

References m_memberGroups and m_subGrouping.

addInnerCompound()

void ClassDefImpl::addInnerCompound (Definition * d)
virtual

Definition at line 292 of file classdef.cpp.

4310{
4311 //printf("**** %s::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
4312 if (d->definitionType()==Definition::TypeClass) // only classes can be
4313 // nested in classes.
4314 {
4316 }
4317}

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

addListReferences()

void ClassDefImpl::addListReferences ()
virtual

Definition at line 314 of file classdef.cpp.

4518{
4519 SrcLangExt lang = getLanguage();
4520 if (!isLinkableInProject()) return;
4521 //printf("ClassDef(%s)::addListReferences()\n",qPrint(name()));
4522 {
4523 const RefItemVector &xrefItems = xrefListItems();
4524 addRefItem(xrefItems,
4526 theTranslator->trCompoundType(compoundType(), lang),
4528 displayName(),
4529 QCString(),
4530 this
4531 );
4532 }
4533 for (const auto &mg : m_memberGroups)
4534 {
4535 mg->addListReferences(this);
4536 }
4537 for (auto &ml : m_memberLists)
4538 {
4539 if (ml->listType().isDetailed())
4540 {
4541 ml->addListReferences(this);
4542 }
4543 }
4544}

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 ()
virtual

Definition at line 313 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}

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)
virtual

Definition at line 306 of file classdef.cpp.

4430{
4431 AUTO_TRACE("this={} cd={} templSpec={}",name(),cd->name(),templSpec);
4432 //printf("%s::addMembersToTemplateInstance(%s,%s)\n",qPrint(name()),qPrint(cd->name()),templSpec);
4433 for (const auto &mni : cd->memberNameInfoLinkedMap())
4434 {
4435 for (const auto &mi : *mni)
4436 {
4437 const MemberDef *md = mi->memberDef();
4438 if (m_allMemberNameInfoLinkedMap.find(md->name())==nullptr) // only insert the member if not hidden by one with the same name (#11541)
4439 {
4441 }
4442 }
4443 }
4444 // also instantatie members for nested classes
4445 for (const auto &innerCd : cd->getClasses())
4446 {
4447 ClassDefMutable *ncd = toClassDefMutable(m_innerClasses.find(innerCd->localName()));
4448 if (ncd)
4449 {
4450 ncd->addMembersToTemplateInstance(innerCd,cd->templateArguments(),templSpec);
4451 }
4452 }
4453}

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

addMemberToTemplateInstance()

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

Definition at line 305 of file classdef.cpp.

4405 const QCString &templSpec)
4406{
4407 AUTO_TRACE("this={} md={}",name(),md->name());
4408 auto actualArguments_p = stringToArgumentList(getLanguage(),templSpec);
4409 auto imd = md->createTemplateInstanceMember(templateArguments,actualArguments_p);
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}

References AUTO_TRACE, Definition::briefDescription, Definition::briefFile, Definition::briefLine, MemberDef::createTemplateInstanceMember, Definition::docFile, Definition::docLine, Definition::documentation, DefinitionMixin< ClassDefMutable >::getLanguage, MemberDef::getMemberGroupId, MemberDef::getMemberSpecifiers, Definition::inbodyDocumentation, Definition::inbodyFile, Definition::inbodyLine, insertMember, Doxygen::memberNameLinkedMap, Definition::name, DefinitionMixin< ClassDefMutable >::name, MemberName::push_back, stringToArgumentList, templateArguments and toMemberDefMutable.

Referenced by addMembersToTemplateInstance.

addQualifiers()

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

Definition at line 299 of file classdef.cpp.

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

Reference m_qualifiers.

addTypeConstraints()

void ClassDefImpl::addTypeConstraints ()
virtual

Definition at line 315 of file classdef.cpp.

3450{
3451 for (const Argument &a : m_tempArgs)
3452 {
3453 if (!a.typeConstraint.isEmpty())
3454 {
3455 QCString typeConstraint;
3456 int i=0,p=0;
3457 while ((i=a.typeConstraint.find('&',p))!=-1) // typeConstraint="A &I" for C<T extends A & I>
3458 {
3459 typeConstraint = a.typeConstraint.mid(p,i-p).stripWhiteSpace();
3460 addTypeConstraint(typeConstraint,a.type);
3461 p=i+1;
3462 }
3463 typeConstraint = a.typeConstraint.right(a.typeConstraint.length()-p).stripWhiteSpace();
3464 addTypeConstraint(typeConstraint,a.type);
3465 }
3466 }
3467}

References addTypeConstraint, m_tempArgs, QCString::mid, QCString::right and QCString::stripWhiteSpace.

addUsedByClass()

void ClassDefImpl::addUsedByClass (ClassDef * cd, const QCString & accessName, Protection prot)
virtual

Definition at line 294 of file classdef.cpp.

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

References Config_getBool, m_usedByImplClassList and QCString::prepend.

addUsedClass()

void ClassDefImpl::addUsedClass (ClassDef * cd, const QCString & accessName, Protection prot)
virtual

Definition at line 293 of file classdef.cpp.

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

References Config_getBool, m_usesImplClassList and QCString::prepend.

anchor()

QCString ClassDefImpl::anchor ()
virtual

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

Definition at line 256 of file classdef.cpp.

5210{
5211 QCString anc;
5213 {
5215 {
5216 // point to the template of which this class is an instance
5217 anc = m_templateMaster->getOutputFileBase();
5218 }
5219 else
5220 {
5221 anc = m_fileName;
5222 }
5223 }
5224 return anc;
5225}

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 ()
virtual

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

Definition at line 210 of file classdef.cpp.

4965{
4966 return m_inherits;
4967}

Reference m_inherits.

Referenced by isBaseClass, mergeMembers and mergeMembersFromBaseClasses.

categoryOf()

ClassDef * ClassDefImpl::categoryOf ()
virtual

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

Definition at line 249 of file classdef.cpp.

5115{
5116 return m_categoryOf;
5117}

Reference m_categoryOf.

className()

QCString ClassDefImpl::className ()
virtual

Returns the name of the class including outer classes, but not including namespaces.

Definition at line 250 of file classdef.cpp.

4502{
4504 auto lang = getLanguage();
4505 if (lang==SrcLangExt::CSharp)
4506 {
4508 }
4509 return name;
4510}

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

codeSymbolType()

CodeSymbolType ClassDefImpl::codeSymbolType ()
virtual

Used for syntax highlighting symbol class

Definition at line 195 of file classdef.cpp.

5389{
5390 switch (compoundType())
5391 {
5392 case Class: return CodeSymbolType::Class; break;
5393 case Struct: return CodeSymbolType::Struct; break;
5394 case Union: return CodeSymbolType::Union; break;
5395 case Interface: return CodeSymbolType::Interface; break;
5396 case Protocol: return CodeSymbolType::Protocol; break;
5397 case Category: return CodeSymbolType::Category; break;
5398 case Exception: return CodeSymbolType::Exception; break;
5399 case Service: return CodeSymbolType::Service; break;
5400 case Singleton: return CodeSymbolType::Singleton; break;
5401 }
5403}

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 ()
virtual

returns the file name to use for the collaboration graph

Definition at line 205 of file classdef.cpp.

Reference m_collabFileName.

compoundType()

ClassDefImpl::CompoundType ClassDefImpl::compoundType ()
virtual

Returns the type of compound this is, i.e.

class/struct/union/..

Definition at line 208 of file classdef.cpp.

Reference m_compType.

Referenced by addListReferences, codeSymbolType, deepCopy, writeDeclarationLink, writeDocumentation and writeMemberList.

compoundTypeString()

QCString ClassDefImpl::compoundTypeString ()
virtual

computeAnchors()

void ClassDefImpl::computeAnchors ()
virtual

Definition at line 316 of file classdef.cpp.

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

References m_memberGroups and m_memberLists.

containsOverload()

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

Definition at line 274 of file classdef.cpp.

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

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

countMemberDeclarations()

int ClassDefImpl::countMemberDeclarations (MemberListType lt, const ClassDef * inheritedFrom, MemberListType lt2, bool invert, bool showAlways, ClassDefSet & visitedClasses)
virtual

Definition at line 343 of file classdef.cpp.

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

References Config_getBool, countInheritedDecMembers, DefinitionMixin< ClassDefMutable >::getLanguage, getMemberList, MemberListType::isInvalid, m_memberGroups and MemberList::numDecMembers.

countMembers()

void ClassDefImpl::countMembers ()
virtual

Definition at line 335 of file classdef.cpp.

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

References m_memberGroups and m_memberLists.

countMembersIncludingGrouped()

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

Definition at line 342 of file classdef.cpp.

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

References MemberList::countInheritableMembers, getMemberList, m_memberGroups and m_subGrouping.

Referenced by countInheritedDecMembers and writeInheritedMemberDeclarations.

deepCopy()

std::unique_ptr< ClassDef > ClassDefImpl::deepCopy (const QCString & name)
virtual

Definition at line 193 of file classdef.cpp.

862std::unique_ptr<ClassDef> ClassDefImpl::deepCopy(const QCString &name) const
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
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);
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}

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 ()
inline virtual

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

Definition at line 192 of file classdef.cpp.

192 DefType definitionType() const override { return TypeClass; }

Reference Definition::TypeClass.

displayName()

QCString ClassDefImpl::displayName (bool includeScope=TRUE)
virtual

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

Definition at line 207 of file classdef.cpp.

989QCString ClassDefImpl::displayName(bool includeScope) const
990{
991 return makeDisplayName(this,includeScope);
992}

Reference makeDisplayName.

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

distributeMemberGroupDocumentation()

void ClassDefImpl::distributeMemberGroupDocumentation ()
virtual

Definition at line 319 of file classdef.cpp.

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

Reference m_memberGroups.

findInnerCompound()

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

Definition at line 235 of file classdef.cpp.

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

References m_innerClasses and DefinitionMixin< ClassDefMutable >::name.

findSectionsInDocumentation()

void ClassDefImpl::findSectionsInDocumentation ()
virtual

Definition at line 312 of file classdef.cpp.

1369{
1373 for (const auto &mg : m_memberGroups)
1374 {
1375 mg->findSectionsInDocumentation(this);
1376 }
1377 for (auto &ml : m_memberLists)
1378 {
1379 if (!ml->listType().isDetailed())
1380 {
1381 ml->findSectionsInDocumentation(this);
1382 }
1383 }
1384}

References DefinitionMixin< ClassDefMutable >::briefDescription, DefinitionMixin< ClassDefMutable >::docFile, docFindSections, DefinitionMixin< ClassDefMutable >::documentation, DefinitionMixin< ClassDefMutable >::inbodyDocumentation, m_memberGroups and m_memberLists.

generatedFromFiles()

QCString ClassDefImpl::generatedFromFiles ()
virtual

Definition at line 263 of file classdef.cpp.

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

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 ()
virtual

returns the classes nested into this class

Definition at line 202 of file classdef.cpp.

Reference m_innerClasses.

getExamples()

const ExampleList & ClassDefImpl::getExamples ()
virtual

Definition at line 266 of file classdef.cpp.

5349{
5350 return m_examples;
5351}

Reference m_examples.

getFileDef()

FileDef * ClassDefImpl::getFileDef ()
virtual

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).

Definition at line 221 of file classdef.cpp.

5010{
5011 return m_fileDef;
5012}

Reference m_fileDef.

Referenced by addTypeConstraint, getOutputFileBase, isEmbeddedInOuterScope and writeTemplateSpec.

getInstanceOutputFileBase()

QCString ClassDefImpl::getInstanceOutputFileBase ()
virtual

Definition at line 197 of file classdef.cpp.

Reference m_fileName.

getMemberByName()

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

Returns the member with the given name.

Definition at line 223 of file classdef.cpp.

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

References m_allMemberNameInfoLinkedMap, maxInheritanceDepth, minClassDistance and DefinitionMixin< ClassDefMutable >::name.

getMemberGroups()

const MemberGroupList & ClassDefImpl::getMemberGroups ()
virtual

Returns the member groups defined for this class.

Definition at line 253 of file classdef.cpp.

5125{
5126 return m_memberGroups;
5127}

Reference m_memberGroups.

getMemberList()

MemberList * ClassDefImpl::getMemberList (MemberListType lt)
virtual

Returns the members in the list identified by lt.

Definition at line 251 of file classdef.cpp.

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

Reference m_memberLists.

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

getMemberListFileName()

QCString ClassDefImpl::getMemberListFileName ()
virtual

Definition at line 268 of file classdef.cpp.

Reference m_memberListFileName.

Referenced by writeDocumentation, writeMemberList and writeSummaryLinks.

getMemberLists()

const MemberLists & ClassDefImpl::getMemberLists ()
virtual

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

Definition at line 252 of file classdef.cpp.

5120{
5121 return m_memberLists;
5122}

Reference m_memberLists.

getModuleDef()

ModuleDef * ClassDefImpl::getModuleDef ()
virtual

Returns the C++20 module in which this compound's definition can be found.

Definition at line 222 of file classdef.cpp.

5015{
5016 return m_moduleDef;
5017}

Reference m_moduleDef.

getOutputFileBase()

QCString ClassDefImpl::getOutputFileBase ()
virtual

Returns the base file name (without extension) of this definition. as it is referenced to/written to disk.

Definition at line 196 of file classdef.cpp.

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

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 ()
virtual

Definition at line 273 of file classdef.cpp.

5298{
5299 return m_qualifiers;
5300}

Reference m_qualifiers.

getReference()

QCString ClassDefImpl::getReference ()
virtual

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

Definition at line 199 of file classdef.cpp.

4456{
4458 {
4459 return m_templateMaster->getReference();
4460 }
4461 else
4462 {
4464 }
4465}

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

Referenced by writeDeclarationLink and writeMemberList.

getSourceFileBase()

QCString ClassDefImpl::getSourceFileBase ()
virtual

Returns the name of the source listing of this definition.

Definition at line 198 of file classdef.cpp.

4278{
4280 {
4281 return m_templateMaster->getSourceFileBase();
4282 }
4283 else
4284 {
4286 }
4287}

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

getTemplateBaseClassNames()

const TemplateNameMap & ClassDefImpl::getTemplateBaseClassNames ()
virtual

Definition at line 254 of file classdef.cpp.

Reference m_templBaseClassNames.

getTemplateInstances()

const TemplateInstanceList & ClassDefImpl::getTemplateInstances ()
virtual

Returns a sorted dictionary with all template instances found for this template class.

Returns 0 if not a template or no instances.

Definition at line 227 of file classdef.cpp.

Reference m_templateInstances.

Referenced by internalInsertMember.

getTemplateParameterLists()

ArgumentLists ClassDefImpl::getTemplateParameterLists ()
virtual

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".

Definition at line 236 of file classdef.cpp.

4480{
4481 ArgumentLists result;
4483 while (d && d->definitionType()==Definition::TypeClass)
4484 {
4485 result.insert(result.begin(),toClassDef(d)->templateArguments());
4486 d = d->getOuterScope();
4487 }
4488 if (!templateArguments().empty())
4489 {
4490 result.push_back(templateArguments());
4491 }
4492 return result;
4493}

References Definition::definitionType, Definition::getOuterScope, DefinitionMixin< ClassDefMutable >::getOuterScope, templateArguments, toClassDef and Definition::TypeClass.

hasCollaborationGraph()

bool ClassDefImpl::hasCollaborationGraph ()
virtual

Definition at line 357 of file classdef.cpp.

Reference m_hasCollaborationGraph.

hasDetailedDescription()

bool ClassDefImpl::hasDetailedDescription ()
virtual

returns TRUE if this class has a non-empty detailed description

Definition at line 204 of file classdef.cpp.

1644{
1645 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
1646 bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
1647 return ((!briefDescription().isEmpty() && repeatBrief) ||
1648 (!documentation().isEmpty() || m_tempArgs.hasTemplateDocumentation()) ||
1649 (sourceBrowser && getStartBodyLine()!=-1 && getBodyDef()));
1650}

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 ()
virtual

Returns TRUE iff the definition is documented (which could be generated documentation)

See Also

hasUserDocumentation()

Definition at line 203 of file classdef.cpp.

Reference DefinitionMixin< Base >::hasDocumentation.

Referenced by isLinkableInProject and isVisibleInHierarchy.

hasExamples()

bool ClassDefImpl::hasExamples ()
virtual

Definition at line 267 of file classdef.cpp.

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

Reference m_examples.

Referenced by writeDetailedDocumentationBody and writeDocumentationContents.

hasInheritanceGraph()

CLASS_GRAPH_t ClassDefImpl::hasInheritanceGraph ()
virtual

Definition at line 353 of file classdef.cpp.

5384{
5386}

Reference m_typeInheritanceGraph.

hasNonReferenceSuperClass()

bool ClassDefImpl::hasNonReferenceSuperClass ()
virtual

Returns TRUE iff this class or a class inheriting from this class is not defined in an external tag file.

Definition at line 271 of file classdef.cpp.

3519{
3520 return hasNonReferenceSuperClassRec(this,0);
3521}

Reference hasNonReferenceSuperClassRec.

Referenced by isVisibleInHierarchy.

includeInfo()

const IncludeInfo * ClassDefImpl::includeInfo ()
virtual

Definition at line 230 of file classdef.cpp.

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

Reference m_incInfo.

inheritanceGraphFileName()

QCString ClassDefImpl::inheritanceGraphFileName ()
virtual

returns the file name to use for the inheritance graph

Definition at line 206 of file classdef.cpp.

Reference m_inheritFileName.

insertBaseClass()

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

Definition at line 279 of file classdef.cpp.

996 Specifier s,const QCString &t)
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);
1001}

References FALSE, m_inherits and m_isSimple.

Referenced by mergeCategory.

insertExplicitTemplateInstance()

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

Definition at line 281 of file classdef.cpp.

4388{
4389 AUTO_TRACE("this={} cd={} templSpec={}",name(),templateClass->name(),templSpec);
4390 m_templateInstances.emplace_back(templSpec,templateClass);
4391}

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

insertMember()

void ClassDefImpl::insertMember (MemberDef * md)
virtual

Definition at line 283 of file classdef.cpp.

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())
virtual

Definition at line 280 of file classdef.cpp.

1005 Specifier s,const QCString &t)
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);
1012}

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)
virtual

Definition at line 277 of file classdef.cpp.

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

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)
virtual

Definition at line 284 of file classdef.cpp.

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

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

isAbstract()

bool ClassDefImpl::isAbstract ()
virtual

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

Definition at line 239 of file classdef.cpp.

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

References m_isAbstract and m_spec.

Referenced by addClassAttributes.

isAccessibleMember()

bool ClassDefImpl::isAccessibleMember (const MemberDef * md)
virtual

returns TRUE iff md is a member of this class or of the the public/protected members of a base class

Definition at line 226 of file classdef.cpp.

4572{
4573 return md->getClassDef() && isBaseClass(md->getClassDef(),TRUE,QCString());
4574}

References MemberDef::getClassDef, isBaseClass and TRUE.

isBaseClass()

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

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.

Definition at line 224 of file classdef.cpp.

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

References baseClasses, err, ClassDef::isBaseClass, QCString::isEmpty, Definition::name, DefinitionMixin< ClassDefMutable >::name and ClassDef::templateMaster.

Referenced by isAccessibleMember.

isCSharp()

bool ClassDefImpl::isCSharp ()
virtual

Returns TRUE if this class is implemented in C#.

Definition at line 242 of file classdef.cpp.

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

Reference DefinitionMixin< ClassDefMutable >::getLanguage.

isEmbeddedInOuterScope()

bool ClassDefImpl::isEmbeddedInOuterScope ()
virtual

Definition at line 257 of file classdef.cpp.

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

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

Referenced by anchor.

isExtension()

bool ClassDefImpl::isExtension ()
virtual

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

Definition at line 246 of file classdef.cpp.

5330{
5331 QCString n = name();
5332 int si = n.find('(');
5333 int ei = n.find(')');
5334 bool b = ei>si && n.mid(si+1,ei-si-1).stripWhiteSpace().isEmpty();
5335 return b;
5336}

References QCString::find, QCString::isEmpty, QCString::mid, DefinitionMixin< ClassDefMutable >::name and QCString::stripWhiteSpace.

Referenced by mergeCategory and visibleInParentsDeclList.

isFinal()

bool ClassDefImpl::isFinal ()
virtual

Returns TRUE if this class is marked as final.

Definition at line 243 of file classdef.cpp.

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

Reference m_spec.

Referenced by addClassAttributes.

isFortran()

bool ClassDefImpl::isFortran ()
virtual

Returns TRUE if this class is implemented in Fortran.

Definition at line 241 of file classdef.cpp.

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

Reference DefinitionMixin< ClassDefMutable >::getLanguage.

Referenced by writeTagFile.

isForwardDeclared()

bool ClassDefImpl::isForwardDeclared ()
virtual

Returns TRUE if this class represents a forward declaration of a template class.

Definition at line 247 of file classdef.cpp.

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

Reference m_spec.

isImplicitTemplateInstance()

bool ClassDefImpl::isImplicitTemplateInstance ()
virtual

Definition at line 275 of file classdef.cpp.

Reference m_implicitTemplateInstance.

isInterface()

bool ClassDefImpl::isInterface ()
virtual

Returns TRUE if this class represents an interface.

Definition at line 248 of file classdef.cpp.

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

Reference m_spec.

isJavaEnum()

bool ClassDefImpl::isJavaEnum ()
virtual

Definition at line 261 of file classdef.cpp.

5276{
5277 return m_isJavaEnum;
5278}

Reference m_isJavaEnum.

Referenced by ClassDefImpl, compoundTypeString, generatedFromFiles and title.

isLinkable()

bool ClassDefImpl::isLinkable ()
virtual

Returns TRUE iff it is possible to link to this item. This can be a link to another project imported via a tag file.

Definition at line 217 of file classdef.cpp.

3614{
3616 {
3617 return m_templateMaster->isLinkable();
3618 }
3619 else
3620 {
3621 return isReference() || isLinkableInProject();
3622 }
3623}

References isLinkableInProject, isReference, m_implicitTemplateInstance and m_templateMaster.

Referenced by visibleInParentsDeclList, writeDeclaration and writeDeclarationLink.

isLinkableInProject()

bool ClassDefImpl::isLinkableInProject ()
virtual

a link to this class is possible within this project

Definition at line 216 of file classdef.cpp.

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

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 ()
virtual

Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES.

Definition at line 201 of file classdef.cpp.

4950{
4951 return m_isLocal;
4952}

Reference m_isLocal.

Referenced by visibleInParentsDeclList.

isObjectiveC()

bool ClassDefImpl::isObjectiveC ()
virtual

Returns TRUE if this class is implemented in Objective-C.

Definition at line 240 of file classdef.cpp.

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

Reference DefinitionMixin< ClassDefMutable >::getLanguage.

Referenced by writeTagFile.

isPublished()

bool ClassDefImpl::isPublished ()
virtual

Returns TRUE if this class is marked as published.

Definition at line 245 of file classdef.cpp.

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

Reference m_spec.

Referenced by addClassAttributes.

isReference()

bool ClassDefImpl::isReference ()
virtual

Returns TRUE if this definition is imported via a tag file.

Definition at line 200 of file classdef.cpp.

4468{
4470 {
4471 return m_templateMaster->isReference();
4472 }
4473 else
4474 {
4476 }
4477}

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

Referenced by isLinkable, isLinkableInProject and isVisibleInHierarchy.

isSealed()

bool ClassDefImpl::isSealed ()
virtual

Returns TRUE if this class is marked as sealed.

Definition at line 244 of file classdef.cpp.

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

Reference m_spec.

Referenced by addClassAttributes.

isSimple()

bool ClassDefImpl::isSimple ()
virtual

Definition at line 258 of file classdef.cpp.

5190{
5191 return m_isSimple;
5192}

Reference m_isSimple.

Referenced by internalInsertMember and writeInlineDocumentation.

isSliceLocal()

bool ClassDefImpl::isSliceLocal ()
virtual

Definition at line 270 of file classdef.cpp.

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

Reference m_spec.

Referenced by title and writeDeclarationLink.

isSmartPointer()

const MemberDef * ClassDefImpl::isSmartPointer ()
virtual

Definition at line 260 of file classdef.cpp.

5195{
5196 return m_arrowOperator;
5197}

Reference m_arrowOperator.

isSubClass()

bool ClassDefImpl::isSubClass (ClassDef * bcd, int level=0)
virtual

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

Definition at line 225 of file classdef.cpp.

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

References err, FALSE, ClassDef::isSubClass, Definition::name, DefinitionMixin< ClassDefMutable >::name and subClasses.

isTemplate()

bool ClassDefImpl::isTemplate ()
virtual

Returns TRUE if this class is a template.

Definition at line 229 of file classdef.cpp.

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

Reference m_tempArgs.

isTemplateArgument()

bool ClassDefImpl::isTemplateArgument ()
virtual

Definition at line 234 of file classdef.cpp.

5065{
5066 return m_isTemplArg;
5067}

Reference m_isTemplArg.

isUsedOnly()

bool ClassDefImpl::isUsedOnly ()
virtual

Definition at line 255 of file classdef.cpp.

5185{
5186 return m_usedOnly;
5187}

Reference m_usedOnly.

isVisibleInHierarchy()

bool ClassDefImpl::isVisibleInHierarchy ()
virtual

the class is visible in a class diagram, or class hierarchy

Definition at line 218 of file classdef.cpp.

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

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)
virtual

Definition at line 307 of file classdef.cpp.

5170{
5171 m_isTemplArg = b;
5172}

Reference m_isTemplArg.

memberNameInfoLinkedMap()

const MemberNameInfoLinkedMap & ClassDefImpl::memberNameInfoLinkedMap ()
virtual

Returns a dictionary of all members.

This includes any inherited members. Members are sorted alphabetically.

Definition at line 214 of file classdef.cpp.

Reference m_allMemberNameInfoLinkedMap.

mergeCategory()

void ClassDefImpl::mergeCategory (ClassDef * cat)
virtual

Merges the members of a Objective-C category into this class.

Definition at line 286 of file classdef.cpp.

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

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 ()
virtual

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

Definition at line 317 of file classdef.cpp.

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

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

moveTo()

void ClassDefImpl::moveTo (Definition * scope)
virtual

Definition at line 194 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}

References Definition::definitionType, m_fileDef, m_moduleDef, DefinitionMixin< ClassDefMutable >::setOuterScope, toFileDef, toModuleDef, Definition::TypeFile and Definition::TypeModule.

overrideCollaborationGraph()

void ClassDefImpl::overrideCollaborationGraph (bool e)
virtual

Definition at line 358 of file classdef.cpp.

Reference m_hasCollaborationGraph.

overrideInheritanceGraph()

void ClassDefImpl::overrideInheritanceGraph (CLASS_GRAPH_t e)
virtual

Definition at line 354 of file classdef.cpp.

5379{
5381}

Reference m_typeInheritanceGraph.

protection()

Protection ClassDefImpl::protection ()
virtual

Return the protection level (Public,Protected,Private) in which this compound was found.

Definition at line 215 of file classdef.cpp.

5000{
5001 return m_prot;
5002}

Reference m_prot.

Referenced by visibleInParentsDeclList and writeDeclarationLink.

qualifiedNameWithTemplateParameters()

QCString ClassDefImpl::qualifiedNameWithTemplateParameters (const ArgumentLists * actualParams=nullptr, uint32_t * actualParamIndex=nullptr)
virtual

Definition at line 237 of file classdef.cpp.

4496 const ArgumentLists *actualParams,uint32_t *actualParamIndex) const
4497{
4498 return makeQualifiedNameWithTemplateParameters(this,actualParams,actualParamIndex);
4499}

Reference makeQualifiedNameWithTemplateParameters.

reclassifyMember()

void ClassDefImpl::reclassifyMember (MemberDefMutable * md, MemberType t)
virtual

Definition at line 329 of file classdef.cpp.

5200{
5201 md->setMemberType(t);
5202 for (auto &ml : m_memberLists)
5203 {
5204 ml->remove(md);
5205 }
5206 insertMember(md);
5207}

References insertMember, m_memberLists and MemberDefMutable::setMemberType.

removeMemberFromLists()

void ClassDefImpl::removeMemberFromLists (MemberDef * md)
virtual

Definition at line 333 of file classdef.cpp.

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

Reference m_memberLists.

Referenced by hideDerivedVariablesInPython.

requiresClause()

QCString ClassDefImpl::requiresClause ()
virtual

Definition at line 272 of file classdef.cpp.

Reference m_requiresClause.

setAnonymousEnumType()

void ClassDefImpl::setAnonymousEnumType ()
virtual

Definition at line 334 of file classdef.cpp.

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

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

setCategoryOf()

void ClassDefImpl::setCategoryOf (ClassDef * cd)
virtual

Definition at line 308 of file classdef.cpp.

5175{
5176 m_categoryOf = cd;
5177}

Reference m_categoryOf.

setClassName()

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

Definition at line 297 of file classdef.cpp.

4513{
4515}

References m_className and DefinitionMixin< ClassDefMutable >::name.

setClassSpecifier()

void ClassDefImpl::setClassSpecifier (TypeSpecifier spec)
virtual

Definition at line 298 of file classdef.cpp.

5281{
5282 m_spec = spec;
5283}

Reference m_spec.

setCompoundType()

void ClassDefImpl::setCompoundType (CompoundType t)
virtual

Definition at line 296 of file classdef.cpp.

Reference m_compType.

setFileDef()

void ClassDefImpl::setFileDef (FileDef * fd)
virtual

Definition at line 287 of file classdef.cpp.

5130{
5131 m_fileDef = fd;
5132}

Reference m_fileDef.

setGroupDefForAllMembers()

void ClassDefImpl::setGroupDefForAllMembers (GroupDef * g, Grouping::GroupPri_t pri, const QCString & fileName, int startLine, bool hasDocs)
virtual

Definition at line 291 of file classdef.cpp.

4289void ClassDefImpl::setGroupDefForAllMembers(GroupDef *gd,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs)
4290{
4291 gd->addClass(this);
4292 //printf("ClassDefImpl::setGroupDefForAllMembers(%s)\n",qPrint(gd->name()));
4293 for (auto &mni : m_allMemberNameInfoLinkedMap)
4294 {
4295 for (auto &mi : *mni)
4296 {
4297 MemberDefMutable *md = toMemberDefMutable(mi->memberDef());
4298 if (md)
4299 {
4300 md->setGroupDef(gd,pri,fileName,startLine,hasDocs);
4301 gd->insertMember(md,TRUE);
4303 if (innerClass) innerClass->setGroupDefForAllMembers(gd,pri,fileName,startLine,hasDocs);
4304 }
4305 }
4306 }
4307}

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

setImplicitTemplateInstance()

void ClassDefImpl::setImplicitTemplateInstance (bool b)
virtual

Definition at line 303 of file classdef.cpp.

Reference m_implicitTemplateInstance.

setIncludeFile()

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

Definition at line 282 of file classdef.cpp.

1429 const QCString &includeName,bool local, bool force)
1430{
1431 //printf("ClassDefImpl::setIncludeFile(%p,%s,%d,%d)\n",fd,includeName,local,force);
1432 if (!m_incInfo) m_incInfo = std::make_unique<IncludeInfo>();
1433 if ((!includeName.isEmpty() && m_incInfo->includeName.isEmpty()) ||
1434 (fd!=nullptr && m_incInfo->fileDef==nullptr)
1435 )
1436 {
1437 //printf("Setting file info\n");
1438 m_incInfo->fileDef = fd;
1439 m_incInfo->includeName = includeName;
1441 }
1442 if (force && !includeName.isEmpty())
1443 {
1444 m_incInfo->includeName = includeName;
1446 }
1447}

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

setIsStatic()

void ClassDefImpl::setIsStatic (bool b)
virtual

Definition at line 295 of file classdef.cpp.

5154{
5155 m_isStatic=b;
5156}

Reference m_isStatic.

setMetaData()

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

Definition at line 311 of file classdef.cpp.

5364{
5365 m_metaData = md;
5366}

Reference m_metaData.

setModuleDef()

void ClassDefImpl::setModuleDef (ModuleDef * mod)
virtual

Definition at line 288 of file classdef.cpp.

5135{
5136 m_moduleDef = mod;
5137}

Reference m_moduleDef.

setProtection()

void ClassDefImpl::setProtection (Protection p)
virtual

setRequiresClause()

void ClassDefImpl::setRequiresClause (const QCString & req)
virtual

Definition at line 350 of file classdef.cpp.

3529{
3530 m_requiresClause = req;
3531}

Reference m_requiresClause.

setSubGrouping()

void ClassDefImpl::setSubGrouping (bool enabled)
virtual

Definition at line 289 of file classdef.cpp.

5140{
5141 m_subGrouping = enabled;
5142}

Reference m_subGrouping.

setTagLessReference()

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

Definition at line 310 of file classdef.cpp.

5263{
5264 m_tagLessRef = cd;
5265}

Reference m_tagLessRef.

setTemplateArguments()

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

Definition at line 300 of file classdef.cpp.

3476{
3477 m_tempArgs = al;
3478}

Reference m_tempArgs.

setTemplateBaseClassNames()

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

Definition at line 301 of file classdef.cpp.

4394{
4395 m_templBaseClassNames = templateNames;
4396}

Reference m_templBaseClassNames.

setTemplateMaster()

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

Definition at line 302 of file classdef.cpp.

5164{
5165 assert(tm!=this);
5167}

Reference m_templateMaster.

setTypeConstraints()

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

Definition at line 304 of file classdef.cpp.

Reference m_typeConstraints.

setUsedOnly()

void ClassDefImpl::setUsedOnly (bool b)
virtual

Definition at line 309 of file classdef.cpp.

5180{
5181 m_usedOnly = b;
5182}

Reference m_usedOnly.

sortAllMembersList()

void ClassDefImpl::sortAllMembersList ()
virtual

Definition at line 336 of file classdef.cpp.

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

Reference m_allMemberNameInfoLinkedMap.

sortMemberLists()

void ClassDefImpl::sortMemberLists ()
virtual

Definition at line 318 of file classdef.cpp.

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

References FALSE, m_innerClasses and m_memberLists.

subClasses()

const BaseClassList & ClassDefImpl::subClasses ()
virtual

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

Definition at line 212 of file classdef.cpp.

4975{
4976 return m_inheritedBy;
4977}

Reference m_inheritedBy.

Referenced by isSubClass.

subGrouping()

bool ClassDefImpl::subGrouping ()
virtual

Definition at line 269 of file classdef.cpp.

5354{
5355 return m_subGrouping;
5356}

Reference m_subGrouping.

tagLessReference()

const ClassDef * ClassDefImpl::tagLessReference ()
virtual

Definition at line 259 of file classdef.cpp.

5258{
5259 return m_tagLessRef;
5260}

Reference m_tagLessRef.

templateArguments()

const ArgumentList & ClassDefImpl::templateArguments ()
virtual

Returns the template arguments of this class.

Definition at line 220 of file classdef.cpp.

5005{
5006 return m_tempArgs;
5007}

Reference m_tempArgs.

Referenced by addMembersToTemplateInstance, addMemberToTemplateInstance, className, getTemplateParameterLists and internalInsertMember.

templateMaster()

const ClassDef * ClassDefImpl::templateMaster ()
virtual

Returns the template master of which this class is an instance.

Returns 0 if not applicable.

Definition at line 228 of file classdef.cpp.

5025{
5026 return m_templateMaster;
5027}

Reference m_templateMaster.

templateTypeConstraints()

const ConstraintClassList & ClassDefImpl::templateTypeConstraints ()
virtual

Definition at line 233 of file classdef.cpp.

Reference m_constraintClassList.

title()

QCString ClassDefImpl::title ()
virtual

Definition at line 262 of file classdef.cpp.

2893{
2894 QCString pageTitle;
2895 SrcLangExt lang = getLanguage();
2896
2897 auto getReferenceTitle = [this](std::function<QCString()> translateFunc) -> QCString
2898 {
2899 return Config_getBool(HIDE_COMPOUND_REFERENCE) ? displayName() : translateFunc();
2900 };
2901
2902 if (lang==SrcLangExt::Fortran)
2903 {
2904 pageTitle = getReferenceTitle([this](){
2905 return theTranslator->trCompoundReferenceFortran(displayName(), m_compType, !m_tempArgs.empty());
2906 });
2907 }
2908 else if (lang==SrcLangExt::Slice)
2909 {
2910 pageTitle = getReferenceTitle([this](){
2911 return theTranslator->trCompoundReferenceSlice(displayName(), m_compType, isSliceLocal());
2912 });
2913 }
2914 else if (lang==SrcLangExt::VHDL)
2915 {
2916 pageTitle = getReferenceTitle([this](){
2917 return theTranslator->trCustomReference(VhdlDocGen::getClassTitle(this));
2918 });
2919 }
2920 else if (isJavaEnum())
2921 {
2922 pageTitle = getReferenceTitle([this](){
2923 return theTranslator->trEnumReference(displayName());
2924 });
2925 }
2926 else if (m_compType==Service)
2927 {
2928 pageTitle = getReferenceTitle([this](){
2929 return theTranslator->trServiceReference(displayName());
2930 });
2931 }
2932 else if (m_compType==Singleton)
2933 {
2934 pageTitle = getReferenceTitle([this](){
2935 return theTranslator->trSingletonReference(displayName());
2936 });
2937 }
2938 else
2939 {
2940 pageTitle = getReferenceTitle([this](){
2941 return theTranslator->trCompoundReference(displayName(),
2942 m_compType == Interface && getLanguage()==SrcLangExt::ObjC ? Class : m_compType,
2943 !m_tempArgs.empty());
2944 });
2945 }
2946 return pageTitle;
2947}

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 ()
virtual

Definition at line 265 of file classdef.cpp.

5344{
5345 return m_typeConstraints;
5346}

Reference m_typeConstraints.

updateBaseClasses()

void ClassDefImpl::updateBaseClasses (const BaseClassList & bcd)
virtual

Update the list of base classes to the one passed.

Definition at line 211 of file classdef.cpp.

4970{
4971 m_inherits = bcd;
4972}

Reference m_inherits.

updateSubClasses()

void ClassDefImpl::updateSubClasses (const BaseClassList & bcd)
virtual

Update the list of sub classes to the one passed.

Definition at line 213 of file classdef.cpp.

4980{
4981 m_inheritedBy = bcd;
4982}

Reference m_inheritedBy.

usedByImplementationClasses()

const UsesClassList & ClassDefImpl::usedByImplementationClasses ()
virtual

Definition at line 232 of file classdef.cpp.

Reference m_usedByImplClassList.

usedFiles()

const FileList & ClassDefImpl::usedFiles ()
virtual

Definition at line 264 of file classdef.cpp.

5339{
5340 return m_files;
5341}

Reference m_files.

usedImplementationClasses()

const UsesClassList & ClassDefImpl::usedImplementationClasses ()
virtual

Definition at line 231 of file classdef.cpp.

Reference m_usesImplClassList.

visibleInParentsDeclList()

bool ClassDefImpl::visibleInParentsDeclList ()
virtual

show this class in the declaration section of its parent?

Definition at line 219 of file classdef.cpp.

2588{
2589 bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
2590 bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
2591 bool extractLocalClasses = Config_getBool(EXTRACT_LOCAL_CLASSES);
2592 bool linkable = isLinkable();
2593 return (!isAnonymous() && !isExtension() &&
2594 (protection()!=Protection::Private || extractPrivate) &&
2595 (linkable || (!hideUndocClasses && (!isLocal() || extractLocalClasses)))
2596 );
2597}

References Config_getBool, DefinitionMixin< ClassDefMutable >::isAnonymous, isExtension, isLinkable, isLocal and protection.

Referenced by writeDeclarationLink.

writeDeclaration()

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

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

Definition at line 324 of file classdef.cpp.

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

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)
virtual

Definition at line 331 of file classdef.cpp.

2599void ClassDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const QCString &header,bool localNames) const
2600{
2601 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
2602 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
2603 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2604 SrcLangExt lang = getLanguage();
2606 {
2607 if (!found) // first class
2608 {
2609 if (sliceOpt)
2610 {
2611 if (compoundType()==Interface)
2612 {
2613 ol.startMemberHeader("interfaces");
2614 }
2615 else if (compoundType()==Struct)
2616 {
2617 ol.startMemberHeader("structs");
2618 }
2619 else if (compoundType()==Exception)
2620 {
2621 ol.startMemberHeader("exceptions");
2622 }
2623 else // compoundType==Class
2624 {
2625 ol.startMemberHeader("nested-classes");
2626 }
2627 }
2628 else // non-Slice optimization: single header for class/struct/..
2629 {
2630 ol.startMemberHeader("nested-classes");
2631 }
2632 if (!header.isEmpty())
2633 {
2634 ol.parseText(header);
2635 }
2636 else if (lang==SrcLangExt::VHDL)
2637 {
2639 }
2640 else
2641 {
2642 ol.parseText(lang==SrcLangExt::Fortran ?
2643 theTranslator->trDataTypes() :
2644 theTranslator->trCompounds());
2645 }
2646 ol.endMemberHeader();
2647 ol.startMemberList();
2648 found=TRUE;
2649 }
2652 QCString cname = displayName(!localNames);
2653 QCString anc = anchor();
2654 if (anc.isEmpty()) anc = cname; else anc.prepend(cname+"_");
2656
2657 if (lang!=SrcLangExt::VHDL) // for VHDL we swap the name and the type
2658 {
2659 if (isSliceLocal())
2660 {
2661 ol.writeString("local ");
2662 }
2663 ol.writeString(ctype);
2664 ol.writeString(" ");
2666 }
2667 if (isLinkable())
2668 {
2671 anchor(),
2672 cname
2673 );
2674 }
2675 else
2676 {
2677 ol.startBold();
2678 ol.docify(cname);
2679 ol.endBold();
2680 }
2681 if (lang==SrcLangExt::VHDL) // now write the type
2682 {
2683 ol.writeString(" ");
2686 }
2688
2689 // add the brief description if available
2690 if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
2691 {
2692 auto parser { createDocParser() };
2693 auto ast { validatingParseDoc(*parser.get(),
2694 briefFile(),briefLine(),this,nullptr,
2696 QCString(),TRUE,FALSE) };
2697 if (!ast->isEmpty())
2698 {
2700 ol.writeDoc(ast.get(),this,nullptr);
2702 {
2703 writeMoreLink(ol,anchor());
2704 }
2706 }
2707 }
2709 }
2710}

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

writeDocumentation()

void ClassDefImpl::writeDocumentation (OutputList & ol)
virtual

Definition at line 320 of file classdef.cpp.

2951{
2952 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
2953 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
2954 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
2955 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2956 QCString pageTitle = title();
2957
2959 if (sliceOpt)
2960 {
2961 if (compoundType()==Interface)
2962 {
2964 }
2965 else if (compoundType()==Struct)
2966 {
2968 }
2969 else if (compoundType()==Exception)
2970 {
2972 }
2973 else
2974 {
2976 }
2977 }
2978 else
2979 {
2981 }
2982
2983 AUTO_TRACE("name='{}' getOutputFileBase='{}'",name(),getOutputFileBase());
2984 bool hasAllMembersLink=false;
2985 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
2986 {
2987 if (lde->kind()==LayoutDocEntry::ClassAllMembersLink)
2988 {
2989 hasAllMembersLink = true;
2990 break;
2991 }
2992 }
2993 QCString memListFile;
2994 if (hasAllMembersLink && !m_allMemberNameInfoLinkedMap.empty() && !Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
2995 {
2996 memListFile = getMemberListFileName();
2997 }
2998 startFile(ol,getOutputFileBase(),name(),pageTitle,hli,!generateTreeView,QCString(),0,memListFile);
2999 if (!generateTreeView)
3000 {
3002 {
3004 }
3005 ol.endQuickIndices();
3006 }
3007
3008 startTitle(ol,getOutputFileBase(),this);
3009 ol.parseText(pageTitle);
3011 addGroupListToTitle(ol,this);
3013 writeDocumentationContents(ol,pageTitle);
3014
3015 endFileWithNavPath(ol,this);
3016
3017 if (Config_getBool(SEPARATE_MEMBER_PAGES))
3018 {
3020 }
3021}

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.

writeDocumentationForInnerClasses()

void ClassDefImpl::writeDocumentationForInnerClasses (OutputList & ol)
virtual

Definition at line 321 of file classdef.cpp.

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

References m_innerClasses, msg and protectionLevelVisible.

writeInlineDocumentation()

void ClassDefImpl::writeInlineDocumentation (OutputList & ol)
virtual

Write class documentation inside another container (i.e.

a group)

Definition at line 330 of file classdef.cpp.

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

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)
virtual

Definition at line 345 of file classdef.cpp.

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

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

Referenced by writeDocumentationContents and writeInlineDocumentation.

writeMemberList()

void ClassDefImpl::writeMemberList (OutputList & ol)
virtual

Definition at line 323 of file classdef.cpp.

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

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)
virtual

Definition at line 322 of file classdef.cpp.

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

References OutputList::disableAllBut, displayName, Html, m_memberLists, OutputList::popGeneratorState and OutputList::pushGeneratorState.

Referenced by writeDocumentation.

writePageNavigation()

void ClassDefImpl::writePageNavigation (OutputList & ol)
virtual

Definition at line 327 of file classdef.cpp.

2313{
2314 ol.writePageOutline();
2315}

Reference OutputList::writePageOutline.

writeQuickMemberLinks()

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

Definition at line 326 of file classdef.cpp.

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

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.

writeSummaryLinks()

void ClassDefImpl::writeSummaryLinks (OutputList & ol)
virtual

Definition at line 328 of file classdef.cpp.

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

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)
virtual

Definition at line 340 of file classdef.cpp.

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

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.

Private Member Functions

addClassAttributes()

void ClassDefImpl::addClassAttributes (OutputList & ol)

Definition at line 397 of file classdef.cpp.

2713{
2714 StringVector sl;
2715 if (isFinal()) sl.emplace_back("final");
2716 if (isSealed()) sl.emplace_back("sealed");
2717 if (isAbstract()) sl.emplace_back("abstract");
2718 if (isExported()) sl.emplace_back("export");
2719 if (getLanguage()==SrcLangExt::IDL && isPublished()) sl.emplace_back("published");
2720
2721 for (const auto &sx : m_qualifiers)
2722 {
2723 bool alreadyAdded = std::find(sl.begin(), sl.end(), sx) != sl.end();
2724 if (!alreadyAdded)
2725 {
2726 sl.push_back(sx);
2727 }
2728 }
2729
2732 if (!sl.empty())
2733 {
2734 ol.startLabels();
2735 size_t i=0;
2736 for (const auto &s : sl)
2737 {
2738 i++;
2739 ol.writeLabel(s.c_str(),i==sl.size());
2740 }
2741 ol.endLabels();
2742 }
2744}

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.

addMemberToList()

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

Definition at line 368 of file classdef.cpp.

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

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

Referenced by internalInsertMember.

addTypeConstraint()

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

Definition at line 403 of file classdef.cpp.

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

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.

addUsedInterfaceClasses()

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

Definition at line 363 of file classdef.cpp.

References anchor, FALSE and title.

countAdditionalInheritedMembers()

int ClassDefImpl::countAdditionalInheritedMembers ()

Definition at line 395 of file classdef.cpp.

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

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

Referenced by endMemberDeclarations.

countInheritanceNodes()

int ClassDefImpl::countInheritanceNodes ()

Definition at line 362 of file classdef.cpp.

References countInheritedByNodes and countInheritsNodes.

Referenced by writeInheritanceGraph.

countInheritedByNodes()

int ClassDefImpl::countInheritedByNodes ()

Definition at line 360 of file classdef.cpp.

1800{
1801 int count=0;
1802 for (const auto &ibcd : m_inheritedBy)
1803 {
1804 const ClassDef *icd=ibcd.classDef;
1805 if ( icd->isVisibleInHierarchy()) count++;
1806 }
1807 return count;
1808}

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)

Definition at line 398 of file classdef.cpp.

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

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 ()

Definition at line 361 of file classdef.cpp.

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

References ClassDef::isVisibleInHierarchy and m_inherits.

Referenced by countInheritanceNodes and writeInheritanceGraph.

endMemberDeclarations()

void ClassDefImpl::endMemberDeclarations (OutputList & ol)

Definition at line 388 of file classdef.cpp.

2217{
2218 //printf("%s: ClassDefImpl::endMemberDeclarations()\n",qPrint(name()));
2219 bool inlineInheritedMembers = Config_getBool(INLINE_INHERITED_MEMB);
2220 if (!inlineInheritedMembers && countAdditionalInheritedMembers()>0)
2221 {
2222 ol.startMemberHeader("inherited");
2223 ol.parseText(theTranslator->trAdditionalInheritedMembers());
2224 ol.endMemberHeader();
2226 }
2228}

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)

Definition at line 390 of file classdef.cpp.

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

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

Referenced by writeDocumentationContents and writeInlineDocumentation.

getTitleForMemberListType()

void ClassDefImpl::getTitleForMemberListType (MemberListType type, QCString & title, QCString & subtitle)

Definition at line 401 of file classdef.cpp.

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

References DefinitionMixin< ClassDefMutable >::getLanguage, LayoutDocManager::instance, LayoutDocEntryMemberDecl::subtitle, title, LayoutDocEntryMemberDecl::title and LayoutDocEntryMemberDecl::type.

hideDerivedVariablesInPython()

void ClassDefImpl::hideDerivedVariablesInPython (ClassDefMutable * cls)

Definition at line 407 of file classdef.cpp.

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

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.

internalInsertMember()

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

Definition at line 367 of file classdef.cpp.

1037 Protection prot,
1038 bool addToAllList
1039 )
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;
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);
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 {
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;
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;
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 {
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
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 AUTO_TRACE_ADD("member {} of class {} with template instance {}\n",md->name(),name(),ti.templSpec);
1329 ClassDefMutable *cdm = toClassDefMutable(ti.classDef);
1330 if (cdm)
1331 {
1332 cdm->addMemberToTemplateInstance(md,templateArguments(),ti.templSpec);
1333 }
1334 }
1335
1336}

References addMemberToList, ClassDefMutable::addMemberToTemplateInstance, AUTO_TRACE, AUTO_TRACE_ADD, Class, Config_getBool, DCOP, Define, Enumeration, EnumValue, err, Event, FALSE, QCString::find, Function, Definition::getDefFileName, Definition::getDefLine, DefinitionMixin< ClassDefMutable >::getLanguage, getTemplateInstances, MemberDef::getVhdlSpecifiers, Interface, MemberDef::isConstructor, MemberDef::isDestructor, MemberDef::isEnumerate, MemberDef::isEnumValue, MemberDef::isFinal, MemberDef::isFriend, MemberDef::isFunction, Definition::isHidden, MemberDef::isOverride, MemberDef::isRelated, isSimple, MemberDef::isStatic, MemberDef::isTypedef, MemberDef::isVariable, 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.

mergeMembersFromBaseClasses()

void ClassDefImpl::mergeMembersFromBaseClasses (bool mergeVirtualBaseClass)

Definition at line 406 of file classdef.cpp.

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

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

Referenced by mergeMembers.

showUsedFiles()

void ClassDefImpl::showUsedFiles (OutputList & ol)

Definition at line 364 of file classdef.cpp.

1722{
1725
1726
1727 ol.writeRuler();
1730 ol.startParagraph();
1732 ol.endParagraph();
1737
1738 bool first=TRUE;
1739 for (const auto &fd : m_files)
1740 {
1741 if (first)
1742 {
1743 first=FALSE;
1744 ol.startItemList();
1745 }
1746
1748 QCString path=fd->getPath();
1749 if (Config_getBool(FULL_PATH_NAMES))
1750 {
1751 ol.docify(stripFromPath(path));
1752 }
1753
1754 QCString fname = fd->name();
1755 if (!fd->getVersion().isEmpty()) // append version if available
1756 {
1757 fname += " (" + fd->getVersion() + ")";
1758 }
1759
1760 // for HTML
1763 if (fd->generateSourceFile())
1764 {
1765 ol.writeObjectLink(QCString(),fd->getSourceFileBase(),QCString(),fname);
1766 }
1767 else if (fd->isLinkable())
1768 {
1769 ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fname);
1770 }
1771 else
1772 {
1773 ol.startBold();
1774 ol.docify(fname);
1775 ol.endBold();
1776 }
1778
1779 // for other output formats
1782 if (fd->isLinkable())
1783 {
1784 ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),QCString(),fname);
1785 }
1786 else
1787 {
1788 ol.docify(fname);
1789 }
1791
1792 ol.endItemListItem();
1793 }
1794 if (!first) ol.endItemList();
1795
1797}

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.

startMemberDeclarations()

void ClassDefImpl::startMemberDeclarations (OutputList & ol)

Definition at line 387 of file classdef.cpp.

2211{
2212 //printf("%s: ClassDefImpl::startMemberDeclarations()\n",qPrint(name()));
2214}

Reference OutputList::startMemberSections.

Referenced by writeDocumentationContents and writeInlineDocumentation.

startMemberDocumentation()

void ClassDefImpl::startMemberDocumentation (OutputList & ol)

Definition at line 389 of file classdef.cpp.

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

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

Referenced by writeDocumentationContents and writeInlineDocumentation.

writeAdditionalInheritedMembers()

void ClassDefImpl::writeAdditionalInheritedMembers (OutputList & ol)

Definition at line 396 of file classdef.cpp.

4779{
4780 //printf("**** writeAdditionalInheritedMembers()\n");
4781 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Class))
4782 {
4783 if (lde->kind()==LayoutDocEntry::MemberDecl)
4784 {
4785 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
4786 if (lmd && lmd->type!=MemberListType::Friends())
4787 {
4788 ClassDefSet visited;
4790 }
4791 }
4792 }
4793}

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

Referenced by endMemberDeclarations.

writeAuthorSection()

writeBriefDescription()

writeCollaborationGraph()

void ClassDefImpl::writeCollaborationGraph (OutputList & ol)

Definition at line 383 of file classdef.cpp.

1962{
1963 if (Config_getBool(HAVE_DOT) && m_hasCollaborationGraph /*&& Config_getBool(COLLABORATION_GRAPH)*/)
1964 {
1965 DotClassGraph usageImplGraph(this,GraphType::Collaboration);
1966 if (usageImplGraph.isTooBig())
1967 {
1968 warn_uncond("Collaboration graph for '{}' not generated, too many nodes ({}), threshold is {}. Consider increasing DOT_GRAPH_MAX_NODES.\n",
1969 name(), usageImplGraph.numNodes(), Config_getInt(DOT_GRAPH_MAX_NODES));
1970 }
1971 else if (!usageImplGraph.isTrivial())
1972 {
1975 ol.startDotGraph();
1976 ol.parseText(theTranslator->trCollaborationDiagram(displayName()));
1977 ol.endDotGraph(usageImplGraph);
1979 }
1980 }
1981}

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.

writeDetailedDescription()

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

Definition at line 378 of file classdef.cpp.

1653void ClassDefImpl::writeDetailedDescription(OutputList &ol, const QCString &/*pageType*/, bool exampleFlag,
1654 const QCString &title,const QCString &anchor) const
1655{
1656 if (hasDetailedDescription() || exampleFlag)
1657 {
1660 ol.writeRuler();
1662
1665 ol.writeAnchor(QCString(),anchor.isEmpty() ? QCString("details") : anchor);
1667
1668 if (!anchor.isEmpty())
1669 {
1675 }
1676
1677 ol.startGroupHeader("details");
1678 ol.parseText(title);
1679 ol.endGroupHeader();
1680
1682 }
1683 else
1684 {
1685 //writeTemplateSpec(ol,this,pageType);
1686 }
1687}

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)

Definition at line 393 of file classdef.cpp.

1587{
1588 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
1589
1590 ol.startTextBlock();
1591
1592 if (getLanguage()==SrcLangExt::Cpp)
1593 {
1595 }
1596
1597 // repeat brief description
1598 if (!briefDescription().isEmpty() && repeatBrief)
1599 {
1602 }
1603 if (!briefDescription().isEmpty() && repeatBrief &&
1604 !documentation().isEmpty())
1605 {
1608 ol.writeString("\n\n");
1610 }
1611 // write documentation
1612 if (!documentation().isEmpty())
1613 {
1614 ol.generateDoc(docFile(),docLine(),this,nullptr,documentation(),TRUE,FALSE,
1616 }
1617 // write type constraints
1619
1620 ol.generateDoc(
1621 docFile(),docLine(),
1622 this,
1623 nullptr, // memberDef
1625 TRUE, // indexWords
1626 FALSE, // isExample
1628 );
1629
1630 // write examples
1631 if (hasExamples())
1632 {
1633 ol.startExamples();
1634 ol.startDescForItem();
1636 ol.endDescForItem();
1637 ol.endExamples();
1638 }
1639 writeSourceDef(ol);
1640 ol.endTextBlock();
1641}

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.

writeDocumentationContents()

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

Definition at line 366 of file classdef.cpp.

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

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.

writeIncludeFiles()

void ClassDefImpl::writeIncludeFiles (OutputList & ol)

Definition at line 380 of file classdef.cpp.

2126{
2127 if (m_incInfo /*&& Config_getBool(SHOW_HEADERFILE)*/)
2128 {
2129 SrcLangExt lang = getLanguage();
2130 QCString nm=m_incInfo->includeName.isEmpty() ?
2131 (m_incInfo->fileDef ?
2132 m_incInfo->fileDef->docName() : QCString()
2133 ) :
2134 m_incInfo->includeName;
2135 if (!nm.isEmpty())
2136 {
2137 ol.startParagraph();
2138 ol.startTypewriter();
2139 ol.docify(::includeStatement(lang,m_incInfo->kind));
2140 ol.docify(::includeOpen(lang,m_incInfo->kind));
2143 ol.docify(nm);
2146 if (m_incInfo->fileDef)
2147 {
2148 ol.writeObjectLink(QCString(),m_incInfo->fileDef->includeName(),QCString(),nm);
2149 }
2150 else
2151 {
2152 ol.docify(nm);
2153 }
2155 ol.docify(::includeClose(lang,m_incInfo->kind));
2156 ol.endTypewriter();
2157 ol.endParagraph();
2158 }
2159 }
2160}

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)

Definition at line 381 of file classdef.cpp.

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

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)

Definition at line 382 of file classdef.cpp.

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

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)

Definition at line 369 of file classdef.cpp.

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

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)

Definition at line 386 of file classdef.cpp.

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

Reference m_innerClasses.

Referenced by writeDocumentationContents.

writeMemberDocumentation()

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

Definition at line 373 of file classdef.cpp.

4924{
4925 //printf("%s: ClassDefImpl::writeMemberDocumentation()\n",qPrint(name()));
4926 MemberList * ml = getMemberList(lt);
4927 if (ml) ml->writeDocumentation(ol,displayName(),this,title,ml->listType().toLabel(),FALSE,showInline);
4928}

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)

Definition at line 384 of file classdef.cpp.

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

References m_memberGroups and m_subGrouping.

Referenced by writeDocumentationContents and writeInlineDocumentation.

writeMoreLink()

void ClassDefImpl::writeMoreLink (OutputList & ol, const QCString & anchor)

Definition at line 392 of file classdef.cpp.

2544{
2545 // TODO: clean up this mess by moving it to
2546 // the output generators...
2547 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
2548 bool rtfHyperlinks = Config_getBool(RTF_HYPERLINKS);
2549 bool usePDFLatex = Config_getBool(USE_PDFLATEX);
2550
2551 // HTML only
2554 ol.docify(" ");
2556 anchor.isEmpty() ? QCString("details") : anchor);
2557 ol.parseText(theTranslator->trMore());
2558 ol.endTextLink();
2560
2561 if (!anchor.isEmpty())
2562 {
2564 // LaTeX + RTF
2568 if (!(usePDFLatex && pdfHyperlinks))
2569 {
2571 }
2572 if (!rtfHyperlinks)
2573 {
2575 }
2576 ol.docify(" ");
2578 ol.parseText(theTranslator->trMore());
2579 ol.endTextLink();
2580 // RTF only
2582 ol.writeString("\\par");
2584 }
2585}

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)

Definition at line 385 of file classdef.cpp.

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

References m_innerClasses, title and TRUE.

Referenced by writeDocumentationContents.

writePlainMemberDeclaration()

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

Definition at line 375 of file classdef.cpp.

4938 MemberListType lt,bool inGroup,
4939 int indentLevel,const ClassDef *inheritedFrom,const QCString &inheritId) const
4940{
4941 //printf("%s: ClassDefImpl::writePlainMemberDeclaration()\n",qPrint(name()));
4942 MemberList * ml = getMemberList(lt);
4943 if (ml)
4944 {
4945 ml->writePlainDeclarations(ol,inGroup,this,nullptr,nullptr,nullptr,nullptr,indentLevel,inheritedFrom,inheritId);
4946 }
4947}

References getMemberList and MemberList::writePlainDeclarations.

Referenced by writeDeclaration.

writeSimpleMemberDocumentation()

void ClassDefImpl::writeSimpleMemberDocumentation (OutputList & ol, MemberListType lt)

Definition at line 374 of file classdef.cpp.

4931{
4932 //printf("%s: ClassDefImpl::writeSimpleMemberDocumentation()\n",qPrint(name()));
4933 MemberList * ml = getMemberList(lt);
4934 if (ml) ml->writeSimpleDocumentation(ol,this);
4935}

References getMemberList and MemberList::writeSimpleDocumentation.

Referenced by writeInlineDocumentation.

writeTemplateSpec()

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

Definition at line 404 of file classdef.cpp.

1503 const QCString &type,SrcLangExt lang) const
1504{
1505 ArgumentLists specs;
1507 searchTemplateSpecs(d,specs,name,lang);
1508 if (!specs.empty()) // class has template scope specifiers
1509 {
1511 for (const ArgumentList &al : specs)
1512 {
1513 ol.docify("template<");
1514 auto it = al.begin();
1515 while (it!=al.end())
1516 {
1517 Argument a = *it;
1519 d, // scope
1520 getFileDef(), // fileScope
1521 this, // self
1522 a.type, // text
1523 FALSE // autoBreak
1524 );
1525 if (!a.name.isEmpty())
1526 {
1527 ol.docify(" ");
1528 ol.docify(a.name);
1529 }
1530 if (a.defval.length()!=0)
1531 {
1532 ol.docify(" = ");
1533 ol.docify(a.defval);
1534 }
1535 ++it;
1536 if (it!=al.end()) ol.docify(", ");
1537 }
1538 ol.docify(">");
1539 ol.lineBreak();
1540 }
1541 if (!m_requiresClause.isEmpty())
1542 {
1543 ol.docify("requires ");
1545 d, // scope
1546 getFileDef(), // fileScope
1547 this, // self
1548 m_requiresClause, // text
1549 FALSE // autoBreak
1550 );
1551 ol.lineBreak();
1552 }
1553 ol.docify(type.lower()+" "+name);
1555 }
1556}

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.

Private Member Attributes

m_allMemberNameInfoLinkedMap

m_arrowOperator

const MemberDef* ClassDefImpl::m_arrowOperator = nullptr

Does this class overloaded the -> operator?

Definition at line 537 of file classdef.cpp.

537 const MemberDef *m_arrowOperator = nullptr;

Referenced by ClassDefImpl, deepCopy, internalInsertMember and isSmartPointer.

m_categoryOf

ClassDef* ClassDefImpl::m_categoryOf = nullptr

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

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

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

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

m_examples

ExampleList ClassDefImpl::m_examples

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

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.

444 FileDef *m_fileDef = nullptr;

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

m_fileName

QCString ClassDefImpl::m_fileName

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

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

m_implicitTemplateInstance

bool ClassDefImpl::m_implicitTemplateInstance = false

m_incInfo

std::unique_ptr<IncludeInfo> ClassDefImpl::m_incInfo

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.

427 std::unique_ptr<IncludeInfo> m_incInfo;

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

m_inheritedBy

BaseClassList ClassDefImpl::m_inheritedBy

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

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

m_innerClasses

ClassLinkedRefMap ClassDefImpl::m_innerClasses

m_isAbstract

bool ClassDefImpl::m_isAbstract = false

Is this an abstract class?

Definition at line 508 of file classdef.cpp.

508 bool m_isAbstract = false;

Referenced by ClassDefImpl, deepCopy, internalInsertMember and isAbstract.

m_isJavaEnum

bool ClassDefImpl::m_isJavaEnum = false

Does this class represent a Java style enum?

Definition at line 542 of file classdef.cpp.

542 bool m_isJavaEnum = false;

Referenced by ClassDefImpl, deepCopy and isJavaEnum.

m_isLocal

bool ClassDefImpl::m_isLocal = false

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

Definition at line 517 of file classdef.cpp.

517 bool m_isLocal = false;

Referenced by ClassDefImpl, deepCopy, isLinkableInProject and isLocal.

m_isSimple

bool ClassDefImpl::m_isSimple = false

Is this a simple (non-nested) C structure?

Definition at line 534 of file classdef.cpp.

534 bool m_isSimple = false;

Referenced by ClassDefImpl, deepCopy, getOutputFileBase, insertBaseClass, insertSubClass, internalInsertMember, isEmbeddedInOuterScope, isSimple and writeInlineDocumentation.

m_isStatic

bool ClassDefImpl::m_isStatic = false

Is the class part of an unnamed namespace?

Definition at line 511 of file classdef.cpp.

511 bool m_isStatic = false;

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

m_isTemplArg

bool ClassDefImpl::m_isTemplArg = false

Definition at line 519 of file classdef.cpp.

519 bool m_isTemplArg = false;

Referenced by ClassDefImpl, deepCopy, isTemplateArgument and makeTemplateArgument.

m_memberGroups

m_memberListFileName

QCString ClassDefImpl::m_memberListFileName

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

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

Definition at line 514 of file classdef.cpp.

514 bool m_membersMerged = false;

Referenced by ClassDefImpl, deepCopy and mergeMembers.

m_metaData

QCString ClassDefImpl::m_metaData

Definition at line 546 of file classdef.cpp.

Referenced by deepCopy, setMetaData and writeIncludeFilesForSlice.

m_moduleDef

ModuleDef* ClassDefImpl::m_moduleDef = nullptr

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

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

Definition at line 551 of file classdef.cpp.

Referenced by addClassAttributes, addQualifiers, deepCopy and getQualifiers.

m_requiresClause

QCString ClassDefImpl::m_requiresClause

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

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.

525 bool m_subGrouping = false;

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

m_tagLessRef

const ClassDef* ClassDefImpl::m_tagLessRef = nullptr

Definition at line 539 of file classdef.cpp.

539 const ClassDef *m_tagLessRef = nullptr;

Referenced by ClassDefImpl, deepCopy, setTagLessReference and tagLessReference.

m_tempArgs

ArgumentList ClassDefImpl::m_tempArgs

m_templateInstances

TemplateInstanceList ClassDefImpl::m_templateInstances

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

The class this class is an instance of.

Definition at line 492 of file classdef.cpp.

492 const ClassDef *m_templateMaster = nullptr;

Referenced by anchor, ClassDefImpl, deepCopy, getOutputFileBase, getReference, getSourceFileBase, isLinkable, isLinkableInProject, isReference, isVisibleInHierarchy, setTemplateMaster and templateMaster.

m_templBaseClassNames

TemplateNameMap ClassDefImpl::m_templBaseClassNames

m_typeConstraints

ArgumentList ClassDefImpl::m_typeConstraints

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

Definition at line 554 of file classdef.cpp.

554 CLASS_GRAPH_t m_typeInheritanceGraph = CLASS_GRAPH_t::NO;

Referenced by ClassDefImpl, deepCopy, hasInheritanceGraph, overrideInheritanceGraph and writeInheritanceGraph.

m_usedByImplClassList

UsesClassList ClassDefImpl::m_usedByImplClassList

m_usedOnly

bool ClassDefImpl::m_usedOnly = false

Reason of existence is a "use" relation.

Definition at line 528 of file classdef.cpp.

528 bool m_usedOnly = false;

Referenced by ClassDefImpl, deepCopy, isUsedOnly and setUsedOnly.

m_usesImplClassList

UsesClassList ClassDefImpl::m_usesImplClassList

m_vhdlSummaryTitles

StringSet ClassDefImpl::m_vhdlSummaryTitles

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:


Generated via doxygen2docusaurus by Doxygen 1.14.0.