summaryrefslogtreecommitdiffstats
path: root/src/context.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-02-08 22:33:01 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-02-08 22:33:01 (GMT)
commit9434ecb13e1f3e2901b78d3e41e7f1d7d9469434 (patch)
tree2bfe20210fbbcf2f05bca002eca960061ecf1b66 /src/context.cpp
parentae3a22ba276a2e446a460274e0bff8a9bdf4af7d (diff)
downloadDoxygen-9434ecb13e1f3e2901b78d3e41e7f1d7d9469434.zip
Doxygen-9434ecb13e1f3e2901b78d3e41e7f1d7d9469434.tar.gz
Doxygen-9434ecb13e1f3e2901b78d3e41e7f1d7d9469434.tar.bz2
Add template context for annotated class index
Diffstat (limited to 'src/context.cpp')
-rw-r--r--src/context.cpp57
1 files changed, 53 insertions, 4 deletions
diff --git a/src/context.cpp b/src/context.cpp
index 055e653..d741f48 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -1990,6 +1990,7 @@ class NamespaceContext::Private : public DefinitionContext<NamespaceContext::Pri
addProperty("highlight",this,&Private::highlight);
addProperty("subhighlight",this,&Private::subHighlight);
addProperty("compoundType",this,&Private::compoundType);
+ addProperty("hasDetails",this,&Private::hasDetails);
}
TemplateVariant title() const
{
@@ -2007,6 +2008,10 @@ class NamespaceContext::Private : public DefinitionContext<NamespaceContext::Pri
{
return m_namespaceDef->compoundTypeString();
}
+ TemplateVariant hasDetails() const
+ {
+ return m_namespaceDef->hasDetailedDescription();
+ }
private:
NamespaceDef *m_namespaceDef;
};
@@ -4074,11 +4079,18 @@ class NestingNodeContext::Private : public PropertyMapper
addProperty("class",this,&Private::getClass);
//%% [optional] Namespace namespace: namespace info (if this node represents a namespace)
addProperty("namespace",this,&Private::getNamespace);
- //%% [optional] file
- //%% id
+ //%% int id
addProperty("id",this,&Private::id);
- //%% level
+ //%% string level
addProperty("level",this,&Private::level);
+ //%% string name
+ addProperty("name",this,&Private::name);
+ //%% string brief
+ addProperty("brief",this,&Private::brief);
+ //%% bool isLinkable
+ addProperty("isLinkable",this,&Private::isLinkable);
+ addProperty("anchor",this,&Private::anchor);
+ addProperty("fileName",this,&Private::fileName);
addNamespaces(addCls);
addClasses();
@@ -4132,7 +4144,43 @@ class NestingNodeContext::Private : public PropertyMapper
result+=QCString().setNum(m_index)+"_";
return result;
}
-
+ TemplateVariant name() const
+ {
+ return m_def->name();
+ }
+ QCString relPathAsString() const
+ {
+ static bool createSubdirs = Config_getBool("CREATE_SUBDIRS");
+ return createSubdirs ? QCString("../../") : QCString("");
+ }
+ TemplateVariant brief() const
+ {
+ if (!m_cache.brief)
+ {
+ if (m_def->hasBriefDescription())
+ {
+ m_cache.brief.reset(new TemplateVariant(parseDoc(m_def,m_def->briefFile(),m_def->briefLine(),
+ "",m_def->briefDescription(),TRUE)));
+ }
+ else
+ {
+ m_cache.brief.reset(new TemplateVariant(""));
+ }
+ }
+ return *m_cache.brief;
+ }
+ TemplateVariant isLinkable() const
+ {
+ return m_def->isLinkable();
+ }
+ TemplateVariant anchor() const
+ {
+ return m_def->anchor();
+ }
+ TemplateVariant fileName() const
+ {
+ return m_def->getOutputFileBase();
+ }
void addClasses()
{
@@ -4164,6 +4212,7 @@ class NestingNodeContext::Private : public PropertyMapper
{
ScopedPtr<ClassContext> classContext;
ScopedPtr<NamespaceContext> namespaceContext;
+ ScopedPtr<TemplateVariant> brief;
};
mutable Cachable m_cache;
};