Doxygen
SymbolContext::Private类 参考
+ SymbolContext::Private 的协作图:

Public 成员函数

 Private (const Definition *d, const Definition *prev, const Definition *next)
 
TemplateVariant get (const QCString &n) const
 
StringVector fields () const
 

Private 成员函数

TemplateVariant fileName () const
 
TemplateVariant anchor () const
 
TemplateVariant scope () const
 
TemplateVariant relPath () const
 
TemplateVariant createScope () const
 

Private 属性

const Definitionm_def
 
const Definitionm_prevDef
 
const Definitionm_nextDef
 
CachedItem< TemplateVariant, Private,&Private::createScopem_scope
 

静态 Private 属性

static const PropertyMap< SymbolContext::Privates_inst
 

详细描述

在文件 context.cpp8350 行定义.

构造及析构函数说明

◆ Private()

SymbolContext::Private::Private ( const Definition d,
const Definition prev,
const Definition next 
)
inline

在文件 context.cpp8353 行定义.

8354  : m_def(d), m_prevDef(prev), m_nextDef(next) {}

成员函数说明

◆ anchor()

TemplateVariant SymbolContext::Private::anchor ( ) const
inlineprivate

在文件 context.cpp8363 行定义.

8363 { return m_def->anchor(); }

引用了 Definition::anchor() , 以及 m_def.

◆ createScope()

TemplateVariant SymbolContext::Private::createScope ( ) const
inlineprivate

在文件 context.cpp8368 行定义.

8369  {
8370  const Definition *scope = m_def->getOuterScope();
8371  const Definition *next = m_nextDef;
8372  const Definition *prev = m_prevDef;
8373  const Definition *nextScope = next ? next->getOuterScope() : 0;
8374  const Definition *prevScope = prev ? prev->getOuterScope() : 0;
8375  const MemberDef *md = toMemberDef(m_def);
8376  bool isFunctionLike = md && (md->isFunction() || md->isSlot() || md->isSignal());
8377  bool overloadedFunction = ((prevScope!=0 && scope==prevScope) || (scope && scope==nextScope)) &&
8378  md && (md->isFunction() || md->isSlot());
8379 
8380  QCString name;
8381  if (prev==0 && next==0) // unique name
8382  {
8384  {
8385  name = scope->name();
8386  }
8387  else if (md)
8388  {
8389  const FileDef *fd = md->getBodyDef();
8390  if (fd==0) fd = md->getFileDef();
8391  if (fd)
8392  {
8393  name = fd->localName();
8394  }
8395  }
8396  }
8397  else
8398  {
8399  QCString prefix;
8400  if (md) prefix=md->localName();
8401  if (overloadedFunction) // overloaded member function
8402  {
8403  prefix+=md->argsString();
8404  // show argument list to disambiguate overloaded functions
8405  }
8406  else if (md && isFunctionLike) // unique member function
8407  {
8408  prefix+="()"; // only to show it is a function
8409  }
8410  bool found=FALSE;
8412  {
8413  name = m_def->displayName();
8414  found = TRUE;
8415  }
8417  {
8418  name = m_def->displayName();
8419  found = TRUE;
8420  }
8421  else if (scope==0 || scope==Doxygen::globalScope) // in global scope
8422  {
8423  if (md)
8424  {
8425  const FileDef *fd = md->getBodyDef();
8426  if (fd==0) fd = md->getFileDef();
8427  if (fd)
8428  {
8429  if (!prefix.isEmpty()) prefix+=": ";
8430  name = prefix + convertToXML(fd->localName());
8431  found = TRUE;
8432  }
8433  }
8434  }
8435  else if (md && (md->resolveAlias()->getClassDef() || md->resolveAlias()->getNamespaceDef()))
8436  // member in class or namespace scope
8437  {
8438  SrcLangExt lang = md->getLanguage();
8440  + getLanguageSpecificSeparator(lang) + prefix;
8441  found = TRUE;
8442  }
8443  else if (scope) // some thing else? -> show scope
8444  {
8445  name = prefix + convertToXML(scope->name());
8446  found = TRUE;
8447  }
8448  if (!found) // fallback
8449  {
8450  name = prefix + "("+theTranslator->trGlobalNamespace()+")";
8451  }
8452  }
8453  return name;
8454  }

引用了 MemberDef::argsString(), convertToXML(), Definition::definitionType(), Definition::displayName(), FALSE, Definition::getBodyDef(), MemberDef::getClassDef(), MemberDef::getFileDef(), Definition::getLanguage(), getLanguageSpecificSeparator(), MemberDef::getNamespaceDef(), Definition::getOuterScope(), Doxygen::globalScope, QCString::isEmpty(), MemberDef::isFunction(), MemberDef::isSignal(), MemberDef::isSlot(), Definition::localName(), m_def, m_nextDef, m_prevDef, Definition::qualifiedName(), MemberDef::resolveAlias(), scope(), theTranslator, toMemberDef(), Translator::trGlobalNamespace(), TRUE, Definition::TypeClass , 以及 Definition::TypeNamespace.

◆ fields()

StringVector SymbolContext::Private::fields ( ) const
inline

在文件 context.cpp8358 行定义.

8358 { return s_inst.fields(); }

引用了 PropertyMap< T >::fields() , 以及 s_inst.

◆ fileName()

TemplateVariant SymbolContext::Private::fileName ( ) const
inlineprivate

在文件 context.cpp8362 行定义.

8362 { return m_def->getOutputFileBase(); }

引用了 Definition::getOutputFileBase() , 以及 m_def.

◆ get()

TemplateVariant SymbolContext::Private::get ( const QCString n) const
inline

在文件 context.cpp8357 行定义.

8357 { return s_inst.get(this,n); }

引用了 PropertyMap< T >::get() , 以及 s_inst.

◆ relPath()

TemplateVariant SymbolContext::Private::relPath ( ) const
inlineprivate

在文件 context.cpp8365 行定义.

8365 { return externalRef("../",m_def->getReference(),TRUE); }

引用了 externalRef(), Definition::getReference(), m_def , 以及 TRUE.

◆ scope()

TemplateVariant SymbolContext::Private::scope ( ) const
inlineprivate

在文件 context.cpp8364 行定义.

8364 { return m_scope.get(this); }

引用了 m_scope.

被这些函数引用 createScope().

类成员变量说明

◆ m_def

const Definition* SymbolContext::Private::m_def
private

在文件 context.cpp8455 行定义.

被这些函数引用 anchor(), createScope(), fileName() , 以及 relPath().

◆ m_nextDef

const Definition* SymbolContext::Private::m_nextDef
private

在文件 context.cpp8457 行定义.

被这些函数引用 createScope().

◆ m_prevDef

const Definition* SymbolContext::Private::m_prevDef
private

在文件 context.cpp8456 行定义.

被这些函数引用 createScope().

◆ m_scope

CachedItem<TemplateVariant,Private,&Private::createScope> SymbolContext::Private::m_scope
private

在文件 context.cpp8458 行定义.

被这些函数引用 scope().

◆ s_inst

const PropertyMap< SymbolContext::Private > SymbolContext::Private::s_inst
staticprivate
初始值:
{
{ "fileName",&Private::fileName },
{ "anchor", &Private::anchor },
{ "scope", &Private::scope },
{ "relPath", &Private::relPath }
}

在文件 context.cpp8459 行定义.

被这些函数引用 fields() , 以及 get().


该类的文档由以下文件生成:
SymbolContext::Private::m_prevDef
const Definition * m_prevDef
Definition: context.cpp:8456
Rtf_Style_Default::name
const char * name
Definition: rtfstyle.h:40
SymbolContext::Private::relPath
TemplateVariant relPath() const
Definition: context.cpp:8365
MemberDef::argsString
virtual QCString argsString() const =0
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
MemberDef::isSignal
virtual bool isSignal() const =0
PropertyMap::get
TemplateVariant get(const T *obj, const QCString &n) const
Definition: context.cpp:126
SymbolContext::Private::fileName
TemplateVariant fileName() const
Definition: context.cpp:8362
SymbolContext::Private::m_scope
CachedItem< TemplateVariant, Private,&Private::createScope > m_scope
Definition: context.cpp:8458
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty
Definition: qcstring.h:144
Translator::trGlobalNamespace
virtual QCString trGlobalNamespace()=0
toMemberDef
MemberDef * toMemberDef(Definition *d)
Definition: memberdef.cpp:6088
SrcLangExt
SrcLangExt
Language as given by extension
Definition: types.h:41
Doxygen::globalScope
static NamespaceDefMutable * globalScope
Definition: doxygen.h:102
PropertyMap::fields
StringVector fields() const
Definition: context.cpp:131
Definition::getLanguage
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
SymbolContext::Private::anchor
TemplateVariant anchor() const
Definition: context.cpp:8363
Definition::getBodyDef
virtual const FileDef * getBodyDef() const =0
Definition::qualifiedName
virtual QCString qualifiedName() const =0
MemberDef
A model of a class/file/namespace member symbol.
Definition: memberdef.h:45
Definition::TypeNamespace
@ TypeNamespace
Definition: definition.h:89
SymbolContext::Private::s_inst
static const PropertyMap< SymbolContext::Private > s_inst
Definition: context.cpp:8459
MemberDef::isSlot
virtual bool isSlot() const =0
theTranslator
Translator * theTranslator
Definition: language.cpp:156
Definition::displayName
virtual QCString displayName(bool includeScope=TRUE) const =0
MemberDef::resolveAlias
virtual MemberDef * resolveAlias()=0
MemberDef::getClassDef
virtual const ClassDef * getClassDef() const =0
getLanguageSpecificSeparator
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang
Definition: util.cpp:6545
MemberDef::isFunction
virtual bool isFunction() const =0
TRUE
#define TRUE
Definition: qcstring.h:36
Definition::getOutputFileBase
virtual QCString getOutputFileBase() const =0
MemberDef::getNamespaceDef
virtual const NamespaceDef * getNamespaceDef() const =0
Definition::TypeClass
@ TypeClass
Definition: definition.h:87
Definition::definitionType
virtual DefType definitionType() const =0
SymbolContext::Private::m_nextDef
const Definition * m_nextDef
Definition: context.cpp:8457
Definition::getReference
virtual QCString getReference() const =0
Definition::anchor
virtual QCString anchor() const =0
Definition::getOuterScope
virtual Definition * getOuterScope() const =0
MemberDef::getFileDef
virtual const FileDef * getFileDef() const =0
SymbolContext::Private::scope
TemplateVariant scope() const
Definition: context.cpp:8364
convertToXML
QCString convertToXML(const QCString &s, bool keepEntities)
Definition: util.cpp:3948
FileDef
A model of a file symbol.
Definition: filedef.h:73
SymbolContext::Private::m_def
const Definition * m_def
Definition: context.cpp:8455
externalRef
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
Definition: util.cpp:6334
Definition::localName
virtual QCString localName() const =0
FALSE
#define FALSE
Definition: qcstring.h:33
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108