Doxygen
namespacedef.h 文件参考
#include <set>
#include "definition.h"
#include "filedef.h"
#include "linkedmap.h"
#include "membergroup.h"
+ namespacedef.h 的引用(Include)关系图:
+ 此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

class  NamespaceLinkedMap
 
class  NamespaceLinkedRefMap
 
class  NamespaceDef
 An abstract interface of a namespace symbol. 更多...
 
class  NamespaceDefMutable
 

类型定义

using NamespaceDefSet = std::set< const NamespaceDef * >
 

函数

NamespaceDefMutablecreateNamespaceDef (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)
 Factory method to create new NamespaceDef instance 更多...
 
NamespaceDefcreateNamespaceDefAlias (const Definition *newScope, const NamespaceDef *nd)
 Factory method to create an alias of an existing namespace. 更多...
 
NamespaceDeftoNamespaceDef (Definition *d)
 
NamespaceDeftoNamespaceDef (DefinitionMutable *d)
 
const NamespaceDeftoNamespaceDef (const Definition *d)
 
NamespaceDefMutabletoNamespaceDefMutable (Definition *d)
 
NamespaceDefMutabletoNamespaceDefMutable (const Definition *d)
 
NamespaceDefgetResolvedNamespace (const QCString &key)
 
NamespaceDefMutablegetResolvedNamespaceMutable (const QCString &key)
 
bool namespaceHasNestedNamespace (const NamespaceDef *nd)
 
bool namespaceHasNestedConcept (const NamespaceDef *nd)
 
bool namespaceHasNestedClass (const NamespaceDef *nd, bool filterClasses, ClassDef::CompoundType ct)
 

类型定义说明

◆ NamespaceDefSet

using NamespaceDefSet = std::set<const NamespaceDef*>

在文件 namespacedef.h39 行定义.

函数说明

◆ createNamespaceDef()

NamespaceDefMutable* createNamespaceDef ( 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 
)

Factory method to create new NamespaceDef instance

在文件 namespacedef.cpp163 行定义.

167 {
168  return new NamespaceDefImpl(defFileName,defLine,defColumn,name,ref,refFile,type,isPublished);
169 }

被这些函数引用 adjustConfiguration(), buildNamespaceList(), buildScopeFromQualifiedName() , 以及 findUsingDirectives().

◆ createNamespaceDefAlias()

NamespaceDef* createNamespaceDefAlias ( const Definition newScope,
const NamespaceDef nd 
)

Factory method to create an alias of an existing namespace.

Used for inline namespaces.

在文件 namespacedef.cpp244 行定义.

245 {
246  NamespaceDef *alnd = new NamespaceDefAliasImpl(newScope,nd);
247  //printf("alnd name=%s localName=%s qualifiedName=%s displayName()=%s\n",
248  // qPrint(alnd->name()),qPrint(alnd->localName()),qPrint(alnd->qualifiedName()),
249  // qPrint(alnd->displayName()));
250  return alnd;
251 }

被这些函数引用 buildNamespaceList().

◆ getResolvedNamespace()

NamespaceDef* getResolvedNamespace ( const QCString key)

在文件 namespacedef.cpp1606 行定义.

1607 {
1608  if (name.isEmpty()) return 0;
1609  auto it = Doxygen::namespaceAliasMap.find(name.str());
1610  if (it!=Doxygen::namespaceAliasMap.end())
1611  {
1612  int count=0; // recursion detection guard
1613  StringUnorderedMap::iterator it2;
1614  while ((it2=Doxygen::namespaceAliasMap.find(it->second))!=Doxygen::namespaceAliasMap.end() &&
1615  count<10)
1616  {
1617  it=it2;
1618  count++;
1619  }
1620  if (count==10)
1621  {
1622  warn_uncond("possible recursive namespace alias detected for %s!\n",qPrint(name));
1623  }
1624  return Doxygen::namespaceLinkedMap->find(it->second);
1625  }
1626  else
1627  {
1628  return Doxygen::namespaceLinkedMap->find(name);
1629  }
1630 }

引用了 end(), LinkedMap< T, Hash, KeyEqual, Map >::find(), QCString::isEmpty(), Doxygen::namespaceAliasMap, Doxygen::namespaceLinkedMap, qPrint(), QCString::str() , 以及 warn_uncond().

被这些函数引用 addMemberFunction(), extractNamespaceName(), findUsedNamespace(), findUsingDirectives(), getResolvedNamespaceMutable() , 以及 writeAlphabeticalClassList().

◆ getResolvedNamespaceMutable()

NamespaceDefMutable* getResolvedNamespaceMutable ( const QCString key)
inline

◆ namespaceHasNestedClass()

bool namespaceHasNestedClass ( const NamespaceDef nd,
bool  filterClasses,
ClassDef::CompoundType  ct 
)

在文件 namespacedef.cpp1666 行定义.

1667 {
1668  //printf(">namespaceHasVisibleChild(%s,includeClasses=%d)\n",qPrint(nd->name()),includeClasses);
1669  for (const auto &cnd : nd->getNamespaces())
1670  {
1671  if (namespaceHasNestedClass(cnd,filterClasses,ct))
1672  {
1673  //printf("<namespaceHasVisibleChild(%s,includeClasses=%d): case2\n",qPrint(nd->name()),includeClasses);
1674  return TRUE;
1675  }
1676  }
1677 
1678  ClassLinkedRefMap list = nd->getClasses();
1679  if (filterClasses)
1680  {
1681  if (ct == ClassDef::Interface)
1682  {
1683  list = nd->getInterfaces();
1684  }
1685  else if (ct == ClassDef::Struct)
1686  {
1687  list = nd->getStructs();
1688  }
1689  else if (ct == ClassDef::Exception)
1690  {
1691  list = nd->getExceptions();
1692  }
1693  }
1694 
1695  for (const auto &cd : list)
1696  {
1697  if (cd->isLinkableInProject() && cd->templateMaster()==0)
1698  {
1699  //printf("<namespaceHasVisibleChild(%s,includeClasses=%d): case3\n",qPrint(nd->name()),includeClasses);
1700  return TRUE;
1701  }
1702  }
1703  return FALSE;
1704 }

引用了 ClassDef::Exception, FALSE, NamespaceDef::getClasses(), NamespaceDef::getExceptions(), NamespaceDef::getInterfaces(), NamespaceDef::getNamespaces(), NamespaceDef::getStructs(), ClassDef::Interface, namespaceHasNestedClass(), ClassDef::Struct , 以及 TRUE.

被这些函数引用 NestingContext::Private::addNamespace(), namespaceHasNestedClass(), writeClassTreeInsideNamespaceElement() , 以及 writeNamespaceTreeElement().

◆ namespaceHasNestedConcept()

bool namespaceHasNestedConcept ( const NamespaceDef nd)

在文件 namespacedef.cpp1646 行定义.

1647 {
1648  for (const auto &cnd : nd->getNamespaces())
1649  {
1650  if (namespaceHasNestedConcept(cnd))
1651  {
1652  //printf("<namespaceHasVisibleChild(%s,includeClasses=%d): case2\n",qPrint(nd->name()),includeClasses);
1653  return true;
1654  }
1655  }
1656  for (const auto &cnd : nd->getConcepts())
1657  {
1658  if (cnd->isLinkableInProject())
1659  {
1660  return true;
1661  }
1662  }
1663  return false;
1664 }

引用了 NamespaceDef::getConcepts(), NamespaceDef::getNamespaces() , 以及 namespaceHasNestedConcept().

被这些函数引用 NestingContext::Private::addNamespace(), namespaceHasNestedConcept(), writeConceptTreeInsideNamespaceElement() , 以及 writeNamespaceTreeElement().

◆ namespaceHasNestedNamespace()

bool namespaceHasNestedNamespace ( const NamespaceDef nd)

在文件 namespacedef.cpp1634 行定义.

1635 {
1636  for (const auto &cnd : nd->getNamespaces())
1637  {
1638  if (cnd->isLinkableInProject() && !cnd->isAnonymous())
1639  {
1640  return true;
1641  }
1642  }
1643  return false;
1644 }

引用了 NamespaceDef::getNamespaces().

被这些函数引用 NestingContext::Private::addNamespace() , 以及 writeNamespaceTreeElement().

◆ toNamespaceDef() [1/3]

const NamespaceDef* toNamespaceDef ( const Definition d)

在文件 namespacedef.cpp1567 行定义.

1568 {
1569  if (d && (typeid(*d)==typeid(NamespaceDefImpl) || typeid(*d)==typeid(NamespaceDefAliasImpl)))
1570  {
1571  return static_cast<const NamespaceDef*>(d);
1572  }
1573  else
1574  {
1575  return 0;
1576  }
1577 }

◆ toNamespaceDef() [2/3]

◆ toNamespaceDef() [3/3]

NamespaceDef* toNamespaceDef ( DefinitionMutable d)

在文件 namespacedef.cpp1553 行定义.

1554 {
1555  Definition *d = toDefinition(md);
1556  if (d && typeid(*d)==typeid(NamespaceDefImpl))
1557  {
1558  return static_cast<NamespaceDef*>(d);
1559  }
1560  else
1561  {
1562  return 0;
1563  }
1564 }

引用了 toDefinition().

◆ toNamespaceDefMutable() [1/2]

NamespaceDefMutable* toNamespaceDefMutable ( const Definition d)

在文件 namespacedef.cpp1591 行定义.

1592 {
1593  if (d && typeid(*d)==typeid(NamespaceDefImpl))
1594  {
1595  return const_cast<NamespaceDefMutable*>(static_cast<const NamespaceDefMutable*>(d));
1596  }
1597  else
1598  {
1599  return 0;
1600  }
1601 }

◆ toNamespaceDefMutable() [2/2]

toDefinition
Definition * toDefinition(DefinitionMutable *dm)
Definition: definition.cpp:1950
namespaceHasNestedConcept
bool namespaceHasNestedConcept(const NamespaceDef *nd)
Definition: namespacedef.cpp:1646
NamespaceDefAliasImpl
Definition: namespacedef.cpp:173
Doxygen::namespaceAliasMap
static StringUnorderedMap namespaceAliasMap
Definition: doxygen.h:95
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
NamespaceDef
An abstract interface of a namespace symbol.
Definition: namespacedef.h:54
NamespaceDef::getExceptions
virtual ClassLinkedRefMap getExceptions() const =0
namespaceHasNestedClass
bool namespaceHasNestedClass(const NamespaceDef *nd, bool filterClasses, ClassDef::CompoundType ct)
Definition: namespacedef.cpp:1666
getResolvedNamespace
NamespaceDef * getResolvedNamespace(const QCString &key)
Definition: namespacedef.cpp:1606
ClassDef::Interface
@ Interface
Definition: classdef.h:110
NamespaceDef::getInterfaces
virtual ClassLinkedRefMap getInterfaces() const =0
end
DirIterator end(const DirIterator &) noexcept
Definition: dir.cpp:128
warn_uncond
void warn_uncond(const char *fmt,...)
Definition: message.cpp:194
toNamespaceDefMutable
NamespaceDefMutable * toNamespaceDefMutable(Definition *d)
Definition: namespacedef.cpp:1579
NamespaceDef::getClasses
virtual ClassLinkedRefMap getClasses() const =0
NamespaceDefImpl
Definition: namespacedef.cpp:52
TRUE
#define TRUE
Definition: qcstring.h:36
ClassDef::Struct
@ Struct
Definition: classdef.h:108
LinkedMap::find
const T * find(const std::string &key) const
Find an object given the key.
Definition: linkedmap.h:60
NamespaceDef::getNamespaces
virtual NamespaceLinkedRefMap getNamespaces() const =0
NamespaceDef::getConcepts
virtual ConceptLinkedRefMap getConcepts() const =0
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
Doxygen::namespaceLinkedMap
static NamespaceLinkedMap * namespaceLinkedMap
Definition: doxygen.h:97
NamespaceDefMutable
Definition: namespacedef.h:106
NamespaceDef::getStructs
virtual ClassLinkedRefMap getStructs() const =0
ClassDef::Exception
@ Exception
Definition: classdef.h:113
ClassLinkedRefMap
Definition: classlist.h:30
FALSE
#define FALSE
Definition: qcstring.h:33