Skip to main content

The NamespaceDefImpl Class Reference

Declaration

class NamespaceDefImpl { ... }

Base class

classDefinitionMixin<Base>

Enumerations Index

anonymous enum { ... }

Public Constructors Index

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

Public Destructor Index

~NamespaceDefImpl () override

Public Member Functions Index

DefTypedefinitionType () const override
CodeSymbolTypecodeSymbolType () const override
QCStringgetOutputFileBase () const override
QCStringanchor () const override
voidinsertUsedFile (FileDef *fd) override
voidwriteDocumentation (OutputList &ol) override
voidwriteMemberPages (OutputList &ol) override
voidwriteQuickMemberLinks (OutputList &ol, const MemberDef *currentMd) const override
voidwriteTagFile (TextStream &) override
voidinsertClass (ClassDef *cd) override
voidinsertConcept (ConceptDef *cd) override
voidinsertNamespace (NamespaceDef *nd) override
voidinsertMember (MemberDef *md) override
voidcomputeAnchors () override
voidcountMembers () override
intnumDocMembers () const override
voidaddUsingDirective (NamespaceDef *nd) override
const LinkedRefMap< NamespaceDef > &getUsedNamespaces () const override
voidaddUsingDeclaration (const Definition *cd) override
const LinkedRefMap< const Definition > &getUsedDefinitions () const override
voidcombineUsingRelations (NamespaceDefSet &visitedNamespace) override
QCStringdisplayName (bool=TRUE) const override
voidsetInline (bool isInline) override
boolisConstantGroup () const override
boolisModule () const override
boolisLibrary () const override
boolisInline () const override
boolisLinkableInProject () const override
boolisLinkable () const override
boolisVisibleInHierarchy () const override
boolhasDetailedDescription () const override
voidaddMembersToMemberGroup () override
voiddistributeMemberGroupDocumentation () override
voidfindSectionsInDocumentation () override
voidsortMemberLists () override
const Definition *findInnerCompound (const QCString &name) const override
voidaddInnerCompound (Definition *d) override
voidaddListReferences () override
voidsetFileName (const QCString &fn) override
boolsubGrouping () const override
MemberList *getMemberList (MemberListType lt) const override
const MemberLists &getMemberLists () const override
const MemberDef *getMemberByName (const QCString &) const override
const MemberGroupList &getMemberGroups () const override
ClassLinkedRefMapgetClasses () const override
ClassLinkedRefMapgetInterfaces () const override
ClassLinkedRefMapgetStructs () const override
ClassLinkedRefMapgetExceptions () const override
NamespaceLinkedRefMapgetNamespaces () const override
ConceptLinkedRefMapgetConcepts () const override
voidsetName (const QCString &name) override
QCStringtitle () const override
QCStringcompoundTypeString () const override
voidsetMetaData (const QCString &m) override
intcountVisibleMembers () const override
voidwriteSummaryLinks (OutputList &ol) const override
voidwritePageNavigation (OutputList &ol) const override

Private Member Functions Index

voidaddMemberToList (MemberListType lt, MemberDef *md)
voidwriteMemberDeclarations (OutputList &ol, MemberListType lt, const QCString &title)
voidwriteMemberDocumentation (OutputList &ol, MemberListType lt, const QCString &title)
voidwriteDetailedDescription (OutputList &ol, const QCString &title)
voidwriteBriefDescription (OutputList &ol)
voidstartMemberDeclarations (OutputList &ol)
voidendMemberDeclarations (OutputList &ol)
voidwriteClassDeclarations (OutputList &ol, const QCString &title, const ClassLinkedRefMap &d)
voidwriteConcepts (OutputList &ol, const QCString &title)
voidwriteInlineClasses (OutputList &ol)
voidwriteMemberGroups (OutputList &ol)
voidwriteAuthorSection (OutputList &ol)
voidstartMemberDocumentation (OutputList &ol)
voidendMemberDocumentation (OutputList &ol)
voidaddNamespaceAttributes (OutputList &ol)
voidwriteClassesToTagFile (TextStream &, const ClassLinkedRefMap &d)
voidwriteConceptsToTagFile (TextStream &)
voidsetFileNameLocal (const QCString &fn)
voidwriteNamespaceDeclarations (OutputList &ol, const QCString &title, bool isConstantGroup=false)
voidupdateLocalName ()

Private Member Attributes Index

QCStringfileName
FileListfiles
LinkedRefMap< NamespaceDef >m_usingDirList
LinkedRefMap< const Definition >m_usingDeclList
LinkedRefMap< const Definition >m_innerCompounds
MemberLinkedRefMapm_allMembers
MemberListsm_memberLists
MemberGroupListm_memberGroups
ClassLinkedRefMapclasses
ClassLinkedRefMapinterfaces
ClassLinkedRefMapstructs
ClassLinkedRefMapexceptions
ConceptLinkedRefMapm_concepts
NamespaceLinkedRefMapnamespaces
boolm_subGrouping = false
enum NamespaceDefImplm_type
boolm_isPublished = false
QCStringmetaData
boolm_inline = false

Definition at line 56 of file namespacedef.cpp.

Enumerations

anonymous enum

anonymous enum
Enumeration values
NAMESPACE
MODULE
CONSTANT_GROUP
LIBRARY

Definition at line 168 of file namespacedef.cpp.

Public Constructors

NamespaceDefImpl()

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

Definition at line 59 of file namespacedef.cpp.

274 const QCString &name,const QCString &lref,
275 const QCString &fName, const QCString &type,
276 bool isPublished) :
277 DefinitionMixin(df,dl,dc,name)
278 ,m_isPublished(isPublished)
279{
280 if (!fName.isEmpty())
281 {
282 if (!lref.isEmpty())
283 {
284 fileName = stripExtension(fName);
285 }
286 else
287 {
288 fileName = convertNameToFile(stripExtension(fName));
289 }
290 }
291 else
292 {
293 setFileNameLocal(name);
294 }
295 setReference(lref);
296 m_inline=FALSE;
297 m_subGrouping=Config_getBool(SUBGROUPING);
298 if (type=="module")
299 {
300 m_type = MODULE;
301 }
302 else if (type=="constants")
303 {
304 m_type = CONSTANT_GROUP;
305 }
306 else if (type=="library")
307 {
308 m_type = LIBRARY;
309 }
310 else
311 {
312 m_type = NAMESPACE;
313 }
314
315 updateLocalName();
316}

References DefinitionMixin< NamespaceDefMutable >::DefinitionMixin, QCString::isEmpty, m_isPublished and DefinitionMixin< NamespaceDefMutable >::name.

Public Destructor

~NamespaceDefImpl()

NamespaceDefImpl::~NamespaceDefImpl ()

Definition at line 63 of file namespacedef.cpp.

Public Member Functions

addInnerCompound()

void NamespaceDefImpl::addInnerCompound (Definition * d)
virtual

Definition at line 103 of file namespacedef.cpp.

393{
394 //printf("%s:NamespaceDefImpl::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
395 m_innerCompounds.add(d->localName(),d);
397 {
399 }
401 {
403 }
405 {
407 }
408}

References Definition::definitionType, insertClass, insertConcept, insertNamespace, Definition::localName, m_innerCompounds, toClassDef, toConceptDef, toNamespaceDef, Definition::TypeClass, Definition::TypeConcept and Definition::TypeNamespace.

addListReferences()

void NamespaceDefImpl::addListReferences ()
virtual

Definition at line 104 of file namespacedef.cpp.

1255{
1256 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
1257 {
1258 const RefItemVector &xrefItems = xrefListItems();
1259 addRefItem(xrefItems,
1261 getLanguage()==SrcLangExt::Fortran ?
1262 theTranslator->trModule(TRUE,TRUE) :
1263 theTranslator->trNamespace(TRUE,TRUE),
1265 QCString(),
1266 this
1267 );
1268 }
1269 for (const auto &mg : m_memberGroups)
1270 {
1271 mg->addListReferences(this);
1272 }
1273 for (auto &ml : m_memberLists)
1274 {
1275 if (ml->listType().isDocumentation())
1276 {
1277 ml->addListReferences(this);
1278 }
1279 }
1280}

References addRefItem, displayName, DefinitionMixin< NamespaceDefMutable >::getLanguage, getOutputFileBase, m_memberGroups, m_memberLists, DefinitionMixin< NamespaceDefMutable >::qualifiedName, theTranslator, TRUE and DefinitionMixin< NamespaceDefMutable >::xrefListItems.

addMembersToMemberGroup()

void NamespaceDefImpl::addMembersToMemberGroup ()
virtual

Definition at line 98 of file namespacedef.cpp.

445{
446 for (auto &ml : m_memberLists)
447 {
448 if (ml->listType().isDeclaration())
449 {
451 }
452 }
453
454 // add members inside sections to their groups
455 for (const auto &mg : m_memberGroups)
456 {
457 if (mg->allMembersInSameSection() && m_subGrouping)
458 {
459 //printf("----> addToDeclarationSection(%s)\n",qPrint(mg->header()));
460 mg->addToDeclarationSection();
461 }
462 }
463}

References addMembersToMemberGroup, m_memberGroups, m_memberLists and m_subGrouping.

Referenced by addMembersToMemberGroup.

addUsingDeclaration()

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

Definition at line 85 of file namespacedef.cpp.

References m_usingDeclList and Definition::qualifiedName.

Referenced by combineUsingRelations.

addUsingDirective()

void NamespaceDefImpl::addUsingDirective (NamespaceDef * nd)
virtual

Definition at line 83 of file namespacedef.cpp.

1221{
1222 m_usingDirList.add(nd->qualifiedName(),nd);
1223 //printf("%s: NamespaceDefImpl::addUsingDirective: %s:%zu\n",qPrint(name()),qPrint(nd->qualifiedName()),m_usingDirList.size());
1224}

References m_usingDirList and Definition::qualifiedName.

Referenced by combineUsingRelations.

anchor()

QCString NamespaceDefImpl::anchor ()
inline virtual

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

Definition at line 70 of file namespacedef.cpp.

70 QCString anchor() const override { return QCString(); }

codeSymbolType()

CodeSymbolType NamespaceDefImpl::codeSymbolType ()
inline virtual

Used for syntax highlighting symbol class

Definition at line 67 of file namespacedef.cpp.

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

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

combineUsingRelations()

void NamespaceDefImpl::combineUsingRelations (NamespaceDefSet & visitedNamespace)
virtual

Definition at line 87 of file namespacedef.cpp.

1288{
1289 if (visitedNamespaces.find(this)!=visitedNamespaces.end()) return; // already processed
1290 visitedNamespaces.insert(this);
1291
1293 for (auto &nd : usingDirList)
1294 {
1296 if (ndm)
1297 {
1298 ndm->combineUsingRelations(visitedNamespaces);
1299 }
1300 }
1301
1302 for (auto &nd : usingDirList)
1303 {
1304 // add used namespaces of namespace nd to this namespace
1305 for (const auto &und : nd->getUsedNamespaces())
1306 {
1308 }
1309 // add used classes of namespace nd to this namespace
1310 for (const auto &ud : nd->getUsedDefinitions())
1311 {
1313 }
1314 }
1315}

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

compoundTypeString()

QCString NamespaceDefImpl::compoundTypeString ()
virtual

Definition at line 120 of file namespacedef.cpp.

1597{
1598 SrcLangExt lang = getLanguage();
1599 if (lang==SrcLangExt::Java)
1600 {
1601 return "package";
1602 }
1603 else if(lang==SrcLangExt::CSharp)
1604 {
1605 return "namespace";
1606 }
1607 else if (lang==SrcLangExt::Fortran)
1608 {
1609 return "module";
1610 }
1611 else if (lang==SrcLangExt::IDL)
1612 {
1613 if (isModule())
1614 {
1615 return "module";
1616 }
1617 else if (isConstantGroup())
1618 {
1619 return "constants";
1620 }
1621 else if (isLibrary())
1622 {
1623 return "library";
1624 }
1625 else
1626 {
1627 err_full(getDefFileName(),getDefLine(),"Internal inconsistency: namespace in IDL not module, library or constant group");
1628 }
1629 }
1630 return "namespace";
1631}

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

computeAnchors()

void NamespaceDefImpl::computeAnchors ()
virtual

Definition at line 80 of file namespacedef.cpp.

590{
591 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
592 if (allMemberList) allMemberList->setAnchors();
593}

References getMemberList and MemberList::setAnchors.

countMembers()

void NamespaceDefImpl::countMembers ()
virtual

Definition at line 81 of file namespacedef.cpp.

1201{
1202 for (auto &ml : m_memberLists)
1203 {
1204 ml->countDecMembers();
1205 ml->countDocMembers();
1206 }
1207 for (const auto &mg : m_memberGroups)
1208 {
1209 mg->countDecMembers();
1210 mg->countDocMembers();
1211 }
1212}

References m_memberGroups and m_memberLists.

countVisibleMembers()

int NamespaceDefImpl::countVisibleMembers ()
virtual

Definition at line 123 of file namespacedef.cpp.

1318{
1319 int count=0;
1320 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1321 {
1322 if (lde->kind()==LayoutDocEntry::MemberDef)
1323 {
1324 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1325 if (lmd)
1326 {
1327 MemberList *ml = getMemberList(lmd->type);
1328 if (ml)
1329 {
1330 for (const auto &md : *ml)
1331 {
1332 if (md->visibleInIndex())
1333 {
1334 count++;
1335 }
1336 }
1337 }
1338 }
1339 }
1340 }
1341 return count;
1342}

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

definitionType()

DefType NamespaceDefImpl::definitionType ()
inline virtual

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

Definition at line 66 of file namespacedef.cpp.

66 DefType definitionType() const override { return TypeNamespace; }

References definitionType and Definition::TypeNamespace.

Referenced by definitionType.

displayName()

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

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

Definition at line 88 of file namespacedef.cpp.

1283{
1284 return makeDisplayName(this,includeScope);
1285}

Reference makeDisplayName.

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

distributeMemberGroupDocumentation()

void NamespaceDefImpl::distributeMemberGroupDocumentation ()
virtual

Definition at line 99 of file namespacedef.cpp.

357{
358 for (const auto &mg : m_memberGroups)
359 {
360 mg->distributeMemberGroupDocumentation();
361 }
362}

Reference m_memberGroups.

findInnerCompound()

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

Definition at line 102 of file namespacedef.cpp.

1237{
1238 if (n==nullptr) return nullptr;
1239 const Definition *d = m_innerCompounds.find(n);
1240 if (d==nullptr)
1241 {
1242 if (!m_usingDirList.empty())
1243 {
1244 d = m_usingDirList.find(n);
1245 }
1246 if (d==nullptr && !m_usingDeclList.empty())
1247 {
1248 d = m_usingDeclList.find(n);
1249 }
1250 }
1251 return d;
1252}

References m_innerCompounds, m_usingDeclList and m_usingDirList.

findSectionsInDocumentation()

void NamespaceDefImpl::findSectionsInDocumentation ()
virtual

Definition at line 100 of file namespacedef.cpp.

365{
369 for (const auto &mg : m_memberGroups)
370 {
371 mg->findSectionsInDocumentation(this);
372 }
373 for (auto &ml : m_memberLists)
374 {
375 if (ml->listType().isDeclaration())
376 {
377 ml->findSectionsInDocumentation(this);
378 }
379 }
380}

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

getClasses()

ClassLinkedRefMap NamespaceDefImpl::getClasses ()
inline virtual

Returns the classes contained in this namespace

Definition at line 111 of file namespacedef.cpp.

111 ClassLinkedRefMap getClasses() const override { return classes; }

Reference classes.

getConcepts()

ConceptLinkedRefMap NamespaceDefImpl::getConcepts ()
inline virtual

Returns the concepts contained in this namespace

Definition at line 116 of file namespacedef.cpp.

116 ConceptLinkedRefMap getConcepts() const override { return m_concepts; }

Reference m_concepts.

getExceptions()

ClassLinkedRefMap NamespaceDefImpl::getExceptions ()
inline virtual

Returns the Slice exceptions contained in this namespace

Definition at line 114 of file namespacedef.cpp.

114 ClassLinkedRefMap getExceptions() const override { return exceptions; }

Reference exceptions.

getInterfaces()

ClassLinkedRefMap NamespaceDefImpl::getInterfaces ()
inline virtual

Returns the Slice interfaces contained in this namespace

Definition at line 112 of file namespacedef.cpp.

112 ClassLinkedRefMap getInterfaces() const override { return interfaces; }

Reference interfaces.

getMemberByName()

const MemberDef * NamespaceDefImpl::getMemberByName (const QCString & n)
virtual

Definition at line 109 of file namespacedef.cpp.

1555{
1556 return m_allMembers.find(n);
1557}

Reference m_allMembers.

getMemberGroups()

const MemberGroupList & NamespaceDefImpl::getMemberGroups ()
inline virtual

Returns the user defined member groups

Definition at line 110 of file namespacedef.cpp.

110 const MemberGroupList &getMemberGroups() const override { return m_memberGroups; }

Reference m_memberGroups.

getMemberList()

MemberList * NamespaceDefImpl::getMemberList (MemberListType lt)
virtual

Definition at line 107 of file namespacedef.cpp.

1478{
1479 for (auto &ml : m_memberLists)
1480 {
1481 if (ml->listType()==lt)
1482 {
1483 return ml.get();
1484 }
1485 }
1486 return nullptr;
1487}

Reference m_memberLists.

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

getMemberLists()

const MemberLists & NamespaceDefImpl::getMemberLists ()
inline virtual

Definition at line 108 of file namespacedef.cpp.

108 const MemberLists &getMemberLists() const override { return m_memberLists; }

Reference m_memberLists.

getNamespaces()

NamespaceLinkedRefMap NamespaceDefImpl::getNamespaces ()
inline virtual

Returns the namespaces contained in this namespace

Definition at line 115 of file namespacedef.cpp.

115 NamespaceLinkedRefMap getNamespaces() const override { return namespaces; }

Reference namespaces.

getOutputFileBase()

QCString NamespaceDefImpl::getOutputFileBase ()
virtual

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

Definition at line 69 of file namespacedef.cpp.

1232{
1233 return fileName;
1234}

Reference fileName.

Referenced by addListReferences, writeBriefDescription, writeDocumentation and writeTagFile.

getStructs()

ClassLinkedRefMap NamespaceDefImpl::getStructs ()
inline virtual

Returns the Slice structs contained in this namespace

Definition at line 113 of file namespacedef.cpp.

113 ClassLinkedRefMap getStructs() const override { return structs; }

Reference structs.

getUsedDefinitions()

const LinkedRefMap< const Definition > & NamespaceDefImpl::getUsedDefinitions ()
inline virtual

Definition at line 86 of file namespacedef.cpp.

Reference m_usingDeclList.

getUsedNamespaces()

const LinkedRefMap< NamespaceDef > & NamespaceDefImpl::getUsedNamespaces ()
inline virtual

Definition at line 84 of file namespacedef.cpp.

Reference m_usingDirList.

hasDetailedDescription()

bool NamespaceDefImpl::hasDetailedDescription ()
virtual

Definition at line 97 of file namespacedef.cpp.

596{
597 bool repeatBrief = Config_getBool(REPEAT_BRIEF);
598 return ((!briefDescription().isEmpty() && repeatBrief) ||
599 !documentation().isEmpty());
600}

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

Referenced by writeBriefDescription and writeDetailedDescription.

insertClass()

void NamespaceDefImpl::insertClass (ClassDef * cd)
virtual

Definition at line 76 of file namespacedef.cpp.

411{
413
414 if (Config_getBool(OPTIMIZE_OUTPUT_SLICE))
415 {
417 {
418 d = &interfaces;
419 }
420 else if (cd->compoundType()==ClassDef::Struct)
421 {
422 d = &structs;
423 }
424 else if (cd->compoundType()==ClassDef::Exception)
425 {
426 d = &exceptions;
427 }
428 }
429
430 d->add(cd->name(),cd);
431}

References LinkedRefMap< T, Hash, KeyEqual, Map >::add, classes, ClassDef::compoundType, Config_getBool, ClassDef::Exception, exceptions, ClassDef::Interface, interfaces, Definition::name, ClassDef::Struct and structs.

Referenced by addInnerCompound.

insertConcept()

void NamespaceDefImpl::insertConcept (ConceptDef * cd)
virtual

Definition at line 77 of file namespacedef.cpp.

434{
435 m_concepts.add(cd->name(),cd);
436}

References m_concepts and Definition::name.

Referenced by addInnerCompound.

insertMember()

void NamespaceDefImpl::insertMember (MemberDef * md)
virtual

Definition at line 79 of file namespacedef.cpp.

466{
467 //printf("%s::insertMember(%s) isInline=%d hasDocs=%d\n",qPrint(name()),qPrint(md->name()),
468 // isInline(),hasDocumentation());
469 if (md->isHidden()) return;
471
472 // if this is an inline namespace that is not documented, then insert the
473 // member in the parent scope instead
474 if (isInline() && !hasDocumentation())
475 {
476 Definition *outerScope = getOuterScope();
477 if (outerScope)
478 {
480 {
482 if (nd && nd!=Doxygen::globalScope)
483 {
484 nd->insertMember(md);
485 if (mdm)
486 {
487 mdm->setNamespace(nd);
488 }
489 }
490 }
491 else if (outerScope->definitionType()==Definition::TypeFile)
492 {
493 FileDef *fd = toFileDef(outerScope);
494 fd->insertMember(md);
495 if (mdm)
496 {
497 mdm->setFileDef(fd);
498 mdm->setOuterScope(fd);
499 }
500 }
501 }
502 }
503 else // member is a non-inline namespace or a documented inline namespace
504 {
505 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
506 if (allMemberList==nullptr)
507 {
508 m_memberLists.emplace_back(std::make_unique<MemberList>(MemberListType::AllMembersList(),MemberListContainer::Namespace));
509 allMemberList = m_memberLists.back().get();
510 }
511 allMemberList->push_back(md);
512 //printf("%s::m_allMembersDict->append(%s)\n",qPrint(name()),qPrint(md->localName()));
513 m_allMembers.add(md->localName(),md);
514 switch(md->memberType())
515 {
517 addMemberToList(MemberListType::DecVarMembers(),md);
518 addMemberToList(MemberListType::DocVarMembers(),md);
519 break;
521 addMemberToList(MemberListType::DecFuncMembers(),md);
522 addMemberToList(MemberListType::DocFuncMembers(),md);
523 break;
525 addMemberToList(MemberListType::DecTypedefMembers(),md);
526 addMemberToList(MemberListType::DocTypedefMembers(),md);
527 break;
529 addMemberToList(MemberListType::DecSequenceMembers(),md);
530 addMemberToList(MemberListType::DocSequenceMembers(),md);
531 break;
533 addMemberToList(MemberListType::DecDictionaryMembers(),md);
534 addMemberToList(MemberListType::DocDictionaryMembers(),md);
535 break;
537 addMemberToList(MemberListType::DecEnumMembers(),md);
538 addMemberToList(MemberListType::DocEnumMembers(),md);
539 break;
541 break;
543 addMemberToList(MemberListType::DecDefineMembers(),md);
544 addMemberToList(MemberListType::DocDefineMembers(),md);
545 break;
547 if (md->getLanguage() == SrcLangExt::Python)
548 {
549 addMemberToList(MemberListType::PropertyMembers(),md);
550 addMemberToList(MemberListType::Properties(),md);
551 break;
552 }
553 // fallthrough, explicitly no break here
554 default:
555 err("NamespaceDefImpl::insertMembers(): "
556 "member '{}' with unexpected type '{}' and class scope '{}' inserted in namespace scope '{}'!\n",
557 md->name(), md->memberTypeName(), md->getClassDef() ? md->getClassDef()->name() : "", name());
558 }
559 // if this is an inline namespace, then insert an alias of this member in the outer scope.
560 if (isInline())
561 {
562 Definition *outerScope = getOuterScope();
563 if (outerScope)
564 {
565 std::unique_ptr<MemberDef> aliasMd = createMemberDefAlias(outerScope,md);
567 {
569 if (ndm)
570 {
571 ndm->insertMember(aliasMd.get());
572 }
573 }
574 else if (outerScope->definitionType()==Definition::TypeFile)
575 {
576 toFileDef(outerScope)->insertMember(aliasMd.get());
577 }
578 if (aliasMd)
579 {
580 QCString name = md->name();
582 mn->push_back(std::move(aliasMd));
583 }
584 }
585 }
586 }
587}

References addMemberToList, createMemberDefAlias, Define, Definition::definitionType, Dictionary, Enumeration, EnumValue, err, Function, Doxygen::functionNameLinkedMap, 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, Property, MemberName::push_back, MemberVector::push_back, Sequence, MemberDefMutable::setFileDef, MemberDefMutable::setNamespace, DefinitionMutable::setOuterScope, toFileDef, toMemberDefMutable, toNamespaceDefMutable, Typedef, Definition::TypeFile, Definition::TypeNamespace and Variable.

insertNamespace()

void NamespaceDefImpl::insertNamespace (NamespaceDef * nd)
virtual

Definition at line 78 of file namespacedef.cpp.

439{
440 namespaces.add(nd->name(),nd);
441}

References Definition::name and namespaces.

Referenced by addInnerCompound.

insertUsedFile()

void NamespaceDefImpl::insertUsedFile (FileDef * fd)
virtual

Definition at line 71 of file namespacedef.cpp.

383{
384 if (fd==nullptr) return;
385 auto it = std::find(files.begin(),files.end(),fd);
386 if (it==files.end())
387 {
388 files.push_back(fd);
389 }
390}

Reference files.

isConstantGroup()

bool NamespaceDefImpl::isConstantGroup ()
inline virtual

Definition at line 90 of file namespacedef.cpp.

90 bool isConstantGroup() const override { return CONSTANT_GROUP == m_type; }

References CONSTANT_GROUP and m_type.

Referenced by addNamespaceAttributes, compoundTypeString, title and writeNamespaceDeclarations.

isInline()

bool NamespaceDefImpl::isInline ()
inline virtual

Definition at line 93 of file namespacedef.cpp.

93 bool isInline() const override { return m_inline; }

Reference m_inline.

Referenced by insertMember and setInline.

isLibrary()

bool NamespaceDefImpl::isLibrary ()
inline virtual

Definition at line 92 of file namespacedef.cpp.

92 bool isLibrary() const override { return LIBRARY == m_type; }

References LIBRARY and m_type.

Referenced by compoundTypeString.

isLinkable()

bool NamespaceDefImpl::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 95 of file namespacedef.cpp.

1550{
1551 return isLinkableInProject() || isReference();
1552}

References isLinkableInProject and DefinitionMixin< NamespaceDefMutable >::isReference.

Referenced by isVisibleInHierarchy.

isLinkableInProject()

bool NamespaceDefImpl::isLinkableInProject ()
virtual

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

Definition at line 94 of file namespacedef.cpp.

1531{
1532 int i = name().findRev("::");
1533 if (i==-1) i=0; else i+=2;
1534 bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
1535 bool hideUndoc = Config_getBool(HIDE_UNDOC_NAMESPACES);
1536 if (extractAnonNs && // extract anonymous ns
1537 name().mid(i,20)=="anonymous_namespace{" // correct prefix
1538 ) // not disabled by config
1539 {
1540 return TRUE;
1541 }
1542 return !name().isEmpty() && name().at(i)!='@' && // not anonymous
1543 (hasDocumentation() || !hideUndoc || getLanguage()==SrcLangExt::CSharp) && // documented
1544 !isReference() && // not an external reference
1545 !isHidden() && // not hidden
1546 !isArtificial(); // or artificial
1547}

References QCString::at, Config_getBool, QCString::findRev, DefinitionMixin< NamespaceDefMutable >::getLanguage, DefinitionMixin< NamespaceDefMutable >::hasDocumentation, DefinitionMixin< NamespaceDefMutable >::isArtificial, QCString::isEmpty, DefinitionMixin< NamespaceDefMutable >::isHidden, DefinitionMixin< NamespaceDefMutable >::isReference, DefinitionMixin< NamespaceDefMutable >::name and TRUE.

Referenced by isLinkable.

isModule()

bool NamespaceDefImpl::isModule ()
inline virtual

Definition at line 91 of file namespacedef.cpp.

91 bool isModule() const override { return NAMESPACE == m_type || MODULE == m_type; }

References m_type, MODULE and NAMESPACE.

Referenced by compoundTypeString.

isVisibleInHierarchy()

bool NamespaceDefImpl::isVisibleInHierarchy ()
virtual

Definition at line 96 of file namespacedef.cpp.

1525{
1526 bool allExternals = Config_getBool(ALLEXTERNALS);
1527 return allExternals || hasNonReferenceNestedNamespaceRec(this,0) || isLinkable();
1528}

References Config_getBool, hasNonReferenceNestedNamespaceRec and isLinkable.

numDocMembers()

int NamespaceDefImpl::numDocMembers ()
virtual

Definition at line 82 of file namespacedef.cpp.

1215{
1216 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1217 return (allMemberList ? allMemberList->numDocMembers() : 0) + static_cast<int>(m_innerCompounds.size());
1218}

References getMemberList, m_innerCompounds and MemberList::numDocMembers.

setFileName()

void NamespaceDefImpl::setFileName (const QCString & fn)
virtual

Definition at line 105 of file namespacedef.cpp.

352{
354}

Reference setFileNameLocal.

setInline()

void NamespaceDefImpl::setInline (bool isInline)
inline virtual

Definition at line 89 of file namespacedef.cpp.

89 void setInline(bool isInline) override { m_inline = isInline; }

References isInline and m_inline.

setMetaData()

void NamespaceDefImpl::setMetaData (const QCString & m)
virtual

Definition at line 122 of file namespacedef.cpp.

1634{
1635 metaData = m;
1636}

Reference metaData.

setName()

void NamespaceDefImpl::setName (const QCString & name)
virtual

sortMemberLists()

void NamespaceDefImpl::sortMemberLists ()
virtual

Definition at line 101 of file namespacedef.cpp.

1450{
1451 for (auto &ml : m_memberLists)
1452 {
1453 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
1454 }
1455
1456 auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2)
1457 {
1458 return Config_getBool(SORT_BY_SCOPE_NAME) ?
1459 qstricmp_sort(c1->name(), c2->name())<0 :
1460 qstricmp_sort(c1->className(), c2->className())<0;
1461 };
1462
1463 std::stable_sort(classes.begin(), classes.end(), classComp);
1464 std::stable_sort(interfaces.begin(),interfaces.end(),classComp);
1465 std::stable_sort(structs.begin(), structs.end(), classComp);
1466 std::stable_sort(exceptions.begin(),exceptions.end(),classComp);
1467
1468
1469 auto namespaceComp = [](const NamespaceLinkedRefMap::Ptr &n1,const NamespaceLinkedRefMap::Ptr &n2)
1470 {
1471 return qstricmp_sort(n1->name(),n2->name())<0;
1472 };
1473
1474 std::stable_sort(namespaces.begin(),namespaces.end(),namespaceComp);
1475}

References classes, ClassDef::className, Config_getBool, exceptions, FALSE, interfaces, m_memberLists, Definition::name, namespaces, qstricmp_sort and structs.

subGrouping()

bool NamespaceDefImpl::subGrouping ()
inline virtual

Definition at line 106 of file namespacedef.cpp.

106 bool subGrouping() const override { return m_subGrouping; }

Reference m_subGrouping.

title()

QCString NamespaceDefImpl::title ()
virtual

Definition at line 119 of file namespacedef.cpp.

1560{
1561 QCString pageTitle;
1562 SrcLangExt lang = getLanguage();
1563
1564 auto getReferenceTitle = [this](std::function<QCString()> translateFunc) -> QCString
1565 {
1566 return Config_getBool(HIDE_COMPOUND_REFERENCE) ? displayName() : translateFunc();
1567 };
1568
1569 if (lang==SrcLangExt::Java)
1570 {
1571 pageTitle = theTranslator->trPackage(displayName());
1572 }
1573 else if (lang==SrcLangExt::Fortran || lang==SrcLangExt::Slice)
1574 {
1575 pageTitle = getReferenceTitle([this](){
1576 return theTranslator->trModuleReference(displayName());
1577 });
1578 }
1579 else if (lang==SrcLangExt::IDL)
1580 {
1581 pageTitle = getReferenceTitle([this](){
1582 return isConstantGroup()
1583 ? theTranslator->trConstantGroupReference(displayName())
1584 : theTranslator->trModuleReference(displayName());
1585 });
1586 }
1587 else
1588 {
1589 pageTitle = getReferenceTitle([this](){
1590 return theTranslator->trNamespaceReference(displayName());
1591 });
1592 }
1593 return pageTitle;
1594}

References Config_getBool, displayName, DefinitionMixin< NamespaceDefMutable >::getLanguage, isConstantGroup and theTranslator.

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

writeDocumentation()

void NamespaceDefImpl::writeDocumentation (OutputList & ol)
virtual

Definition at line 72 of file namespacedef.cpp.

977{
978 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
979 //bool outputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
980 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
981
982 QCString pageTitle = title();
983 startFile(ol,getOutputFileBase(),name(),pageTitle,HighlightedItem::NamespaceVisible,!generateTreeView);
984
985 if (!generateTreeView)
986 {
988 {
990 }
991 ol.endQuickIndices();
992 }
993
995 ol.parseText(pageTitle);
996 addGroupListToTitle(ol,this);
999 ol.startContents();
1000
1001 //---------------------------------------- start flexible part -------------------------------
1002
1003 SrcLangExt lang = getLanguage();
1004 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1005 {
1006 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
1007 switch (lde->kind())
1008 {
1009 case LayoutDocEntry::BriefDesc:
1011 break;
1012 case LayoutDocEntry::MemberDeclStart:
1014 break;
1015 case LayoutDocEntry::NamespaceClasses:
1016 {
1017 if (ls) writeClassDeclarations(ol,ls->title(lang),classes);
1018 }
1019 break;
1020 case LayoutDocEntry::NamespaceInterfaces:
1021 {
1022 if (ls) writeClassDeclarations(ol,ls->title(lang),interfaces);
1023 }
1024 break;
1025 case LayoutDocEntry::NamespaceStructs:
1026 {
1027 if (ls) writeClassDeclarations(ol,ls->title(lang),structs);
1028 }
1029 break;
1030 case LayoutDocEntry::NamespaceExceptions:
1031 {
1032 if (ls) writeClassDeclarations(ol,ls->title(lang),exceptions);
1033 }
1034 break;
1035 case LayoutDocEntry::NamespaceConcepts:
1036 {
1037 if (ls) writeConcepts(ol,ls->title(lang));
1038 }
1039 break;
1040 case LayoutDocEntry::NamespaceNestedNamespaces:
1041 {
1042 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),false);
1043 }
1044 break;
1045 case LayoutDocEntry::NamespaceNestedConstantGroups:
1046 {
1047 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),true);
1048 }
1049 break;
1050 case LayoutDocEntry::MemberGroups:
1052 break;
1053 case LayoutDocEntry::MemberDecl:
1054 {
1055 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1056 if (lmd) writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
1057 }
1058 break;
1059 case LayoutDocEntry::MemberDeclEnd:
1061 break;
1062 case LayoutDocEntry::DetailedDesc:
1063 {
1064 if (ls) writeDetailedDescription(ol,ls->title(lang));
1065 }
1066 break;
1067 case LayoutDocEntry::MemberDefStart:
1069 break;
1070 case LayoutDocEntry::NamespaceInlineClasses:
1072 break;
1073 case LayoutDocEntry::MemberDef:
1074 {
1075 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1076 if (lmd) writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
1077 }
1078 break;
1079 case LayoutDocEntry::MemberDefEnd:
1081 break;
1082 case LayoutDocEntry::AuthorSection:
1084 break;
1085 case LayoutDocEntry::ClassIncludes:
1086 case LayoutDocEntry::ClassInheritanceGraph:
1087 case LayoutDocEntry::ClassNestedClasses:
1088 case LayoutDocEntry::ClassCollaborationGraph:
1089 case LayoutDocEntry::ClassAllMembersLink:
1090 case LayoutDocEntry::ClassUsedFiles:
1091 case LayoutDocEntry::ClassInlineClasses:
1092 case LayoutDocEntry::ConceptDefinition:
1093 case LayoutDocEntry::FileClasses:
1094 case LayoutDocEntry::FileConcepts:
1095 case LayoutDocEntry::FileInterfaces:
1096 case LayoutDocEntry::FileStructs:
1097 case LayoutDocEntry::FileExceptions:
1098 case LayoutDocEntry::FileNamespaces:
1099 case LayoutDocEntry::FileConstantGroups:
1100 case LayoutDocEntry::FileIncludes:
1101 case LayoutDocEntry::FileIncludeGraph:
1102 case LayoutDocEntry::FileIncludedByGraph:
1103 case LayoutDocEntry::FileSourceLink:
1104 case LayoutDocEntry::FileInlineClasses:
1105 case LayoutDocEntry::GroupClasses:
1106 case LayoutDocEntry::GroupConcepts:
1107 case LayoutDocEntry::GroupModules:
1108 case LayoutDocEntry::GroupInlineClasses:
1109 case LayoutDocEntry::GroupNamespaces:
1110 case LayoutDocEntry::GroupDirs:
1111 case LayoutDocEntry::GroupNestedGroups:
1112 case LayoutDocEntry::GroupFiles:
1113 case LayoutDocEntry::GroupGraph:
1114 case LayoutDocEntry::GroupPageDocs:
1115 case LayoutDocEntry::ModuleExports:
1116 case LayoutDocEntry::ModuleClasses:
1117 case LayoutDocEntry::ModuleConcepts:
1118 case LayoutDocEntry::ModuleUsedFiles:
1119 case LayoutDocEntry::DirSubDirs:
1120 case LayoutDocEntry::DirFiles:
1121 case LayoutDocEntry::DirGraph:
1122 err("Internal inconsistency: member '{}' should not be part of "
1123 "LayoutDocManager::Namespace entry list\n",lde->entryToString());
1124 break;
1125 }
1126 }
1127
1128 //---------------------------------------- end flexible part -------------------------------
1129
1130 ol.endContents();
1131
1132 endFileWithNavPath(ol,this);
1133
1134 if (Config_getBool(SEPARATE_MEMBER_PAGES))
1135 {
1136 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1137 if (allMemberList) allMemberList->sort();
1139 }
1140}

References addGroupListToTitle, addNamespaceAttributes, classes, Config_getBool, displayName, OutputList::endContents, endFileWithNavPath, endMemberDeclarations, endMemberDocumentation, OutputList::endQuickIndices, endTitle, err, exceptions, DefinitionMixin< NamespaceDefMutable >::getLanguage, getMemberList, DefinitionMixin< NamespaceDefMutable >::getOuterScope, getOutputFileBase, Doxygen::globalScope, LayoutDocManager::instance, interfaces, DefinitionMixin< NamespaceDefMutable >::name, NamespaceVisible, OutputList::parseText, MemberVector::sort, OutputList::startContents, startFile, startMemberDeclarations, startMemberDocumentation, startTitle, structs, 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.

writeMemberPages()

void NamespaceDefImpl::writeMemberPages (OutputList & ol)
virtual

Definition at line 73 of file namespacedef.cpp.

1143{
1146
1147 for (const auto &ml : m_memberLists)
1148 {
1149 if (ml->listType().isDocumentation())
1150 {
1151 ml->writeDocumentationPage(ol,displayName(),this);
1152 }
1153 }
1155}

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

Referenced by writeDocumentation.

writePageNavigation()

void NamespaceDefImpl::writePageNavigation (OutputList & ol)
virtual

Definition at line 125 of file namespacedef.cpp.

Reference OutputList::writePageOutline.

writeQuickMemberLinks()

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

Definition at line 74 of file namespacedef.cpp.

1158{
1159 bool createSubDirs=Config_getBool(CREATE_SUBDIRS);
1160
1161 ol.writeString(" <div class=\"navtab\">\n");
1162 ol.writeString(" <table>\n");
1163
1164 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1165 if (allMemberList)
1166 {
1167 for (const auto &md : *allMemberList)
1168 {
1169 if (md->getNamespaceDef()==this && md->isLinkable() && !md->isEnumValue())
1170 {
1171 if (md->isLinkableInProject())
1172 {
1173 QCString fn = md->getOutputFileBase();
1175 if (md==currentMd) // selected item => highlight
1176 {
1177 ol.writeString(" <tr><td class=\"navtabHL\">");
1178 }
1179 else
1180 {
1181 ol.writeString(" <tr><td class=\"navtab\">");
1182 }
1183 ol.writeString("<span class=\"label\"><a ");
1184 ol.writeString("href=\"");
1185 if (createSubDirs) ol.writeString("../../");
1186 ol.writeString(fn+"#"+md->anchor());
1187 ol.writeString("\">");
1188 ol.writeString(convertToHtml(md->localName()));
1189 ol.writeString("</a></span>");
1190 ol.writeString("</td></tr>\n");
1191 }
1192 }
1193 }
1194 }
1195
1196 ol.writeString(" </table>\n");
1197 ol.writeString(" </div>\n");
1198}

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

writeSummaryLinks()

void NamespaceDefImpl::writeSummaryLinks (OutputList & ol)
virtual

Definition at line 124 of file namespacedef.cpp.

854{
857 bool first=TRUE;
858 SrcLangExt lang = getLanguage();
859 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
860 {
861 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
862 if (lde->kind()==LayoutDocEntry::NamespaceClasses && classes.declVisible() && ls)
863 {
864 QCString label = "nested-classes";
865 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
866 first=FALSE;
867 }
868 else if (lde->kind()==LayoutDocEntry::NamespaceInterfaces && interfaces.declVisible() && ls)
869 {
870 QCString label = "interfaces";
871 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
872 first=FALSE;
873 }
874 else if (lde->kind()==LayoutDocEntry::NamespaceStructs && structs.declVisible() && ls)
875 {
876 QCString label = "structs";
877 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
878 first=FALSE;
879 }
880 else if (lde->kind()==LayoutDocEntry::NamespaceExceptions && exceptions.declVisible() && ls)
881 {
882 QCString label = "exceptions";
883 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
884 first=FALSE;
885 }
886 else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && namespaces.declVisible(false) && ls)
887 {
888 QCString label = "namespaces";
889 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
890 first=FALSE;
891 }
892 else if (lde->kind()==LayoutDocEntry::NamespaceNestedConstantGroups && namespaces.declVisible(true) && ls)
893 {
894 QCString label = "constantgroups";
895 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
896 first=FALSE;
897 }
898 else if (lde->kind()==LayoutDocEntry::NamespaceConcepts && m_concepts.declVisible() && ls)
899 {
900 QCString label = "concepts";
901 ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
902 first=FALSE;
903 }
904 else if (lde->kind()== LayoutDocEntry::MemberDecl)
905 {
906 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
907 if (lmd)
908 {
909 MemberList * ml = getMemberList(lmd->type);
910 if (ml && ml->declVisible())
911 {
912 ol.writeSummaryLink(QCString(),ml->listType().toLabel(),lmd->title(lang),first);
913 first=FALSE;
914 }
915 }
916 }
917 }
918 if (!first)
919 {
920 ol.writeString(" </div>\n");
921 }
923}

References classes, MemberList::declVisible, OutputList::disableAllBut, exceptions, FALSE, DefinitionMixin< NamespaceDefMutable >::getLanguage, getMemberList, Html, LayoutDocManager::instance, interfaces, MemberList::listType, m_concepts, namespaces, OutputList::popGeneratorState, OutputList::pushGeneratorState, structs, LayoutDocEntryMemberDecl::title, LayoutDocEntrySection::title, MemberListType::toLabel, TRUE, LayoutDocEntryMemberDecl::type, OutputList::writeString and OutputList::writeSummaryLink.

writeTagFile()

void NamespaceDefImpl::writeTagFile (TextStream & tagFile)
virtual

Definition at line 75 of file namespacedef.cpp.

603{
606 tagFile << " <compound kind=\"namespace\">\n";
607 tagFile << " <name>" << convertToXML(name()) << "</name>\n";
608 tagFile << " <filename>" << fn << "</filename>\n";
609 QCString idStr = id();
610 if (!idStr.isEmpty())
611 {
612 tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
613 }
614 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
615 {
616 switch (lde->kind())
617 {
618 case LayoutDocEntry::NamespaceNestedNamespaces:
619 {
620 for (const auto &nd : namespaces)
621 {
622 if (nd->isLinkableInProject())
623 {
624 tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>\n";
625 }
626 }
627 }
628 break;
629 case LayoutDocEntry::NamespaceClasses:
630 {
632 }
633 break;
634 case LayoutDocEntry::NamespaceInterfaces:
635 {
637 }
638 break;
639 case LayoutDocEntry::NamespaceStructs:
640 {
642 }
643 break;
644 case LayoutDocEntry::NamespaceExceptions:
645 {
647 }
648 break;
649 case LayoutDocEntry::NamespaceConcepts:
650 {
652 }
653 break;
654 case LayoutDocEntry::MemberDecl:
655 {
656 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
657 if (lmd)
658 {
659 MemberList * ml = getMemberList(lmd->type);
660 if (ml)
661 {
662 ml->writeTagFile(tagFile);
663 }
664 }
665 }
666 break;
667 case LayoutDocEntry::MemberGroups:
668 {
669 for (const auto &mg : m_memberGroups)
670 {
671 mg->writeTagFile(tagFile);
672 }
673 }
674 break;
675 default:
676 break;
677 }
678 }
680 tagFile << " </compound>\n";
681}

References addHtmlExtensionIfMissing, classes, convertToXML, exceptions, getMemberList, getOutputFileBase, DefinitionMixin< NamespaceDefMutable >::id, LayoutDocManager::instance, interfaces, QCString::isEmpty, m_memberGroups, DefinitionMixin< NamespaceDefMutable >::name, namespaces, structs, LayoutDocEntryMemberDecl::type, writeClassesToTagFile, writeConceptsToTagFile, DefinitionMixin< NamespaceDefMutable >::writeDocAnchorsToTagFile and MemberList::writeTagFile.

Private Member Functions

addMemberToList()

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

Definition at line 128 of file namespacedef.cpp.

1430{
1431 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
1432 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
1433 const auto &ml = m_memberLists.get(lt,MemberListContainer::Namespace);
1434 ml->setNeedsSorting(
1435 (ml->listType().isDeclaration() && sortBriefDocs) ||
1436 (ml->listType().isDocumentation() && sortMemberDocs));
1437 ml->push_back(md);
1438
1439 if (ml->listType().isDeclaration())
1440 {
1442 if (mdm)
1443 {
1444 mdm->setSectionList(this,ml.get());
1445 }
1446 }
1447}

References Config_getBool, m_memberLists, Namespace, MemberDefMutable::setSectionList and toMemberDefMutable.

Referenced by insertMember.

addNamespaceAttributes()

void NamespaceDefImpl::addNamespaceAttributes (OutputList & ol)

endMemberDeclarations()

void NamespaceDefImpl::endMemberDeclarations (OutputList & ol)

Definition at line 134 of file namespacedef.cpp.

Reference OutputList::endMemberSections.

Referenced by writeDocumentation.

endMemberDocumentation()

void NamespaceDefImpl::endMemberDocumentation (OutputList & ol)

Definition at line 141 of file namespacedef.cpp.

800{
801 if (Config_getBool(SEPARATE_MEMBER_PAGES))
802 {
805 }
806}

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

Referenced by writeDocumentation.

setFileNameLocal()

void NamespaceDefImpl::setFileNameLocal (const QCString & fn)

Definition at line 145 of file namespacedef.cpp.

340{
341 if (isReference())
342 {
343 fileName = "namespace"+fn;
344 }
345 else
346 {
347 fileName = convertNameToFile("namespace"+fn);
348 }
349}

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

Referenced by setFileName.

startMemberDeclarations()

void NamespaceDefImpl::startMemberDeclarations (OutputList & ol)

Definition at line 133 of file namespacedef.cpp.

Reference OutputList::startMemberSections.

Referenced by writeDocumentation.

startMemberDocumentation()

void NamespaceDefImpl::startMemberDocumentation (OutputList & ol)

Definition at line 140 of file namespacedef.cpp.

791{
792 if (Config_getBool(SEPARATE_MEMBER_PAGES))
793 {
796 }
797}

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

Referenced by writeDocumentation.

updateLocalName()

void NamespaceDefImpl::updateLocalName ()

Definition at line 149 of file namespacedef.cpp.

319{
320 QCString locName=name();
321 int i=locName.findRev("::");
322 if (i!=-1)
323 {
324 locName=locName.mid(i+2);
325 }
326 setLocalName(locName);
327}

References QCString::findRev, QCString::mid, DefinitionMixin< NamespaceDefMutable >::name and DefinitionMixin< NamespaceDefMutable >::setLocalName.

Referenced by setName.

writeAuthorSection()

void NamespaceDefImpl::writeAuthorSection (OutputList & ol)

writeBriefDescription()

void NamespaceDefImpl::writeBriefDescription (OutputList & ol)

Definition at line 132 of file namespacedef.cpp.

727{
729 {
730 auto parser { createDocParser() };
731 auto ast { validatingParseDoc(*parser.get(),
732 briefFile(),briefLine(),this,nullptr,
734 QCString(),TRUE,FALSE) };
735 if (!ast->isEmpty())
736 {
737 ol.startParagraph();
740 ol.writeString(" - ");
742 ol.writeDoc(ast.get(),this,nullptr);
745 ol.writeString(" \n");
747
749 {
751 ol.startTextLink(getOutputFileBase(),"details");
752 ol.parseText(theTranslator->trMore());
753 ol.endTextLink();
754 }
756 ol.endParagraph();
757 }
758 }
759
760 // Write a summary of the Slice definition including metadata.
761 if (getLanguage() == SrcLangExt::Slice)
762 {
763 ol.startParagraph();
764 ol.startTypewriter();
765 if (!metaData.isEmpty())
766 {
767 ol.docify(metaData);
768 ol.lineBreak();
769 }
770 ol.docify("module ");
771 ol.docify(stripScope(name()));
772 ol.docify(" { ... }");
773 ol.endTypewriter();
774 ol.endParagraph();
775 }
776
777 ol.writeSynopsis();
778}

References DefinitionMixin< NamespaceDefMutable >::briefDescription, DefinitionMixin< NamespaceDefMutable >::briefFile, DefinitionMixin< NamespaceDefMutable >::briefLine, createDocParser, OutputList::disable, OutputList::disableAllBut, OutputList::docify, OutputList::enable, OutputList::endParagraph, OutputList::endTextLink, OutputList::endTypewriter, FALSE, 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, TRUE, validatingParseDoc, OutputList::writeDoc, OutputList::writeString and OutputList::writeSynopsis.

Referenced by writeDocumentation.

writeClassDeclarations()

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

Definition at line 135 of file namespacedef.cpp.

References title, TRUE and ClassLinkedRefMap::writeDeclaration.

Referenced by writeDocumentation.

writeClassesToTagFile()

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

Definition at line 143 of file namespacedef.cpp.

954{
955 for (const auto &cd : list)
956 {
957 if (cd->isLinkableInProject())
958 {
959 tagFile << " <class kind=\"" << cd->compoundTypeString()
960 << "\">" << convertToXML(cd->name()) << "</class>\n";
961 }
962 }
963}

Reference convertToXML.

Referenced by writeTagFile.

writeConcepts()

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

Definition at line 136 of file namespacedef.cpp.

814{
815 m_concepts.writeDeclaration(ol,title,TRUE);
816}

References m_concepts, title and TRUE.

Referenced by writeDocumentation.

writeConceptsToTagFile()

void NamespaceDefImpl::writeConceptsToTagFile (TextStream & tagFile)

Definition at line 144 of file namespacedef.cpp.

966{
967 for (const auto &cd : m_concepts)
968 {
969 if (cd->isLinkableInProject())
970 {
971 tagFile << " <concept>" << convertToXML(cd->name()) << "</concept>\n";
972 }
973 }
974}

References convertToXML and m_concepts.

Referenced by writeTagFile.

writeDetailedDescription()

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

Definition at line 131 of file namespacedef.cpp.

684{
686 {
689 ol.writeRuler();
693 ol.writeAnchor(QCString(),"details");
695 ol.startGroupHeader("details");
696 ol.parseText(title);
697 ol.endGroupHeader();
698
699 ol.startTextBlock();
700 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
701 {
704 }
705 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
706 !documentation().isEmpty())
707 {
711 ol.enableAll();
714 ol.writeString("\n\n");
716 }
717 if (!documentation().isEmpty())
718 {
719 ol.generateDoc(docFile(),docLine(),this,nullptr,documentation()+"\n",TRUE,FALSE,
721 }
722 ol.endTextBlock();
723 }
724}

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, OutputList::enable, OutputList::enableAll, OutputList::endGroupHeader, OutputList::endTextBlock, FALSE, OutputList::generateDoc, hasDetailedDescription, Html, Latex, Man, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, RTF, OutputList::startGroupHeader, OutputList::startTextBlock, title, TRUE, OutputList::writeAnchor, OutputList::writeRuler and OutputList::writeString.

Referenced by writeDocumentation.

writeInlineClasses()

void NamespaceDefImpl::writeInlineClasses (OutputList & ol)

Definition at line 137 of file namespacedef.cpp.

819{
820 classes.writeDocumentation(ol,this);
821}

Reference classes.

Referenced by writeDocumentation.

writeMemberDeclarations()

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

Definition at line 129 of file namespacedef.cpp.

1490{
1491 MemberList * ml = getMemberList(lt);
1492 if (ml) ml->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr,title,QCString());
1493}

References getMemberList, title and MemberList::writeDeclarations.

Referenced by writeDocumentation.

writeMemberDocumentation()

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

writeMemberGroups()

void NamespaceDefImpl::writeMemberGroups (OutputList & ol)

Definition at line 138 of file namespacedef.cpp.

830{
831 /* write user defined member groups */
832 for (const auto &mg : m_memberGroups)
833 {
834 if (!mg->allMembersInSameSection() || !m_subGrouping)
835 {
836 mg->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr);
837 }
838 }
839}

References m_memberGroups and m_subGrouping.

Referenced by writeDocumentation.

writeNamespaceDeclarations()

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

Definition at line 147 of file namespacedef.cpp.

References isConstantGroup, namespaces, title and TRUE.

Referenced by writeDocumentation.

Private Member Attributes

classes

ClassLinkedRefMap NamespaceDefImpl::classes

exceptions

ClassLinkedRefMap NamespaceDefImpl::exceptions

fileName

QCString NamespaceDefImpl::fileName

Definition at line 151 of file namespacedef.cpp.

Referenced by getOutputFileBase and setFileNameLocal.

files

FileList NamespaceDefImpl::files

Definition at line 152 of file namespacedef.cpp.

Referenced by insertUsedFile.

interfaces

ClassLinkedRefMap NamespaceDefImpl::interfaces

m_allMembers

MemberLinkedRefMap NamespaceDefImpl::m_allMembers

Definition at line 158 of file namespacedef.cpp.

Referenced by getMemberByName and insertMember.

m_concepts

ConceptLinkedRefMap NamespaceDefImpl::m_concepts

m_inline

bool NamespaceDefImpl::m_inline = false

Definition at line 171 of file namespacedef.cpp.

171 bool m_inline = false;

Referenced by isInline and setInline.

m_innerCompounds

LinkedRefMap<const Definition> NamespaceDefImpl::m_innerCompounds

m_isPublished

bool NamespaceDefImpl::m_isPublished = false

Definition at line 169 of file namespacedef.cpp.

169 bool m_isPublished = false;

Referenced by addNamespaceAttributes and NamespaceDefImpl.

m_memberGroups

m_memberLists

m_subGrouping

bool NamespaceDefImpl::m_subGrouping = false

Definition at line 167 of file namespacedef.cpp.

167 bool m_subGrouping = false;

Referenced by addMembersToMemberGroup, subGrouping and writeMemberGroups.

m_type

enum NamespaceDefImpl NamespaceDefImpl::m_type

Definition at line 168 of file namespacedef.cpp.

Referenced by isConstantGroup, isLibrary and isModule.

m_usingDeclList

LinkedRefMap<const Definition> NamespaceDefImpl::m_usingDeclList

m_usingDirList

LinkedRefMap<NamespaceDef> NamespaceDefImpl::m_usingDirList

metaData

QCString NamespaceDefImpl::metaData

Definition at line 170 of file namespacedef.cpp.

Referenced by setMetaData and writeBriefDescription.

namespaces

NamespaceLinkedRefMap NamespaceDefImpl::namespaces

structs

ClassLinkedRefMap NamespaceDefImpl::structs

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


Generated via doxygen2docusaurus by Doxygen 1.14.0.