My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
SymbolContext::Private Class Reference

Public Member Functions

 Private (const Definition *d, const Definition *prev, const Definition *next)
 
TemplateVariant get (const char *n) const
 
TemplateVariant fileName () const
 
TemplateVariant anchor () const
 
TemplateVariant scope () const
 
TemplateVariant relPath () const
 

Private Attributes

const Definitionm_def
 
const Definitionm_prevDef
 
const Definitionm_nextDef
 

Static Private Attributes

static PropertyMapper
< SymbolContext::Private
s_inst
 

Detailed Description

Definition at line 9438 of file context.cpp.

Constructor & Destructor Documentation

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

Definition at line 9441 of file context.cpp.

References anchor(), fileName(), Config::init(), relPath(), s_inst, and scope().

: m_def(d), m_prevDef(prev), m_nextDef(next)
{
static bool init=FALSE;
if (!init)
{
s_inst.addProperty("fileName",&Private::fileName);
s_inst.addProperty("anchor", &Private::anchor);
s_inst.addProperty("scope", &Private::scope);
s_inst.addProperty("relPath", &Private::relPath);
init=TRUE;
}
}

Member Function Documentation

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

Definition at line 9462 of file context.cpp.

References Definition::anchor(), and m_def.

Referenced by Private().

{
return m_def->anchor();
}
TemplateVariant SymbolContext::Private::fileName ( ) const
inline

Definition at line 9458 of file context.cpp.

References Definition::getOutputFileBase(), and m_def.

Referenced by Private().

{
}
TemplateVariant SymbolContext::Private::get ( const char *  n) const
inline

Definition at line 9454 of file context.cpp.

References s_inst.

Referenced by SymbolContext::get().

{
return s_inst.get(this,n);
}
TemplateVariant SymbolContext::Private::relPath ( ) const
inline

Definition at line 9534 of file context.cpp.

References externalRef(), Definition::getReference(), and m_def.

Referenced by Private().

{
return externalRef("../",m_def->getReference(),TRUE);
}
TemplateVariant SymbolContext::Private::scope ( ) const
inline

Definition at line 9466 of file context.cpp.

References MemberDef::argsString(), convertToXML(), DefinitionIntf::definitionType(), Definition::displayName(), Definition::getBodyDef(), MemberDef::getClassDef(), MemberDef::getFileDef(), Definition::getLanguage(), getLanguageSpecificSeparator(), MemberDef::getNamespaceDef(), Definition::getOuterScope(), Doxygen::globalScope, MemberDef::isFunction(), MemberDef::isSignal(), MemberDef::isSlot(), Definition::localName(), m_def, m_nextDef, m_prevDef, Definition::name(), Definition::qualifiedName(), theTranslator, Translator::trGlobalNamespace(), DefinitionIntf::TypeClass, DefinitionIntf::TypeMember, and DefinitionIntf::TypeNamespace.

Referenced by Private().

{
const Definition *next = m_nextDef;
const Definition *prev = m_prevDef;
const Definition *nextScope = next ? next->getOuterScope() : 0;
const Definition *prevScope = prev ? prev->getOuterScope() : 0;
const MemberDef *md = isMemberDef ? (const MemberDef*)m_def : 0;
bool isFunctionLike = md && (md->isFunction() || md->isSlot() || md->isSignal());
bool overloadedFunction = isFunctionLike &&
((prevScope!=0 && scope==prevScope) || (scope && scope==nextScope));
QCString prefix;
if (md) prefix=md->localName();
if (overloadedFunction) // overloaded member function
{
prefix+=md->argsString();
// show argument list to disambiguate overloaded functions
}
else if (md && isFunctionLike) // unique member function
{
prefix+="()"; // only to show it is a function
}
bool found=FALSE;
QCString name;
{
name = m_def->displayName();
found = TRUE;
}
{
name = m_def->displayName();
found = TRUE;
}
else if (scope==0 || scope==Doxygen::globalScope) // in global scope
{
if (md)
{
FileDef *fd = md->getBodyDef();
if (fd==0) fd = md->getFileDef();
if (fd)
{
if (!prefix.isEmpty()) prefix+=": ";
name = prefix + convertToXML(fd->localName());
found = TRUE;
}
}
}
else if (md && (md->getClassDef() || md->getNamespaceDef()))
// member in class or namespace scope
{
SrcLangExt lang = md->getLanguage();
+ getLanguageSpecificSeparator(lang) + prefix;
found = TRUE;
}
else if (scope) // some thing else? -> show scope
{
name = prefix + convertToXML(scope->name());
found = TRUE;
}
if (!found) // fallback
{
name = prefix + "("+theTranslator->trGlobalNamespace()+")";
}
return name;
}

Member Data Documentation

const Definition* SymbolContext::Private::m_def
private

Definition at line 9539 of file context.cpp.

Referenced by anchor(), fileName(), relPath(), and scope().

const Definition* SymbolContext::Private::m_nextDef
private

Definition at line 9541 of file context.cpp.

Referenced by scope().

const Definition* SymbolContext::Private::m_prevDef
private

Definition at line 9540 of file context.cpp.

Referenced by scope().

PropertyMapper< SymbolContext::Private > SymbolContext::Private::s_inst
staticprivate

Definition at line 9542 of file context.cpp.

Referenced by get(), and Private().


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