Ejemplo n.º 1
0
void GroupDef::sortMemberLists()
{
  MemberList *ml = m_memberLists.first();
  while (ml)
  {
    if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
    ml = m_memberLists.next();
  }
}
Ejemplo n.º 2
0
void GroupDef::sortMemberLists()
{
  QListIterator<MemberList> mli(m_memberLists);
  MemberList *ml;
  for (;(ml=mli.current());++mli)
  {
    if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
  }
}
Ejemplo n.º 3
0
void NamespaceDef::sortMemberLists()
{
  QListIterator<MemberList> mli(m_memberLists);
  MemberList *ml;
  for (mli.toFirst();(ml=mli.current());++mli)
  {
    if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
  }
  if (classSDict)
  {
    classSDict->sort();
  }
  if (namespaceSDict)
  {
    namespaceSDict->sort();
  }
}
Ejemplo n.º 4
0
void NamespaceDef::writeDocumentation(OutputList &ol)
{
    static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
    //static bool outputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
    //static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");

    QCString pageTitle = title();
    startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_NamespaceVisible,!generateTreeView);

    if (!generateTreeView)
    {
        if (getOuterScope()!=Doxygen::globalScope)
        {
            writeNavigationPath(ol);
        }
        ol.endQuickIndices();
    }

    startTitle(ol,getOutputFileBase(),this);
    ol.parseText(pageTitle);
    addGroupListToTitle(ol,this);
    addNamespaceAttributes(ol);
    endTitle(ol,getOutputFileBase(),displayName());
    ol.startContents();

    if (Doxygen::searchIndex)
    {
        Doxygen::searchIndex->setCurrentDoc(this,anchor(),FALSE);
        Doxygen::searchIndex->addWord(localName(),TRUE);
    }

    Doxygen::indexList->addIndexItem(this,0);

    //---------------------------------------- start flexible part -------------------------------

    SrcLangExt lang = getLanguage();
    QListIterator<LayoutDocEntry> eli(
        LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace));
    LayoutDocEntry *lde;
    for (eli.toFirst(); (lde=eli.current()); ++eli)
    {
        switch (lde->kind())
        {
        case LayoutDocEntry::BriefDesc:
            writeBriefDescription(ol);
            break;
        case LayoutDocEntry::MemberDeclStart:
            startMemberDeclarations(ol);
            break;
        case LayoutDocEntry::NamespaceClasses:
        {
            LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
            writeClassDeclarations(ol,ls->title(lang));
        }
        break;
        case LayoutDocEntry::NamespaceNestedNamespaces:
        {
            LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
            writeNamespaceDeclarations(ol,ls->title(lang),false);
        }
        break;
        case LayoutDocEntry::NamespaceNestedConstantGroups:
        {
            LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
            writeNamespaceDeclarations(ol,ls->title(lang),true);
        }
        break;
        case LayoutDocEntry::MemberGroups:
            writeMemberGroups(ol);
            break;
        case LayoutDocEntry::MemberDecl:
        {
            LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
            writeMemberDeclarations(ol,lmd->type,lmd->title(lang));
        }
        break;
        case LayoutDocEntry::MemberDeclEnd:
            endMemberDeclarations(ol);
            break;
        case LayoutDocEntry::DetailedDesc:
        {
            LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
            writeDetailedDescription(ol,ls->title(lang));
        }
        break;
        case LayoutDocEntry::MemberDefStart:
            startMemberDocumentation(ol);
            break;
        case LayoutDocEntry::NamespaceInlineClasses:
            writeInlineClasses(ol);
            break;
        case LayoutDocEntry::MemberDef:
        {
            LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde;
            writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
        }
        break;
        case LayoutDocEntry::MemberDefEnd:
            endMemberDocumentation(ol);
            break;
        case LayoutDocEntry::AuthorSection:
            writeAuthorSection(ol);
            break;
        case LayoutDocEntry::ClassIncludes:
        case LayoutDocEntry::ClassInheritanceGraph:
        case LayoutDocEntry::ClassNestedClasses:
        case LayoutDocEntry::ClassCollaborationGraph:
        case LayoutDocEntry::ClassAllMembersLink:
        case LayoutDocEntry::ClassUsedFiles:
        case LayoutDocEntry::ClassInlineClasses:
        case LayoutDocEntry::FileClasses:
        case LayoutDocEntry::FileNamespaces:
        case LayoutDocEntry::FileConstantGroups:
        case LayoutDocEntry::FileIncludes:
        case LayoutDocEntry::FileIncludeGraph:
        case LayoutDocEntry::FileIncludedByGraph:
        case LayoutDocEntry::FileSourceLink:
        case LayoutDocEntry::FileInlineClasses:
        case LayoutDocEntry::GroupClasses:
        case LayoutDocEntry::GroupInlineClasses:
        case LayoutDocEntry::GroupNamespaces:
        case LayoutDocEntry::GroupDirs:
        case LayoutDocEntry::GroupNestedGroups:
        case LayoutDocEntry::GroupFiles:
        case LayoutDocEntry::GroupGraph:
        case LayoutDocEntry::GroupPageDocs:
        case LayoutDocEntry::DirSubDirs:
        case LayoutDocEntry::DirFiles:
        case LayoutDocEntry::DirGraph:
            err("Internal inconsistency: member %d should not be part of "
                "LayoutDocManager::Namespace entry list\n",lde->kind());
            break;
        }
    }

    //---------------------------------------- end flexible part -------------------------------

    ol.endContents();

    endFileWithNavPath(this,ol);

    if (Config_getBool("SEPARATE_MEMBER_PAGES"))
    {
        MemberList *allMemberList = getMemberList(MemberListType_allMembersList);
        if (allMemberList) allMemberList->sort();
        writeMemberPages(ol);
    }
}
Ejemplo n.º 5
0
/*! Write the documentation page for this file to the file of output
    generators \a ol. 
*/
void FileDef::writeDocumentation(OutputList &ol)
{
  static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
  //funcList->countDecMembers();
  
  //QCString fn = name();
  //if (Config_getBool("FULL_PATH_NAMES"))
  //{
  //  fn.prepend(stripFromPath(getPath().copy()));
  //}

  //printf("WriteDocumentation diskname=%s\n",diskname.data());
  
  QCString versionTitle;
  if (!fileVersion.isEmpty())
  {
    versionTitle=("("+fileVersion+")");
  }
  QCString title = docname+versionTitle;
  QCString pageTitle=theTranslator->trFileReference(docname);

  if (Config_getBool("SHOW_DIRECTORIES") && getDirDef())
  {
    startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_FileVisible,!generateTreeView);
    if (!generateTreeView)
    {
      getDirDef()->writeNavigationPath(ol);
      ol.endQuickIndices();
    }
    QCString pageTitleShort=theTranslator->trFileReference(name());
    startTitle(ol,getOutputFileBase(),this);
    ol.pushGeneratorState();
      ol.disableAllBut(OutputGenerator::Html);
      ol.parseText(pageTitleShort); // Html only
      ol.enableAll();
      ol.disable(OutputGenerator::Html);
      ol.parseText(pageTitle); // other output formats
    ol.popGeneratorState();
    addGroupListToTitle(ol,this);
    endTitle(ol,getOutputFileBase(),title);
  }
  else
  {
    startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_FileVisible,!generateTreeView);
    if (!generateTreeView)
    {
      ol.endQuickIndices();
    }
    startTitle(ol,getOutputFileBase(),this);
    ol.parseText(pageTitle);
    addGroupListToTitle(ol,this);
    endTitle(ol,getOutputFileBase(),title);
  }

  ol.startContents();

  if (!fileVersion.isEmpty())
  {
    ol.disableAllBut(OutputGenerator::Html);
    ol.startProjectNumber();
    ol.docify(versionTitle);
    ol.endProjectNumber();
    ol.enableAll();
  }
  
  if (Doxygen::searchIndex)
  {
    Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase());
    Doxygen::searchIndex->addWord(localName(),TRUE);
  }
  
  if (!Config_getString("GENERATE_TAGFILE").isEmpty()) 
  {
    Doxygen::tagFile << "  <compound kind=\"file\">" << endl;
    Doxygen::tagFile << "    <name>" << convertToXML(name()) << "</name>" << endl;
    Doxygen::tagFile << "    <path>" << convertToXML(getPath()) << "</path>" << endl;
    Doxygen::tagFile << "    <filename>" 
                     << convertToXML(getOutputFileBase()) 
                     << "</filename>" << endl;
  }

  //---------------------------------------- start flexible part -------------------------------
  
  QListIterator<LayoutDocEntry> eli(
      LayoutDocManager::instance().docEntries(LayoutDocManager::File));
  LayoutDocEntry *lde;
  for (eli.toFirst();(lde=eli.current());++eli)
  {
    switch (lde->kind())
    {
      case LayoutDocEntry::BriefDesc: 
        writeBriefDescription(ol);
        break; 
      case LayoutDocEntry::MemberDeclStart: 
        startMemberDeclarations(ol);
        break; 
      case LayoutDocEntry::FileIncludes:
        writeIncludeFiles(ol);
        break;
      case LayoutDocEntry::FileIncludeGraph:
        writeIncludeGraph(ol);
        break;
      case LayoutDocEntry::FileIncludedByGraph:
        writeIncludedByGraph(ol);
        break;
      case LayoutDocEntry::FileSourceLink:
        writeSourceLink(ol);
        break;
      case LayoutDocEntry::FileClasses: 
        {
          LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
          writeClassDeclarations(ol,ls->title);
        }
        break; 
      case LayoutDocEntry::FileNamespaces: 
        {
          LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
          writeNamespaceDeclarations(ol,ls->title);
        }
        break; 
      case LayoutDocEntry::MemberGroups: 
        writeMemberGroups(ol);
        break; 
      case LayoutDocEntry::MemberDecl: 
        {
          LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
          writeMemberDeclarations(ol,lmd->type,lmd->title);
        }
        break; 
      case LayoutDocEntry::MemberDeclEnd: 
        endMemberDeclarations(ol);
        break;
      case LayoutDocEntry::DetailedDesc: 
        {
          LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
          writeDetailedDescription(ol,ls->title);
        }
        break;
      case LayoutDocEntry::MemberDefStart: 
        startMemberDocumentation(ol);
        break; 
      case LayoutDocEntry::FileInlineClasses:
        writeInlineClasses(ol);
        break;
      case LayoutDocEntry::MemberDef: 
        {
          LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde;
          writeMemberDocumentation(ol,lmd->type,lmd->title);
        }
        break;
      case LayoutDocEntry::MemberDefEnd: 
        endMemberDocumentation(ol);
        break;
      case LayoutDocEntry::AuthorSection: 
        writeAuthorSection(ol);
        break;
      case LayoutDocEntry::ClassIncludes:
      case LayoutDocEntry::ClassInheritanceGraph:
      case LayoutDocEntry::ClassNestedClasses:
      case LayoutDocEntry::ClassCollaborationGraph:
      case LayoutDocEntry::ClassAllMembersLink:
      case LayoutDocEntry::ClassUsedFiles:
      case LayoutDocEntry::ClassInlineClasses:
      case LayoutDocEntry::NamespaceNestedNamespaces:
      case LayoutDocEntry::NamespaceClasses:
      case LayoutDocEntry::NamespaceInlineClasses:
      case LayoutDocEntry::GroupClasses: 
      case LayoutDocEntry::GroupInlineClasses: 
      case LayoutDocEntry::GroupNamespaces:
      case LayoutDocEntry::GroupDirs: 
      case LayoutDocEntry::GroupNestedGroups: 
      case LayoutDocEntry::GroupFiles:
      case LayoutDocEntry::GroupGraph: 
      case LayoutDocEntry::GroupPageDocs:
      case LayoutDocEntry::DirSubDirs:
      case LayoutDocEntry::DirFiles:
      case LayoutDocEntry::DirGraph:
        err("Internal inconsistency: member %d should not be part of "
            "LayoutDocManager::File entry list\n",lde->kind());
        break;
    }
  }

  //---------------------------------------- end flexible part -------------------------------

  if (!Config_getString("GENERATE_TAGFILE").isEmpty()) 
  {
    writeDocAnchorsToTagFile();
    Doxygen::tagFile << "  </compound>" << endl;
  }

  ol.endContents();

  if (generateTreeView)
  {
    writeNavigationPath(ol);
  }

  endFile(ol,TRUE);

  if (Config_getBool("SEPARATE_MEMBER_PAGES"))
  {
    MemberList *ml = getMemberList(MemberList::allMembersList);
    if (ml) ml->sort();
    writeMemberPages(ol);
  }
}
Ejemplo n.º 6
0
void NamespaceDef::writeDocumentation(OutputList &ol)
{
  static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
  static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
  static bool outputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");

  QCString pageTitle;
  if (outputJava)
  {
    pageTitle = theTranslator->trPackage(displayName());
  }
  else if (fortranOpt)
  {
    pageTitle = theTranslator->trModuleReference(displayName());
  }
  else
  {
    pageTitle = theTranslator->trNamespaceReference(displayName());
  }
  startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_NamespaceVisible,!generateTreeView);

  if (!generateTreeView)
  {
    if (getOuterScope()!=Doxygen::globalScope)
    {
      writeNavigationPath(ol);
    }
    ol.endQuickIndices();
  }

  startTitle(ol,getOutputFileBase(),this);
  ol.parseText(pageTitle,TRUE);
  addGroupListToTitle(ol,this);
  endTitle(ol,getOutputFileBase(),displayName());
  ol.startContents();
  
  if (Doxygen::searchIndex)
  {
    Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase());
    Doxygen::searchIndex->addWord(localName(),TRUE);
  }

  bool generateTagFile = !Config_getString("GENERATE_TAGFILE").isEmpty();
  if (generateTagFile)
  {
    Doxygen::tagFile << "  <compound kind=\"namespace\">" << endl;
    Doxygen::tagFile << "    <name>" << convertToXML(name()) << "</name>" << endl;
    Doxygen::tagFile << "    <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
  }

  Doxygen::indexList.addIndexItem(this,0);

  //---------------------------------------- start flexible part -------------------------------

  QListIterator<LayoutDocEntry> eli(
      LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace));
  LayoutDocEntry *lde;
  for (eli.toFirst();(lde=eli.current());++eli)
  {
    switch (lde->kind())
    {
      case LayoutDocEntry::BriefDesc: 
        writeBriefDescription(ol);
        break; 
      case LayoutDocEntry::MemberDeclStart: 
        startMemberDeclarations(ol);
        break; 
      case LayoutDocEntry::NamespaceClasses: 
        {
          LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
          writeClassDeclarations(ol,ls->title);
        }
        break; 
      case LayoutDocEntry::NamespaceNestedNamespaces: 
        {
          LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
          writeNamespaceDeclarations(ol,ls->title);
        }
        break; 
      case LayoutDocEntry::MemberGroups: 
        writeMemberGroups(ol);
        break; 
      case LayoutDocEntry::MemberDecl: 
        {
          LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
          writeMemberDeclarations(ol,lmd->type,lmd->title);
        }
        break; 
      case LayoutDocEntry::MemberDeclEnd: 
        endMemberDeclarations(ol);
        break;
      case LayoutDocEntry::DetailedDesc: 
        {
          LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
          writeDetailedDescription(ol,ls->title);
        }
        break;
      case LayoutDocEntry::MemberDefStart: 
        startMemberDocumentation(ol);
        break; 
      case LayoutDocEntry::MemberDef: 
        {
          LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde;
          writeMemberDocumentation(ol,lmd->type,lmd->title);
        }
        break;
      case LayoutDocEntry::MemberDefEnd: 
        endMemberDocumentation(ol);
        break;
      case LayoutDocEntry::AuthorSection: 
        writeAuthorSection(ol);
        break;
      case LayoutDocEntry::ClassIncludes:
      case LayoutDocEntry::ClassInheritanceGraph:
      case LayoutDocEntry::ClassNestedClasses:
      case LayoutDocEntry::ClassCollaborationGraph:
      case LayoutDocEntry::ClassAllMembersLink:
      case LayoutDocEntry::ClassUsedFiles:
      case LayoutDocEntry::FileClasses:
      case LayoutDocEntry::FileNamespaces:
      case LayoutDocEntry::FileIncludes:
      case LayoutDocEntry::FileIncludeGraph:
      case LayoutDocEntry::FileIncludedByGraph: 
      case LayoutDocEntry::FileSourceLink:
      case LayoutDocEntry::GroupClasses: 
      case LayoutDocEntry::GroupInlineClasses: 
      case LayoutDocEntry::GroupNamespaces:
      case LayoutDocEntry::GroupDirs: 
      case LayoutDocEntry::GroupNestedGroups: 
      case LayoutDocEntry::GroupFiles:
      case LayoutDocEntry::GroupGraph: 
      case LayoutDocEntry::GroupPageDocs:
      case LayoutDocEntry::DirSubDirs:
      case LayoutDocEntry::DirFiles:
      case LayoutDocEntry::DirGraph:
        err("Internal inconsistency: member %d should not be part of "
            "LayoutDocManager::Namespace entry list\n",lde->kind());
        break;
    }
  }

  //---------------------------------------- end flexible part -------------------------------

  ol.endContents();

  if (generateTreeView)
  {
    writeNavigationPath(ol);
  }

  endFile(ol,TRUE);

  if (generateTagFile)
  {
    writeDocAnchorsToTagFile();
    Doxygen::tagFile << "  </compound>" << endl;
  }

  if (Config_getBool("SEPARATE_MEMBER_PAGES"))
  {
    MemberList *allMemberList = getMemberList(MemberList::allMembersList);
    if (allMemberList) allMemberList->sort();
    writeMemberPages(ol);
  }
}