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

Public Member Functions

 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)
 
 ~NamespaceDefImpl () override
 
DefType definitionType () const override
 
CodeSymbolType codeSymbolType () const override
 
QCString getOutputFileBase () const override
 
QCString 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
 
QCString 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 QCString &name) const override
 
void addInnerCompound (Definition *d) override
 
void addListReferences () override
 
void setFileName (const QCString &fn) override
 
bool subGrouping () const override
 
MemberListgetMemberList (MemberListType lt) const override
 
const MemberListsgetMemberLists () const override
 
const MemberDefgetMemberByName (const QCString &) 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 QCString &name) override
 
QCString title () const override
 
QCString compoundTypeString () const override
 
void setMetaData (const QCString &m) override
 
int countVisibleMembers () const override
 
void writeSummaryLinks (OutputList &ol) const override
 
- Public Member Functions inherited from DefinitionMixin< NamespaceDefMutable >
 DefinitionMixin (const QCString &defFileName, int defLine, int defColumn, const QCString &name, const char *b=nullptr, const char *d=nullptr, bool isSymbol=TRUE)
 
 DefinitionMixin (const DefinitionMixin &other)
 
 DefinitionMixin (DefinitionMixin &&)=delete
 
DefinitionMixinoperator= (const DefinitionMixin &other)
 
DefinitionMixinoperator= (DefinitionMixin &&)=delete
 
 ~DefinitionMixin () override=default
 
bool isAlias () const override
 
const QCStringname () const override
 
bool isAnonymous () const override
 
const QCStringlocalName () const override
 
QCString qualifiedName () const override
 
QCString symbolName () const override
 
QCString getSourceFileBase () const override
 
QCString getSourceAnchor () const override
 
QCString documentation () const override
 
int docLine () const override
 
QCString docFile () const override
 
QCString briefDescription (bool abbreviate=FALSE) const override
 
QCString briefDescriptionAsTooltip () const override
 
int briefLine () const override
 
QCString inbodyDocumentation () const override
 
QCString inbodyFile () const override
 
int inbodyLine () const override
 
QCString briefFile () const override
 
QCString getDefFileName () const override
 
QCString getDefFileExtension () const override
 
int getDefLine () const override
 
int getDefColumn () const override
 
bool hasDocumentation () const override
 
bool hasUserDocumentation () const override
 
bool isVisibleInProject () const override
 
bool isVisible () const override
 
bool isHidden () const override
 
bool isArtificial () const override
 
bool isExported () const override
 
QCString getReference () const override
 
bool isReference () const override
 
QCString externalReference (const QCString &relPath) const override
 
int getStartDefLine () const override
 
int getStartBodyLine () const override
 
int getEndBodyLine () const override
 
const FileDefgetBodyDef () const override
 
SrcLangExt getLanguage () const override
 
const GroupListpartOfGroups () const override
 
bool isLinkableViaGroup () const override
 
const RefItemVectorxrefListItems () const override
 
DefinitiongetOuterScope () const override
 
const MemberVectorgetReferencesMembers () const override
 
const MemberVectorgetReferencedByMembers () const override
 
bool hasSections () const override
 
bool hasSources () const override
 
bool hasBriefDescription () const override
 
QCString id () const override
 
const SectionRefsgetSectionRefs () const override
 
void setId (const QCString &name) override
 
void setDefFile (const QCString &df, int defLine, int defColumn) override
 
void setDocumentation (const QCString &doc, const QCString &docFile, int docLine, bool stripWhiteSpace=TRUE) override
 
void setBriefDescription (const QCString &brief, const QCString &briefFile, int briefLine) override
 
void setInbodyDocumentation (const QCString &doc, const QCString &docFile, int docLine) override
 
void setReference (const QCString &r) override
 
void addSectionsToDefinition (const std::vector< const SectionInfo * > &anchorList) override
 
void setBodySegment (int defLine, int bls, int ble) override
 
void setBodyDef (const FileDef *fd) override
 
void addSourceReferencedBy (MemberDef *md, const QCString &sourceRefName) override
 
void addSourceReferences (MemberDef *md, const QCString &sourceRefName) override
 
void setRefItems (const RefItemVector &sli) override
 
void mergeRefItems (Definition *def) override
 
void mergeReferences (const Definition *other) override
 
void mergeReferencedBy (const Definition *other) override
 
void setOuterScope (Definition *def) override
 
void setHidden (bool b) override
 
void setArtificial (bool b) override
 
void setExported (bool b) override
 
void setLanguage (SrcLangExt lang) override
 
void writeSourceDef (OutputList &ol) const override
 
void writeInlineCode (OutputList &ol, const QCString &scopeName) const override
 
bool hasSourceRefs () const override
 
bool hasSourceReffedBy () const override
 
void writeSourceRefs (OutputList &ol, const QCString &scopeName) const override
 
void writeSourceReffedBy (OutputList &ol, const QCString &scopeName) const override
 
void makePartOfGroup (GroupDef *gd) override
 
void writeNavigationPath (OutputList &ol) const override
 
QCString navigationPathAsString () const override
 
QCString pathFragment () const override
 
void writeDocAnchorsToTagFile (TextStream &fs) const override
 
void setLocalName (const QCString &name) override
 
void writeToc (OutputList &ol, const LocalToc &lt) const override
 
void computeTooltip () override
 
void _setSymbolName (const QCString &name) override
 
QCString _symbolName () const override
 
- Public Member Functions inherited from NamespaceDefMutable
- Public Member Functions inherited from DefinitionMutable
- Public Member Functions inherited from NamespaceDef
- Public Member Functions inherited from Definition

Private Types

enum  { NAMESPACE , MODULE , CONSTANT_GROUP , LIBRARY }
 

Private Member Functions

void addMemberToList (MemberListType lt, MemberDef *md)
 
void writeMemberDeclarations (OutputList &ol, MemberListType lt, const QCString &title)
 
void writeMemberDocumentation (OutputList &ol, MemberListType lt, const QCString &title)
 
void writeDetailedDescription (OutputList &ol, const QCString &title)
 
void writeBriefDescription (OutputList &ol)
 
void startMemberDeclarations (OutputList &ol)
 
void endMemberDeclarations (OutputList &ol)
 
void writeClassDeclarations (OutputList &ol, const QCString &title, const ClassLinkedRefMap &d)
 
void writeConcepts (OutputList &ol, const QCString &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 QCString &fn)
 
void writeNamespaceDeclarations (OutputList &ol, const QCString &title, bool isConstantGroup=false)
 
void updateLocalName ()
 

Private Attributes

QCString fileName
 
FileList files
 
LinkedRefMap< NamespaceDefm_usingDirList
 
LinkedRefMap< const Definitionm_usingDeclList
 
LinkedRefMap< const Definitionm_innerCompounds
 
MemberLinkedRefMap m_allMembers
 
MemberLists m_memberLists
 
MemberGroupList m_memberGroups
 
ClassLinkedRefMap classes
 
ClassLinkedRefMap interfaces
 
ClassLinkedRefMap structs
 
ClassLinkedRefMap exceptions
 
ConceptLinkedRefMap m_concepts
 
NamespaceLinkedRefMap namespaces
 
bool m_subGrouping = false
 
enum NamespaceDefImpl:: { ... }  m_type
 
bool m_isPublished = false
 
QCString 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 56 of file namespacedef.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
NAMESPACE 
MODULE 
CONSTANT_GROUP 
LIBRARY 

Definition at line 167 of file namespacedef.cpp.

enum NamespaceDefImpl::@152056333015234071026257214045103374127312105332 m_type

Constructor & Destructor Documentation

◆ NamespaceDefImpl()

NamespaceDefImpl::NamespaceDefImpl ( const 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 272 of file namespacedef.cpp.

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

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

◆ ~NamespaceDefImpl()

NamespaceDefImpl::~NamespaceDefImpl ( )
override

Definition at line 334 of file namespacedef.cpp.

335{
336}

Member Function Documentation

◆ addInnerCompound()

void NamespaceDefImpl::addInnerCompound ( Definition * d)
overridevirtual

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 391 of file namespacedef.cpp.

392{
393 //printf("%s:NamespaceDefImpl::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
394 m_innerCompounds.add(d->localName(),d);
396 {
398 }
400 {
402 }
404 {
406 }
407}
virtual const QCString & localName() const =0
virtual DefType definitionType() const =0
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 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 1251 of file namespacedef.cpp.

1252{
1253 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
1254 {
1255 const RefItemVector &xrefItems = xrefListItems();
1256 addRefItem(xrefItems,
1257 qualifiedName(),
1262 QCString(),
1263 this
1264 );
1265 }
1266 for (const auto &mg : m_memberGroups)
1267 {
1268 mg->addListReferences(this);
1269 }
1270 for (auto &ml : m_memberLists)
1271 {
1272 if (ml->listType().isDocumentation())
1273 {
1274 ml->addListReferences(this);
1275 }
1276 }
1277}
QCString qualifiedName() const override
const RefItemVector & xrefListItems() const override
SrcLangExt getLanguage() const override
MemberGroupList m_memberGroups
QCString getOutputFileBase() const override
QCString displayName(bool=TRUE) const override
MemberLists m_memberLists
virtual QCString trNamespace(bool first_capital, bool singular)=0
virtual QCString trModule(bool first_capital, bool singular)=0
Translator * theTranslator
Definition language.cpp:71
#define TRUE
Definition qcstring.h:37
std::vector< RefItem * > RefItemVector
Definition reflist.h:133
@ Fortran
Definition types.h:53
void addRefItem(const RefItemVector &sli, const QCString &key, const QCString &prefix, const QCString &name, const QCString &title, const QCString &args, const Definition *scope)
Definition util.cpp:5146

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

◆ addMembersToMemberGroup()

void NamespaceDefImpl::addMembersToMemberGroup ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 443 of file namespacedef.cpp.

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

1433{
1434 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
1435 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
1436 const auto &ml = m_memberLists.get(lt,MemberListContainer::Namespace);
1437 ml->setNeedsSorting(
1438 (ml->listType().isDeclaration() && sortBriefDocs) ||
1439 (ml->listType().isDocumentation() && sortMemberDocs));
1440 ml->push_back(md);
1441
1442 if (ml->listType().isDeclaration())
1443 {
1444 MemberDefMutable *mdm = toMemberDefMutable(md);
1445 if (mdm)
1446 {
1447 mdm->setSectionList(this,ml.get());
1448 }
1449 }
1450}
virtual void setSectionList(const Definition *container, const MemberList *sl)=0
MemberDefMutable * toMemberDefMutable(Definition *d)

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

Referenced by insertMember().

◆ addNamespaceAttributes()

void NamespaceDefImpl::addNamespaceAttributes ( OutputList & ol)
private

Definition at line 927 of file namespacedef.cpp.

928{
929 // UNO IDL constant groups may be published
931 {
934 ol.startLabels();
935 ol.writeLabel("published",false);
936 ol.endLabels();
938 }
939 else if (isExported())
940 {
943 ol.startLabels();
944 ol.writeLabel("export",false);
945 ol.endLabels();
947 }
948}
bool isConstantGroup() const override
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void endLabels()
Definition outputlist.h:741
void writeLabel(const QCString &l, bool isLast)
Definition outputlist.h:739
void startLabels()
Definition outputlist.h:737

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

Referenced by writeDocumentation().

◆ addUsingDeclaration()

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

Implements NamespaceDefMutable.

Definition at line 1223 of file namespacedef.cpp.

1224{
1225 m_usingDeclList.add(d->qualifiedName(),d);
1226}
LinkedRefMap< const Definition > m_usingDeclList

References m_usingDeclList, and Definition::qualifiedName().

Referenced by combineUsingRelations().

◆ addUsingDirective()

void NamespaceDefImpl::addUsingDirective ( NamespaceDef * nd)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1217 of file namespacedef.cpp.

1218{
1219 m_usingDirList.add(nd->qualifiedName(),nd);
1220 //printf("%s: NamespaceDefImpl::addUsingDirective: %s:%zu\n",qPrint(name()),qPrint(nd->qualifiedName()),m_usingDirList.size());
1221}
virtual QCString qualifiedName() const =0
LinkedRefMap< NamespaceDef > m_usingDirList

References m_usingDirList, and Definition::qualifiedName().

Referenced by combineUsingRelations().

◆ anchor()

QCString NamespaceDefImpl::anchor ( ) const
inlineoverridevirtual

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

Implements Definition.

Definition at line 70 of file namespacedef.cpp.

70{ return QCString(); }

◆ codeSymbolType()

CodeSymbolType NamespaceDefImpl::codeSymbolType ( ) const
inlineoverridevirtual

Used for syntax highlighting symbol class

Implements Definition.

Definition at line 67 of file namespacedef.cpp.

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

◆ combineUsingRelations()

void NamespaceDefImpl::combineUsingRelations ( NamespaceDefSet & visitedNamespace)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1284 of file namespacedef.cpp.

1285{
1286 if (visitedNamespaces.find(this)!=visitedNamespaces.end()) return; // already processed
1287 visitedNamespaces.insert(this);
1288
1289 LinkedRefMap<NamespaceDef> usingDirList = m_usingDirList;
1290 for (auto &nd : usingDirList)
1291 {
1292 NamespaceDefMutable *ndm = toNamespaceDefMutable(nd);
1293 if (ndm)
1294 {
1295 ndm->combineUsingRelations(visitedNamespaces);
1296 }
1297 }
1298
1299 for (auto &nd : usingDirList)
1300 {
1301 // add used namespaces of namespace nd to this namespace
1302 for (const auto &und : nd->getUsedNamespaces())
1303 {
1304 addUsingDirective(und);
1305 }
1306 // add used classes of namespace nd to this namespace
1307 for (const auto &ud : nd->getUsedDefinitions())
1308 {
1310 }
1311 }
1312}
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()

QCString NamespaceDefImpl::compoundTypeString ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 1587 of file namespacedef.cpp.

1588{
1589 SrcLangExt lang = getLanguage();
1590 if (lang==SrcLangExt::Java)
1591 {
1592 return "package";
1593 }
1594 else if(lang==SrcLangExt::CSharp)
1595 {
1596 return "namespace";
1597 }
1598 else if (lang==SrcLangExt::Fortran)
1599 {
1600 return "module";
1601 }
1602 else if (lang==SrcLangExt::IDL)
1603 {
1604 if (isModule())
1605 {
1606 return "module";
1607 }
1608 else if (isConstantGroup())
1609 {
1610 return "constants";
1611 }
1612 else if (isLibrary())
1613 {
1614 return "library";
1615 }
1616 else
1617 {
1618 err_full(getDefFileName(),getDefLine(),"Internal inconsistency: namespace in IDL not module, library or constant group");
1619 }
1620 }
1621 return "namespace";
1622}
QCString getDefFileName() const override
bool isLibrary() const override
bool isModule() const override
#define err_full(file, line, fmt,...)
Definition message.h:89
SrcLangExt
Language as given by extension.
Definition types.h:42
@ CSharp
Definition types.h:46

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

◆ computeAnchors()

void NamespaceDefImpl::computeAnchors ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 591 of file namespacedef.cpp.

592{
593 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
594 if (allMemberList) allMemberList->setAnchors();
595}
void setAnchors()
MemberList * getMemberList(MemberListType lt) const override

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

◆ countMembers()

void NamespaceDefImpl::countMembers ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1197 of file namespacedef.cpp.

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

References m_memberGroups, and m_memberLists.

◆ countVisibleMembers()

int NamespaceDefImpl::countVisibleMembers ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 1314 of file namespacedef.cpp.

1315{
1316 int count=0;
1317 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1318 {
1319 if (lde->kind()==LayoutDocEntry::MemberDef)
1320 {
1321 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1322 if (lmd)
1323 {
1324 MemberList *ml = getMemberList(lmd->type);
1325 if (ml)
1326 {
1327 for (const auto &md : *ml)
1328 {
1329 if (md->visibleInIndex())
1330 {
1331 count++;
1332 }
1333 }
1334 }
1335 }
1336 }
1337 }
1338 return count;
1339}
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1423
MemberListType type
Definition layout.h:130

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

66{ return TypeNamespace; }

References definitionType(), and Definition::TypeNamespace.

Referenced by definitionType().

◆ displayName()

QCString NamespaceDefImpl::displayName ( bool includeScope = TRUE) const
overridevirtual

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

Implements Definition.

Definition at line 1279 of file namespacedef.cpp.

1280{
1281 return makeDisplayName(this,includeScope);
1282}
static QCString 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 355 of file namespacedef.cpp.

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

References m_memberGroups.

◆ endMemberDeclarations()

void NamespaceDefImpl::endMemberDeclarations ( OutputList & ol)
private

Definition at line 787 of file namespacedef.cpp.

788{
790}
void endMemberSections()
Definition outputlist.h:464

References OutputList::endMemberSections().

Referenced by writeDocumentation().

◆ endMemberDocumentation()

void NamespaceDefImpl::endMemberDocumentation ( OutputList & ol)
private

Definition at line 801 of file namespacedef.cpp.

802{
803 if (Config_getBool(SEPARATE_MEMBER_PAGES))
804 {
807 }
808}
static bool suppressDocWarnings
Definition doxygen.h:132
void enable(OutputType o)

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

Referenced by writeDocumentation().

◆ findInnerCompound()

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

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 1233 of file namespacedef.cpp.

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

References m_innerCompounds, m_usingDeclList, and m_usingDirList.

◆ findSectionsInDocumentation()

void NamespaceDefImpl::findSectionsInDocumentation ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 363 of file namespacedef.cpp.

364{
368 for (const auto &mg : m_memberGroups)
369 {
370 mg->findSectionsInDocumentation(this);
371 }
372 for (auto &ml : m_memberLists)
373 {
374 if (ml->listType().isDeclaration())
375 {
376 ml->findSectionsInDocumentation(this);
377 }
378 }
379}
QCString briefDescription(bool abbreviate=FALSE) const override
QCString inbodyDocumentation() const override
QCString documentation() const override
void docFindSections(const QCString &input, const Definition *d, const QCString &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 classes; }
ClassLinkedRefMap classes

References 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 exceptions; }
ClassLinkedRefMap exceptions

References 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 interfaces; }
ClassLinkedRefMap interfaces

References interfaces.

◆ getMemberByName()

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

Implements NamespaceDef.

Definition at line 1557 of file namespacedef.cpp.

1558{
1559 return m_allMembers.find(n);
1560}
MemberLinkedRefMap m_allMembers

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

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

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 namespaces; }
NamespaceLinkedRefMap namespaces

References namespaces.

◆ getOutputFileBase()

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

1229{
1230 return fileName;
1231}

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 structs; }
ClassLinkedRefMap structs

References structs.

◆ getUsedDefinitions()

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

Implements NamespaceDef.

Definition at line 86 of file namespacedef.cpp.

86{ return m_usingDeclList; }

References m_usingDeclList.

◆ getUsedNamespaces()

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

Implements NamespaceDef.

Definition at line 84 of file namespacedef.cpp.

84{ return m_usingDirList; }

References m_usingDirList.

◆ hasDetailedDescription()

bool NamespaceDefImpl::hasDetailedDescription ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 597 of file namespacedef.cpp.

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

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

410{
411 ClassLinkedRefMap *d = &classes;
412
413 if (Config_getBool(OPTIMIZE_OUTPUT_SLICE))
414 {
416 {
417 d = &interfaces;
418 }
419 else if (cd->compoundType()==ClassDef::Struct)
420 {
421 d = &structs;
422 }
423 else if (cd->compoundType()==ClassDef::Exception)
424 {
425 d = &exceptions;
426 }
427 }
428
429 d->add(cd->name(),cd);
430}
@ Interface
Definition classdef.h:112
@ Exception
Definition classdef.h:115
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e.
bool add(const char *k, T *obj)
Adds an object reference to the ordered vector if it was not added already.
Definition linkedmap.h:284

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

Implements NamespaceDefMutable.

Definition at line 432 of file namespacedef.cpp.

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

References m_concepts, and Definition::name().

Referenced by addInnerCompound().

◆ insertMember()

void NamespaceDefImpl::insertMember ( MemberDef * md)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 464 of file namespacedef.cpp.

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

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(), Python, qPrint(), Sequence, MemberDefMutable::setFileDef(), MemberDefMutable::setNamespace(), DefinitionMutable::setOuterScope(), toFileDef(), toMemberDefMutable(), toNamespaceDefMutable(), Typedef, Definition::TypeFile, Definition::TypeNamespace, and Variable.

◆ insertNamespace()

void NamespaceDefImpl::insertNamespace ( NamespaceDef * nd)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 437 of file namespacedef.cpp.

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

References Definition::name(), and namespaces.

Referenced by addInnerCompound().

◆ insertUsedFile()

void NamespaceDefImpl::insertUsedFile ( FileDef * fd)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 381 of file namespacedef.cpp.

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

References files.

◆ isConstantGroup()

bool NamespaceDefImpl::isConstantGroup ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 90 of file namespacedef.cpp.

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

93{ return m_inline; }

References m_inline.

Referenced by insertMember(), and setInline().

◆ isLibrary()

bool NamespaceDefImpl::isLibrary ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 92 of file namespacedef.cpp.

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

1553{
1554 return isLinkableInProject() || isReference();
1555}
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 1533 of file namespacedef.cpp.

1534{
1535 int i = name().findRev("::");
1536 if (i==-1) i=0; else i+=2;
1537 bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
1538 bool hideUndoc = Config_getBool(HIDE_UNDOC_NAMESPACES);
1539 if (extractAnonNs && // extract anonymous ns
1540 name().mid(i,20)=="anonymous_namespace{" // correct prefix
1541 ) // not disabled by config
1542 {
1543 return TRUE;
1544 }
1545 return !name().isEmpty() && name().at(i)!='@' && // not anonymous
1546 (hasDocumentation() || !hideUndoc || getLanguage()==SrcLangExt::CSharp) && // documented
1547 !isReference() && // not an external reference
1548 !isHidden() && // not hidden
1549 !isArtificial(); // or artificial
1550}
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:578
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:91

References QCString::at(), Config_getBool, CSharp, 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 ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 91 of file namespacedef.cpp.

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

1528{
1529 bool allExternals = Config_getBool(ALLEXTERNALS);
1530 return allExternals || hasNonReferenceNestedNamespaceRec(this,0) || isLinkable();
1531}
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 1211 of file namespacedef.cpp.

1212{
1213 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1214 return (allMemberList ? allMemberList->numDocMembers() : 0) + static_cast<int>(m_innerCompounds.size());
1215}
int numDocMembers() const
Definition memberlist.h:118

References getMemberList(), m_innerCompounds, and MemberList::numDocMembers().

◆ setFileName()

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

Implements NamespaceDefMutable.

Definition at line 350 of file namespacedef.cpp.

351{
353}

References setFileNameLocal().

◆ setFileNameLocal()

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

Definition at line 338 of file namespacedef.cpp.

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

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

Referenced by setFileName().

◆ setInline()

void NamespaceDefImpl::setInline ( bool isInline)
inlineoverridevirtual

Implements NamespaceDefMutable.

Definition at line 89 of file namespacedef.cpp.

89{ m_inline = isInline; }

References isInline(), and m_inline.

◆ setMetaData()

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

Implements NamespaceDefMutable.

Definition at line 1624 of file namespacedef.cpp.

1625{
1626 metaData = m;
1627}

References metaData.

◆ setName()

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

Sets a new name for the definition

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 328 of file namespacedef.cpp.

329{
332}
void setName(const QCString &name) override

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

◆ sortMemberLists()

void NamespaceDefImpl::sortMemberLists ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1452 of file namespacedef.cpp.

1453{
1454 for (auto &ml : m_memberLists)
1455 {
1456 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
1457 }
1458
1459 auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2)
1460 {
1461 return Config_getBool(SORT_BY_SCOPE_NAME) ?
1462 qstricmp_sort(c1->name(), c2->name())<0 :
1463 qstricmp_sort(c1->className(), c2->className())<0;
1464 };
1465
1466 std::stable_sort(classes.begin(), classes.end(), classComp);
1467 std::stable_sort(interfaces.begin(),interfaces.end(),classComp);
1468 std::stable_sort(structs.begin(), structs.end(), classComp);
1469 std::stable_sort(exceptions.begin(),exceptions.end(),classComp);
1470
1471
1472 auto namespaceComp = [](const NamespaceLinkedRefMap::Ptr &n1,const NamespaceLinkedRefMap::Ptr &n2)
1473 {
1474 return qstricmp_sort(n1->name(),n2->name())<0;
1475 };
1476
1477 std::stable_sort(namespaces.begin(),namespaces.end(),namespaceComp);
1478}
virtual QCString className() const =0
Returns the name of the class including outer classes, but not including namespaces.
int qstricmp_sort(const char *str1, const char *str2)
Definition qcstring.h:86

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

◆ startMemberDeclarations()

void NamespaceDefImpl::startMemberDeclarations ( OutputList & ol)
private

Definition at line 782 of file namespacedef.cpp.

783{
785}
void startMemberSections()
Definition outputlist.h:462

References OutputList::startMemberSections().

Referenced by writeDocumentation().

◆ startMemberDocumentation()

void NamespaceDefImpl::startMemberDocumentation ( OutputList & ol)
private

Definition at line 792 of file namespacedef.cpp.

793{
794 if (Config_getBool(SEPARATE_MEMBER_PAGES))
795 {
798 }
799}
void disable(OutputType o)

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

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

QCString NamespaceDefImpl::title ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 1562 of file namespacedef.cpp.

1563{
1564 SrcLangExt lang = getLanguage();
1565 QCString pageTitle;
1566 if (lang==SrcLangExt::Java)
1567 {
1568 pageTitle = theTranslator->trPackage(displayName());
1569 }
1570 else if (lang==SrcLangExt::Fortran || lang==SrcLangExt::Slice)
1571 {
1573 }
1574 else if (lang==SrcLangExt::IDL)
1575 {
1576 pageTitle = isConstantGroup()
1579 }
1580 else
1581 {
1583 }
1584 return pageTitle;
1585}
virtual QCString trPackage(const QCString &name)=0
virtual QCString trNamespaceReference(const QCString &namespaceName)=0
virtual QCString trConstantGroupReference(const QCString &namespaceName)=0
virtual QCString trModuleReference(const QCString &namespaceName)=0
@ Slice
Definition types.h:59

References displayName(), Fortran, DefinitionMixin< NamespaceDefMutable >::getLanguage(), IDL, isConstantGroup(), Java, Slice, and theTranslator.

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

◆ updateLocalName()

void NamespaceDefImpl::updateLocalName ( )
private

Definition at line 317 of file namespacedef.cpp.

318{
319 QCString locName=name();
320 int i=locName.findRev("::");
321 if (i!=-1)
322 {
323 locName=locName.mid(i+2);
324 }
325 setLocalName(locName);
326}
void setLocalName(const QCString &name) override
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:226

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

Referenced by setName().

◆ writeAuthorSection()

void NamespaceDefImpl::writeAuthorSection ( OutputList & ol)
private

Definition at line 843 of file namespacedef.cpp.

844{
845 // write Author section (Man only)
848 ol.startGroupHeader();
850 ol.endGroupHeader();
853}
void startGroupHeader(int extraLevels=0)
Definition outputlist.h:454
void endGroupHeader(int extraLevels=0)
Definition outputlist.h:456
void parseText(const QCString &textStr)
virtual QCString trGeneratedAutomatically(const QCString &s)=0
virtual QCString trAuthor(bool first_capital, bool singular)=0
#define Config_getString(name)
Definition config.h:32

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

Referenced by writeDocumentation().

◆ writeBriefDescription()

void NamespaceDefImpl::writeBriefDescription ( OutputList & ol)
private

Definition at line 728 of file namespacedef.cpp.

729{
731 {
732 auto parser { createDocParser() };
733 auto ast { validatingParseDoc(*parser.get(),
734 briefFile(),briefLine(),this,nullptr,
736 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
737 if (!ast->isEmpty())
738 {
739 ol.startParagraph();
742 ol.writeString(" - ");
744 ol.writeDoc(ast.get(),this,nullptr);
747 ol.writeString(" \n");
749
751 {
753 ol.startTextLink(getOutputFileBase(),"details");
755 ol.endTextLink();
756 }
758 ol.endParagraph();
759 }
760 }
761
762 // Write a summary of the Slice definition including metadata.
764 {
765 ol.startParagraph();
766 ol.startTypewriter();
767 if (!metaData.isEmpty())
768 {
769 ol.docify(metaData);
770 ol.lineBreak();
771 }
772 ol.docify("module ");
773 ol.docify(stripScope(name()));
774 ol.docify(" { ... }");
775 ol.endTypewriter();
776 ol.endParagraph();
777 }
778
779 ol.writeSynopsis();
780}
virtual QCString briefFile() const =0
bool hasDetailedDescription() const override
void writeString(const QCString &text)
Definition outputlist.h:412
void writeDoc(const IDocNodeAST *ast, const Definition *ctx, const MemberDef *md)
Definition outputlist.h:384
void docify(const QCString &s)
Definition outputlist.h:438
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:408
void endParagraph()
Definition outputlist.h:410
void endTextLink()
Definition outputlist.h:445
void writeSynopsis()
Definition outputlist.h:593
void startTypewriter()
Definition outputlist.h:450
void endTypewriter()
Definition outputlist.h:452
void lineBreak(const QCString &style=QCString())
Definition outputlist.h:560
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:443
virtual QCString trMore()=0
IDocParserPtr createDocParser()
factory function to create a parser
Definition docparser.cpp:54
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
QCString stripScope(const QCString &name)
Definition util.cpp:4133

References DefinitionMixin< NamespaceDefMutable >::briefDescription(), DefinitionMixin< NamespaceDefMutable >::briefFile(), DefinitionMixin< NamespaceDefMutable >::briefLine(), Config_getBool, 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, Slice, 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 )
private

Definition at line 810 of file namespacedef.cpp.

811{
812 d.writeDeclaration(ol,nullptr,title,TRUE);
813}
void writeDeclaration(OutputList &ol, const ClassDef::CompoundType *filter, const QCString &header, bool localNames) const
Definition classlist.cpp:53
QCString title() const override

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

Referenced by writeDocumentation().

◆ writeClassesToTagFile()

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

Definition at line 950 of file namespacedef.cpp.

951{
952 for (const auto &cd : list)
953 {
954 if (cd->isLinkableInProject())
955 {
956 tagFile << " <class kind=\"" << cd->compoundTypeString()
957 << "\">" << convertToXML(cd->name()) << "</class>\n";
958 }
959 }
960}
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:4266

References convertToXML().

Referenced by writeTagFile().

◆ writeConcepts()

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

Definition at line 815 of file namespacedef.cpp.

816{
817 m_concepts.writeDeclaration(ol,title,TRUE);
818}

References m_concepts, title(), and TRUE.

Referenced by writeDocumentation().

◆ writeConceptsToTagFile()

void NamespaceDefImpl::writeConceptsToTagFile ( TextStream & tagFile)
private

Definition at line 962 of file namespacedef.cpp.

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

References convertToXML(), and m_concepts.

Referenced by writeTagFile().

◆ writeDetailedDescription()

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

Definition at line 685 of file namespacedef.cpp.

686{
688 {
691 ol.writeRuler();
695 ol.writeAnchor(QCString(),"details");
697 ol.startGroupHeader();
698 ol.parseText(title);
699 ol.endGroupHeader();
700
701 ol.startTextBlock();
702 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
703 {
705 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
706 }
707 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF) &&
708 !documentation().isEmpty())
709 {
713 ol.enableAll();
716 ol.writeString("\n\n");
718 }
719 if (!documentation().isEmpty())
720 {
721 ol.generateDoc(docFile(),docLine(),this,nullptr,documentation()+"\n",TRUE,FALSE,
722 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
723 }
724 ol.endTextBlock();
725 }
726}
QCString briefFile() const override
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:671
void writeRuler()
Definition outputlist.h:522
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:669
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
void writeAnchor(const QCString &fileName, const QCString &name)
Definition outputlist.h:524
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(), 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().

◆ writeDocumentation()

void NamespaceDefImpl::writeDocumentation ( OutputList & ol)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 973 of file namespacedef.cpp.

974{
975 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
976 //bool outputJava = Config_getBool(OPTIMIZE_OUTPUT_JAVA);
977 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
978
979 QCString pageTitle = title();
980 startFile(ol,getOutputFileBase(),name(),pageTitle,HighlightedItem::NamespaceVisible,!generateTreeView);
981
982 if (!generateTreeView)
983 {
985 {
987 }
988 ol.endQuickIndices();
989 }
990
991 startTitle(ol,getOutputFileBase(),this);
992 ol.parseText(pageTitle);
993 addGroupListToTitle(ol,this);
996 ol.startContents();
997
998 //---------------------------------------- start flexible part -------------------------------
999
1000 SrcLangExt lang = getLanguage();
1001 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1002 {
1003 const LayoutDocEntrySection *ls = dynamic_cast<const LayoutDocEntrySection*>(lde.get());
1004 switch (lde->kind())
1005 {
1006 case LayoutDocEntry::BriefDesc:
1008 break;
1009 case LayoutDocEntry::MemberDeclStart:
1011 break;
1012 case LayoutDocEntry::NamespaceClasses:
1013 {
1014 if (ls) writeClassDeclarations(ol,ls->title(lang),classes);
1015 }
1016 break;
1017 case LayoutDocEntry::NamespaceInterfaces:
1018 {
1019 if (ls) writeClassDeclarations(ol,ls->title(lang),interfaces);
1020 }
1021 break;
1022 case LayoutDocEntry::NamespaceStructs:
1023 {
1024 if (ls) writeClassDeclarations(ol,ls->title(lang),structs);
1025 }
1026 break;
1027 case LayoutDocEntry::NamespaceExceptions:
1028 {
1029 if (ls) writeClassDeclarations(ol,ls->title(lang),exceptions);
1030 }
1031 break;
1032 case LayoutDocEntry::NamespaceConcepts:
1033 {
1034 if (ls) writeConcepts(ol,ls->title(lang));
1035 }
1036 break;
1037 case LayoutDocEntry::NamespaceNestedNamespaces:
1038 {
1039 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),false);
1040 }
1041 break;
1042 case LayoutDocEntry::NamespaceNestedConstantGroups:
1043 {
1044 if (ls) writeNamespaceDeclarations(ol,ls->title(lang),true);
1045 }
1046 break;
1047 case LayoutDocEntry::MemberGroups:
1049 break;
1050 case LayoutDocEntry::MemberDecl:
1051 {
1052 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1053 if (lmd) writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
1054 }
1055 break;
1056 case LayoutDocEntry::MemberDeclEnd:
1058 break;
1059 case LayoutDocEntry::DetailedDesc:
1060 {
1061 if (ls) writeDetailedDescription(ol,ls->title(lang));
1062 }
1063 break;
1064 case LayoutDocEntry::MemberDefStart:
1066 break;
1067 case LayoutDocEntry::NamespaceInlineClasses:
1069 break;
1070 case LayoutDocEntry::MemberDef:
1071 {
1072 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1073 if (lmd) writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
1074 }
1075 break;
1076 case LayoutDocEntry::MemberDefEnd:
1078 break;
1079 case LayoutDocEntry::AuthorSection:
1081 break;
1082 case LayoutDocEntry::ClassIncludes:
1083 case LayoutDocEntry::ClassInheritanceGraph:
1084 case LayoutDocEntry::ClassNestedClasses:
1085 case LayoutDocEntry::ClassCollaborationGraph:
1086 case LayoutDocEntry::ClassAllMembersLink:
1087 case LayoutDocEntry::ClassUsedFiles:
1088 case LayoutDocEntry::ClassInlineClasses:
1089 case LayoutDocEntry::ConceptDefinition:
1090 case LayoutDocEntry::FileClasses:
1091 case LayoutDocEntry::FileConcepts:
1092 case LayoutDocEntry::FileInterfaces:
1093 case LayoutDocEntry::FileStructs:
1094 case LayoutDocEntry::FileExceptions:
1095 case LayoutDocEntry::FileNamespaces:
1096 case LayoutDocEntry::FileConstantGroups:
1097 case LayoutDocEntry::FileIncludes:
1098 case LayoutDocEntry::FileIncludeGraph:
1099 case LayoutDocEntry::FileIncludedByGraph:
1100 case LayoutDocEntry::FileSourceLink:
1101 case LayoutDocEntry::FileInlineClasses:
1102 case LayoutDocEntry::GroupClasses:
1103 case LayoutDocEntry::GroupConcepts:
1104 case LayoutDocEntry::GroupModules:
1105 case LayoutDocEntry::GroupInlineClasses:
1106 case LayoutDocEntry::GroupNamespaces:
1107 case LayoutDocEntry::GroupDirs:
1108 case LayoutDocEntry::GroupNestedGroups:
1109 case LayoutDocEntry::GroupFiles:
1110 case LayoutDocEntry::GroupGraph:
1111 case LayoutDocEntry::GroupPageDocs:
1112 case LayoutDocEntry::ModuleExports:
1113 case LayoutDocEntry::ModuleClasses:
1114 case LayoutDocEntry::ModuleConcepts:
1115 case LayoutDocEntry::ModuleUsedFiles:
1116 case LayoutDocEntry::DirSubDirs:
1117 case LayoutDocEntry::DirFiles:
1118 case LayoutDocEntry::DirGraph:
1119 err("Internal inconsistency: member '%s' should not be part of "
1120 "LayoutDocManager::Namespace entry list\n",qPrint(lde->entryToString()));
1121 break;
1122 }
1123 }
1124
1125 //---------------------------------------- end flexible part -------------------------------
1126
1127 ol.endContents();
1128
1129 endFileWithNavPath(ol,this);
1130
1131 if (Config_getBool(SEPARATE_MEMBER_PAGES))
1132 {
1133 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1134 if (allMemberList) allMemberList->sort();
1135 writeMemberPages(ol);
1136 }
1137}
void writeNavigationPath(OutputList &ol) const override
void sort()
Definition memberlist.h:75
void writeMemberPages(OutputList &ol) override
void writeMemberGroups(OutputList &ol)
void writeMemberDocumentation(OutputList &ol, MemberListType lt, const QCString &title)
void startMemberDeclarations(OutputList &ol)
void writeAuthorSection(OutputList &ol)
void writeClassDeclarations(OutputList &ol, const QCString &title, const ClassLinkedRefMap &d)
void endMemberDocumentation(OutputList &ol)
void writeInlineClasses(OutputList &ol)
void writeBriefDescription(OutputList &ol)
void startMemberDocumentation(OutputList &ol)
void writeMemberDeclarations(OutputList &ol, MemberListType lt, const QCString &title)
void endMemberDeclarations(OutputList &ol)
void writeConcepts(OutputList &ol, const QCString &title)
void addNamespaceAttributes(OutputList &ol)
void writeNamespaceDeclarations(OutputList &ol, const QCString &title, bool isConstantGroup=false)
void writeDetailedDescription(OutputList &ol, const QCString &title)
void endContents()
Definition outputlist.h:619
void endQuickIndices()
Definition outputlist.h:605
void startContents()
Definition outputlist.h:617
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition index.cpp:386
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:395
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel)
Definition index.cpp:402
void endFileWithNavPath(OutputList &ol, const Definition *d)
Definition index.cpp:441
@ NamespaceVisible
Definition index.h:92
QCString title(SrcLangExt lang) const
Definition layout.cpp:1533
MemberListType type
Definition layout.h:115
QCString title(SrcLangExt lang) const
Definition layout.cpp:1545
QCString title(SrcLangExt lang) const
Definition layout.cpp:1526
void addGroupListToTitle(OutputList &ol, const Definition *d)
Definition util.cpp:5233

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(), qPrint(), 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().

◆ writeInlineClasses()

void NamespaceDefImpl::writeInlineClasses ( OutputList & ol)
private

Definition at line 820 of file namespacedef.cpp.

821{
822 classes.writeDocumentation(ol,this);
823}

References classes.

Referenced by writeDocumentation().

◆ writeMemberDeclarations()

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

Definition at line 1492 of file namespacedef.cpp.

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

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

Referenced by writeDocumentation().

◆ writeMemberDocumentation()

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

Definition at line 1498 of file namespacedef.cpp.

1499{
1500 MemberList * ml = getMemberList(lt);
1501 if (ml) ml->writeDocumentation(ol,displayName(),this,title);
1502}
void writeDocumentation(OutputList &ol, const QCString &scopeName, const Definition *container, const QCString &title, bool showEnumValues=FALSE, bool showInline=FALSE) const

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

Referenced by writeDocumentation().

◆ writeMemberGroups()

void NamespaceDefImpl::writeMemberGroups ( OutputList & ol)
private

Definition at line 831 of file namespacedef.cpp.

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

References m_memberGroups, and m_subGrouping.

Referenced by writeDocumentation().

◆ writeMemberPages()

void NamespaceDefImpl::writeMemberPages ( OutputList & ol)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1139 of file namespacedef.cpp.

1140{
1141 ol.pushGeneratorState();
1143
1144 for (const auto &ml : m_memberLists)
1145 {
1146 if (ml->listType().isDocumentation())
1147 {
1148 ml->writeDocumentationPage(ol,displayName(),this);
1149 }
1150 }
1151 ol.popGeneratorState();
1152}

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

Referenced by writeDocumentation().

◆ writeNamespaceDeclarations()

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

Definition at line 825 of file namespacedef.cpp.

827{
828 namespaces.writeDeclaration(ol,title,isConstantGroup,TRUE);
829}

References isConstantGroup(), namespaces, title(), and TRUE.

Referenced by writeDocumentation().

◆ writeQuickMemberLinks()

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

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 1154 of file namespacedef.cpp.

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

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

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

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

Implements NamespaceDefMutable.

Definition at line 604 of file namespacedef.cpp.

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

Member Data Documentation

◆ classes

◆ exceptions

ClassLinkedRefMap NamespaceDefImpl::exceptions
private

◆ fileName

QCString NamespaceDefImpl::fileName
private

Definition at line 150 of file namespacedef.cpp.

Referenced by getOutputFileBase(), and setFileNameLocal().

◆ files

FileList NamespaceDefImpl::files
private

Definition at line 151 of file namespacedef.cpp.

Referenced by insertUsedFile().

◆ interfaces

ClassLinkedRefMap NamespaceDefImpl::interfaces
private

◆ m_allMembers

MemberLinkedRefMap NamespaceDefImpl::m_allMembers
private

Definition at line 157 of file namespacedef.cpp.

Referenced by getMemberByName(), and insertMember().

◆ m_concepts

ConceptLinkedRefMap NamespaceDefImpl::m_concepts
private

◆ m_inline

bool NamespaceDefImpl::m_inline = false
private

Definition at line 170 of file namespacedef.cpp.

Referenced by isInline(), and setInline().

◆ m_innerCompounds

LinkedRefMap<const Definition> NamespaceDefImpl::m_innerCompounds
private

Definition at line 155 of file namespacedef.cpp.

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

◆ m_isPublished

bool NamespaceDefImpl::m_isPublished = false
private

Definition at line 168 of file namespacedef.cpp.

Referenced by addNamespaceAttributes(), and NamespaceDefImpl().

◆ m_memberGroups

◆ m_memberLists

◆ m_subGrouping

bool NamespaceDefImpl::m_subGrouping = false
private

Definition at line 166 of file namespacedef.cpp.

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

◆ []

enum { ... } NamespaceDefImpl::m_type

◆ m_usingDeclList

LinkedRefMap<const Definition> NamespaceDefImpl::m_usingDeclList
private

Definition at line 154 of file namespacedef.cpp.

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

◆ m_usingDirList

LinkedRefMap<NamespaceDef> NamespaceDefImpl::m_usingDirList
private

◆ metaData

QCString NamespaceDefImpl::metaData
private

Definition at line 169 of file namespacedef.cpp.

Referenced by setMetaData(), and writeBriefDescription().

◆ namespaces

◆ structs

ClassLinkedRefMap NamespaceDefImpl::structs
private

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