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 55 of file namespacedef.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
NAMESPACE 
MODULE 
CONSTANT_GROUP 
LIBRARY 

Definition at line 168 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 273 of file namespacedef.cpp.

276 :
277 DefinitionMixin(df,dl,dc,name)
278 ,m_isPublished(isPublished)
279{
280 if (!fName.empty())
281 {
282 if (!lref.empty())
283 {
284 fileName = stripExtension(fName);
285 }
286 else
287 {
289 }
290 }
291 else
292 {
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 {
305 }
306 else if (type=="library")
307 {
308 m_type = LIBRARY;
309 }
310 else
311 {
313 }
314
316}
virtual const DString & name() const =0
void setReference(const DString &r) override
DefinitionMixin(const DString &defFileName, int defLine, size_t defColumn, const DString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=true)
void setFileNameLocal(const DString &fn)
#define Config_getBool(name)
Definition config.h:33
DString stripExtension(const DString &fName)
Definition util.cpp:3955
DString convertNameToFile(const DString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:2863

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

◆ ~NamespaceDefImpl()

NamespaceDefImpl::~NamespaceDefImpl ( )
override

Definition at line 331 of file namespacedef.cpp.

332{
333}

Member Function Documentation

◆ addInnerCompound()

void NamespaceDefImpl::addInnerCompound ( Definition * d)
overridevirtual

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 388 of file namespacedef.cpp.

389{
390 //printf("%s:NamespaceDefImpl::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
393 {
395 }
397 {
399 }
401 {
403 }
404}
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 1265 of file namespacedef.cpp.

1266{
1268 qualifiedName(),
1269 getLanguage()==SrcLangExt::Fortran ?
1270 theTranslator->trModule(true,true) :
1271 theTranslator->trNamespace(true,true),
1273 DString(),
1274 this
1275 );
1276 for (const auto &mg : m_memberGroups)
1277 {
1278 mg->addListReferences(this);
1279 }
1280 for (auto &ml : m_memberLists)
1281 {
1282 if (ml->listType().isDocumentation())
1283 {
1284 ml->addListReferences(this);
1285 }
1286 }
1287}
DString qualifiedName() const override
const RefItemVector & xrefListItems() const override
SrcLangExt getLanguage() const override
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:76
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:136

References addRefItem(), displayName(), 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 440 of file namespacedef.cpp.

441{
442 for (auto &ml : m_memberLists)
443 {
444 if (ml->listType().isDeclaration())
445 {
447 }
448 }
449
450 // add members inside sections to their groups
451 for (const auto &mg : m_memberGroups)
452 {
453 if (mg->allMembersInSameSection() && m_subGrouping)
454 {
455 //printf("----> addToDeclarationSection(%s)\n",qPrint(mg->header()));
456 mg->addToDeclarationSection();
457 }
458 }
459}
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 1457 of file namespacedef.cpp.

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

942{
943 // UNO IDL constant groups may be published
944 if (getLanguage()==SrcLangExt::IDL && isConstantGroup() && m_isPublished)
945 {
948 ol.startLabels();
949 ol.writeLabel("published",false);
950 ol.endLabels();
952 }
953 else if (isExported())
954 {
957 ol.startLabels();
958 ol.writeLabel("export",false);
959 ol.endLabels();
961 }
962}
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 1289 of file namespacedef.cpp.

1290{
1292 for (const auto &mg : m_memberGroups)
1293 {
1294 mg->addRequirementReferences(this);
1295 }
1296 for (auto &ml : m_memberLists)
1297 {
1298 if (ml->listType().isDocumentation())
1299 {
1300 ml->addRequirementReferences(this);
1301 }
1302 }
1303}
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 1237 of file namespacedef.cpp.

1238{
1239 m_usingDeclList.add(d->qualifiedName(),d);
1240}
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 1231 of file namespacedef.cpp.

1232{
1234 //printf("%s: NamespaceDefImpl::addUsingDirective: %s:%zu\n",qPrint(name()),qPrint(nd->qualifiedName()),m_usingDirList.size());
1235}
virtual DString qualifiedName() const =0
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 69 of file namespacedef.cpp.

69{ return DString(); }

◆ codeSymbolType()

CodeSymbolType NamespaceDefImpl::codeSymbolType ( ) const
inlineoverridevirtual

Used for syntax highlighting symbol class

Implements Definition.

Definition at line 66 of file namespacedef.cpp.

67 { 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 1310 of file namespacedef.cpp.

1311{
1312 if (visitedNamespaces.find(this)!=visitedNamespaces.end()) return; // already processed
1313 visitedNamespaces.insert(this);
1314
1315 LinkedRefMap<NamespaceDef> usingDirList = m_usingDirList;
1316 for (auto &nd : usingDirList)
1317 {
1318 NamespaceDefMutable *ndm = toNamespaceDefMutable(nd);
1319 if (ndm)
1320 {
1321 ndm->combineUsingRelations(visitedNamespaces);
1322 }
1323 }
1324
1325 for (auto &nd : usingDirList)
1326 {
1327 // add used namespaces of namespace nd to this namespace
1328 for (const auto &und : nd->getUsedNamespaces())
1329 {
1330 addUsingDirective(und);
1331 }
1332 // add used classes of namespace nd to this namespace
1333 for (const auto &ud : nd->getUsedDefinitions())
1334 {
1336 }
1337 }
1338}
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 1649 of file namespacedef.cpp.

1650{
1651 SrcLangExt lang = getLanguage();
1652 if (lang==SrcLangExt::Java)
1653 {
1654 return "package";
1655 }
1656 else if(lang==SrcLangExt::CSharp)
1657 {
1658 return "namespace";
1659 }
1660 else if (lang==SrcLangExt::Fortran)
1661 {
1662 return "module";
1663 }
1664 else if (lang==SrcLangExt::IDL)
1665 {
1666 if (isModule())
1667 {
1668 return "module";
1669 }
1670 else if (isConstantGroup())
1671 {
1672 return "constants";
1673 }
1674 else if (isLibrary())
1675 {
1676 return "library";
1677 }
1678 else
1679 {
1680 err_full(getDefFileName(),getDefLine(),"Internal inconsistency: namespace in IDL not module, library or constant group");
1681 }
1682 }
1683 return "namespace";
1684}
DString getDefFileName() const override
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 584 of file namespacedef.cpp.

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

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

◆ countMembers()

void NamespaceDefImpl::countMembers ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1211 of file namespacedef.cpp.

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

References m_memberGroups, and m_memberLists.

◆ countVisibleMembers()

int NamespaceDefImpl::countVisibleMembers ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 1340 of file namespacedef.cpp.

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

65{ 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 1305 of file namespacedef.cpp.

1306{
1307 return makeDisplayName(this,includeScope);
1308}
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 352 of file namespacedef.cpp.

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

References m_memberGroups.

◆ endMemberDeclarations()

void NamespaceDefImpl::endMemberDeclarations ( OutputList & ol)
private

Definition at line 796 of file namespacedef.cpp.

797{
799}
void endMemberSections()
Definition outputlist.h:459

References OutputList::endMemberSections().

Referenced by writeDocumentation().

◆ endMemberDocumentation()

void NamespaceDefImpl::endMemberDocumentation ( OutputList & ol)
private

Definition at line 810 of file namespacedef.cpp.

811{
812 if (Config_getBool(SEPARATE_MEMBER_PAGES))
813 {
816 }
817}
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 1247 of file namespacedef.cpp.

1248{
1249 if (n==nullptr) return nullptr;
1250 const Definition *d = m_innerCompounds.find(n);
1251 if (d==nullptr)
1252 {
1253 if (!m_usingDirList.empty())
1254 {
1255 d = m_usingDirList.find(n);
1256 }
1257 if (d==nullptr && !m_usingDeclList.empty())
1258 {
1259 d = m_usingDeclList.find(n);
1260 }
1261 }
1262 return d;
1263}
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 360 of file namespacedef.cpp.

361{
365 for (const auto &mg : m_memberGroups)
366 {
367 mg->findSectionsInDocumentation(this);
368 }
369 for (auto &ml : m_memberLists)
370 {
371 if (ml->listType().isDeclaration())
372 {
373 ml->findSectionsInDocumentation(this);
374 }
375 }
376}
DString briefDescription(bool abbreviate=false) const override
DString documentation() const override
DString inbodyDocumentation() const override
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 111 of file namespacedef.cpp.

111{ 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 116 of file namespacedef.cpp.

116{ 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 114 of file namespacedef.cpp.

114{ 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 112 of file namespacedef.cpp.

112{ return m_interfaces; }
ClassLinkedRefMap m_interfaces

References m_interfaces.

◆ getMemberByName()

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

Implements NamespaceDef.

Definition at line 1607 of file namespacedef.cpp.

1608{
1609 return m_allMembers.find(n);
1610}
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 110 of file namespacedef.cpp.

110{ return m_memberGroups; }

References m_memberGroups.

◆ getMemberList()

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

Implements NamespaceDef.

Definition at line 1530 of file namespacedef.cpp.

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

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 108 of file namespacedef.cpp.

108{ return m_memberLists; }

References m_memberLists.

◆ getNamespaces()

NamespaceLinkedRefMap NamespaceDefImpl::getNamespaces ( ) const
inlineoverridevirtual

Returns the namespaces contained in this namespace

Implements NamespaceDef.

Definition at line 115 of file namespacedef.cpp.

115{ 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 1242 of file namespacedef.cpp.

1243{
1244 return fileName;
1245}

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 113 of file namespacedef.cpp.

113{ return m_structs; }
ClassLinkedRefMap m_structs

References m_structs.

◆ getUsedDefinitions()

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

Implements NamespaceDef.

Definition at line 85 of file namespacedef.cpp.

85{ return m_usingDeclList; }

References m_usingDeclList.

◆ getUsedNamespaces()

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

Implements NamespaceDef.

Definition at line 83 of file namespacedef.cpp.

83{ return m_usingDirList; }

References m_usingDirList.

◆ hasDetailedDescription()

bool NamespaceDefImpl::hasDetailedDescription ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 590 of file namespacedef.cpp.

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

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 406 of file namespacedef.cpp.

407{
408 ClassLinkedRefMap *d = &m_classes;
409
410 if (Config_getBool(OPTIMIZE_OUTPUT_SLICE))
411 {
413 {
414 d = &m_interfaces;
415 }
416 else if (cd->compoundType()==ClassDef::Struct)
417 {
418 d = &m_structs;
419 }
420 else if (cd->compoundType()==ClassDef::Exception)
421 {
422 d = &m_exceptions;
423 }
424 }
425
426 d->add(cd->name(),cd);
427}
@ 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 429 of file namespacedef.cpp.

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

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 461 of file namespacedef.cpp.

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

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

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 378 of file namespacedef.cpp.

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

References files.

◆ isConstantGroup()

bool NamespaceDefImpl::isConstantGroup ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 89 of file namespacedef.cpp.

89{ 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 92 of file namespacedef.cpp.

92{ return m_inline; }

References m_inline.

Referenced by insertMember(), and setInline().

◆ isLibrary()

bool NamespaceDefImpl::isLibrary ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 91 of file namespacedef.cpp.

91{ 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 1602 of file namespacedef.cpp.

1603{
1604 return isLinkableInProject() || isReference();
1605}
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 1583 of file namespacedef.cpp.

1584{
1585 size_t i = name().rfind("::");
1586 if (i==DString::npos) i=0; else i+=2;
1587 bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
1588 bool hideUndoc = Config_getBool(HIDE_UNDOC_NAMESPACES);
1589 if (extractAnonNs && // extract anonymous ns
1590 name().mid(i,20)=="anonymous_namespace{" // correct prefix
1591 ) // not disabled by config
1592 {
1593 return true;
1594 }
1595 return !name().empty() && name().at(i)!='@' && // not anonymous
1596 (hasDocumentation() || !hideUndoc || getLanguage()==SrcLangExt::CSharp) && // documented
1597 !isReference() && // not an external reference
1598 !isHidden() && // not hidden
1599 !isArtificial(); // or artificial
1600}
size_t rfind(char c, size_t pos=npos) const
Definition dstring.h:244
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
Definition dstring.h:148
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:178
char & at(size_t i)
Returns a reference to the character at index i.
Definition dstring.h:686
const DString & name() const override

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 90 of file namespacedef.cpp.

90{ 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 1577 of file namespacedef.cpp.

1578{
1579 bool allExternals = Config_getBool(ALLEXTERNALS);
1580 return allExternals || hasNonReferenceNestedNamespaceRec(this,0) || isLinkable();
1581}
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 1225 of file namespacedef.cpp.

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

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 347 of file namespacedef.cpp.

348{
350}

References setFileNameLocal().

◆ setFileNameLocal()

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

Definition at line 335 of file namespacedef.cpp.

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

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

Referenced by setFileName().

◆ setInline()

void NamespaceDefImpl::setInline ( bool isInline)
inlineoverridevirtual

Implements NamespaceDefMutable.

Definition at line 88 of file namespacedef.cpp.

88{ m_inline = isInline; }

References isInline(), and m_inline.

◆ setMetaData()

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

Implements NamespaceDefMutable.

Definition at line 1686 of file namespacedef.cpp.

1687{
1688 metaData = m;
1689}

References metaData.

◆ setName()

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

Sets a new name for the definition

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 325 of file namespacedef.cpp.

326{
329}
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 1495 of file namespacedef.cpp.

1496{
1497 for (auto &ml : m_memberLists)
1498 {
1499 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(false); }
1500 }
1501
1502 auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2)
1503 {
1504 return Config_getBool(SORT_BY_SCOPE_NAME) ?
1505 dstricmp_sort(c1->name(), c2->name())<0 :
1506 dstricmp_sort(c1->className(), c2->className())<0;
1507 };
1508
1509 if (needsSorting(m_classes)) std::stable_sort(m_classes.begin(), m_classes.end(), classComp);
1510 if (needsSorting(m_interfaces)) std::stable_sort(m_interfaces.begin(),m_interfaces.end(),classComp);
1511 if (needsSorting(m_structs)) std::stable_sort(m_structs.begin(), m_structs.end(), classComp);
1512 if (needsSorting(m_exceptions)) std::stable_sort(m_exceptions.begin(),m_exceptions.end(),classComp);
1513
1514 auto conceptComp = [](const ConceptLinkedRefMap::Ptr &c1,const ConceptLinkedRefMap::Ptr &c2)
1515 {
1516 return dstricmp_sort(c1->name(),c2->name())<0;
1517 };
1518
1519 if (needsSorting(m_concepts)) std::stable_sort(m_concepts.begin(), m_concepts.end(), conceptComp);
1520
1521 auto namespaceComp = [](const NamespaceLinkedRefMap::Ptr &n1,const NamespaceLinkedRefMap::Ptr &n2)
1522 {
1523 return dstricmp_sort(n1->name(),n2->name())<0;
1524 };
1525
1526 if (needsSorting(m_namespaces)) std::stable_sort(m_namespaces.begin(),m_namespaces.end(),namespaceComp);
1527
1528}
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:67
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 791 of file namespacedef.cpp.

792{
794}
void startMemberSections()
Definition outputlist.h:457

References OutputList::startMemberSections().

Referenced by writeDocumentation().

◆ startMemberDocumentation()

void NamespaceDefImpl::startMemberDocumentation ( OutputList & ol)
private

Definition at line 801 of file namespacedef.cpp.

802{
803 if (Config_getBool(SEPARATE_MEMBER_PAGES))
804 {
807 }
808}
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 106 of file namespacedef.cpp.

106{ return m_subGrouping; }

References m_subGrouping.

◆ title()

DString NamespaceDefImpl::title ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 1612 of file namespacedef.cpp.

1613{
1614 DString pageTitle;
1615 SrcLangExt lang = getLanguage();
1616
1617 auto getReferenceTitle = [this](std::function<DString()> translateFunc) -> DString
1618 {
1619 return Config_getBool(HIDE_COMPOUND_REFERENCE) ? displayName() : translateFunc();
1620 };
1621
1622 if (lang==SrcLangExt::Java)
1623 {
1624 pageTitle = theTranslator->trPackage(displayName());
1625 }
1626 else if (lang==SrcLangExt::Fortran || lang==SrcLangExt::Slice)
1627 {
1628 pageTitle = getReferenceTitle([this](){
1630 });
1631 }
1632 else if (lang==SrcLangExt::IDL)
1633 {
1634 pageTitle = getReferenceTitle([this](){
1635 return isConstantGroup()
1638 });
1639 }
1640 else
1641 {
1642 pageTitle = getReferenceTitle([this](){
1644 });
1645 }
1646 return pageTitle;
1647}
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(), 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 318 of file namespacedef.cpp.

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

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 852 of file namespacedef.cpp.

853{
854 // write Author section (Man only)
857 ol.startGroupHeader();
858 ol.parseText(theTranslator->trAuthor(true,true));
859 ol.endGroupHeader();
862}
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 731 of file namespacedef.cpp.

732{
734 {
735 auto parser { createDocParser() };
736 auto ast { validatingParseDoc(*parser.get(),
737 briefFile(),
738 briefLine(),
739 this,
740 nullptr,
742 DocOptions()
743 .setIndexWords(true)
744 .setSingleLine(true))
745 };
746 if (!ast->empty())
747 {
748 ol.startParagraph();
751 ol.writeString(" - ");
753 ol.writeDoc(ast.get(),this,nullptr);
756 ol.writeString(" \n");
758
760 {
762 ol.startTextLink(getOutputFileBase(),"details");
764 ol.endTextLink();
765 }
767 ol.endParagraph();
768 }
769 }
770
771 // Write a summary of the Slice definition including metadata.
772 if (getLanguage() == SrcLangExt::Slice)
773 {
774 ol.startParagraph();
775 ol.startTypewriter();
776 if (!metaData.empty())
777 {
778 ol.docify(metaData);
779 ol.lineBreak();
780 }
781 ol.docify("module ");
782 ol.docify(stripScope(name()));
783 ol.docify(" { ... }");
784 ol.endTypewriter();
785 ol.endParagraph();
786 }
787
788 ol.writeSynopsis();
789}
virtual DString briefFile() 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:3109

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 819 of file namespacedef.cpp.

820{
821 d.writeDeclaration(ol,nullptr,title,true);
822}
void writeDeclaration(OutputList &ol, const ClassDef::CompoundType *filter, const DString &header, bool localNames) const
Definition classlist.cpp:51
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 964 of file namespacedef.cpp.

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

References convertToXML().

Referenced by writeTagFile().

◆ writeConcepts()

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

Definition at line 824 of file namespacedef.cpp.

825{
827}
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 976 of file namespacedef.cpp.

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

References convertToXML(), and m_concepts.

Referenced by writeTagFile().

◆ writeDetailedDescription()

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

Definition at line 678 of file namespacedef.cpp.

679{
681 {
684 ol.writeRuler();
688 ol.writeAnchor(DString(),"details");
690 ol.startGroupHeader("details");
691 ol.parseText(title);
692 ol.endGroupHeader();
693
694 ol.startTextBlock();
695 if (!briefDescription().empty() && Config_getBool(REPEAT_BRIEF))
696 {
698 briefLine(),
699 this,
700 nullptr,
702 DocOptions());
703 }
704 if (!briefDescription().empty() && Config_getBool(REPEAT_BRIEF) &&
705 !documentation().empty())
706 {
710 ol.enableAll();
713 ol.writeString("\n\n");
715 }
716 if (!documentation().empty())
717 {
718 ol.generateDoc(docFile(),
719 docLine(),
720 this,
721 nullptr,
722 documentation()+"\n",
723 DocOptions()
724 .setIndexWords(true));
725 }
727 ol.endTextBlock();
728 }
729}
void writeRequirementRefs(OutputList &ol) const override
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(), 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 987 of file namespacedef.cpp.

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

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 829 of file namespacedef.cpp.

830{
832}
void writeDocumentation(OutputList &ol, const Definition *container=nullptr) const
Definition classlist.cpp:72

References m_classes, and ClassLinkedRefMap::writeDocumentation().

Referenced by writeDocumentation().

◆ writeMemberDeclarations()

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

Definition at line 1542 of file namespacedef.cpp.

1543{
1544 MemberList * ml = getMemberList(lt);
1545 if (ml) ml->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr,title,DString());
1546}
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 getMemberList(), title(), and MemberList::writeDeclarations().

Referenced by writeDocumentation().

◆ writeMemberDocumentation()

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

Definition at line 1548 of file namespacedef.cpp.

1549{
1550 MemberList * ml = getMemberList(lt);
1551 if (ml) ml->writeDocumentation(ol,displayName(),this,title,ml->listType().toLabel());
1552}
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:131
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 840 of file namespacedef.cpp.

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

References m_memberGroups, and m_subGrouping.

Referenced by writeDocumentation().

◆ writeMemberPages()

void NamespaceDefImpl::writeMemberPages ( OutputList & ol)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1153 of file namespacedef.cpp.

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

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 834 of file namespacedef.cpp.

836{
838}
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 936 of file namespacedef.cpp.

937{
938 ol.writePageOutline();
939}
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 1168 of file namespacedef.cpp.

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

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 864 of file namespacedef.cpp.

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

598{
599 DString fn = getOutputFileBase();
601 tagFile << " <compound kind=\"namespace\">\n";
602 tagFile << " <name>" << convertToXML(name()) << "</name>\n";
603 tagFile << " <filename>" << fn << "</filename>\n";
604 DString idStr = id();
605 if (!idStr.empty())
606 {
607 tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>\n";
608 }
609 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
610 {
611 switch (lde->kind())
612 {
613 case LayoutDocEntry::NamespaceNestedNamespaces:
614 {
615 for (const auto &nd : m_namespaces)
616 {
617 if (nd->isLinkableInProject())
618 {
619 tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>\n";
620 }
621 }
622 }
623 break;
624 case LayoutDocEntry::NamespaceClasses:
625 {
627 }
628 break;
629 case LayoutDocEntry::NamespaceInterfaces:
630 {
632 }
633 break;
634 case LayoutDocEntry::NamespaceStructs:
635 {
637 }
638 break;
639 case LayoutDocEntry::NamespaceExceptions:
640 {
642 }
643 break;
644 case LayoutDocEntry::NamespaceConcepts:
645 {
646 writeConceptsToTagFile(tagFile);
647 }
648 break;
649 case LayoutDocEntry::MemberDecl:
650 {
651 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
652 if (lmd)
653 {
654 MemberList * ml = getMemberList(lmd->type);
655 if (ml)
656 {
657 ml->writeTagFile(tagFile);
658 }
659 }
660 }
661 break;
662 case LayoutDocEntry::MemberGroups:
663 {
664 for (const auto &mg : m_memberGroups)
665 {
666 mg->writeTagFile(tagFile);
667 }
668 }
669 break;
670 default:
671 break;
672 }
673 }
675 tagFile << " </compound>\n";
676}
void writeDocAnchorsToTagFile(TextStream &fs) const override
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 151 of file namespacedef.cpp.

Referenced by getOutputFileBase(), and setFileNameLocal().

◆ files

FileList NamespaceDefImpl::files
private

Definition at line 152 of file namespacedef.cpp.

Referenced by insertUsedFile().

◆ m_allMembers

MemberLinkedRefMap NamespaceDefImpl::m_allMembers
private

Definition at line 158 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 171 of file namespacedef.cpp.

Referenced by isInline(), and setInline().

◆ m_innerCompounds

LinkedRefMap<const Definition> NamespaceDefImpl::m_innerCompounds
private

Definition at line 156 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 169 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 167 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 155 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 170 of file namespacedef.cpp.

Referenced by setMetaData(), and writeBriefDescription().


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