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
void writePageNavigation (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)
DefinitionMixinoperator= (const DefinitionMixin &other)
 ~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

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

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
NAMESPACE 
MODULE 
CONSTANT_GROUP 
LIBRARY 

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

274 :
275 DefinitionMixin(df,dl,dc,name)
276 ,m_isPublished(isPublished)
277{
278 if (!fName.isEmpty())
279 {
280 if (!lref.isEmpty())
281 {
282 fileName = stripExtension(fName);
283 }
284 else
285 {
287 }
288 }
289 else
290 {
292 }
293 setReference(lref);
295 m_subGrouping=Config_getBool(SUBGROUPING);
296 if (type=="module")
297 {
298 m_type = MODULE;
299 }
300 else if (type=="constants")
301 {
303 }
304 else if (type=="library")
305 {
306 m_type = LIBRARY;
307 }
308 else
309 {
311 }
312
314}
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:4845
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3425

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

◆ ~NamespaceDefImpl()

NamespaceDefImpl::~NamespaceDefImpl ( )
override

Definition at line 333 of file namespacedef.cpp.

334{
335}

Member Function Documentation

◆ addInnerCompound()

void NamespaceDefImpl::addInnerCompound ( Definition * d)
overridevirtual

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 390 of file namespacedef.cpp.

391{
392 //printf("%s:NamespaceDefImpl::addInnerCompound(%s)\n",qPrint(name()),qPrint(d->name()));
393 m_innerCompounds.add(d->localName(),d);
395 {
397 }
399 {
401 }
403 {
405 }
406}
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 1267 of file namespacedef.cpp.

1268{
1269 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
1270 {
1271 const RefItemVector &xrefItems = xrefListItems();
1272 addRefItem(xrefItems,
1273 qualifiedName(),
1274 getLanguage()==SrcLangExt::Fortran ?
1278 QCString(),
1279 this
1280 );
1281 }
1282 for (const auto &mg : m_memberGroups)
1283 {
1284 mg->addListReferences(this);
1285 }
1286 for (auto &ml : m_memberLists)
1287 {
1288 if (ml->listType().isDocumentation())
1289 {
1290 ml->addListReferences(this);
1291 }
1292 }
1293}
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
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:4726

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

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

1448{
1449 bool sortBriefDocs = Config_getBool(SORT_BRIEF_DOCS);
1450 bool sortMemberDocs = Config_getBool(SORT_MEMBER_DOCS);
1451 const auto &ml = m_memberLists.get(lt,MemberListContainer::Namespace);
1452 ml->setNeedsSorting(
1453 (ml->listType().isDeclaration() && sortBriefDocs) ||
1454 (ml->listType().isDocumentation() && sortMemberDocs));
1455 ml->push_back(md);
1456
1457 if (ml->listType().isDeclaration())
1458 {
1459 MemberDefMutable *mdm = toMemberDefMutable(md);
1460 if (mdm)
1461 {
1462 mdm->setSectionList(this,ml.get());
1463 }
1464 }
1465}
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 943 of file namespacedef.cpp.

944{
945 // UNO IDL constant groups may be published
946 if (getLanguage()==SrcLangExt::IDL && isConstantGroup() && m_isPublished)
947 {
950 ol.startLabels();
951 ol.writeLabel("published",false);
952 ol.endLabels();
954 }
955 else if (isExported())
956 {
959 ol.startLabels();
960 ol.writeLabel("export",false);
961 ol.endLabels();
963 }
964}
bool isConstantGroup() const override
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void endLabels()
Definition outputlist.h:742
void writeLabel(const QCString &l, bool isLast)
Definition outputlist.h:740
void startLabels()
Definition outputlist.h:738

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

◆ addUsingDeclaration()

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

Implements NamespaceDefMutable.

Definition at line 1239 of file namespacedef.cpp.

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

1234{
1235 m_usingDirList.add(nd->qualifiedName(),nd);
1236 //printf("%s: NamespaceDefImpl::addUsingDirective: %s:%zu\n",qPrint(name()),qPrint(nd->qualifiedName()),m_usingDirList.size());
1237}
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 68 of file namespacedef.cpp.

68{ return QCString(); }

◆ codeSymbolType()

CodeSymbolType NamespaceDefImpl::codeSymbolType ( ) const
inlineoverridevirtual

Used for syntax highlighting symbol class

Implements Definition.

Definition at line 65 of file namespacedef.cpp.

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

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

◆ combineUsingRelations()

void NamespaceDefImpl::combineUsingRelations ( NamespaceDefSet & visitedNamespace)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1300 of file namespacedef.cpp.

1301{
1302 if (visitedNamespaces.find(this)!=visitedNamespaces.end()) return; // already processed
1303 visitedNamespaces.insert(this);
1304
1305 LinkedRefMap<NamespaceDef> usingDirList = m_usingDirList;
1306 for (auto &nd : usingDirList)
1307 {
1308 NamespaceDefMutable *ndm = toNamespaceDefMutable(nd);
1309 if (ndm)
1310 {
1311 ndm->combineUsingRelations(visitedNamespaces);
1312 }
1313 }
1314
1315 for (auto &nd : usingDirList)
1316 {
1317 // add used namespaces of namespace nd to this namespace
1318 for (const auto &und : nd->getUsedNamespaces())
1319 {
1320 addUsingDirective(und);
1321 }
1322 // add used classes of namespace nd to this namespace
1323 for (const auto &ud : nd->getUsedDefinitions())
1324 {
1326 }
1327 }
1328}
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 1624 of file namespacedef.cpp.

1625{
1626 SrcLangExt lang = getLanguage();
1627 if (lang==SrcLangExt::Java)
1628 {
1629 return "package";
1630 }
1631 else if(lang==SrcLangExt::CSharp)
1632 {
1633 return "namespace";
1634 }
1635 else if (lang==SrcLangExt::Fortran)
1636 {
1637 return "module";
1638 }
1639 else if (lang==SrcLangExt::IDL)
1640 {
1641 if (isModule())
1642 {
1643 return "module";
1644 }
1645 else if (isConstantGroup())
1646 {
1647 return "constants";
1648 }
1649 else if (isLibrary())
1650 {
1651 return "library";
1652 }
1653 else
1654 {
1655 err_full(getDefFileName(),getDefLine(),"Internal inconsistency: namespace in IDL not module, library or constant group");
1656 }
1657 }
1658 return "namespace";
1659}
QCString 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 587 of file namespacedef.cpp.

588{
589 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
590 if (allMemberList) allMemberList->setAnchors();
591}
void setAnchors()
MemberList * getMemberList(MemberListType lt) const override

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

◆ countMembers()

void NamespaceDefImpl::countMembers ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1213 of file namespacedef.cpp.

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

References m_memberGroups, and m_memberLists.

◆ countVisibleMembers()

int NamespaceDefImpl::countVisibleMembers ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 1330 of file namespacedef.cpp.

1331{
1332 int count=0;
1333 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1334 {
1335 if (lde->kind()==LayoutDocEntry::MemberDef)
1336 {
1337 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1338 if (lmd)
1339 {
1340 MemberList *ml = getMemberList(lmd->type);
1341 if (ml)
1342 {
1343 for (const auto &md : *ml)
1344 {
1345 if (md->visibleInIndex())
1346 {
1347 count++;
1348 }
1349 }
1350 }
1351 }
1352 }
1353 }
1354 return count;
1355}
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1435
MemberListType type
Definition layout.h:137

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

◆ definitionType()

DefType NamespaceDefImpl::definitionType ( ) const
inlineoverridevirtual

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

Implements Definition.

Definition at line 64 of file namespacedef.cpp.

64{ return TypeNamespace; }

References definitionType(), and Definition::TypeNamespace.

Referenced by definitionType().

◆ displayName()

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

1296{
1297 return makeDisplayName(this,includeScope);
1298}
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 354 of file namespacedef.cpp.

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

References m_memberGroups.

◆ endMemberDeclarations()

void NamespaceDefImpl::endMemberDeclarations ( OutputList & ol)
private

Definition at line 798 of file namespacedef.cpp.

799{
801}
void endMemberSections()
Definition outputlist.h:463

References OutputList::endMemberSections().

Referenced by writeDocumentation().

◆ endMemberDocumentation()

void NamespaceDefImpl::endMemberDocumentation ( OutputList & ol)
private

Definition at line 812 of file namespacedef.cpp.

813{
814 if (Config_getBool(SEPARATE_MEMBER_PAGES))
815 {
818 }
819}
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 1249 of file namespacedef.cpp.

1250{
1251 if (n==nullptr) return nullptr;
1252 const Definition *d = m_innerCompounds.find(n);
1253 if (d==nullptr)
1254 {
1255 if (!m_usingDirList.empty())
1256 {
1257 d = m_usingDirList.find(n);
1258 }
1259 if (d==nullptr && !m_usingDeclList.empty())
1260 {
1261 d = m_usingDeclList.find(n);
1262 }
1263 }
1264 return d;
1265}

References m_innerCompounds, m_usingDeclList, and m_usingDirList.

◆ findSectionsInDocumentation()

void NamespaceDefImpl::findSectionsInDocumentation ( )
overridevirtual

Implements NamespaceDefMutable.

Definition at line 362 of file namespacedef.cpp.

363{
367 for (const auto &mg : m_memberGroups)
368 {
369 mg->findSectionsInDocumentation(this);
370 }
371 for (auto &ml : m_memberLists)
372 {
373 if (ml->listType().isDeclaration())
374 {
375 ml->findSectionsInDocumentation(this);
376 }
377 }
378}
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 109 of file namespacedef.cpp.

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

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

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

110{ return m_interfaces; }
ClassLinkedRefMap m_interfaces

References m_interfaces.

◆ getMemberByName()

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

Implements NamespaceDef.

Definition at line 1582 of file namespacedef.cpp.

1583{
1584 return m_allMembers.find(n);
1585}
MemberLinkedRefMap m_allMembers

References m_allMembers.

◆ getMemberGroups()

const MemberGroupList & NamespaceDefImpl::getMemberGroups ( ) const
inlineoverridevirtual

Returns the user defined member groups

Implements NamespaceDef.

Definition at line 108 of file namespacedef.cpp.

108{ return m_memberGroups; }

References m_memberGroups.

◆ getMemberList()

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

Implements NamespaceDef.

Definition at line 1505 of file namespacedef.cpp.

1506{
1507 for (auto &ml : m_memberLists)
1508 {
1509 if (ml->listType()==lt)
1510 {
1511 return ml.get();
1512 }
1513 }
1514 return nullptr;
1515}

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

106{ return m_memberLists; }

References m_memberLists.

◆ getNamespaces()

NamespaceLinkedRefMap NamespaceDefImpl::getNamespaces ( ) const
inlineoverridevirtual

Returns the namespaces contained in this namespace

Implements NamespaceDef.

Definition at line 113 of file namespacedef.cpp.

113{ return m_namespaces; }
NamespaceLinkedRefMap m_namespaces

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

1245{
1246 return fileName;
1247}

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

111{ return m_structs; }
ClassLinkedRefMap m_structs

References m_structs.

◆ getUsedDefinitions()

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

Implements NamespaceDef.

Definition at line 84 of file namespacedef.cpp.

84{ return m_usingDeclList; }

References m_usingDeclList.

◆ getUsedNamespaces()

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

Implements NamespaceDef.

Definition at line 82 of file namespacedef.cpp.

82{ return m_usingDirList; }

References m_usingDirList.

◆ hasDetailedDescription()

bool NamespaceDefImpl::hasDetailedDescription ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 593 of file namespacedef.cpp.

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

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

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

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

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

References m_concepts, and Definition::name().

Referenced by addInnerCompound().

◆ insertMember()

void NamespaceDefImpl::insertMember ( MemberDef * md)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 463 of file namespacedef.cpp.

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

References addMemberToList(), createMemberDefAlias(), Define, Definition::definitionType(), Dictionary, Enumeration, EnumValue, err, Function, Doxygen::functionNameLinkedMap, MemberDef::getClassDef(), Definition::getLanguage(), getMemberList(), DefinitionMixin< NamespaceDefMutable >::getOuterScope(), Doxygen::globalScope, DefinitionMixin< NamespaceDefMutable >::hasDocumentation(), FileDef::insertMember(), NamespaceDefMutable::insertMember(), Definition::isHidden(), isInline(), Definition::localName(), m_allMembers, m_memberLists, MemberDef::memberType(), MemberDef::memberTypeName(), Definition::name(), DefinitionMixin< NamespaceDefMutable >::name(), Namespace, Property, MemberName::push_back(), MemberVector::push_back(), Sequence, MemberDefMutable::setFileDef(), MemberDefMutable::setNamespace(), DefinitionMutable::setOuterScope(), toFileDef(), toMemberDefMutable(), toNamespaceDefMutable(), Typedef, Definition::TypeFile, Definition::TypeNamespace, and Variable.

◆ insertNamespace()

void NamespaceDefImpl::insertNamespace ( NamespaceDef * nd)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 436 of file namespacedef.cpp.

437{
438 m_namespaces.add(nd->name(),nd);
439}

References m_namespaces, and Definition::name().

Referenced by addInnerCompound().

◆ insertUsedFile()

void NamespaceDefImpl::insertUsedFile ( FileDef * fd)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 380 of file namespacedef.cpp.

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

References files.

◆ isConstantGroup()

bool NamespaceDefImpl::isConstantGroup ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 88 of file namespacedef.cpp.

88{ return CONSTANT_GROUP == m_type; }

References CONSTANT_GROUP, and m_type.

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

◆ isInline()

bool NamespaceDefImpl::isInline ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 91 of file namespacedef.cpp.

91{ return m_inline; }

References m_inline.

Referenced by insertMember(), and setInline().

◆ isLibrary()

bool NamespaceDefImpl::isLibrary ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 90 of file namespacedef.cpp.

90{ return LIBRARY == m_type; }

References LIBRARY, and m_type.

Referenced by compoundTypeString().

◆ isLinkable()

bool NamespaceDefImpl::isLinkable ( ) const
overridevirtual

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

Implements Definition.

Definition at line 1577 of file namespacedef.cpp.

1578{
1579 return isLinkableInProject() || isReference();
1580}
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 1558 of file namespacedef.cpp.

1559{
1560 int i = name().findRev("::");
1561 if (i==-1) i=0; else i+=2;
1562 bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
1563 bool hideUndoc = Config_getBool(HIDE_UNDOC_NAMESPACES);
1564 if (extractAnonNs && // extract anonymous ns
1565 name().mid(i,20)=="anonymous_namespace{" // correct prefix
1566 ) // not disabled by config
1567 {
1568 return TRUE;
1569 }
1570 return !name().isEmpty() && name().at(i)!='@' && // not anonymous
1571 (hasDocumentation() || !hideUndoc || getLanguage()==SrcLangExt::CSharp) && // documented
1572 !isReference() && // not an external reference
1573 !isHidden() && // not hidden
1574 !isArtificial(); // or artificial
1575}
const QCString & name() const override
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:593
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:96

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

Referenced by isLinkable().

◆ isModule()

bool NamespaceDefImpl::isModule ( ) const
inlineoverridevirtual

Implements NamespaceDef.

Definition at line 89 of file namespacedef.cpp.

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

References m_type, MODULE, and NAMESPACE.

Referenced by compoundTypeString().

◆ isVisibleInHierarchy()

bool NamespaceDefImpl::isVisibleInHierarchy ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 1552 of file namespacedef.cpp.

1553{
1554 bool allExternals = Config_getBool(ALLEXTERNALS);
1555 return allExternals || hasNonReferenceNestedNamespaceRec(this,0) || isLinkable();
1556}
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 1227 of file namespacedef.cpp.

1228{
1229 MemberList *allMemberList = getMemberList(MemberListType::AllMembersList());
1230 return (allMemberList ? allMemberList->numDocMembers() : 0) + static_cast<int>(m_innerCompounds.size());
1231}
int numDocMembers() const
Definition memberlist.h:138

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

◆ setFileName()

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

Implements NamespaceDefMutable.

Definition at line 349 of file namespacedef.cpp.

350{
352}

References setFileNameLocal().

◆ setFileNameLocal()

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

Definition at line 337 of file namespacedef.cpp.

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

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

Referenced by setFileName().

◆ setInline()

void NamespaceDefImpl::setInline ( bool isInline)
inlineoverridevirtual

Implements NamespaceDefMutable.

Definition at line 87 of file namespacedef.cpp.

87{ m_inline = isInline; }

References isInline(), and m_inline.

◆ setMetaData()

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

Implements NamespaceDefMutable.

Definition at line 1661 of file namespacedef.cpp.

1662{
1663 metaData = m;
1664}

References metaData.

◆ setName()

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

Sets a new name for the definition

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 327 of file namespacedef.cpp.

328{
331}
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 1467 of file namespacedef.cpp.

1468{
1469 for (auto &ml : m_memberLists)
1470 {
1471 if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
1472 }
1473
1474 if (Config_getBool(SORT_BRIEF_DOCS))
1475 {
1476 auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2)
1477 {
1478 return Config_getBool(SORT_BY_SCOPE_NAME) ?
1479 qstricmp_sort(c1->name(), c2->name())<0 :
1480 qstricmp_sort(c1->className(), c2->className())<0;
1481 };
1482
1483 std::stable_sort(m_classes.begin(), m_classes.end(), classComp);
1484 std::stable_sort(m_interfaces.begin(),m_interfaces.end(),classComp);
1485 std::stable_sort(m_structs.begin(), m_structs.end(), classComp);
1486 std::stable_sort(m_exceptions.begin(),m_exceptions.end(),classComp);
1487
1488 auto conceptComp = [](const ConceptLinkedRefMap::Ptr &c1,const ConceptLinkedRefMap::Ptr &c2)
1489 {
1490 return qstricmp_sort(c1->name(),c2->name())<0;
1491 };
1492
1493 std::stable_sort(m_concepts.begin(), m_concepts.end(), conceptComp);
1494
1495 auto namespaceComp = [](const NamespaceLinkedRefMap::Ptr &n1,const NamespaceLinkedRefMap::Ptr &n2)
1496 {
1497 return qstricmp_sort(n1->name(),n2->name())<0;
1498 };
1499
1500 std::stable_sort(m_namespaces.begin(),m_namespaces.end(),namespaceComp);
1501 }
1502
1503}
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 ClassDef::className(), Config_getBool, FALSE, m_classes, m_concepts, m_exceptions, m_interfaces, m_memberLists, m_namespaces, m_structs, Definition::name(), and qstricmp_sort().

◆ startMemberDeclarations()

void NamespaceDefImpl::startMemberDeclarations ( OutputList & ol)
private

Definition at line 793 of file namespacedef.cpp.

794{
796}
void startMemberSections()
Definition outputlist.h:461

References OutputList::startMemberSections().

Referenced by writeDocumentation().

◆ startMemberDocumentation()

void NamespaceDefImpl::startMemberDocumentation ( OutputList & ol)
private

Definition at line 803 of file namespacedef.cpp.

804{
805 if (Config_getBool(SEPARATE_MEMBER_PAGES))
806 {
809 }
810}
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 104 of file namespacedef.cpp.

104{ return m_subGrouping; }

References m_subGrouping.

◆ title()

QCString NamespaceDefImpl::title ( ) const
overridevirtual

Implements NamespaceDef.

Definition at line 1587 of file namespacedef.cpp.

1588{
1589 QCString pageTitle;
1590 SrcLangExt lang = getLanguage();
1591
1592 auto getReferenceTitle = [this](std::function<QCString()> translateFunc) -> QCString
1593 {
1594 return Config_getBool(HIDE_COMPOUND_REFERENCE) ? displayName() : translateFunc();
1595 };
1596
1597 if (lang==SrcLangExt::Java)
1598 {
1599 pageTitle = theTranslator->trPackage(displayName());
1600 }
1601 else if (lang==SrcLangExt::Fortran || lang==SrcLangExt::Slice)
1602 {
1603 pageTitle = getReferenceTitle([this](){
1605 });
1606 }
1607 else if (lang==SrcLangExt::IDL)
1608 {
1609 pageTitle = getReferenceTitle([this](){
1610 return isConstantGroup()
1613 });
1614 }
1615 else
1616 {
1617 pageTitle = getReferenceTitle([this](){
1619 });
1620 }
1621 return pageTitle;
1622}
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

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

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

◆ updateLocalName()

void NamespaceDefImpl::updateLocalName ( )
private

Definition at line 316 of file namespacedef.cpp.

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

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

855{
856 // write Author section (Man only)
859 ol.startGroupHeader();
861 ol.endGroupHeader();
864}
void startGroupHeader(const QCString &id=QCString(), int extraLevels=0)
Definition outputlist.h:453
void endGroupHeader(int extraLevels=0)
Definition outputlist.h:455
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 733 of file namespacedef.cpp.

734{
736 {
737 auto parser { createDocParser() };
738 auto ast { validatingParseDoc(*parser.get(),
739 briefFile(),
740 briefLine(),
741 this,
742 nullptr,
744 DocOptions()
745 .setIndexWords(true)
746 .setSingleLine(true))
747 };
748 if (!ast->isEmpty())
749 {
750 ol.startParagraph();
753 ol.writeString(" - ");
755 ol.writeDoc(ast.get(),this,nullptr);
758 ol.writeString(" \n");
760
762 {
764 ol.startTextLink(getOutputFileBase(),"details");
766 ol.endTextLink();
767 }
769 ol.endParagraph();
770 }
771 }
772
773 // Write a summary of the Slice definition including metadata.
774 if (getLanguage() == SrcLangExt::Slice)
775 {
776 ol.startParagraph();
777 ol.startTypewriter();
778 if (!metaData.isEmpty())
779 {
780 ol.docify(metaData);
781 ol.lineBreak();
782 }
783 ol.docify("module ");
784 ol.docify(stripScope(name()));
785 ol.docify(" { ... }");
786 ol.endTypewriter();
787 ol.endParagraph();
788 }
789
790 ol.writeSynopsis();
791}
virtual QCString briefFile() const =0
bool hasDetailedDescription() const override
void writeDoc(const IDocNodeAST *ast, const Definition *ctx, const MemberDef *md, int sectionLevel=-1)
Definition outputlist.h:383
void writeString(const QCString &text)
Definition outputlist.h:411
void docify(const QCString &s)
Definition outputlist.h:437
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:407
void endParagraph()
Definition outputlist.h:409
void endTextLink()
Definition outputlist.h:444
void writeSynopsis()
Definition outputlist.h:592
void startTypewriter()
Definition outputlist.h:449
void endTypewriter()
Definition outputlist.h:451
void lineBreak(const QCString &style=QCString())
Definition outputlist.h:559
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:442
virtual QCString trMore()=0
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, const DocOptions &options)
IDocParserPtr createDocParser()
factory function to create a parser
Definition docparser.cpp:55
QCString stripScope(const QCString &name)
Definition util.cpp:3700

References DefinitionMixin< NamespaceDefMutable >::briefDescription(), DefinitionMixin< NamespaceDefMutable >::briefFile(), DefinitionMixin< NamespaceDefMutable >::briefLine(), createDocParser(), OutputList::disable(), OutputList::disableAllBut(), OutputList::docify(), OutputList::enable(), OutputList::endParagraph(), OutputList::endTextLink(), OutputList::endTypewriter(), 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, 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 821 of file namespacedef.cpp.

822{
823 d.writeDeclaration(ol,nullptr,title,TRUE);
824}
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 966 of file namespacedef.cpp.

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

References convertToXML().

Referenced by writeTagFile().

◆ writeConcepts()

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

Definition at line 826 of file namespacedef.cpp.

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

References m_concepts, title(), and TRUE.

Referenced by writeDocumentation().

◆ writeConceptsToTagFile()

void NamespaceDefImpl::writeConceptsToTagFile ( TextStream & tagFile)
private

Definition at line 978 of file namespacedef.cpp.

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

References convertToXML(), and m_concepts.

Referenced by writeTagFile().

◆ writeDetailedDescription()

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

Definition at line 681 of file namespacedef.cpp.

682{
684 {
687 ol.writeRuler();
691 ol.writeAnchor(QCString(),"details");
693 ol.startGroupHeader("details");
694 ol.parseText(title);
695 ol.endGroupHeader();
696
697 ol.startTextBlock();
698 if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
699 {
701 briefLine(),
702 this,
703 nullptr,
705 DocOptions());
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(),
722 docLine(),
723 this,
724 nullptr,
725 documentation()+"\n",
726 DocOptions()
727 .setIndexWords(true));
728 }
729 ol.endTextBlock();
730 }
731}
QCString briefFile() const override
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:672
void writeRuler()
Definition outputlist.h:521
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, const DocOptions &options)
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:670
void writeAnchor(const QCString &fileName, const QCString &name)
Definition outputlist.h:523
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(), Html, Latex, Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, OutputList::startGroupHeader(), OutputList::startTextBlock(), title(), OutputList::writeAnchor(), OutputList::writeRuler(), and OutputList::writeString().

Referenced by writeDocumentation().

◆ writeDocumentation()

void NamespaceDefImpl::writeDocumentation ( OutputList & ol)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 989 of file namespacedef.cpp.

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

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

832{
833 m_classes.writeDocumentation(ol,this);
834}

References m_classes.

Referenced by writeDocumentation().

◆ writeMemberDeclarations()

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

Definition at line 1517 of file namespacedef.cpp.

1518{
1519 MemberList * ml = getMemberList(lt);
1520 if (ml) ml->writeDeclarations(ol,nullptr,this,nullptr,nullptr,nullptr,title,QCString());
1521}
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 1523 of file namespacedef.cpp.

1524{
1525 MemberList * ml = getMemberList(lt);
1526 if (ml) ml->writeDocumentation(ol,displayName(),this,title,ml->listType().toLabel());
1527}
MemberListType listType() const
Definition memberlist.h:130
void writeDocumentation(OutputList &ol, const QCString &scopeName, const Definition *container, const QCString &title, const QCString &anchor, bool showEnumValues=FALSE, bool showInline=FALSE) const
constexpr const char * toLabel() const
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 842 of file namespacedef.cpp.

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

References m_memberGroups, and m_subGrouping.

Referenced by writeDocumentation().

◆ writeMemberPages()

void NamespaceDefImpl::writeMemberPages ( OutputList & ol)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 1155 of file namespacedef.cpp.

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

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

838{
839 m_namespaces.writeDeclaration(ol,title,isConstantGroup,TRUE);
840}

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

Referenced by writeDocumentation().

◆ writePageNavigation()

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

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 938 of file namespacedef.cpp.

939{
940 ol.writePageOutline();
941}
void writePageOutline()
Definition outputlist.h:616

References OutputList::writePageOutline().

◆ writeQuickMemberLinks()

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

Reimplemented from DefinitionMixin< NamespaceDefMutable >.

Definition at line 1170 of file namespacedef.cpp.

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

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

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

References MemberList::declVisible(), OutputList::disableAllBut(), FALSE, 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(), TRUE, LayoutDocEntryMemberDecl::type, OutputList::writeString(), and OutputList::writeSummaryLink().

◆ writeTagFile()

void NamespaceDefImpl::writeTagFile ( TextStream & tagFile)
overridevirtual

Implements NamespaceDefMutable.

Definition at line 600 of file namespacedef.cpp.

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

QCString NamespaceDefImpl::fileName
private

Definition at line 149 of file namespacedef.cpp.

Referenced by getOutputFileBase(), and setFileNameLocal().

◆ files

FileList NamespaceDefImpl::files
private

Definition at line 150 of file namespacedef.cpp.

Referenced by insertUsedFile().

◆ m_allMembers

MemberLinkedRefMap NamespaceDefImpl::m_allMembers
private

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

Referenced by isInline(), and setInline().

◆ m_innerCompounds

LinkedRefMap<const Definition> NamespaceDefImpl::m_innerCompounds
private

Definition at line 154 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 167 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 165 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 153 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 168 of file namespacedef.cpp.

Referenced by setMetaData(), and writeBriefDescription().


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