Doxygen
DefinitionContext< T > 模板类 参考
+ 类 DefinitionContext< T > 继承关系图:
+ DefinitionContext< T > 的协作图:

struct  Cachable
 

Public 成员函数

 DefinitionContext (const Definition *d)
 
virtual ~DefinitionContext ()
 

Protected 成员函数

TemplateVariant fileName () const
 
TemplateVariant anchor () const
 
TemplateVariant sourceFileName () const
 
TemplateVariant isLinkable () const
 
TemplateVariant isLinkableInProject () const
 
TemplateVariant name () const
 
TemplateVariant bareName () const
 
TemplateVariant details () const
 
TemplateVariant brief () const
 
TemplateVariant inbodyDocs () const
 
TemplateVariant dynSectionId () const
 
TemplateVariant sourceDef () const
 
TemplateVariant navigationPath () const
 
TemplateVariant partOfGroups () const
 
TemplateVariant isReference () const
 
TemplateVariant externalReference () const
 
TemplateVariant language () const
 
TemplateVariant compoundKind () const
 
QCString relPathAsString () const
 
virtual TemplateVariant relPath () const
 

Private 成员函数

TemplateVariant createDetails () const
 
TemplateVariant createBrief () const
 
TemplateVariant createInbodyDocs () const
 
void fillPath (const Definition *def, TemplateVariantList &list) const
 
TemplateListIntfPtr createNavigationPath () const
 
TemplateListIntfPtr createPartOfGroups () const
 

Private 属性

Cachable m_cachable
 
const Definitionm_def
 
TemplateListIntfPtr m_sourceDef
 

静态 Private 属性

static const PropertyMap< DefinitionContext< T > > s_baseProperties
 

详细描述

template<typename T>
class DefinitionContext< T >

在文件 context.cpp1367 行定义.

构造及析构函数说明

◆ DefinitionContext()

template<typename T >
DefinitionContext< T >::DefinitionContext ( const Definition d)
inline

在文件 context.cpp1370 行定义.

1370  : m_def(d)
1371  {
1372  assert(d!=0);
1373 
1374  if (m_def && !m_def->getSourceFileBase().isEmpty())
1375  {
1377  {
1378  { "text", TemplateVariant(m_def->getStartBodyLine()) },
1379  { "isLinkable", TemplateVariant(TRUE) },
1380  { "fileName", TemplateVariant(m_def->getSourceFileBase()) },
1381  { "anchor", TemplateVariant(m_def->getSourceAnchor()) },
1382  { "isReference", TemplateVariant(FALSE) },
1383  { "externalReference", TemplateVariant("") }
1384  });
1385 
1387  m_def->getBodyDef() ? m_def->getBodyDef()->name() :
1389 
1391  {
1392  { "text", TemplateVariant(text) },
1393  { "isLinkable", TemplateVariant(TRUE) },
1394  { "fileName", TemplateVariant(m_def->getSourceFileBase()) },
1395  { "anchor", TemplateVariant("") },
1396  { "isReference", TemplateVariant(FALSE) },
1397  { "externalReference", TemplateVariant("") }
1398  });
1399 
1400  m_sourceDef = TemplateImmutableList::alloc( { lineLink, fileLink });
1401  }
1402  else
1403  {
1405  }
1406  }

◆ ~DefinitionContext()

template<typename T >
virtual DefinitionContext< T >::~DefinitionContext ( )
inlinevirtual

在文件 context.cpp1407 行定义.

1407 {}

成员函数说明

◆ anchor()

template<typename T >
TemplateVariant DefinitionContext< T >::anchor ( ) const
inlineprotected

在文件 context.cpp1412 行定义.

1412 { return m_def->anchor(); }

◆ bareName()

template<typename T >
TemplateVariant DefinitionContext< T >::bareName ( ) const
inlineprotected

在文件 context.cpp1417 行定义.

1417 { return m_def->displayName(FALSE); }

◆ brief()

template<typename T >
TemplateVariant DefinitionContext< T >::brief ( ) const
inlineprotected

在文件 context.cpp1419 行定义.

1419 { return m_cachable.brief.get(this); }

◆ compoundKind()

template<typename T >
TemplateVariant DefinitionContext< T >::compoundKind ( ) const
inlineprotected

在文件 context.cpp1453 行定义.

1454  {
1455  QCString result = "unspecified";
1456  switch (m_def->definitionType())
1457  {
1458  case Definition::TypeClass: result="class"; break;
1459  case Definition::TypeFile: result="file"; break;
1460  case Definition::TypeNamespace: result="namespace"; break;
1461  case Definition::TypeGroup: result="module"; break;
1462  case Definition::TypePackage: result="package"; break;
1463  case Definition::TypePage: result="page"; break;
1464  case Definition::TypeDir: result="dir"; break;
1465  case Definition::TypeConcept: result="concept"; break;
1466  case Definition::TypeMember: break;
1467  }
1468  return result;
1469  }

◆ createBrief()

template<typename T >
TemplateVariant DefinitionContext< T >::createBrief ( ) const
inlineprivate

在文件 context.cpp1488 行定义.

1489  {
1490  if (m_def->hasBriefDescription())
1491  {
1494  }
1495  else
1496  {
1497  return TemplateVariant("");
1498  }
1499  }

◆ createDetails()

template<typename T >
TemplateVariant DefinitionContext< T >::createDetails ( ) const
inlineprivate

在文件 context.cpp1483 行定义.

1484  {
1487  }

◆ createInbodyDocs()

template<typename T >
TemplateVariant DefinitionContext< T >::createInbodyDocs ( ) const
inlineprivate

在文件 context.cpp1500 行定义.

1501  {
1502  if (!m_def->inbodyDocumentation().isEmpty())
1503  {
1506  }
1507  else
1508  {
1509  return TemplateVariant("");
1510  }
1511  }

◆ createNavigationPath()

template<typename T >
TemplateListIntfPtr DefinitionContext< T >::createNavigationPath ( ) const
inlineprivate

在文件 context.cpp1526 行定义.

1527  {
1528  TemplateVariantList list;
1530  {
1531  fillPath(m_def,list);
1532  }
1533  else if (m_def->definitionType()==Definition::TypeFile && (toFileDef(m_def))->getDirDef())
1534  {
1535  fillPath((toFileDef(m_def))->getDirDef(),list);
1536  }
1537  return TemplateImmutableList::alloc(list);
1538  }

◆ createPartOfGroups()

template<typename T >
TemplateListIntfPtr DefinitionContext< T >::createPartOfGroups ( ) const
inlineprivate

在文件 context.cpp1539 行定义.

1540  {
1541  TemplateVariantList list;
1542  list.reserve(m_def->partOfGroups().size());
1543  for (const auto &gd : m_def->partOfGroups())
1544  {
1545  list.push_back(ModuleContext::alloc(gd));
1546  }
1547  return TemplateImmutableList::alloc(list);
1548  }

◆ details()

template<typename T >
TemplateVariant DefinitionContext< T >::details ( ) const
inlineprotected

在文件 context.cpp1418 行定义.

1418 { return m_cachable.details.get(this); }

◆ dynSectionId()

template<typename T >
TemplateVariant DefinitionContext< T >::dynSectionId ( ) const
inlineprotected

在文件 context.cpp1421 行定义.

1421 { return g_globals.dynSectionId; }

◆ externalReference()

template<typename T >
TemplateVariant DefinitionContext< T >::externalReference ( ) const
inlineprotected

在文件 context.cpp1426 行定义.

1426 { return m_def->externalReference(relPathAsString()); }

◆ fileName()

template<typename T >
TemplateVariant DefinitionContext< T >::fileName ( ) const
inlineprotected

在文件 context.cpp1411 行定义.

1411 { return m_def->getOutputFileBase(); }

◆ fillPath()

template<typename T >
void DefinitionContext< T >::fillPath ( const Definition def,
TemplateVariantList list 
) const
inlineprivate

在文件 context.cpp1512 行定义.

1513  {
1514  const Definition *outerScope = def->getOuterScope();
1515  Definition::DefType type = def->definitionType();
1516  if (outerScope && outerScope!=Doxygen::globalScope)
1517  {
1518  fillPath(outerScope,list);
1519  }
1520  else if (type==Definition::TypeFile && (toFileDef(def))->getDirDef())
1521  {
1522  fillPath((toFileDef(def))->getDirDef(),list);
1523  }
1524  list.push_back(NavPathElemContext::alloc(def));
1525  }

被这些函数引用 DefinitionContext< FileContext::Private >::createNavigationPath() , 以及 DefinitionContext< FileContext::Private >::fillPath().

◆ inbodyDocs()

template<typename T >
TemplateVariant DefinitionContext< T >::inbodyDocs ( ) const
inlineprotected

在文件 context.cpp1420 行定义.

1420 { return m_cachable.inbodyDocs.get(this); }

◆ isLinkable()

template<typename T >
TemplateVariant DefinitionContext< T >::isLinkable ( ) const
inlineprotected

在文件 context.cpp1414 行定义.

1414 { return m_def->isLinkable(); }

◆ isLinkableInProject()

template<typename T >
TemplateVariant DefinitionContext< T >::isLinkableInProject ( ) const
inlineprotected

在文件 context.cpp1415 行定义.

1415 { return m_def->isLinkableInProject(); }

◆ isReference()

template<typename T >
TemplateVariant DefinitionContext< T >::isReference ( ) const
inlineprotected

在文件 context.cpp1425 行定义.

1425 { return m_def->isReference(); }

◆ language()

template<typename T >
TemplateVariant DefinitionContext< T >::language ( ) const
inlineprotected

在文件 context.cpp1427 行定义.

1428  {
1429  SrcLangExt lang = m_def->getLanguage();
1430  QCString result = "unknown";
1431  switch (lang)
1432  {
1433  case SrcLangExt_Unknown: break;
1434  case SrcLangExt_IDL: result="idl"; break;
1435  case SrcLangExt_Java: result="java"; break;
1436  case SrcLangExt_CSharp: result="csharp"; break;
1437  case SrcLangExt_D: result="d"; break;
1438  case SrcLangExt_PHP: result="php"; break;
1439  case SrcLangExt_ObjC: result="objc"; break;
1440  case SrcLangExt_Cpp: result="cpp"; break;
1441  case SrcLangExt_JS: result="js"; break;
1442  case SrcLangExt_Python: result="python"; break;
1443  case SrcLangExt_Fortran: result="fortran"; break;
1444  case SrcLangExt_VHDL: result="vhdl"; break;
1445  case SrcLangExt_XML: result="xml"; break;
1446  case SrcLangExt_SQL: result="sql"; break;
1447  case SrcLangExt_Markdown: result="markdown"; break;
1448  case SrcLangExt_Slice: result="slice"; break;
1449  case SrcLangExt_Lex: result="lex"; break;
1450  }
1451  return result;
1452  }

◆ name()

template<typename T >
TemplateVariant DefinitionContext< T >::name ( ) const
inlineprotected

在文件 context.cpp1416 行定义.

1416 { return m_def->displayName(TRUE); }

◆ navigationPath()

template<typename T >
TemplateVariant DefinitionContext< T >::navigationPath ( ) const
inlineprotected

在文件 context.cpp1423 行定义.

1423 { return m_cachable.navPath.get(this); }

◆ partOfGroups()

template<typename T >
TemplateVariant DefinitionContext< T >::partOfGroups ( ) const
inlineprotected

在文件 context.cpp1424 行定义.

1424 { return m_cachable.partOfGroups.get(this); }

◆ relPath()

template<typename T >
virtual TemplateVariant DefinitionContext< T >::relPath ( ) const
inlineprotectedvirtual

在文件 context.cpp1478 行定义.

1478 { return relPathAsString(); }

◆ relPathAsString()

template<typename T >
QCString DefinitionContext< T >::relPathAsString ( ) const
inlineprotected

◆ sourceDef()

template<typename T >
TemplateVariant DefinitionContext< T >::sourceDef ( ) const
inlineprotected

在文件 context.cpp1422 行定义.

1422 { return std::static_pointer_cast<TemplateListIntf>(m_sourceDef); }

◆ sourceFileName()

template<typename T >
TemplateVariant DefinitionContext< T >::sourceFileName ( ) const
inlineprotected

在文件 context.cpp1413 行定义.

1413 { return m_def->getSourceFileBase(); }

类成员变量说明

◆ m_cachable

◆ m_def

◆ m_sourceDef

template<typename T >
TemplateListIntfPtr DefinitionContext< T >::m_sourceDef
private

◆ s_baseProperties

template<typename T >
const PropertyMap< DefinitionContext<T> > DefinitionContext< T >::s_baseProperties
staticprivate

在文件 context.cpp1565 行定义.


该类的文档由以下文件生成:
Definition::getSourceFileBase
virtual QCString getSourceFileBase() const =0
Definition::hasBriefDescription
virtual bool hasBriefDescription() const =0
returns TRUE if this class has a brief description
SrcLangExt_Unknown
@ SrcLangExt_Unknown
Definition: types.h:43
TemplateImmutableStruct::alloc
static TemplateStructIntfPtr alloc(std::initializer_list< StructField > fields)
Creates an instance and returns a shared pointer to it
Definition: template.cpp:497
TemplateVariantList
std::vector< TemplateVariant > TemplateVariantList
Definition: template.h:261
ModuleContext::alloc
static TemplateStructIntfPtr alloc(const GroupDef *gd)
Definition: context.h:341
Definition::docLine
virtual int docLine() const =0
Definition::TypeMember
@ TypeMember
Definition: definition.h:90
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
Definition::isLinkable
virtual bool isLinkable() const =0
SrcLangExt_XML
@ SrcLangExt_XML
Definition: types.h:55
SrcLangExt_PHP
@ SrcLangExt_PHP
Definition: types.h:48
SrcLangExt_JS
@ SrcLangExt_JS
Definition: types.h:51
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty
Definition: qcstring.h:144
Definition::TypePage
@ TypePage
Definition: definition.h:93
DefinitionContext::m_def
const Definition * m_def
Definition: context.cpp:1563
DefinitionContext::Cachable::navPath
CachedItem< TemplateListIntfPtr, DC, &DC::createNavigationPath > navPath
Definition: context.cpp:1557
SrcLangExt
SrcLangExt
Language as given by extension
Definition: types.h:41
Doxygen::globalScope
static NamespaceDefMutable * globalScope
Definition: doxygen.h:102
Definition::TypeGroup
@ TypeGroup
Definition: definition.h:91
DefinitionContext::Cachable::brief
CachedItem< TemplateVariant, DC, &DC::createBrief > brief
Definition: context.cpp:1555
SrcLangExt_Lex
@ SrcLangExt_Lex
Definition: types.h:60
parseDoc
static TemplateVariant parseDoc(const Definition *def, const QCString &file, int line, const QCString &relPath, const QCString &docStr, bool isBrief)
Definition: context.cpp:1241
Definition::inbodyLine
virtual int inbodyLine() const =0
SrcLangExt_Java
@ SrcLangExt_Java
Definition: types.h:45
Definition::briefLine
virtual int briefLine() const =0
Definition::docFile
virtual QCString docFile() const =0
TemplateStructIntfPtr
std::shared_ptr< TemplateStructIntf > TemplateStructIntfPtr
Definition: template.h:33
Definition::getLanguage
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
ContextGlobals::dynSectionId
int dynSectionId
Definition: context.cpp:76
NavPathElemContext::alloc
static TemplateStructIntfPtr alloc(const Definition *def)
Definition: context.h:942
SrcLangExt_ObjC
@ SrcLangExt_ObjC
Definition: types.h:49
Definition::getBodyDef
virtual const FileDef * getBodyDef() const =0
TemplateVariant
Variant type which can hold one value of a fixed set of types.
Definition: template.h:98
Definition::TypeNamespace
@ TypeNamespace
Definition: definition.h:89
Definition::TypePackage
@ TypePackage
Definition: definition.h:92
Definition::externalReference
virtual QCString externalReference(const QCString &relPath) const =0
FileDef::name
virtual QCString name() const =0
Definition::TypeFile
@ TypeFile
Definition: definition.h:88
DefinitionContext::m_cachable
Cachable m_cachable
Definition: context.cpp:1562
Definition::isReference
virtual bool isReference() const =0
Definition::displayName
virtual QCString displayName(bool includeScope=TRUE) const =0
Definition::inbodyDocumentation
virtual QCString inbodyDocumentation() const =0
Definition::name
virtual QCString name() const =0
SrcLangExt_D
@ SrcLangExt_D
Definition: types.h:47
SrcLangExt_Cpp
@ SrcLangExt_Cpp
Definition: types.h:50
Definition::inbodyFile
virtual QCString inbodyFile() const =0
Definition::TypeConcept
@ TypeConcept
Definition: definition.h:95
SrcLangExt_Python
@ SrcLangExt_Python
Definition: types.h:52
Definition::briefDescription
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
TRUE
#define TRUE
Definition: qcstring.h:36
Definition::TypeDir
@ TypeDir
Definition: definition.h:94
Definition::getOutputFileBase
virtual QCString getOutputFileBase() const =0
Definition::getStartBodyLine
virtual int getStartBodyLine() const =0
SrcLangExt_Fortran
@ SrcLangExt_Fortran
Definition: types.h:53
DefinitionContext::Cachable::partOfGroups
CachedItem< TemplateListIntfPtr, DC, &DC::createPartOfGroups > partOfGroups
Definition: context.cpp:1558
Definition::partOfGroups
virtual const GroupList & partOfGroups() const =0
Definition::DefType
DefType
Definition: definition.h:85
SrcLangExt_CSharp
@ SrcLangExt_CSharp
Definition: types.h:46
SrcLangExt_SQL
@ SrcLangExt_SQL
Definition: types.h:58
Definition::TypeClass
@ TypeClass
Definition: definition.h:87
Definition::definitionType
virtual DefType definitionType() const =0
Definition::briefFile
virtual QCString briefFile() const =0
g_globals
struct ContextGlobals g_globals
Definition::anchor
virtual QCString anchor() const =0
Config_getBool
#define Config_getBool(name)
Definition: config.h:33
TemplateImmutableList::alloc
static TemplateListIntfPtr alloc(std::initializer_list< TemplateVariant > elements)
Creates an instance and returns a shared pointer to it
Definition: template.cpp:543
DefinitionContext::Cachable::details
CachedItem< TemplateVariant, DC, &DC::createDetails > details
Definition: context.cpp:1554
Definition::documentation
virtual QCString documentation() const =0
Definition::getOuterScope
virtual Definition * getOuterScope() const =0
SrcLangExt_IDL
@ SrcLangExt_IDL
Definition: types.h:44
DefinitionContext::Cachable::inbodyDocs
CachedItem< TemplateVariant, DC, &DC::createInbodyDocs > inbodyDocs
Definition: context.cpp:1556
SrcLangExt_Markdown
@ SrcLangExt_Markdown
Definition: types.h:57
toFileDef
FileDef * toFileDef(Definition *d)
Definition: filedef.cpp:1778
SrcLangExt_VHDL
@ SrcLangExt_VHDL
Definition: types.h:54
Definition::isLinkableInProject
virtual bool isLinkableInProject() const =0
DefinitionContext::fillPath
void fillPath(const Definition *def, TemplateVariantList &list) const
Definition: context.cpp:1512
Definition::getSourceAnchor
virtual QCString getSourceAnchor() const =0
DefinitionContext::relPathAsString
QCString relPathAsString() const
Definition: context.cpp:1473
FALSE
#define FALSE
Definition: qcstring.h:33
DefinitionContext::m_sourceDef
TemplateListIntfPtr m_sourceDef
Definition: context.cpp:1564
SrcLangExt_Slice
@ SrcLangExt_Slice
Definition: types.h:59
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108