Doxygen
Loading...
Searching...
No Matches
NamespaceDefImpl Class Referencefinal
Inheritance diagram for NamespaceDefImpl:
Collaboration diagram for NamespaceDefImpl:

Public Member Functions

 NamespaceDefImpl (const DString &defFileName, int defLine, size_t defColumn, const DString &name, const DString &ref=DString(), const DString &refFile=DString(), const DString &type=DString(), bool isPublished=false)
 ~NamespaceDefImpl () override
DefType definitionType () const override
CodeSymbolType codeSymbolType () const override
DString getOutputFileBase () const override
DString anchor () const override
void insertUsedFile (FileDef *fd) override
void writeDocumentation (OutputList &ol) override
void writeMemberPages (OutputList &ol) override
void writeQuickMemberLinks (OutputList &ol, const MemberDef *currentMd) const override
void writeTagFile (TextStream &) override
void insertClass (ClassDef *cd) override
void insertConcept (ConceptDef *cd) override
void insertNamespace (NamespaceDef *nd) override
void insertMember (MemberDef *md) override
void computeAnchors () override
void countMembers () override
int numDocMembers () const override
void addUsingDirective (NamespaceDef *nd) override
const LinkedRefMap< NamespaceDef > & getUsedNamespaces () const override
void addUsingDeclaration (const Definition *cd) override
const LinkedRefMap< const Definition > & getUsedDefinitions () const override
void combineUsingRelations (NamespaceDefSet &visitedNamespace) override
DString displayName (bool=true) const override
void setInline (bool isInline) override
bool isConstantGroup () const override
bool isModule () const override
bool isLibrary () const override
bool isInline () const override
bool isLinkableInProject () const override
bool isLinkable () const override
bool isVisibleInHierarchy () const override
bool hasDetailedDescription () const override
void addMembersToMemberGroup () override
void distributeMemberGroupDocumentation () override
void findSectionsInDocumentation () override
void sortMemberLists () override
const DefinitionfindInnerCompound (const DString &name) const override
void addInnerCompound (Definition *d) override
void addListReferences () override
void addRequirementReferences () override
void setFileName (const DString &fn) override
bool subGrouping () const override
MemberListgetMemberList (MemberListType lt) const override
const MemberListsgetMemberLists () const override
const MemberDefgetMemberByName (const DString &) const override
const MemberGroupListgetMemberGroups () const override
ClassLinkedRefMap getClasses () const override
ClassLinkedRefMap getInterfaces () const override
ClassLinkedRefMap getStructs () const override
ClassLinkedRefMap getExceptions () const override
NamespaceLinkedRefMap getNamespaces () const override
ConceptLinkedRefMap getConcepts () const override
void setName (const DString &name) override
DString title () const override
DString compoundTypeString () const override
void setMetaData (const DString &m) override
int countVisibleMembers () const override
void writeSummaryLinks (OutputList &ol) const override
void writePageNavigation (OutputList &ol) const override
Public Member Functions inherited from DefinitionMixin< NamespaceDefMutable >
 DefinitionMixin (const DString &defFileName, int defLine, size_t defColumn, const DString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=true)
DefinitionMixinoperator= (const DefinitionMixin &other)
 ~DefinitionMixin () override=default
bool isAlias () const override
const DStringname () const override
bool isAnonymous () const override
const DStringlocalName () const override
DString qualifiedName () const override
DString symbolName () const override
DString getSourceFileBase () const override
DString getSourceAnchor () const override
DString documentation () const override
int docLine () const override
DString docFile () const override
DString briefDescription (bool abbreviate=false) const override
DString briefDescriptionAsTooltip () const override
int briefLine () const override
DString inbodyDocumentation () const override
DString inbodyFile () const override
int inbodyLine () const override
DString briefFile () const override
DString getDefFileName () const override
DString getDefFileExtension () const override
int getDefLine () const override
size_t getDefColumn () const override
bool hasDocumentation () const override
bool hasUserDocumentation () const override
bool isVisibleInProject () const override
bool isVisible () const override
bool isHidden () const override
bool isArtificial () const override
bool isExported () const override
DString getReference () const override
bool isReference () const override
DString externalReference (const DString &relPath) const override
int getStartDefLine () const override
int getStartBodyLine () const override
int getEndBodyLine () const override
const FileDefgetBodyDef () const override
SrcLangExt getLanguage () const override
const GroupListpartOfGroups () const override
bool isLinkableViaGroup () const override
const RefItemVectorxrefListItems () const override
const RequirementRefsrequirementReferences () const override
DefinitiongetOuterScope () const override
const MemberVectorgetReferencesMembers () const override
const MemberVectorgetReferencedByMembers () const override
bool hasSections () const override
bool hasSources () const override
bool hasBriefDescription () const override
DString id () const override
const SectionRefsgetSectionRefs () const override
void setId (const DString &name) override
void setDefFile (const DString &df, int defLine, size_t defColumn) override
void setDocumentation (const DString &doc, const DString &docFile, int docLine, bool stripWhiteSpace=true) override
void setBriefDescription (const DString &brief, const DString &briefFile, int briefLine) override
void setInbodyDocumentation (const DString &doc, const DString &docFile, int docLine) override
void setReference (const DString &r) override
void addSectionsToDefinition (const std::vector< const SectionInfo * > &anchorList) override
void setBodySegment (int defLine, int bls, int ble) override
void setBodyDef (const FileDef *fd) override
void addSourceReferencedBy (MemberDef *md, const DString &sourceRefName) override
void addSourceReferences (MemberDef *md, const DString &sourceRefName) override
void setRefItems (const RefItemVector &sli) override
void setRequirementReferences (const RequirementRefs &rqli) override
void mergeRefItems (Definition *def) override
void mergeReferences (const Definition *other) override
void mergeReferencedBy (const Definition *other) override
void setOuterScope (Definition *def) override
void setHidden (bool b) override
void setArtificial (bool b) override
void setExported (bool b) override
void setLanguage (SrcLangExt lang) override
void writeSourceDef (OutputList &ol) const override
void writeInlineCode (OutputList &ol, const DString &scopeName) const override
bool hasSourceRefs () const override
bool hasSourceReffedBy () const override
void writeSourceRefs (OutputList &ol, const DString &scopeName) const override
void writeSourceReffedBy (OutputList &ol, const DString &scopeName) const override
bool hasRequirementRefs () const override
void writeRequirementRefs (OutputList &ol) const override
void makePartOfGroup (GroupDef *gd) override
void writeNavigationPath (OutputList &ol) const override
DString navigationPathAsString () const override
DString pathFragment () const override
void writeDocAnchorsToTagFile (TextStream &fs) const override
void setLocalName (const DString &name) override
void writeToc (OutputList &ol, const LocalToc &lt) const override
void computeTooltip () override
void _setSymbolName (const DString &name) override
DString _symbolName () const override

Private Types

enum  { NAMESPACE , MODULE , CONSTANT_GROUP , LIBRARY }

Private Member Functions

void addMemberToList (MemberListType lt, MemberDef *md)
void writeMemberDeclarations (OutputList &ol, MemberListType lt, const DString &title)
void writeMemberDocumentation (OutputList &ol, MemberListType lt, const DString &title)
void writeDetailedDescription (OutputList &ol, const DString &title)
void writeBriefDescription (OutputList &ol)
void startMemberDeclarations (OutputList &ol)
void endMemberDeclarations (OutputList &ol)
void writeClassDeclarations (OutputList &ol, const DString &title, const ClassLinkedRefMap &d)
void writeConcepts (OutputList &ol, const DString &title)
void writeInlineClasses (OutputList &ol)
void writeMemberGroups (OutputList &ol)
void writeAuthorSection (OutputList &ol)
void startMemberDocumentation (OutputList &ol)
void endMemberDocumentation (OutputList &ol)
void addNamespaceAttributes (OutputList &ol)
void writeClassesToTagFile (TextStream &, const ClassLinkedRefMap &d)
void writeConceptsToTagFile (TextStream &)
void setFileNameLocal (const DString &fn)
void writeNamespaceDeclarations (OutputList &ol, const DString &title, bool isConstantGroup=false)
void updateLocalName ()

Private Attributes

DString fileName
FileList files
LinkedRefMap< NamespaceDefm_usingDirList
LinkedRefMap< const Definitionm_usingDeclList
LinkedRefMap< const Definitionm_innerCompounds
MemberLinkedRefMap m_allMembers
MemberLists m_memberLists
MemberGroupList m_memberGroups
ClassLinkedRefMap m_classes
ClassLinkedRefMap m_interfaces
ClassLinkedRefMap m_structs
ClassLinkedRefMap m_exceptions
ConceptLinkedRefMap m_concepts
NamespaceLinkedRefMap m_namespaces
bool m_subGrouping = false
enum NamespaceDefImpl:: { ... }  m_type
bool m_isPublished = false
DString metaData
bool m_inline = false

Additional Inherited Members

Public Types inherited from Definition
enum  DefType {
  TypeClass = 0 , TypeFile = 1 , TypeNamespace = 2 , TypeModule = 3 ,
  TypeMember = 4 , TypeGroup = 5 , TypePackage = 6 , TypePage = 7 ,
  TypeDir = 8 , TypeConcept = 9
}

Detailed Description

Definition at line 54 of file namespacedef.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
NAMESPACE 
MODULE 
CONSTANT_GROUP 
LIBRARY 

Definition at line 167 of file namespacedef.cpp.

enum NamespaceDefImpl::@152056333015234071026257214045103374127312105332 m_type

Constructor & Destructor Documentation

◆ NamespaceDefImpl()

NamespaceDefImpl::NamespaceDefImpl ( const DString & defFileName,
int defLine,
size_t defColumn,
const DString & name,
const DString & ref = DString(),
const DString & refFile = DString(),
const DString & type = DString(),
bool isPublished = false )

Definition at line 272 of file namespacedef.cpp.

275 :
276 DefinitionMixin(df,dl,dc,name)
277 ,m_isPublished(isPublished)
278{
279 if (!fName.empty())
280 {
281 if (!lref.empty())
282 {
283 fileName = stripExtension(fName);
284 }
285 else
286 {
288 }
289 }
290 else
291 {
293 }
294 setReference(lref);
295 m_inline=false;
296 m_subGrouping=Config_getBool(SUBGROUPING);
297 if (type=="module")
298 {
299 m_type = MODULE;
300 }
301 else if (type=="constants")
302 {
304 }
305 else if (type=="library")
306 {
307 m_type = LIBRARY;
308 }
309 else
310 {
312 }
313
315}
virtual const DString & name() const =0
DefinitionMixin(const DString &defFileName, int defLine, size_t defColumn, const DString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=true)
virtual void setReference(const DString &r)=0
void setFileNameLocal(const DString &fn)
#define Config_getBool(name)
Definition config.h:33
DString stripExtension(const DString &fName)
Definition util.cpp:3957
DString convertNameToFile(const DString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:2865

References DefinitionMixin< NamespaceDefMutable >::DefinitionMixin(), DString::empty(), m_isPublished, and DefinitionMixin< NamespaceDefMutable >::name().

◆ ~NamespaceDefImpl()

NamespaceDefImpl::~NamespaceDefImpl ( )
override

Definition at line 330 of file namespacedef.cpp.

331{
332}

Member Function Documentation

◆ addInnerCompound()

void NamespaceDefImpl::addInnerCompound ( Definition * d)
overridevirtual

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 387 of file namespacedef.cpp.

388{
389 //printf("%s:NamespaceDefImpl::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
392 {
394 }
396 {
398 }
400 {
402 }
403}
virtual DefType definitionType() const =0
virtual const DString & localName() const =0
bool add(const char *k, T *obj)
Definition linkedmap.h:284
void insertNamespace(NamespaceDef *nd) override
void insertClass(ClassDef *cd) override
void insertConcept(ConceptDef *cd) override
LinkedRefMap< const Definition > m_innerCompounds
ClassDef * toClassDef(Definition *d)
ConceptDef * toConceptDef(Definition *d)
NamespaceDef * toNamespaceDef(Definition *d)

References LinkedRefMap< T, Hash, KeyEqual, Map >::add(), Definition::definitionType(), insertClass(), insertConcept(), insertNamespace(), Definition::localName(), m_innerCompounds, toClassDef(), toConceptDef(), toNamespaceDef(), Definition::TypeClass, Definition::TypeConcept, and Definition::TypeNamespace.

◆ addListReferences()

void NamespaceDefImpl::addListReferences ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1264 of file namespacedef.cpp.

1265{
1267 qualifiedName(),
1268 getLanguage()==SrcLangExt::Fortran ?
1269 theTranslator->trModule(true,true) :
1270 theTranslator->trNamespace(true,true),
1272 DString(),
1273 this
1274 );
1275 for (const auto &mg : m_memberGroups)
1276 {
1277 mg->addListReferences(this);
1278 }
1279 for (auto &ml : m_memberLists)
1280 {
1281 if (ml->listType().isDocumentation())
1282 {
1283 ml->addListReferences(this);
1284 }
1285 }
1286}
DString()=default
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual const RefItemVector & xrefListItems() const =0
virtual DString qualifiedName() const =0
MemberGroupList m_memberGroups
DString getOutputFileBase() const override
DString displayName(bool=true) const override
MemberLists m_memberLists
virtual DString trNamespace(bool first_capital, bool singular)=0
virtual DString trModule(bool first_capital, bool singular)=0
Translator * theTranslator
Definition language.cpp:71
void addRefItem(const RefItemVector &sli, const DString &key, const DString &prefix, const DString &name, const DString &title, const DString &args, const Definition *scope)
Definition reflist.h:134

References addRefItem(), displayName(), DString::DString(), DefinitionMixin< NamespaceDefMutable >::getLanguage(), getOutputFileBase(), m_memberGroups, m_memberLists, DefinitionMixin< NamespaceDefMutable >::qualifiedName(), theTranslator, Translator::trModule(), Translator::trNamespace(), and DefinitionMixin< NamespaceDefMutable >::xrefListItems().

◆ addMembersToMemberGroup()

void NamespaceDefImpl::addMembersToMemberGroup ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 439 of file namespacedef.cpp.

440{
441 for (auto &ml : m_memberLists)
442 {
443 if (ml->listType().isDeclaration())
444 {
446 }
447 }
448
449 // add members inside sections to their groups
450 for (const auto &mg : m_memberGroups)
451 {
452 if (mg->allMembersInSameSection() && m_subGrouping)
453 {
454 //printf("----> addToDeclarationSection(%s)\n",qPrint(mg->header()));
455 mg->addToDeclarationSection();
456 }
457 }
458}
void addMembersToMemberGroup() override

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

Referenced by addMembersToMemberGroup().

◆ addMemberToList()

void NamespaceDefImpl::addMemberToList ( MemberListType lt,
MemberDef * md )
private

Definition at line 1456 of file namespacedef.cpp.

1457{
1458 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
1459 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
1461 ml->setNeedsSorting(
1462 (ml->listType().isDeclaration() && sortBriefDocs) ||
1463 (ml->listType().isDocumentation() && sortMemberDocs));
1464 ml->push_back(md);
1465
1466 if (ml->listType().isDeclaration())
1467 {
1468 MemberDefMutable *mdm = toMemberDefMutable(md);
1469 if (mdm)
1470 {
1471 mdm->setSectionList(this,ml.get());
1472 }
1473 }
1474}
virtual void setSectionList(const Definition *container, const MemberList *sl)=0
const std::unique_ptr< MemberList > & get(MemberListType lt, MemberListContainer con)
Definition memberlist.h:191
MemberDefMutable * toMemberDefMutable(Definition *d)

References Config_getBool, MemberLists::get(), m_memberLists, Namespace, MemberDefMutable::setSectionList(), and toMemberDefMutable().

Referenced by insertMember().

◆ addNamespaceAttributes()

void NamespaceDefImpl::addNamespaceAttributes ( OutputList & ol)
private

Definition at line 940 of file namespacedef.cpp.

941{
942 // UNO IDL constant groups may be published
943 if (getLanguage()==SrcLangExt::IDL && isConstantGroup() && m_isPublished)
944 {
947 ol.startLabels();
948 ol.writeLabel("published",false);
949 ol.endLabels();
951 }
952 else if (isExported())
953 {
956 ol.startLabels();
957 ol.writeLabel("export",false);
958 ol.endLabels();
960 }
961}
virtual bool isExported() const =0
bool isConstantGroup() const override
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void writeLabel(const DString &l, bool isLast)
Definition outputlist.h:736
void endLabels()
Definition outputlist.h:738
void startLabels()
Definition outputlist.h:734

References OutputList::disableAllBut(), OutputList::endLabels(), DefinitionMixin< NamespaceDefMutable >::getLanguage(), Html, isConstantGroup(), DefinitionMixin< NamespaceDefMutable >::isExported(), m_isPublished, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startLabels(), and OutputList::writeLabel().

Referenced by writeDocumentation().

◆ addRequirementReferences()

void NamespaceDefImpl::addRequirementReferences ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1288 of file namespacedef.cpp.

1289{
1291 for (const auto &mg : m_memberGroups)
1292 {
1293 mg->addRequirementReferences(this);
1294 }
1295 for (auto &ml : m_memberLists)
1296 {
1297 if (ml->listType().isDocumentation())
1298 {
1299 ml->addRequirementReferences(this);
1300 }
1301 }
1302}
static RequirementManager & instance()
void addRequirementRefsForSymbol(const Definition *symbol)

References RequirementManager::addRequirementRefsForSymbol(), RequirementManager::instance(), m_memberGroups, and m_memberLists.

◆ addUsingDeclaration()

void NamespaceDefImpl::addUsingDeclaration ( const Definition * cd)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1236 of file namespacedef.cpp.

1237{
1238 m_usingDeclList.add(d->qualifiedName(),d);
1239}
LinkedRefMap< const Definition > m_usingDeclList

References LinkedRefMap< T, Hash, KeyEqual, Map >::add(), m_usingDeclList, and Definition::qualifiedName().

Referenced by combineUsingRelations().

◆ addUsingDirective()

void NamespaceDefImpl::addUsingDirective ( NamespaceDef * nd)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1230 of file namespacedef.cpp.

1231{
1233 //printf("%s: NamespaceDefImpl::addUsingDirective: %s:%zu\n",qPrint(name()),qPrint(nd->qualifiedName()),m_usingDirList.size());
1234}
LinkedRefMap< NamespaceDef > m_usingDirList

References LinkedRefMap< T, Hash, KeyEqual, Map >::add(), m_usingDirList, and Definition::qualifiedName().

Referenced by combineUsingRelations().

◆ anchor()

DString NamespaceDefImpl::anchor ( ) const
inlineoverridevirtual

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

Implements Definition.

Definition at line 68 of file namespacedef.cpp.

68{ return DString(); }

References DString::DString().

◆ codeSymbolType()

CodeSymbolType NamespaceDefImpl::codeSymbolType ( ) const
inlineoverridevirtual

Used for syntax highlighting symbol class

Implements Definition.

Definition at line 65 of file namespacedef.cpp.

66 { return getLanguage()==SrcLangExt::Java ? CodeSymbolType::Package : CodeSymbolType::Namespace; }

References DefinitionMixin< NamespaceDefMutable >::getLanguage(), Namespace, and Package.

◆ combineUsingRelations()

void NamespaceDefImpl::combineUsingRelations ( NamespaceDefSet & visitedNamespace)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1309 of file namespacedef.cpp.

1310{
1311 if (visitedNamespaces.find(this)!=visitedNamespaces.end()) return; // already processed
1312 visitedNamespaces.insert(this);
1313
1314 LinkedRefMap<NamespaceDef> usingDirList = m_usingDirList;
1315 for (auto &nd : usingDirList)
1316 {
1317 NamespaceDefMutable *ndm = toNamespaceDefMutable(nd);
1318 if (ndm)
1319 {
1320 ndm->combineUsingRelations(visitedNamespaces);
1321 }
1322 }
1323
1324 for (auto &nd : usingDirList)
1325 {
1326 // add used namespaces of namespace nd to this namespace
1327 for (const auto &und : nd->getUsedNamespaces())
1328 {
1329 addUsingDirective(und);
1330 }
1331 // add used classes of namespace nd to this namespace
1332 for (const auto &ud : nd->getUsedDefinitions())
1333 {
1335 }
1336 }
1337}
void addUsingDirective(NamespaceDef *nd) override
void addUsingDeclaration(const Definition *cd) override
virtual void combineUsingRelations(NamespaceDefSet &visitedNamespace)=0
NamespaceDefMutable * toNamespaceDefMutable(Definition *d)

References addUsingDeclaration(), addUsingDirective(), NamespaceDefMutable::combineUsingRelations(), m_usingDirList, and toNamespaceDefMutable().

◆ compoundTypeString()

DString NamespaceDefImpl::compoundTypeString ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 1648 of file namespacedef.cpp.

1649{
1650 SrcLangExt lang = getLanguage();
1651 if (lang==SrcLangExt::Java)
1652 {
1653 return "package";
1654 }
1655 else if(lang==SrcLangExt::CSharp)
1656 {
1657 return "namespace";
1658 }
1659 else if (lang==SrcLangExt::Fortran)
1660 {
1661 return "module";
1662 }
1663 else if (lang==SrcLangExt::IDL)
1664 {
1665 if (isModule())
1666 {
1667 return "module";
1668 }
1669 else if (isConstantGroup())
1670 {
1671 return "constants";
1672 }
1673 else if (isLibrary())
1674 {
1675 return "library";
1676 }
1677 else
1678 {
1679 err_full(getDefFileName(),getDefLine(),"Internal inconsistency: namespace in IDL not module, library or constant group");
1680 }
1681 }
1682 return "namespace";
1683}
virtual DString getDefFileName() const =0
virtual int getDefLine() const =0
bool isLibrary() const override
bool isModule() const override
#define err_full(file, line, fmt,...)
Definition message.h:132
SrcLangExt
Definition types.h:207

References err_full, DefinitionMixin< NamespaceDefMutable >::getDefFileName(), DefinitionMixin< NamespaceDefMutable >::getDefLine(), DefinitionMixin< NamespaceDefMutable >::getLanguage(), isConstantGroup(), isLibrary(), and isModule().

◆ computeAnchors()

void NamespaceDefImpl::computeAnchors ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 583 of file namespacedef.cpp.

584{
585 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
586 if (allMemberList) allMemberList->setAnchors();
587}
void setAnchors()
MemberList * getMemberList(MemberListType lt) const override

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

◆ countMembers()

void NamespaceDefImpl::countMembers ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1210 of file namespacedef.cpp.

1211{
1212 for (auto &ml : m_memberLists)
1213 {
1214 ml->countDecMembers();
1215 ml->countDocMembers();
1216 }
1217 for (const auto &mg : m_memberGroups)
1218 {
1219 mg->countDecMembers();
1220 mg->countDocMembers();
1221 }
1222}

References m_memberGroups, and m_memberLists.

◆ countVisibleMembers()

int NamespaceDefImpl::countVisibleMembers ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 1339 of file namespacedef.cpp.

1340{
1341 int count=0;
1342 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1343 {
1344 if (lde->kind()==LayoutDocEntry::MemberDef)
1345 {
1346 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1347 if (lmd)
1348 {
1349 MemberList *ml = getMemberList(lmd->type);
1350 if (ml)
1351 {
1352 for (const auto &md : *ml)
1353 {
1354 if (md->visibleInIndex())
1355 {
1356 count++;
1357 }
1358 }
1359 }
1360 }
1361 }
1362 }
1363 return count;
1364}
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1436
MemberListType type
Definition layout.h:136

References getMemberList(), LayoutDocManager::instance(), and LayoutDocEntryMemberDef::type.

◆ definitionType()

DefType NamespaceDefImpl::definitionType ( ) const
inlineoverridevirtual

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

Implements Definition.

Definition at line 64 of file namespacedef.cpp.

64{ return TypeNamespace; }

References definitionType(), and Definition::TypeNamespace.

Referenced by definitionType().

◆ displayName()

DString NamespaceDefImpl::displayName ( bool includeScope = true) const
overridevirtual

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

Implements Definition.

Definition at line 1304 of file namespacedef.cpp.

1305{
1306 return makeDisplayName(this,includeScope);
1307}
static DString makeDisplayName(const NamespaceDef *nd, bool includeScope)

References makeDisplayName().

Referenced by addListReferences(), title(), writeDocumentation(), writeMemberDocumentation(), and writeMemberPages().

◆ distributeMemberGroupDocumentation()

void NamespaceDefImpl::distributeMemberGroupDocumentation ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 351 of file namespacedef.cpp.

352{
353 for (const auto &mg : m_memberGroups)
354 {
355 mg->distributeMemberGroupDocumentation();
356 }
357}

References m_memberGroups.

◆ endMemberDeclarations()

void NamespaceDefImpl::endMemberDeclarations ( OutputList & ol)
private

Definition at line 795 of file namespacedef.cpp.

796{
798}
void endMemberSections()
Definition outputlist.h:459

References OutputList::endMemberSections().

Referenced by writeDocumentation().

◆ endMemberDocumentation()

void NamespaceDefImpl::endMemberDocumentation ( OutputList & ol)
private

Definition at line 809 of file namespacedef.cpp.

810{
811 if (Config_getBool(SEPARATE_MEMBER_PAGES))
812 {
815 }
816}
static bool suppressDocWarnings
Definition doxygen.h:123
void enable(OutputType o)

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

Referenced by writeDocumentation().

◆ findInnerCompound()

const Definition * NamespaceDefImpl::findInnerCompound ( const DString & name) const
overridevirtual

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 1246 of file namespacedef.cpp.

1247{
1248 if (n==nullptr) return nullptr;
1249 const Definition *d = m_innerCompounds.find(n);
1250 if (d==nullptr)
1251 {
1252 if (!m_usingDirList.empty())
1253 {
1254 d = m_usingDirList.find(n);
1255 }
1256 if (d==nullptr && !m_usingDeclList.empty())
1257 {
1258 d = m_usingDeclList.find(n);
1259 }
1260 }
1261 return d;
1262}
const T * find(const std::string &key) const
Definition linkedmap.h:243
bool empty() const
Definition linkedmap.h:374

References LinkedRefMap< T, Hash, KeyEqual, Map >::empty(), LinkedRefMap< T, Hash, KeyEqual, Map >::find(), m_innerCompounds, m_usingDeclList, and m_usingDirList.

◆ findSectionsInDocumentation()

void NamespaceDefImpl::findSectionsInDocumentation ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 359 of file namespacedef.cpp.

360{
364 for (const auto &mg : m_memberGroups)
365 {
366 mg->findSectionsInDocumentation(this);
367 }
368 for (auto &ml : m_memberLists)
369 {
370 if (ml->listType().isDeclaration())
371 {
372 ml->findSectionsInDocumentation(this);
373 }
374 }
375}
virtual DString briefDescription(bool abbreviate=false) const =0
virtual DString documentation() const =0
virtual DString inbodyDocumentation() const =0
virtual DString docFile() const =0
void docFindSections(const DString &input, const Definition *d, const DString &fileName)

References DefinitionMixin< NamespaceDefMutable >::briefDescription(), DefinitionMixin< NamespaceDefMutable >::docFile(), docFindSections(), DefinitionMixin< NamespaceDefMutable >::documentation(), DefinitionMixin< NamespaceDefMutable >::inbodyDocumentation(), m_memberGroups, and m_memberLists.

◆ getClasses()

ClassLinkedRefMap NamespaceDefImpl::getClasses ( ) const
inlineoverridevirtual

Returns the classes contained in this namespace

Implements NamespaceDef.

Definition at line 110 of file namespacedef.cpp.

110{ return m_classes; }
ClassLinkedRefMap m_classes

References m_classes.

◆ getConcepts()

ConceptLinkedRefMap NamespaceDefImpl::getConcepts ( ) const
inlineoverridevirtual

Returns the concepts contained in this namespace

Implements NamespaceDef.

Definition at line 115 of file namespacedef.cpp.

115{ return m_concepts; }
ConceptLinkedRefMap m_concepts

References m_concepts.

◆ getExceptions()

ClassLinkedRefMap NamespaceDefImpl::getExceptions ( ) const
inlineoverridevirtual

Returns the Slice exceptions contained in this namespace

Implements NamespaceDef.

Definition at line 113 of file namespacedef.cpp.

113{ return m_exceptions; }
ClassLinkedRefMap m_exceptions

References m_exceptions.

◆ getInterfaces()

ClassLinkedRefMap NamespaceDefImpl::getInterfaces ( ) const
inlineoverridevirtual

Returns the Slice interfaces contained in this namespace

Implements NamespaceDef.

Definition at line 111 of file namespacedef.cpp.

111{ return m_interfaces; }
ClassLinkedRefMap m_interfaces

References m_interfaces.

◆ getMemberByName()

const MemberDef * NamespaceDefImpl::getMemberByName ( const DString & n) const
overridevirtual

Implements NamespaceDef.

Definition at line 1606 of file namespacedef.cpp.

1607{
1608 return m_allMembers.find(n);
1609}
MemberLinkedRefMap m_allMembers

References LinkedRefMap< T, Hash, KeyEqual, Map >::find(), and m_allMembers.

◆ getMemberGroups()

const MemberGroupList & NamespaceDefImpl::getMemberGroups ( ) const
inlineoverridevirtual

Returns the user defined member groups

Implements NamespaceDef.

Definition at line 109 of file namespacedef.cpp.

109{ return m_memberGroups; }

References m_memberGroups.

◆ getMemberList()

MemberList * NamespaceDefImpl::getMemberList ( MemberListType lt) const
overridevirtual

Implements NamespaceDef.

Definition at line 1529 of file namespacedef.cpp.

1530{
1531 for (auto &ml : m_memberLists)
1532 {
1533 if (ml->listType()==lt)
1534 {
1535 return ml.get();
1536 }
1537 }
1538 return nullptr;
1539}

References m_memberLists.

Referenced by computeAnchors(), countVisibleMembers(), insertMember(), numDocMembers(), writeDocumentation(), writeMemberDeclarations(), writeMemberDocumentation(), writeQuickMemberLinks(), writeSummaryLinks(), and writeTagFile().

◆ getMemberLists()

const MemberLists & NamespaceDefImpl::getMemberLists ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 107 of file namespacedef.cpp.

107{ return m_memberLists; }

References m_memberLists.

◆ getNamespaces()

NamespaceLinkedRefMap NamespaceDefImpl::getNamespaces ( ) const
inlineoverridevirtual

Returns the namespaces contained in this namespace

Implements NamespaceDef.

Definition at line 114 of file namespacedef.cpp.

114{ return m_namespaces; }
NamespaceLinkedRefMap m_namespaces

References m_namespaces.

◆ getOutputFileBase()

DString NamespaceDefImpl::getOutputFileBase ( ) const
overridevirtual

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

Implements Definition.

Definition at line 1241 of file namespacedef.cpp.

1242{
1243 return fileName;
1244}

References fileName.

Referenced by addListReferences(), writeBriefDescription(), writeDocumentation(), and writeTagFile().

◆ getStructs()

ClassLinkedRefMap NamespaceDefImpl::getStructs ( ) const
inlineoverridevirtual

Returns the Slice structs contained in this namespace

Implements NamespaceDef.

Definition at line 112 of file namespacedef.cpp.

112{ return m_structs; }
ClassLinkedRefMap m_structs

References m_structs.

◆ getUsedDefinitions()

const LinkedRefMap< const Definition > & NamespaceDefImpl::getUsedDefinitions ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 84 of file namespacedef.cpp.

84{ return m_usingDeclList; }

References m_usingDeclList.

◆ getUsedNamespaces()

const LinkedRefMap< NamespaceDef > & NamespaceDefImpl::getUsedNamespaces ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 82 of file namespacedef.cpp.

82{ return m_usingDirList; }

References m_usingDirList.

◆ hasDetailedDescription()

bool NamespaceDefImpl::hasDetailedDescription ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 589 of file namespacedef.cpp.

590{
591 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
592 return ((!briefDescription().empty() && repeatBrief) ||
593 !documentation().empty());
594}

References DefinitionMixin< NamespaceDefMutable >::briefDescription(), Config_getBool, and DefinitionMixin< NamespaceDefMutable >::documentation().

Referenced by writeBriefDescription(), and writeDetailedDescription().

◆ insertClass()

void NamespaceDefImpl::insertClass ( ClassDef * cd)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 405 of file namespacedef.cpp.

406{
407 ClassLinkedRefMap *d = &m_classes;
408
409 if (Config_getBool(OPTIMIZE_OUTPUT_SLICE))
410 {
412 {
413 d = &m_interfaces;
414 }
415 else if (cd->compoundType()==ClassDef::Struct)
416 {
417 d = &m_structs;
418 }
419 else if (cd->compoundType()==ClassDef::Exception)
420 {
421 d = &m_exceptions;
422 }
423 }
424
425 d->add(cd->name(),cd);
426}
@ Interface
Definition classdef.h:108
@ Exception
Definition classdef.h:111
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e. class/struct/union/...

References LinkedRefMap< T, Hash, KeyEqual, Map >::add(), ClassDef::compoundType(), Config_getBool, ClassDef::Exception, ClassDef::Interface, m_classes, m_exceptions, m_interfaces, m_structs, Definition::name(), and ClassDef::Struct.

Referenced by addInnerCompound().

◆ insertConcept()

void NamespaceDefImpl::insertConcept ( ConceptDef * cd)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 428 of file namespacedef.cpp.

429{
430 m_concepts.add(cd->name(),cd);
431}

References LinkedRefMap< T, Hash, KeyEqual, Map >::add(), m_concepts, and Definition::name().

Referenced by addInnerCompound().

◆ insertMember()

void NamespaceDefImpl::insertMember ( MemberDef * md)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 460 of file namespacedef.cpp.

461{
462 //printf("%s::insertMember(%s) isInline=%d hasDocs=%d\n",qPrint(name()),qPrint(md->name()),
463 // isInline(),hasDocumentation());
464 if (md->isHidden()) return;
465 MemberDefMutable *mdm = toMemberDefMutable(md);
466
467 // if this is an inline namespace that is not documented, then insert the
468 // member in the parent scope instead
469 if (isInline() && !hasDocumentation())
470 {
471 Definition *outerScope = getOuterScope();
472 if (outerScope)
473 {
474 if (outerScope->definitionType()==Definition::TypeNamespace)
475 {
476 NamespaceDefMutable *nd = toNamespaceDefMutable(outerScope);
477 if (nd && nd!=Doxygen::globalScope)
478 {
479 nd->insertMember(md);
480 if (mdm)
481 {
482 mdm->setNamespace(nd);
483 }
484 }
485 }
486 else if (outerScope->definitionType()==Definition::TypeFile)
487 {
488 FileDef *fd = toFileDef(outerScope);
489 fd->insertMember(md);
490 if (mdm)
491 {
492 mdm->setFileDef(fd);
493 mdm->setOuterScope(fd);
494 }
495 }
496 }
497 }
498 else // member is a non-inline namespace or a documented inline namespace
499 {
500 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
501 if (allMemberList==nullptr)
502 {
503 m_memberLists.emplace_back(std::make_unique<MemberList>(MemberListType::AllMembersList(),MemberListContainer::Namespace));
504 allMemberList = m_memberLists.back().get();
505 }
506 allMemberList->push_back(md);
507 //printf("%s::m_allMembersDict->append(%s)\n",qPrint(name()),qPrint(md->localName()));
508 m_allMembers.add(md->localName(),md);
509 switch(md->memberType())
510 {
511 case MemberType::Variable:
512 addMemberToList(MemberListType::DecVarMembers(),md);
513 addMemberToList(MemberListType::DocVarMembers(),md);
514 break;
515 case MemberType::Function:
516 addMemberToList(MemberListType::DecFuncMembers(),md);
517 addMemberToList(MemberListType::DocFuncMembers(),md);
518 break;
519 case MemberType::Typedef:
520 addMemberToList(MemberListType::DecTypedefMembers(),md);
521 addMemberToList(MemberListType::DocTypedefMembers(),md);
522 break;
523 case MemberType::Sequence:
524 addMemberToList(MemberListType::DecSequenceMembers(),md);
525 addMemberToList(MemberListType::DocSequenceMembers(),md);
526 break;
527 case MemberType::Dictionary:
528 addMemberToList(MemberListType::DecDictionaryMembers(),md);
529 addMemberToList(MemberListType::DocDictionaryMembers(),md);
530 break;
531 case MemberType::Enumeration:
532 addMemberToList(MemberListType::DecEnumMembers(),md);
533 addMemberToList(MemberListType::DocEnumMembers(),md);
534 break;
535 case MemberType::EnumValue:
536 break;
537 case MemberType::Define:
538 addMemberToList(MemberListType::DecDefineMembers(),md);
539 addMemberToList(MemberListType::DocDefineMembers(),md);
540 break;
541 case MemberType::Property:
542 if (md->getLanguage() == SrcLangExt::Python)
543 {
544 addMemberToList(MemberListType::PropertyMembers(),md);
545 addMemberToList(MemberListType::Properties(),md);
546 break;
547 }
548 // fallthrough, explicitly no break here
549 default:
550 err("NamespaceDefImpl::insertMembers(): "
551 "member '{}' with unexpected type '{}' and class scope '{}' inserted in namespace scope '{}'!\n",
552 md->name(), md->memberTypeName(), md->getClassDef() ? md->getClassDef()->name() : "", name());
553 }
554 // if this is an inline namespace, then insert an alias of this member in the outer scope.
555 if (isInline())
556 {
557 Definition *outerScope = getOuterScope();
558 if (outerScope)
559 {
560 std::unique_ptr<MemberDef> aliasMd = createMemberDefAlias(outerScope,md);
561 if (outerScope->definitionType()==Definition::TypeNamespace)
562 {
563 NamespaceDefMutable *ndm = toNamespaceDefMutable(outerScope);
564 if (ndm)
565 {
566 ndm->insertMember(aliasMd.get());
567 }
568 }
569 else if (outerScope->definitionType()==Definition::TypeFile)
570 {
571 toFileDef(outerScope)->insertMember(aliasMd.get());
572 }
573 if (aliasMd)
574 {
575 MemberName *mn = Doxygen::functionNameLinkedMap->add(md->name());
576 mn->push_back(std::move(aliasMd));
577 }
578 }
579 }
580 }
581}
virtual bool hasDocumentation() const =0
virtual bool isHidden() const =0
virtual Definition * getOuterScope() const =0
virtual void setOuterScope(Definition *d)=0
static MemberNameLinkedMap * functionNameLinkedMap
Definition doxygen.h:105
static NamespaceDefMutable * globalScope
Definition doxygen.h:114
virtual void insertMember(MemberDef *md)=0
T * add(const char *k, Args &&... args)
Definition linkedmap.h:90
virtual const ClassDef * getClassDef() const =0
virtual MemberType memberType() const =0
virtual DString memberTypeName() const =0
virtual void setFileDef(FileDef *fd)=0
virtual void setNamespace(NamespaceDef *nd)=0
void push_back(Ptr &&p)
Definition membername.h:52
void push_back(const T &value)
Definition memberlist.h:48
bool isInline() const override
void addMemberToList(MemberListType lt, MemberDef *md)
virtual void insertMember(MemberDef *md)=0
FileDef * toFileDef(Definition *d)
Definition filedef.cpp:1976
std::unique_ptr< MemberDef > createMemberDefAlias(const Definition *newScope, const MemberDef *aliasMd)
#define err(fmt,...)
Definition message.h:127

References LinkedMap< T, Hash, KeyEqual, Map >::add(), LinkedRefMap< T, Hash, KeyEqual, Map >::add(), addMemberToList(), createMemberDefAlias(), Definition::definitionType(), err, Doxygen::functionNameLinkedMap, MemberLists::get(), MemberDef::getClassDef(), Definition::getLanguage(), getMemberList(), DefinitionMixin< NamespaceDefMutable >::getOuterScope(), Doxygen::globalScope, DefinitionMixin< NamespaceDefMutable >::hasDocumentation(), FileDef::insertMember(), NamespaceDefMutable::insertMember(), Definition::isHidden(), isInline(), Definition::localName(), m_allMembers, m_memberLists, MemberDef::memberType(), MemberDef::memberTypeName(), Definition::name(), DefinitionMixin< NamespaceDefMutable >::name(), Namespace, MemberName::push_back(), MemberVector::push_back(), MemberDefMutable::setFileDef(), MemberDefMutable::setNamespace(), DefinitionMutable::setOuterScope(), toFileDef(), toMemberDefMutable(), toNamespaceDefMutable(), Definition::TypeFile, and Definition::TypeNamespace.

◆ insertNamespace()

void NamespaceDefImpl::insertNamespace ( NamespaceDef * nd)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 433 of file namespacedef.cpp.

434{
435 m_namespaces.add(nd->name(),nd);
436}

References LinkedRefMap< T, Hash, KeyEqual, Map >::add(), m_namespaces, and Definition::name().

Referenced by addInnerCompound().

◆ insertUsedFile()

void NamespaceDefImpl::insertUsedFile ( FileDef * fd)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 377 of file namespacedef.cpp.

378{
379 if (fd==nullptr) return;
380 auto it = std::find(files.begin(),files.end(),fd);
381 if (it==files.end())
382 {
383 files.push_back(fd);
384 }
385}

References files.

◆ isConstantGroup()

bool NamespaceDefImpl::isConstantGroup ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 88 of file namespacedef.cpp.

88{ return CONSTANT_GROUP == m_type; }

References CONSTANT_GROUP, and m_type.

Referenced by addNamespaceAttributes(), compoundTypeString(), title(), and writeNamespaceDeclarations().

◆ isInline()

bool NamespaceDefImpl::isInline ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 91 of file namespacedef.cpp.

91{ return m_inline; }

References m_inline.

Referenced by insertMember(), and setInline().

◆ isLibrary()

bool NamespaceDefImpl::isLibrary ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 90 of file namespacedef.cpp.

90{ return LIBRARY == m_type; }

References LIBRARY, and m_type.

Referenced by compoundTypeString().

◆ isLinkable()

bool NamespaceDefImpl::isLinkable ( ) const
overridevirtual

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

Implements Definition.

Definition at line 1601 of file namespacedef.cpp.

1602{
1603 return isLinkableInProject() || isReference();
1604}
virtual bool isReference() const =0
bool isLinkableInProject() const override

References isLinkableInProject(), and DefinitionMixin< NamespaceDefMutable >::isReference().

Referenced by isVisibleInHierarchy().

◆ isLinkableInProject()

bool NamespaceDefImpl::isLinkableInProject ( ) const
overridevirtual

Returns true iff it is possible to link to this item within this project.

Implements Definition.

Definition at line 1582 of file namespacedef.cpp.

1583{
1584 size_t i = name().rfind("::");
1585 if (i==DString::npos) i=0; else i+=2;
1586 bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
1587 bool hideUndoc = Config_getBool(HIDE_UNDOC_NAMESPACES);
1588 if (extractAnonNs && // extract anonymous ns
1589 name().mid(i,20)=="anonymous_namespace{" // correct prefix
1590 ) // not disabled by config
1591 {
1592 return true;
1593 }
1594 return !name().empty() && name().at(i)!='@' && // not anonymous
1595 (hasDocumentation() || !hideUndoc || getLanguage()==SrcLangExt::CSharp) && // documented
1596 !isReference() && // not an external reference
1597 !isHidden() && // not hidden
1598 !isArtificial(); // or artificial
1599}
size_t rfind(char c, size_t pos=npos) const
Definition dstring.h:248
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
Definition dstring.h:152
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
Definition dstring.h:182
char & at(size_t i)
Returns a reference to the character at index i.
Definition dstring.h:690
virtual bool isArtificial() const =0

References DString::at(), Config_getBool, DString::empty(), DefinitionMixin< NamespaceDefMutable >::getLanguage(), DefinitionMixin< NamespaceDefMutable >::hasDocumentation(), DefinitionMixin< NamespaceDefMutable >::isArtificial(), DefinitionMixin< NamespaceDefMutable >::isHidden(), DefinitionMixin< NamespaceDefMutable >::isReference(), DefinitionMixin< NamespaceDefMutable >::name(), DString::npos, and DString::rfind().

Referenced by isLinkable().

◆ isModule()

bool NamespaceDefImpl::isModule ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 89 of file namespacedef.cpp.

89{ return NAMESPACE == m_type || MODULE == m_type; }

References m_type, MODULE, and NAMESPACE.

Referenced by compoundTypeString().

◆ isVisibleInHierarchy()

bool NamespaceDefImpl::isVisibleInHierarchy ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 1576 of file namespacedef.cpp.

1577{
1578 bool allExternals = Config_getBool(ALLEXTERNALS);
1579 return allExternals || hasNonReferenceNestedNamespaceRec(this,0) || isLinkable();
1580}
bool isLinkable() const override
static bool hasNonReferenceNestedNamespaceRec(const NamespaceDef *nd, int level)

References Config_getBool, hasNonReferenceNestedNamespaceRec(), and isLinkable().

◆ numDocMembers()

int NamespaceDefImpl::numDocMembers ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 1224 of file namespacedef.cpp.

1225{
1226 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1227 return (allMemberList ? allMemberList->numDocMembers() : 0) + static_cast<int>(m_innerCompounds.size());
1228}
size_t size() const
Definition linkedmap.h:375
int numDocMembers() const
Definition memberlist.h:138

References getMemberList(), m_innerCompounds, MemberList::numDocMembers(), and LinkedRefMap< T, Hash, KeyEqual, Map >::size().

◆ setFileName()

void NamespaceDefImpl::setFileName ( const DString & fn)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 346 of file namespacedef.cpp.

347{
349}

References setFileNameLocal().

◆ setFileNameLocal()

void NamespaceDefImpl::setFileNameLocal ( const DString & fn)
private

Definition at line 334 of file namespacedef.cpp.

335{
336 if (isReference())
337 {
338 fileName = "namespace"+fn;
339 }
340 else
341 {
342 fileName = convertNameToFile("namespace"+fn);
343 }
344}

References convertNameToFile(), fileName, and DefinitionMixin< NamespaceDefMutable >::isReference().

Referenced by setFileName().

◆ setInline()

void NamespaceDefImpl::setInline ( bool isInline)
inlineoverridevirtual

Implements NamespaceDefMutable.

Definition at line 87 of file namespacedef.cpp.

87{ m_inline = isInline; }

References isInline(), and m_inline.

◆ setMetaData()

void NamespaceDefImpl::setMetaData ( const DString & m)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1685 of file namespacedef.cpp.

1686{
1687 metaData = m;
1688}

References metaData.

◆ setName()

void NamespaceDefImpl::setName ( const DString & name)
overridevirtual

Sets a new name for the definition

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 324 of file namespacedef.cpp.

325{
328}
void setName(const DString &name) override

References DefinitionMixin< NamespaceDefMutable >::name(), DefinitionMixin< Base >::setName(), and updateLocalName().

◆ sortMemberLists()

void NamespaceDefImpl::sortMemberLists ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1494 of file namespacedef.cpp.

1495{
1496 for (auto &ml : m_memberLists)
1497 {
1498 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(false); }
1499 }
1500
1501 auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2)
1502 {
1503 return Config_getBool(SORT_BY_SCOPE_NAME) ?
1504 dstricmp_sort(c1->name(), c2->name())<0 :
1505 dstricmp_sort(c1->className(), c2->className())<0;
1506 };
1507
1508 if (needsSorting(m_classes)) std::stable_sort(m_classes.begin(), m_classes.end(), classComp);
1509 if (needsSorting(m_interfaces)) std::stable_sort(m_interfaces.begin(),m_interfaces.end(),classComp);
1510 if (needsSorting(m_structs)) std::stable_sort(m_structs.begin(), m_structs.end(), classComp);
1511 if (needsSorting(m_exceptions)) std::stable_sort(m_exceptions.begin(),m_exceptions.end(),classComp);
1512
1513 auto conceptComp = [](const ConceptLinkedRefMap::Ptr &c1,const ConceptLinkedRefMap::Ptr &c2)
1514 {
1515 return dstricmp_sort(c1->name(),c2->name())<0;
1516 };
1517
1518 if (needsSorting(m_concepts)) std::stable_sort(m_concepts.begin(), m_concepts.end(), conceptComp);
1519
1520 auto namespaceComp = [](const NamespaceLinkedRefMap::Ptr &n1,const NamespaceLinkedRefMap::Ptr &n2)
1521 {
1522 return dstricmp_sort(n1->name(),n2->name())<0;
1523 };
1524
1525 if (needsSorting(m_namespaces)) std::stable_sort(m_namespaces.begin(),m_namespaces.end(),namespaceComp);
1526
1527}
virtual DString className() const =0
Returns the name of the class including outer classes, but not including namespaces.
iterator end()
Definition linkedmap.h:367
iterator begin()
Definition linkedmap.h:366
int dstricmp_sort(const char *str1, const char *str2)
Definition dstring.h:71
bool needsSorting(const Container &container)

References LinkedRefMap< T, Hash, KeyEqual, Map >::begin(), ClassDef::className(), Config_getBool, dstricmp_sort(), LinkedRefMap< T, Hash, KeyEqual, Map >::end(), m_classes, m_concepts, m_exceptions, m_interfaces, m_memberLists, m_namespaces, m_structs, Definition::name(), and needsSorting().

◆ startMemberDeclarations()

void NamespaceDefImpl::startMemberDeclarations ( OutputList & ol)
private

Definition at line 790 of file namespacedef.cpp.

791{
793}
void startMemberSections()
Definition outputlist.h:457

References OutputList::startMemberSections().

Referenced by writeDocumentation().

◆ startMemberDocumentation()

void NamespaceDefImpl::startMemberDocumentation ( OutputList & ol)
private

Definition at line 800 of file namespacedef.cpp.

801{
802 if (Config_getBool(SEPARATE_MEMBER_PAGES))
803 {
806 }
807}
void disable(OutputType o)

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

Referenced by writeDocumentation().

◆ subGrouping()

bool NamespaceDefImpl::subGrouping ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 105 of file namespacedef.cpp.

105{ return m_subGrouping; }

References m_subGrouping.

◆ title()

DString NamespaceDefImpl::title ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 1611 of file namespacedef.cpp.

1612{
1613 DString pageTitle;
1614 SrcLangExt lang = getLanguage();
1615
1616 auto getReferenceTitle = [this](std::function<DString()> translateFunc) -> DString
1617 {
1618 return Config_getBool(HIDE_COMPOUND_REFERENCE) ? displayName() : translateFunc();
1619 };
1620
1621 if (lang==SrcLangExt::Java)
1622 {
1623 pageTitle = theTranslator->trPackage(displayName());
1624 }
1625 else if (lang==SrcLangExt::Fortran || lang==SrcLangExt::Slice)
1626 {
1627 pageTitle = getReferenceTitle([this](){
1629 });
1630 }
1631 else if (lang==SrcLangExt::IDL)
1632 {
1633 pageTitle = getReferenceTitle([this](){
1634 return isConstantGroup()
1637 });
1638 }
1639 else
1640 {
1641 pageTitle = getReferenceTitle([this](){
1643 });
1644 }
1645 return pageTitle;
1646}
virtual DString trPackage(const DString &name)=0
virtual DString trModuleReference(const DString &namespaceName)=0
virtual DString trNamespaceReference(const DString &namespaceName)=0
virtual DString trConstantGroupReference(const DString &namespaceName)=0

References Config_getBool, displayName(), DString::DString(), DefinitionMixin< NamespaceDefMutable >::getLanguage(), isConstantGroup(), theTranslator, Translator::trConstantGroupReference(), Translator::trModuleReference(), Translator::trNamespaceReference(), and Translator::trPackage().

Referenced by writeClassDeclarations(), writeConcepts(), writeDetailedDescription(), writeDocumentation(), writeMemberDeclarations(), writeMemberDocumentation(), and writeNamespaceDeclarations().

◆ updateLocalName()

void NamespaceDefImpl::updateLocalName ( )
private

Definition at line 317 of file namespacedef.cpp.

318{
319 DString locName=name();
320 if (size_t i=locName.rfind("::"); i!=DString::npos) locName=locName.mid(i+2);
321 setLocalName(locName);
322}
DString mid(size_t index, size_t len=npos) const
Definition dstring.h:322
virtual void setLocalName(const DString &name)=0

References DString::mid(), DefinitionMixin< NamespaceDefMutable >::name(), DString::npos, DString::rfind(), and DefinitionMixin< NamespaceDefMutable >::setLocalName().

Referenced by setName().

◆ writeAuthorSection()

void NamespaceDefImpl::writeAuthorSection ( OutputList & ol)
private

Definition at line 851 of file namespacedef.cpp.

852{
853 // write Author section (Man only)
856 ol.startGroupHeader();
857 ol.parseText(theTranslator->trAuthor(true,true));
858 ol.endGroupHeader();
861}
void parseText(const DString &textStr)
void endGroupHeader(int extraLevels=0)
Definition outputlist.h:451
void startGroupHeader(const DString &id=DString(), int extraLevels=0)
Definition outputlist.h:449
virtual DString trAuthor(bool first_capital, bool singular)=0
virtual DString trGeneratedAutomatically(const DString &s)=0
#define Config_getString(name)
Definition config.h:32

References Config_getString, OutputList::disableAllBut(), OutputList::endGroupHeader(), Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startGroupHeader(), theTranslator, Translator::trAuthor(), and Translator::trGeneratedAutomatically().

Referenced by writeDocumentation().

◆ writeBriefDescription()

void NamespaceDefImpl::writeBriefDescription ( OutputList & ol)
private

Definition at line 730 of file namespacedef.cpp.

731{
733 {
734 auto parser { createDocParser() };
735 auto ast { validatingParseDoc(*parser.get(),
736 briefFile(),
737 briefLine(),
738 this,
739 nullptr,
741 DocOptions()
742 .setIndexWords(true)
743 .setSingleLine(true))
744 };
745 if (!ast->empty())
746 {
747 ol.startParagraph();
750 ol.writeString(" - ");
752 ol.writeDoc(ast.get(),this,nullptr);
755 ol.writeString(" \n");
757
759 {
761 ol.startTextLink(getOutputFileBase(),"details");
763 ol.endTextLink();
764 }
766 ol.endParagraph();
767 }
768 }
769
770 // Write a summary of the Slice definition including metadata.
771 if (getLanguage() == SrcLangExt::Slice)
772 {
773 ol.startParagraph();
774 ol.startTypewriter();
775 if (!metaData.empty())
776 {
777 ol.docify(metaData);
778 ol.lineBreak();
779 }
780 ol.docify("module ");
781 ol.docify(stripScope(name()));
782 ol.docify(" { ... }");
783 ol.endTypewriter();
784 ol.endParagraph();
785 }
786
787 ol.writeSynopsis();
788}
virtual DString briefFile() const =0
virtual bool hasBriefDescription() const =0
returns true if this class has a brief description
virtual int briefLine() const =0
bool hasDetailedDescription() const override
void writeDoc(const IDocNodeAST *ast, const Definition *ctx, const MemberDef *md, int sectionLevel=-1)
Definition outputlist.h:379
void startParagraph(const DString &classDef=DString())
Definition outputlist.h:403
void docify(const DString &s)
Definition outputlist.h:433
void lineBreak(const DString &style=DString())
Definition outputlist.h:555
void writeString(const DString &text)
Definition outputlist.h:407
void endParagraph()
Definition outputlist.h:405
void endTextLink()
Definition outputlist.h:440
void writeSynopsis()
Definition outputlist.h:588
void startTypewriter()
Definition outputlist.h:445
void startTextLink(const DString &file, const DString &anchor)
Definition outputlist.h:438
void endTypewriter()
Definition outputlist.h:447
virtual DString trMore()=0
IDocParserPtr createDocParser()
factory function to create a parser
Definition docparser.cpp:59
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const DString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const DString &input, const DocOptions &options)
DString stripScope(const DString &name)
Definition util.cpp:3111

References DefinitionMixin< NamespaceDefMutable >::briefDescription(), DefinitionMixin< NamespaceDefMutable >::briefFile(), DefinitionMixin< NamespaceDefMutable >::briefLine(), createDocParser(), OutputList::disable(), OutputList::disableAllBut(), OutputList::docify(), DString::empty(), OutputList::enable(), OutputList::endParagraph(), OutputList::endTextLink(), OutputList::endTypewriter(), DefinitionMixin< NamespaceDefMutable >::getLanguage(), getOutputFileBase(), DefinitionMixin< NamespaceDefMutable >::hasBriefDescription(), hasDetailedDescription(), Html, OutputList::lineBreak(), Man, metaData, DefinitionMixin< NamespaceDefMutable >::name(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, OutputList::startParagraph(), OutputList::startTextLink(), OutputList::startTypewriter(), stripScope(), theTranslator, Translator::trMore(), validatingParseDoc(), OutputList::writeDoc(), OutputList::writeString(), and OutputList::writeSynopsis().

Referenced by writeDocumentation().

◆ writeClassDeclarations()

void NamespaceDefImpl::writeClassDeclarations ( OutputList & ol,
const DString & title,
const ClassLinkedRefMap & d )
private

Definition at line 818 of file namespacedef.cpp.

819{
820 d.writeDeclaration(ol,nullptr,title,true);
821}
void writeDeclaration(OutputList &ol, const ClassDef::CompoundType *filter, const DString &header, bool localNames) const
Definition classlist.cpp:53
DString title() const override

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

Referenced by writeDocumentation().

◆ writeClassesToTagFile()

void NamespaceDefImpl::writeClassesToTagFile ( TextStream & tagFile,
const ClassLinkedRefMap & d )
private

Definition at line 963 of file namespacedef.cpp.

964{
965 for (const auto &cd : list)
966 {
967 if (cd->isLinkableInProject())
968 {
969 tagFile << " <class kind=\"" << cd->compoundTypeString()
970 << "\">" << convertToXML(cd->name()) << "</class>\n";
971 }
972 }
973}
DString convertToXML(const DString &s, bool keepEntities, const bool citeEntry)
Definition util.cpp:3234

References convertToXML().

Referenced by writeTagFile().

◆ writeConcepts()

void NamespaceDefImpl::writeConcepts ( OutputList & ol,
const DString & title )
private

Definition at line 823 of file namespacedef.cpp.

824{
826}
void writeDeclaration(OutputList &ol, const DString &header, bool localNames) const

References m_concepts, title(), and ConceptLinkedRefMap::writeDeclaration().

Referenced by writeDocumentation().

◆ writeConceptsToTagFile()

void NamespaceDefImpl::writeConceptsToTagFile ( TextStream & tagFile)
private

Definition at line 975 of file namespacedef.cpp.

976{
977 for (const auto &cd : m_concepts)
978 {
979 if (cd->isLinkableInProject())
980 {
981 tagFile << " <concept>" << convertToXML(cd->name()) << "</concept>\n";
982 }
983 }
984}

References convertToXML(), and m_concepts.

Referenced by writeTagFile().

◆ writeDetailedDescription()

void NamespaceDefImpl::writeDetailedDescription ( OutputList & ol,
const DString & title )
private

Definition at line 677 of file namespacedef.cpp.

678{
680 {
683 ol.writeRuler();
687 ol.writeAnchor(DString(),"details");
689 ol.startGroupHeader("details");
690 ol.parseText(title);
691 ol.endGroupHeader();
692
693 ol.startTextBlock();
694 if (!briefDescription().empty() && Config_getBool(REPEAT_BRIEF))
695 {
697 briefLine(),
698 this,
699 nullptr,
701 DocOptions());
702 }
703 if (!briefDescription().empty() && Config_getBool(REPEAT_BRIEF) &&
704 !documentation().empty())
705 {
709 ol.enableAll();
712 ol.writeString("\n\n");
714 }
715 if (!documentation().empty())
716 {
717 ol.generateDoc(docFile(),
718 docLine(),
719 this,
720 nullptr,
721 documentation()+"\n",
722 DocOptions()
723 .setIndexWords(true));
724 }
726 ol.endTextBlock();
727 }
728}
virtual int docLine() const =0
virtual bool hasRequirementRefs() const =0
virtual void writeRequirementRefs(OutputList &ol) const =0
void writeRuler()
Definition outputlist.h:517
void endTextBlock(bool paraBreak=false)
Definition outputlist.h:668
void writeAnchor(const DString &fileName, const DString &name)
Definition outputlist.h:519
void startTextBlock(bool dense=false)
Definition outputlist.h:666
void generateDoc(const DString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const DString &docStr, const DocOptions &options)
void enableAll()

References DefinitionMixin< NamespaceDefMutable >::briefDescription(), DefinitionMixin< NamespaceDefMutable >::briefFile(), DefinitionMixin< NamespaceDefMutable >::briefLine(), Config_getBool, OutputList::disable(), OutputList::disableAllBut(), DefinitionMixin< NamespaceDefMutable >::docFile(), DefinitionMixin< NamespaceDefMutable >::docLine(), DefinitionMixin< NamespaceDefMutable >::documentation(), DString::DString(), OutputList::enable(), OutputList::enableAll(), OutputList::endGroupHeader(), OutputList::endTextBlock(), OutputList::generateDoc(), hasDetailedDescription(), DefinitionMixin< NamespaceDefMutable >::hasRequirementRefs(), Html, Latex, Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, OutputList::startGroupHeader(), OutputList::startTextBlock(), title(), OutputList::writeAnchor(), DefinitionMixin< NamespaceDefMutable >::writeRequirementRefs(), OutputList::writeRuler(), and OutputList::writeString().

Referenced by writeDocumentation().

◆ writeDocumentation()

void NamespaceDefImpl::writeDocumentation ( OutputList & ol)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 986 of file namespacedef.cpp.

987{
988 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
989 //bool outputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
990 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
991
992 DString pageTitle = title();
993 startFile(ol,getOutputFileBase(),false,name(),pageTitle,HighlightedItem::NamespaceVisible,!generateTreeView);
994
995 if (!generateTreeView)
996 {
998 {
1000 }
1001 ol.endQuickIndices();
1002 }
1003
1004 startTitle(ol,getOutputFileBase(),this);
1005 ol.parseText(pageTitle);
1006 addGroupListToTitle(ol,this);
1009 ol.startContents();
1010
1011 //---------------------------------------- start flexible part -------------------------------
1012
1013 SrcLangExt lang = getLanguage();
1014 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1015 {
1016 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
1017 switch (lde->kind())
1018 {
1019 case LayoutDocEntry::BriefDesc:
1021 break;
1022 case LayoutDocEntry::MemberDeclStart:
1024 break;
1025 case LayoutDocEntry::NamespaceClasses:
1026 {
1027 if (ls) writeClassDeclarations(ol,ls->title(lang),m_classes);
1028 }
1029 break;
1030 case LayoutDocEntry::NamespaceInterfaces:
1031 {
1032 if (ls) writeClassDeclarations(ol,ls->title(lang),m_interfaces);
1033 }
1034 break;
1035 case LayoutDocEntry::NamespaceStructs:
1036 {
1037 if (ls) writeClassDeclarations(ol,ls->title(lang),m_structs);
1038 }
1039 break;
1040 case LayoutDocEntry::NamespaceExceptions:
1041 {
1042 if (ls) writeClassDeclarations(ol,ls->title(lang),m_exceptions);
1043 }
1044 break;
1045 case LayoutDocEntry::NamespaceConcepts:
1046 {
1047 if (ls) writeConcepts(ol,ls->title(lang));
1048 }
1049 break;
1050 case LayoutDocEntry::NamespaceNestedNamespaces:
1051 {
1052 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),false);
1053 }
1054 break;
1055 case LayoutDocEntry::NamespaceNestedConstantGroups:
1056 {
1057 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),true);
1058 }
1059 break;
1060 case LayoutDocEntry::MemberGroups:
1062 break;
1063 case LayoutDocEntry::MemberDecl:
1064 {
1065 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1066 if (lmd) writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
1067 }
1068 break;
1069 case LayoutDocEntry::MemberDeclEnd:
1071 break;
1072 case LayoutDocEntry::DetailedDesc:
1073 {
1074 if (ls) writeDetailedDescription(ol,ls->title(lang));
1075 }
1076 break;
1077 case LayoutDocEntry::MemberDefStart:
1079 break;
1080 case LayoutDocEntry::NamespaceInlineClasses:
1082 break;
1083 case LayoutDocEntry::MemberDef:
1084 {
1085 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1086 if (lmd) writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
1087 }
1088 break;
1089 case LayoutDocEntry::MemberDefEnd:
1091 break;
1092 case LayoutDocEntry::AuthorSection:
1094 break;
1095 case LayoutDocEntry::ClassIncludes:
1096 case LayoutDocEntry::ClassInheritanceGraph:
1097 case LayoutDocEntry::ClassNestedClasses:
1098 case LayoutDocEntry::ClassCollaborationGraph:
1099 case LayoutDocEntry::ClassAllMembersLink:
1100 case LayoutDocEntry::ClassUsedFiles:
1101 case LayoutDocEntry::ClassInlineClasses:
1102 case LayoutDocEntry::ConceptDefinition:
1103 case LayoutDocEntry::FileClasses:
1104 case LayoutDocEntry::FileConcepts:
1105 case LayoutDocEntry::FileInterfaces:
1106 case LayoutDocEntry::FileStructs:
1107 case LayoutDocEntry::FileExceptions:
1108 case LayoutDocEntry::FileNamespaces:
1109 case LayoutDocEntry::FileConstantGroups:
1110 case LayoutDocEntry::FileIncludes:
1111 case LayoutDocEntry::FileIncludeGraph:
1112 case LayoutDocEntry::FileIncludedByGraph:
1113 case LayoutDocEntry::FileSourceLink:
1114 case LayoutDocEntry::FileInlineClasses:
1115 case LayoutDocEntry::GroupClasses:
1116 case LayoutDocEntry::GroupConcepts:
1117 case LayoutDocEntry::GroupModules:
1118 case LayoutDocEntry::GroupInlineClasses:
1119 case LayoutDocEntry::GroupNamespaces:
1120 case LayoutDocEntry::GroupDirs:
1121 case LayoutDocEntry::GroupNestedGroups:
1122 case LayoutDocEntry::GroupFiles:
1123 case LayoutDocEntry::GroupGraph:
1124 case LayoutDocEntry::GroupPageDocs:
1125 case LayoutDocEntry::ModuleExports:
1126 case LayoutDocEntry::ModuleClasses:
1127 case LayoutDocEntry::ModuleConcepts:
1128 case LayoutDocEntry::ModuleUsedFiles:
1129 case LayoutDocEntry::DirSubDirs:
1130 case LayoutDocEntry::DirFiles:
1131 case LayoutDocEntry::DirGraph:
1132 err("Internal inconsistency: member '{}' should not be part of "
1133 "LayoutDocManager::Namespace entry list\n",lde->entryToString());
1134 break;
1135 }
1136 }
1137
1138 //---------------------------------------- end flexible part -------------------------------
1139
1140 ol.endContents();
1141
1142 endFileWithNavPath(ol,this);
1143
1144 if (Config_getBool(SEPARATE_MEMBER_PAGES))
1145 {
1146 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1147 if (allMemberList) allMemberList->sort();
1148 writeMemberPages(ol);
1149 }
1150}
virtual void writeNavigationPath(OutputList &ol) const =0
void sort()
Definition memberlist.h:76
void writeMemberDocumentation(OutputList &ol, MemberListType lt, const DString &title)
void writeMemberPages(OutputList &ol) override
void writeMemberGroups(OutputList &ol)
void startMemberDeclarations(OutputList &ol)
void writeAuthorSection(OutputList &ol)
void endMemberDocumentation(OutputList &ol)
void writeInlineClasses(OutputList &ol)
void writeBriefDescription(OutputList &ol)
void startMemberDocumentation(OutputList &ol)
void writeNamespaceDeclarations(OutputList &ol, const DString &title, bool isConstantGroup=false)
void endMemberDeclarations(OutputList &ol)
void writeConcepts(OutputList &ol, const DString &title)
void writeClassDeclarations(OutputList &ol, const DString &title, const ClassLinkedRefMap &d)
void addNamespaceAttributes(OutputList &ol)
void writeMemberDeclarations(OutputList &ol, MemberListType lt, const DString &title)
void writeDetailedDescription(OutputList &ol, const DString &title)
void endContents()
Definition outputlist.h:616
void endQuickIndices()
Definition outputlist.h:600
void startContents()
Definition outputlist.h:614
void endTitle(OutputList &ol, const DString &fileName, const DString &name)
Definition index.cpp:397
void endFileWithNavPath(OutputList &ol, const DefinitionMutable *d, bool showPageNavigation)
Definition index.cpp:451
void startTitle(OutputList &ol, const DString &fileName, const DefinitionMutable *def)
Definition index.cpp:387
void startFile(OutputList &ol, const DString &name, bool isSource, const DString &manName, const DString &title, HighlightedItem hli, bool additionalIndices, const DString &altSidebarName, int hierarchyLevel, const DString &allMembersFile)
Definition index.cpp:404
@ NamespaceVisible
Definition index.h:91
MemberListType type
Definition layout.h:117
DString title(SrcLangExt lang) const
Definition layout.cpp:1787
DString title(SrcLangExt lang) const
Definition layout.cpp:1799
DString title(SrcLangExt lang) const
Definition layout.cpp:1780
void addGroupListToTitle(OutputList &ol, const Definition *d)
Definition util.cpp:3923

References addGroupListToTitle(), addNamespaceAttributes(), Config_getBool, displayName(), OutputList::endContents(), endFileWithNavPath(), endMemberDeclarations(), endMemberDocumentation(), OutputList::endQuickIndices(), endTitle(), err, DefinitionMixin< NamespaceDefMutable >::getLanguage(), getMemberList(), DefinitionMixin< NamespaceDefMutable >::getOuterScope(), getOutputFileBase(), Doxygen::globalScope, LayoutDocManager::instance(), m_classes, m_exceptions, m_interfaces, m_structs, DefinitionMixin< NamespaceDefMutable >::name(), NamespaceVisible, OutputList::parseText(), MemberVector::sort(), OutputList::startContents(), startFile(), startMemberDeclarations(), startMemberDocumentation(), startTitle(), LayoutDocEntryMemberDecl::title(), LayoutDocEntryMemberDef::title(), LayoutDocEntrySection::title(), title(), LayoutDocEntryMemberDecl::type, LayoutDocEntryMemberDef::type, writeAuthorSection(), writeBriefDescription(), writeClassDeclarations(), writeConcepts(), writeDetailedDescription(), writeInlineClasses(), writeMemberDeclarations(), writeMemberDocumentation(), writeMemberGroups(), writeMemberPages(), writeNamespaceDeclarations(), and DefinitionMixin< NamespaceDefMutable >::writeNavigationPath().

◆ writeInlineClasses()

void NamespaceDefImpl::writeInlineClasses ( OutputList & ol)
private

Definition at line 828 of file namespacedef.cpp.

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

References m_classes, and ClassLinkedRefMap::writeDocumentation().

Referenced by writeDocumentation().

◆ writeMemberDeclarations()

void NamespaceDefImpl::writeMemberDeclarations ( OutputList & ol,
MemberListType lt,
const DString & title )
private

Definition at line 1541 of file namespacedef.cpp.

1542{
1543 MemberList * ml = getMemberList(lt);
1544 if (ml) ml->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr,title,DString());
1545}
void writeDeclarations(OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, const DString &title, const DString &subtitle, bool showEnumValues=false, bool showInline=false, const ClassDef *inheritedFrom=nullptr, MemberListType lt=MemberListType::PubMethods(), bool showSectionTitle=true) const
Writes the list of members to the output.

References DString::DString(), getMemberList(), title(), and MemberList::writeDeclarations().

Referenced by writeDocumentation().

◆ writeMemberDocumentation()

void NamespaceDefImpl::writeMemberDocumentation ( OutputList & ol,
MemberListType lt,
const DString & title )
private

Definition at line 1547 of file namespacedef.cpp.

1548{
1549 MemberList * ml = getMemberList(lt);
1550 if (ml) ml->writeDocumentation(ol,displayName(),this,title,ml->listType().toLabel());
1551}
void writeDocumentation(OutputList &ol, const DString &scopeName, const Definition *container, const DString &title, const DString &anchor, bool showEnumValues=false, bool showInline=false) const
MemberListType listType() const
Definition memberlist.h:130
constexpr const char * toLabel() const noexcept
Definition types.h:402

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

Referenced by writeDocumentation().

◆ writeMemberGroups()

void NamespaceDefImpl::writeMemberGroups ( OutputList & ol)
private

Definition at line 839 of file namespacedef.cpp.

840{
841 /* write user defined member groups */
842 for (const auto &mg : m_memberGroups)
843 {
844 if (!mg->allMembersInSameSection() || !m_subGrouping)
845 {
846 mg->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr);
847 }
848 }
849}

References m_memberGroups, and m_subGrouping.

Referenced by writeDocumentation().

◆ writeMemberPages()

void NamespaceDefImpl::writeMemberPages ( OutputList & ol)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1152 of file namespacedef.cpp.

1153{
1154 ol.pushGeneratorState();
1156
1157 for (const auto &ml : m_memberLists)
1158 {
1159 if (ml->listType().isDocumentation())
1160 {
1161 ml->writeDocumentationPage(ol,displayName(),this);
1162 }
1163 }
1164 ol.popGeneratorState();
1165}

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

Referenced by writeDocumentation().

◆ writeNamespaceDeclarations()

void NamespaceDefImpl::writeNamespaceDeclarations ( OutputList & ol,
const DString & title,
bool isConstantGroup = false )
private

Definition at line 833 of file namespacedef.cpp.

835{
837}
void writeDeclaration(OutputList &ol, const DString &title, bool isConstantGroup=false, bool localName=false)

References isConstantGroup(), m_namespaces, title(), and NamespaceLinkedRefMap::writeDeclaration().

Referenced by writeDocumentation().

◆ writePageNavigation()

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

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 935 of file namespacedef.cpp.

936{
937 ol.writePageOutline();
938}
void writePageOutline()
Definition outputlist.h:612

References OutputList::writePageOutline().

◆ writeQuickMemberLinks()

void NamespaceDefImpl::writeQuickMemberLinks ( OutputList & ol,
const MemberDef * currentMd ) const
overridevirtual

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 1167 of file namespacedef.cpp.

1168{
1169 bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
1170
1171 ol.writeString(" <div class=\"navtab\">\n");
1172 ol.writeString(" <table>\n");
1173
1174 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1175 if (allMemberList)
1176 {
1177 for (const auto &md : *allMemberList)
1178 {
1179 if (md->getNamespaceDef()==this && md->isLinkable() && !md->isEnumValue())
1180 {
1181 if (md->isLinkableInProject())
1182 {
1183 DString fn = md->getOutputFileBase();
1185 if (md==currentMd) // selected item => highlight
1186 {
1187 ol.writeString(" <tr><td class=\"navtabHL\">");
1188 }
1189 else
1190 {
1191 ol.writeString(" <tr><td class=\"navtab\">");
1192 }
1193 ol.writeString("<span class=\"label\"><a ");
1194 ol.writeString("href=\"");
1195 if (createSubDirs) ol.writeString("../../");
1196 ol.writeString(fn+"#"+md->anchor());
1197 ol.writeString("\">");
1198 ol.writeString(convertToHtml(md->localName()));
1199 ol.writeString("</a></span>");
1200 ol.writeString("</td></tr>\n");
1201 }
1202 }
1203 }
1204 }
1205
1206 ol.writeString(" </table>\n");
1207 ol.writeString(" </div>\n");
1208}
void createSubDirs(const Dir &d)
Definition util.cpp:2971
DString convertToHtml(const DString &s, bool keepEntities)
Definition util.cpp:3293
void addHtmlExtensionIfMissing(DString &fName)
Definition util.cpp:3933

References addHtmlExtensionIfMissing(), Config_getBool, convertToHtml(), createSubDirs(), getMemberList(), and OutputList::writeString().

◆ writeSummaryLinks()

void NamespaceDefImpl::writeSummaryLinks ( OutputList & ol) const
overridevirtual

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 863 of file namespacedef.cpp.

864{
867 bool first=true;
868 SrcLangExt lang = getLanguage();
869 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
870 {
871 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
872 if (lde->kind()==LayoutDocEntry::NamespaceClasses && m_classes.declVisible() && ls)
873 {
874 DString label = "nested-classes";
875 ol.writeSummaryLink(DString(),label,ls->title(lang),first);
876 first=false;
877 }
878 else if (lde->kind()==LayoutDocEntry::NamespaceInterfaces && m_interfaces.declVisible() && ls)
879 {
880 DString label = "interfaces";
881 ol.writeSummaryLink(DString(),label,ls->title(lang),first);
882 first=false;
883 }
884 else if (lde->kind()==LayoutDocEntry::NamespaceStructs && m_structs.declVisible() && ls)
885 {
886 DString label = "structs";
887 ol.writeSummaryLink(DString(),label,ls->title(lang),first);
888 first=false;
889 }
890 else if (lde->kind()==LayoutDocEntry::NamespaceExceptions && m_exceptions.declVisible() && ls)
891 {
892 DString label = "exceptions";
893 ol.writeSummaryLink(DString(),label,ls->title(lang),first);
894 first=false;
895 }
896 else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && m_namespaces.declVisible(false) && ls)
897 {
898 DString label = "namespaces";
899 ol.writeSummaryLink(DString(),label,ls->title(lang),first);
900 first=false;
901 }
902 else if (lde->kind()==LayoutDocEntry::NamespaceNestedConstantGroups && m_namespaces.declVisible(true) && ls)
903 {
904 DString label = "constantgroups";
905 ol.writeSummaryLink(DString(),label,ls->title(lang),first);
906 first=false;
907 }
908 else if (lde->kind()==LayoutDocEntry::NamespaceConcepts && m_concepts.declVisible() && ls)
909 {
910 DString label = "concepts";
911 ol.writeSummaryLink(DString(),label,ls->title(lang),first);
912 first=false;
913 }
914 else if (lde->kind()== LayoutDocEntry::MemberDecl)
915 {
916 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
917 if (lmd)
918 {
919 MemberList * ml = getMemberList(lmd->type);
920 if (ml && ml->declVisible())
921 {
922 ol.writeSummaryLink(DString(),ml->listType().toLabel(),lmd->title(lang),first);
923 first=false;
924 }
925 }
926 }
927 }
928 if (!first)
929 {
930 ol.writeString(" </div>\n");
931 }
933}
bool declVisible(const ClassDef::CompoundType *filter=nullptr) const
Definition classlist.cpp:29
bool declVisible() const
bool declVisible() const
bool declVisible(bool isContantGroup) const
void writeSummaryLink(const DString &file, const DString &anchor, const DString &title, bool first)
Definition outputlist.h:610

References ClassLinkedRefMap::declVisible(), ConceptLinkedRefMap::declVisible(), MemberList::declVisible(), NamespaceLinkedRefMap::declVisible(), OutputList::disableAllBut(), DString::DString(), DefinitionMixin< NamespaceDefMutable >::getLanguage(), getMemberList(), Html, LayoutDocManager::instance(), MemberList::listType(), m_classes, m_concepts, m_exceptions, m_interfaces, m_namespaces, m_structs, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocEntryMemberDecl::title(), LayoutDocEntrySection::title(), MemberListType::toLabel(), LayoutDocEntryMemberDecl::type, OutputList::writeString(), and OutputList::writeSummaryLink().

◆ writeTagFile()

void NamespaceDefImpl::writeTagFile ( TextStream & tagFile)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 596 of file namespacedef.cpp.

597{
598 DString fn = getOutputFileBase();
600 tagFile << " <compound kind=\"namespace\">\n";
601 tagFile << " <name>" << convertToXML(name()) << "</name>\n";
602 tagFile << " <filename>" << fn << "</filename>\n";
603 DString idStr = id();
604 if (!idStr.empty())
605 {
606 tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
607 }
608 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
609 {
610 switch (lde->kind())
611 {
612 case LayoutDocEntry::NamespaceNestedNamespaces:
613 {
614 for (const auto &nd : m_namespaces)
615 {
616 if (nd->isLinkableInProject())
617 {
618 tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>\n";
619 }
620 }
621 }
622 break;
623 case LayoutDocEntry::NamespaceClasses:
624 {
626 }
627 break;
628 case LayoutDocEntry::NamespaceInterfaces:
629 {
631 }
632 break;
633 case LayoutDocEntry::NamespaceStructs:
634 {
636 }
637 break;
638 case LayoutDocEntry::NamespaceExceptions:
639 {
641 }
642 break;
643 case LayoutDocEntry::NamespaceConcepts:
644 {
645 writeConceptsToTagFile(tagFile);
646 }
647 break;
648 case LayoutDocEntry::MemberDecl:
649 {
650 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
651 if (lmd)
652 {
653 MemberList * ml = getMemberList(lmd->type);
654 if (ml)
655 {
656 ml->writeTagFile(tagFile);
657 }
658 }
659 }
660 break;
661 case LayoutDocEntry::MemberGroups:
662 {
663 for (const auto &mg : m_memberGroups)
664 {
665 mg->writeTagFile(tagFile);
666 }
667 }
668 break;
669 default:
670 break;
671 }
672 }
674 tagFile << " </compound>\n";
675}
virtual DString id() const =0
virtual void writeDocAnchorsToTagFile(TextStream &) const =0
void writeTagFile(TextStream &, bool useQualifiedName=false, bool showNamespaceMembers=true)
void writeConceptsToTagFile(TextStream &)
void writeClassesToTagFile(TextStream &, const ClassLinkedRefMap &d)

References addHtmlExtensionIfMissing(), convertToXML(), DString::empty(), getMemberList(), getOutputFileBase(), DefinitionMixin< NamespaceDefMutable >::id(), LayoutDocManager::instance(), m_classes, m_exceptions, m_interfaces, m_memberGroups, m_namespaces, m_structs, DefinitionMixin< NamespaceDefMutable >::name(), LayoutDocEntryMemberDecl::type, writeClassesToTagFile(), writeConceptsToTagFile(), DefinitionMixin< NamespaceDefMutable >::writeDocAnchorsToTagFile(), and MemberList::writeTagFile().

Member Data Documentation

◆ fileName

DString NamespaceDefImpl::fileName
private

Definition at line 150 of file namespacedef.cpp.

Referenced by getOutputFileBase(), and setFileNameLocal().

◆ files

FileList NamespaceDefImpl::files
private

Definition at line 151 of file namespacedef.cpp.

Referenced by insertUsedFile().

◆ m_allMembers

MemberLinkedRefMap NamespaceDefImpl::m_allMembers
private

Definition at line 157 of file namespacedef.cpp.

Referenced by getMemberByName(), and insertMember().

◆ m_classes

◆ m_concepts

ConceptLinkedRefMap NamespaceDefImpl::m_concepts
private

◆ m_exceptions

ClassLinkedRefMap NamespaceDefImpl::m_exceptions
private

◆ m_inline

bool NamespaceDefImpl::m_inline = false
private

Definition at line 170 of file namespacedef.cpp.

Referenced by isInline(), and setInline().

◆ m_innerCompounds

LinkedRefMap<const Definition> NamespaceDefImpl::m_innerCompounds
private

Definition at line 155 of file namespacedef.cpp.

Referenced by addInnerCompound(), findInnerCompound(), and numDocMembers().

◆ m_interfaces

ClassLinkedRefMap NamespaceDefImpl::m_interfaces
private

◆ m_isPublished

bool NamespaceDefImpl::m_isPublished = false
private

Definition at line 168 of file namespacedef.cpp.

Referenced by addNamespaceAttributes(), and NamespaceDefImpl().

◆ m_memberGroups

◆ m_memberLists

◆ m_namespaces

NamespaceLinkedRefMap NamespaceDefImpl::m_namespaces
private

◆ m_structs

ClassLinkedRefMap NamespaceDefImpl::m_structs
private

◆ m_subGrouping

bool NamespaceDefImpl::m_subGrouping = false
private

Definition at line 166 of file namespacedef.cpp.

Referenced by addMembersToMemberGroup(), subGrouping(), and writeMemberGroups().

◆ m_type

enum { ... } NamespaceDefImpl::m_type

◆ m_usingDeclList

LinkedRefMap<const Definition> NamespaceDefImpl::m_usingDeclList
private

Definition at line 154 of file namespacedef.cpp.

Referenced by addUsingDeclaration(), findInnerCompound(), and getUsedDefinitions().

◆ m_usingDirList

LinkedRefMap<NamespaceDef> NamespaceDefImpl::m_usingDirList
private

◆ metaData

DString NamespaceDefImpl::metaData
private

Definition at line 169 of file namespacedef.cpp.

Referenced by setMetaData(), and writeBriefDescription().


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