Permalink
Browse files

Added missing information to template version of the all members list

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Dec 30, 2014
1 parent 6bb0d29 commit f16c156065ac8bc6242870c2ae701252b5d4f9b2
Showing with 98 additions and 13 deletions.
  1. +36 −2 src/context.cpp
  2. +54 −5 templates/html/htmlallmembers.tpl
  3. +8 −6 templates/html/htmlmemdef.tpl
@@ -895,6 +895,14 @@ class TranslateContext::Private : public PropertyMapper
{
return theTranslator->trNoMatches();
}
TemplateVariant enumName() const
{
return theTranslator->trEnumName();
}
TemplateVariant enumValue() const
{
return theTranslator->trEnumValue();
}
Private()
{
//%% string generatedBy
@@ -1049,6 +1057,10 @@ class TranslateContext::Private : public PropertyMapper
addProperty("searching", this,&Private::searching);
//%% string noMatches
addProperty("noMatches", this,&Private::noMatches);
//%% string enumValue
addProperty("enumValue", this,&Private::enumValue);
//%% string enumName
addProperty("enumName", this,&Private::enumName);
m_javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
m_fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
@@ -3211,6 +3223,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
addProperty("isObjCMethod", this,&Private::isObjCMethod);
addProperty("isObjCProperty", this,&Private::isObjCProperty);
addProperty("isAnonymous", this,&Private::isAnonymous);
addProperty("hasParameters", this,&Private::hasParameters);
addProperty("declType", this,&Private::declType);
addProperty("declArgs", this,&Private::declArgs);
addProperty("anonymousType", this,&Private::anonymousType);
@@ -3226,12 +3239,12 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
addProperty("templateAlias", this,&Private::templateAlias);
addProperty("propertyAttrs", this,&Private::propertyAttrs);
addProperty("eventAttrs", this,&Private::eventAttrs);
addProperty("category", this,&Private::category);
addProperty("class", this,&Private::getClass);
addProperty("file", this,&Private::getFile);
addProperty("namespace", this,&Private::getNamespace);
addProperty("definition", this,&Private::definition);
addProperty("parameters", this,&Private::parameters);
addProperty("hasParameterList", this,&Private::hasParameterList);
addProperty("hasConstQualifier", this,&Private::hasConstQualifier);
addProperty("hasVolatileQualifier",this,&Private::hasVolatileQualifier);
addProperty("trailingReturnType", this,&Private::trailingReturnType);
@@ -3257,6 +3270,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
addProperty("hasCallerGraph", this,&Private::hasCallerGraph);
addProperty("callerGraph", this,&Private::callerGraph);
addProperty("fieldType", this,&Private::fieldType);
addProperty("type", this,&Private::type);
m_cache.propertyAttrs.reset(TemplateList::alloc());
if (md && md->isProperty())
@@ -3694,6 +3708,21 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
return TemplateVariant(FALSE);
}
}
TemplateVariant category() const
{
if (!m_cache.category && m_memberDef->category())
{
m_cache.category.reset(ClassContext::alloc(m_memberDef->category()));
}
if (m_cache.category)
{
return m_cache.category.get();
}
else
{
return TemplateVariant(FALSE);
}
}
TemplateVariant getFile() const
{
if (!m_cache.fileDef && m_memberDef->getFileDef())
@@ -3750,7 +3779,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
}
return m_cache.arguments.get();
}
TemplateVariant hasParameterList() const
TemplateVariant hasParameters() const
{
return getDefArgList()!=0;
}
@@ -4142,6 +4171,10 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
return TemplateVariant("");
}
}
TemplateVariant type() const
{
return m_memberDef->typeString();
}
private:
MemberDef *m_memberDef;
struct Cachable
@@ -4154,6 +4187,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private>
SharedPtr<MemberListContext> enumValues;
SharedPtr<FileContext> fileDef;
SharedPtr<NamespaceContext> namespaceDef;
SharedPtr<ClassContext> category;
SharedPtr<ClassContext> classDef;
SharedPtr<ClassContext> anonymousType;
SharedPtr<TemplateList> templateDecls;
@@ -10,13 +10,62 @@
<table class="directory">
{% for mi in compound.allMembersList %}
<tr class="{% cycle 'even' 'odd' %}">
{# TODO: objective-C #}
<td class="entry">{% with obj=mi.member text=mi.ambiguityScope|append:mi.member.name %}
{% include 'htmlobjlink.tpl' %}
{% spaceless %}
{% with member=mi.member %}
{% if member.language=='objc' %}
<td class="entry">
{% if member.isObjCMethod %}
{% if member.isStatic %}+&#160;{% else %}-&#160;{% endif %}
{% endif %}
</td>
{% endif %}
{% if member.isObjCMethod %}
<td class="entry">
{% with obj=member text=member.name %}
{% include 'htmlobjlink.tpl' %}
{% endwith %}
</td>
{%else %}
{# name #}
<td class="entry">
{% with obj=member text=mi.ambiguityScope|append:member.name %}
{% include 'htmlobjlink.tpl' %}
{% endwith %}
{# TODO: add arguments #}
{# TODO: add column with scope #}
{% if member.isEnumeration %}
&#160;{{ tr.enumName }}
{% elif member.isEnumValue %}
&#160;{{ tr.enumValue }}
{% elif member.isTypedef %}
&#160;typedef
{% elif member.isFriend and member.type=='friend class' %}
&#160;class
{% elif member.isFunction or member.isSignal or member.isSlot or (member.isFriend and member.hasParameters) %}
{{ member.declArgs }}
{% endif %}
</td>
{% endif %}
{# class link #}
<td class="entry">
{% if member.category %}
{% with obj=member.category text=member.category.name %}
{% include 'htmlobjlink.tpl' %}
{% endwith %}
{% else %}
{% with obj=member.class text=member.class.name %}
{% include 'htmlobjlink.tpl' %}
{% endwith %}
{% endif %}
</td>
{# labels #}
{% if member.labels %}
<td class="entry">
{% for label in member.labels %}
<span class="mlabel">{{ label }}</span>
{% endfor %}
</td>
{% endif %}
{% endwith %}
{% endspaceless %}
</tr>
{% endfor %}
</table>
@@ -1,6 +1,6 @@
{# inputs: memberListInfo #}
{% if memberListInfo %}
{% if memberListInfo.members|length>0 %}
{% if memberListInfo.members %}
<h2 class="groupheader">{{ memberListInfo.title }}</h2>
{% for member in memberListInfo.members %}
{% if member.hasDetails %} {# TODO: not the same as isDetailedSectionVisible! #}
@@ -9,7 +9,7 @@
<div class="memitem">
<div class="memproto">
{# write template declarations #}
{% if member.language=='cpp' and member.templateDecls|length>0 %}
{% if member.language=='cpp' and member.templateDecls %}
{% for targList in member.templateDecls %}
{% spaceless %}
<div class="memtemplate">
@@ -23,17 +23,19 @@
{% endfor %}
{% endif %}
{# start of labels if present #}
{% if member.labels|length>0 %}
{% if member.labels %}
<table class="mlabels"><tr><td class="mlabels-left">
{% endif %}
<table class="memname">
<tr><td class="memname">
{{ member.definition }}
{# write argument list #}
{# TODO: TCL #}
{% if member.hasParameterList %}
{% if member.hasParameters %}
{% if member.isObjCMethod %}
{% if member.parameters %}
</td><td></td>
{% endif %}
{% for arg in member.parameters %}
{% if not forloop.first %}
<tr><td class="paramkey">{{ arg.namePart }}</td><td></td>
@@ -43,7 +45,7 @@
<em>{% if not arg.name %}{{ arg.type }}{% else %}{{ arg.name }}{% endif %}</em>
{% endif %}
{% if not forloop.last %}
,</td></tr>
</td></tr>
{% endif %}
{% endfor %}
{% else %}
@@ -109,7 +111,7 @@
</td></tr>
</table>
{# end of labels if present #}
{% if member.labels|length>0 %}
{% if member.labels %}
</td><td class="mlabels-right">{% spaceless %}
{% for label in member.labels %}
<span class="mlabel">{{ label }}</span>

0 comments on commit f16c156

Please sign in to comment.