Пример #1
0
void MemberList::writeDocumentation(OutputList &ol,
                     const char *scopeName, Definition *container,
                     const char *title,bool showEnumValues,bool showInline)
{
  //printf("MemberList::writeDocumentation()\n");

  countDocMembers(showEnumValues);
  if (numDocMembers()==0) return;

  if (title)
  {
    ol.pushGeneratorState();
      ol.disable(OutputGenerator::Html);
      ol.writeRuler();
    ol.popGeneratorState();
    ol.startGroupHeader(showInline ? 2 : 0);
    ol.parseText(title);
    ol.endGroupHeader(showInline ? 2 : 0);
  }
  ol.startMemberDocList();
  
  MemberListIterator mli(*this);
  MemberDef *md;
  for ( ; (md=mli.current()) ; ++mli)
  {
    md->writeDocumentation(this,ol,scopeName,container,
                           m_inGroup,showEnumValues,showInline);
  }
  if (memberGroupList)
  {
    //printf("MemberList::writeDocumentation()  --  member groups\n");
    MemberGroupListIterator mgli(*memberGroupList);
    MemberGroup *mg;
    for (;(mg=mgli.current());++mgli)
    {
      mg->writeDocumentation(ol,scopeName,container,showEnumValues,showInline);
    }
  }
  ol.endMemberDocList();
}
Пример #2
0
void MemberList::writeDocumentation(OutputList &ol,
                                    const char *scopeName, Definition *container,
                                    const char *title,bool showEnumValues,bool showInline)
{
    //printf("MemberList::writeDocumentation()\n");

    countDocMembers(showEnumValues);
    if (numDocMembers()==0) return;

    if (title)
    {
        ol.pushGeneratorState();
        ol.disable(OutputGenerator::Html);
        ol.writeRuler();
        ol.popGeneratorState();
        ol.startGroupHeader(showInline ? 2 : 0);
        ol.parseText(title);
        ol.endGroupHeader(showInline ? 2 : 0);
    }
    ol.startMemberDocList();

    MemberListIterator mli(*this);
    MemberDef *md;

    // count the number of overloaded members
    QDict<uint> overloadTotalDict(67);
    QDict<uint> overloadCountDict(67);
    overloadTotalDict.setAutoDelete(TRUE);
    overloadCountDict.setAutoDelete(TRUE);
    for (mli.toFirst() ; (md=mli.current()) ; ++mli)
    {
        if (md->isDetailedSectionVisible(m_inGroup,container->definitionType()==Definition::TypeFile) &&
                !(md->isEnumValue() && !showInline))
        {
            uint *pCount = overloadTotalDict.find(md->name());
            if (pCount)
            {
                (*pCount)++;
            }
            else
            {
                overloadTotalDict.insert(md->name(),new uint(1));
                overloadCountDict.insert(md->name(),new uint(1));
            }
        }
    }

    for (mli.toFirst() ; (md=mli.current()) ; ++mli)
    {
        if (md->isDetailedSectionVisible(m_inGroup,container->definitionType()==Definition::TypeFile) &&
                !(md->isEnumValue() && !showInline))
        {
            uint overloadCount = *overloadTotalDict.find(md->name());
            uint *pCount = overloadCountDict.find(md->name());
            md->writeDocumentation(this,*pCount,overloadCount,ol,scopeName,container,
                                   m_inGroup,showEnumValues,showInline);
            (*pCount)++;
        }
    }
    if (memberGroupList)
    {
        printf("MemberList::writeDocumentation()  --  member groups %d\n",memberGroupList->count());
        MemberGroupListIterator mgli(*memberGroupList);
        MemberGroup *mg;
        for (; (mg=mgli.current()); ++mgli)
        {
            mg->writeDocumentation(ol,scopeName,container,showEnumValues,showInline);
        }
    }
    ol.endMemberDocList();
}