Orb/Doxygen/src/filedef.cpp
author Jonathan Harrington <jonathan.harrington@nokia.com>
Wed, 11 Aug 2010 14:49:30 +0100
changeset 4 468f4c8d3d5b
parent 0 42188c7ea2d9
permissions -rw-r--r--
Orb version 0.2.0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     1
/******************************************************************************
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     2
 *
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     3
 * 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     4
 *
4
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
     5
 * Copyright (C) 1997-2010 by Dimitri van Heesch.
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     6
 *
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     7
 * Permission to use, copy, modify, and distribute this software and its
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     8
 * documentation under the terms of the GNU General Public License is hereby 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
     9
 * granted. No representations are made about the suitability of this software 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    10
 * for any purpose. It is provided "as is" without express or implied warranty.
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    11
 * See the GNU General Public License for more details.
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    12
 *
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    13
 * Documents produced by Doxygen are derivative works derived from the
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    14
 * input used in their production; they are not affected by this license.
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    15
 *
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    16
 */
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    17
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    18
#include "qtbc.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    19
#include "memberlist.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    20
#include "classlist.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    21
#include "filedef.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    22
#include "doxygen.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    23
#include "memberdef.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    24
#include "classdef.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    25
#include "namespacedef.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    26
#include "util.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    27
#include "language.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    28
#include "outputlist.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    29
#include "dot.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    30
#include "message.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    31
#include "docparser.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    32
#include "searchindex.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    33
#include "htags.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    34
#include "parserintf.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    35
#include "portable.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    36
#include "vhdldocgen.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    37
#include "debug.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    38
#include "layout.h"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    39
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    40
//---------------------------------------------------------------------------
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    41
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    42
class DevNullCodeDocInterface : public CodeOutputInterface
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    43
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    44
  public:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    45
    virtual void codify(const char *) {}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    46
    virtual void writeCodeLink(const char *,const char *,
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    47
                               const char *,const char *,
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    48
                               const char *) {}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    49
    virtual void writeLineNumber(const char *,const char *,
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    50
                                 const char *,int) {}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    51
    virtual void startCodeLine() {}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    52
    virtual void endCodeLine() {}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    53
    virtual void startCodeAnchor(const char *) {}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    54
    virtual void endCodeAnchor() {}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    55
    virtual void startFontClass(const char *) {}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    56
    virtual void endFontClass() {}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    57
    virtual void writeCodeAnchor(const char *) {}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    58
    virtual void linkableSymbol(int, const char *,Definition *,Definition *) {}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    59
};
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    60
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    61
//---------------------------------------------------------------------------
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    62
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    63
/*! create a new file definition, where \a p is the file path, 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    64
    \a nm the file name, and \a ref is an HTML anchor name if the
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    65
    file was read from a tag file or 0 otherwise
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    66
*/
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    67
FileDef::FileDef(const char *p,const char *nm,
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    68
                 const char *lref,const char *dn)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    69
   : Definition((QCString)p+nm,1,nm)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    70
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    71
  path=p;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    72
  filepath=path+nm;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    73
  filename=nm;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    74
  diskname=dn;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    75
  if (diskname.isEmpty()) diskname=nm;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    76
  setReference(lref);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    77
  classSDict        = 0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    78
  includeList       = 0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    79
  includeDict       = 0; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    80
  includedByList    = 0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    81
  includedByDict    = 0; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    82
  namespaceSDict    = 0; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    83
  srcDefDict        = 0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    84
  srcMemberDict     = 0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    85
  usingDirList      = 0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    86
  usingDeclList     = 0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    87
  package           = 0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    88
  isSource          = FALSE; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    89
  docname           = nm;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    90
  dir               = 0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    91
  if (Config_getBool("FULL_PATH_NAMES"))
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    92
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    93
    docname.prepend(stripFromPath(path.copy()));
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    94
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    95
  m_isJava          = name().right(5)==".java";
4
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
    96
  m_isCSharp        = name().right(5)==".cs";
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    97
  memberGroupSDict = 0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    98
  acquireFileVersion();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
    99
  m_subGrouping=Config_getBool("SUBGROUPING");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   100
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   101
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   102
/*! destroy the file definition */
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   103
FileDef::~FileDef()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   104
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   105
  delete classSDict;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   106
  delete includeDict;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   107
  delete includeList;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   108
  delete includedByDict;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   109
  delete includedByList;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   110
  delete namespaceSDict;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   111
  delete srcDefDict;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   112
  delete srcMemberDict;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   113
  delete usingDirList;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   114
  delete usingDeclList;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   115
  delete memberGroupSDict;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   116
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   117
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   118
/*! Compute the HTML anchor names for all members in the class */ 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   119
void FileDef::computeAnchors()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   120
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   121
  MemberList *ml = getMemberList(MemberList::allMembersList);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   122
  if (ml) setAnchors(0,'a',ml);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   123
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   124
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   125
void FileDef::distributeMemberGroupDocumentation()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   126
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   127
  //printf("FileDef::distributeMemberGroupDocumentation()\n");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   128
  if (memberGroupSDict)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   129
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   130
    MemberGroupSDict::Iterator mgli(*memberGroupSDict);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   131
    MemberGroup *mg;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   132
    for (;(mg=mgli.current());++mgli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   133
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   134
      mg->distributeMemberGroupDocumentation();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   135
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   136
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   137
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   138
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   139
void FileDef::findSectionsInDocumentation()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   140
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   141
  docFindSections(documentation(),this,0,docFile());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   142
  if (memberGroupSDict)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   143
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   144
    MemberGroupSDict::Iterator mgli(*memberGroupSDict);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   145
    MemberGroup *mg;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   146
    for (;(mg=mgli.current());++mgli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   147
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   148
      mg->findSectionsInDocumentation();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   149
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   150
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   151
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   152
  QListIterator<MemberList> mli(m_memberLists);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   153
  MemberList *ml;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   154
  for (mli.toFirst();(ml=mli.current());++mli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   155
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   156
    if (ml->listType()&MemberList::declarationLists)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   157
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   158
      ml->findSectionsInDocumentation();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   159
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   160
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   161
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   162
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   163
void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   164
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   165
  if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   166
      !documentation().isEmpty() ||
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   167
      (Config_getBool("SOURCE_BROWSER") && getStartBodyLine()!=-1 && getBodyDef())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   168
     )
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   169
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   170
    ol.writeRuler();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   171
    ol.pushGeneratorState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   172
    ol.disableAllBut(OutputGenerator::Html);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   173
      ol.writeAnchor(0,"_details"); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   174
    ol.popGeneratorState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   175
    ol.startGroupHeader();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   176
    ol.parseText(title);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   177
    ol.endGroupHeader();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   178
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   179
    ol.startTextBlock();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   180
    if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   181
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   182
      ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   183
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   184
    if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") && 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   185
        !documentation().isEmpty())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   186
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   187
      ol.pushGeneratorState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   188
        ol.disable(OutputGenerator::Man);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   189
        ol.disable(OutputGenerator::RTF);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   190
        // ol.newParagraph(); // FIXME:PARA
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   191
        ol.enableAll();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   192
        ol.disableAllBut(OutputGenerator::Man);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   193
        ol.writeString("\n\n");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   194
      ol.popGeneratorState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   195
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   196
    if (!documentation().isEmpty())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   197
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   198
      ol.parseDoc(docFile(),docLine(),this,0,documentation()+"\n",TRUE,FALSE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   199
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   200
    //printf("Writing source ref for file %s\n",name().data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   201
    if (Config_getBool("SOURCE_BROWSER")) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   202
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   203
      ol.startParagraph();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   204
      QCString refText = theTranslator->trDefinedInSourceFile();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   205
      int fileMarkerPos = refText.find("@0");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   206
      if (fileMarkerPos!=-1) // should always pass this.
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   207
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   208
        ol.parseText(refText.left(fileMarkerPos)); //text left from marker 1
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   209
        ol.writeObjectLink(0,getSourceFileBase(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   210
            0,name());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   211
        ol.parseText(refText.right(
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   212
              refText.length()-fileMarkerPos-2)); // text right from marker 2
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   213
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   214
      ol.endParagraph();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   215
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   216
    ol.endTextBlock();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   217
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   218
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   219
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   220
void FileDef::writeBriefDescription(OutputList &ol)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   221
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   222
  if (!briefDescription().isEmpty()) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   223
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   224
    ol.startParagraph();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   225
    ol.parseDoc(briefFile(),briefLine(),this,0,
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   226
                briefDescription(),TRUE,FALSE,0,TRUE,FALSE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   227
    ol.pushGeneratorState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   228
    ol.disable(OutputGenerator::RTF);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   229
    ol.writeString(" \n");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   230
    ol.enable(OutputGenerator::RTF);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   231
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   232
    if (Config_getBool("REPEAT_BRIEF") ||
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   233
        !documentation().isEmpty()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   234
       )
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   235
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   236
      ol.disableAllBut(OutputGenerator::Html);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   237
      ol.startTextLink(0,"_details");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   238
      ol.parseText(theTranslator->trMore());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   239
      ol.endTextLink();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   240
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   241
    ol.popGeneratorState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   242
    ol.endParagraph();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   243
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   244
    //ol.pushGeneratorState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   245
    //ol.disable(OutputGenerator::RTF);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   246
    //ol.newParagraph();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   247
    //ol.popGeneratorState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   248
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   249
  ol.writeSynopsis();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   250
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   251
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   252
void FileDef::writeIncludeFiles(OutputList &ol)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   253
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   254
  if (/*Config_getBool("SHOW_INCLUDE_FILES") &&*/ includeList && 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   255
      includeList->count()>0)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   256
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   257
    ol.startTextBlock(TRUE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   258
    QListIterator<IncludeInfo> ili(*includeList);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   259
    IncludeInfo *ii;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   260
    for (;(ii=ili.current());++ili)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   261
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   262
      FileDef *fd=ii->fileDef;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   263
      bool isIDLorJava = FALSE;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   264
      if (fd)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   265
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   266
        isIDLorJava = fd->name().right(4)==".idl" ||   // M$ or Corba IDL
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   267
                      fd->name().right(5)==".pidl" ||
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   268
                      fd->name().right(5)==".java" ||  // Sun's Java
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   269
                      fd->name().right(4)==".jsl";     // M$ J#
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   270
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   271
      ol.startTypewriter();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   272
      if (isIDLorJava) // IDL/Java include
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   273
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   274
        ol.docify("import ");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   275
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   276
      else if (ii->imported) // Objective-C include
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   277
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   278
        ol.docify("#import ");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   279
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   280
      else // C/C++ include
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   281
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   282
        ol.docify("#include ");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   283
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   284
      if (ii->local || isIDLorJava)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   285
        ol.docify("\"");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   286
      else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   287
        ol.docify("<");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   288
      ol.disable(OutputGenerator::Html);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   289
      ol.docify(ii->includeName);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   290
      ol.enableAll();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   291
      ol.disableAllBut(OutputGenerator::Html);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   292
      
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   293
      // Here we use the include file name as it appears in the file.
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   294
      // we could also we the name as it is used within doxygen,
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   295
      // then we should have used fd->docName() instead of ii->includeName
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   296
      if (fd && fd->isLinkable())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   297
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   298
        ol.writeObjectLink(fd->getReference(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   299
            fd->generateSourceFile() ? fd->includeName() : fd->getOutputFileBase(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   300
            0,ii->includeName);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   301
        if (!Config_getString("GENERATE_TAGFILE").isEmpty() && !fd->isReference()) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   302
        {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   303
          const char *locStr = (ii->local    || isIDLorJava) ? "yes" : "no";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   304
          const char *impStr = (ii->imported || isIDLorJava) ? "yes" : "no";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   305
          Doxygen::tagFile << "    <includes id=\"" 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   306
                           << convertToXML(fd->getOutputFileBase()) << "\" "
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   307
                           << "name=\"" << convertToXML(fd->name()) << "\" "
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   308
                           << "local=\"" << locStr << "\" "
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   309
                           << "imported=\"" << impStr << "\">"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   310
                           << convertToXML(ii->includeName)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   311
                           << "</includes>" 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   312
                           << endl;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   313
        }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   314
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   315
      else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   316
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   317
        ol.docify(ii->includeName);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   318
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   319
      
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   320
      ol.enableAll();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   321
      if (ii->local || isIDLorJava)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   322
        ol.docify("\"");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   323
      else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   324
        ol.docify(">");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   325
      if (isIDLorJava) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   326
        ol.docify(";");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   327
      ol.endTypewriter();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   328
      ol.lineBreak();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   329
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   330
    ol.endTextBlock();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   331
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   332
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   333
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   334
void FileDef::writeIncludeGraph(OutputList &ol)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   335
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   336
  if (Config_getBool("HAVE_DOT") /*&& Config_getBool("INCLUDE_GRAPH")*/)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   337
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   338
    //printf("Graph for file %s\n",name().data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   339
    DotInclDepGraph incDepGraph(this,FALSE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   340
    if (!incDepGraph.isTrivial() && !incDepGraph.isTooBig())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   341
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   342
      ol.startTextBlock(); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   343
      ol.disable(OutputGenerator::Man);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   344
      ol.startInclDepGraph();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   345
      ol.parseText(theTranslator->trInclDepGraph(name()));
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   346
      ol.endInclDepGraph(incDepGraph);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   347
      ol.enableAll();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   348
      ol.endTextBlock(TRUE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   349
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   350
    //incDepGraph.writeGraph(Config_getString("HTML_OUTPUT"),fd->getOutputFileBase());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   351
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   352
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   353
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   354
void FileDef::writeIncludedByGraph(OutputList &ol)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   355
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   356
  if (Config_getBool("HAVE_DOT") /*&& Config_getBool("INCLUDED_BY_GRAPH")*/)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   357
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   358
    //printf("Graph for file %s\n",name().data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   359
    DotInclDepGraph incDepGraph(this,TRUE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   360
    if (!incDepGraph.isTrivial() && !incDepGraph.isTooBig())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   361
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   362
      ol.startTextBlock(); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   363
      ol.disable(OutputGenerator::Man);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   364
      ol.startInclDepGraph();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   365
      ol.parseText(theTranslator->trInclByDepGraph());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   366
      ol.endInclDepGraph(incDepGraph);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   367
      ol.enableAll();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   368
      ol.endTextBlock(TRUE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   369
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   370
    //incDepGraph.writeGraph(Config_getString("HTML_OUTPUT"),fd->getOutputFileBase());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   371
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   372
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   373
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   374
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   375
void FileDef::writeSourceLink(OutputList &ol)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   376
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   377
  //printf("%s: generateSourceFile()=%d\n",name().data(),generateSourceFile());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   378
  if (generateSourceFile())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   379
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   380
    ol.disableAllBut(OutputGenerator::Html);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   381
    ol.startParagraph();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   382
    ol.startTextLink(includeName(),0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   383
    ol.parseText(theTranslator->trGotoSourceCode());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   384
    ol.endTextLink();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   385
    ol.endParagraph();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   386
    ol.enableAll();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   387
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   388
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   389
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   390
void FileDef::writeNamespaceDeclarations(OutputList &ol,const QCString &title)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   391
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   392
  // write list of namespaces
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   393
  if (namespaceSDict) namespaceSDict->writeDeclaration(ol,title);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   394
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   395
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   396
void FileDef::writeClassDeclarations(OutputList &ol,const QCString &title)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   397
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   398
  // write list of classes
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   399
  if (classSDict) classSDict->writeDeclaration(ol,0,title,FALSE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   400
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   401
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   402
void FileDef::startMemberDeclarations(OutputList &ol)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   403
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   404
  ol.startMemberSections();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   405
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   406
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   407
void FileDef::endMemberDeclarations(OutputList &ol)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   408
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   409
  ol.endMemberSections();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   410
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   411
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   412
void FileDef::startMemberDocumentation(OutputList &ol)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   413
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   414
  if (Config_getBool("SEPARATE_MEMBER_PAGES"))
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   415
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   416
    ol.disable(OutputGenerator::Html);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   417
    Doxygen::suppressDocWarnings = TRUE;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   418
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   419
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   420
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   421
void FileDef::endMemberDocumentation(OutputList &ol)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   422
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   423
  if (Config_getBool("SEPARATE_MEMBER_PAGES"))
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   424
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   425
    ol.enable(OutputGenerator::Html);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   426
    Doxygen::suppressDocWarnings = FALSE;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   427
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   428
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   429
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   430
void FileDef::writeMemberGroups(OutputList &ol)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   431
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   432
  /* write user defined member groups */
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   433
  if (memberGroupSDict)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   434
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   435
    MemberGroupSDict::Iterator mgli(*memberGroupSDict);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   436
    MemberGroup *mg;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   437
    for (;(mg=mgli.current());++mgli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   438
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   439
      if ((!mg->allMembersInSameSection() || !m_subGrouping) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   440
          && mg->header()!="[NOHEADER]")
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   441
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   442
        mg->writeDeclarations(ol,0,0,this,0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   443
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   444
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   445
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   446
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   447
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   448
void FileDef::writeAuthorSection(OutputList &ol)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   449
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   450
  // write Author section (Man only)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   451
  ol.pushGeneratorState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   452
  ol.disableAllBut(OutputGenerator::Man);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   453
  ol.startGroupHeader();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   454
  ol.parseText(theTranslator->trAuthor(TRUE,TRUE));
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   455
  ol.endGroupHeader();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   456
  ol.parseText(theTranslator->trGeneratedAutomatically(Config_getString("PROJECT_NAME")));
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   457
  ol.popGeneratorState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   458
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   459
4
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   460
void FileDef::writeSummaryLinks(OutputList &ol)
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   461
{
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   462
  ol.pushGeneratorState();
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   463
  ol.disableAllBut(OutputGenerator::Html);
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   464
  QListIterator<LayoutDocEntry> eli(
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   465
      LayoutDocManager::instance().docEntries(LayoutDocManager::File));
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   466
  LayoutDocEntry *lde;
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   467
  bool first=TRUE;
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   468
  for (eli.toFirst();(lde=eli.current());++eli)
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   469
  {
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   470
    if ((lde->kind()==LayoutDocEntry::FileClasses && classSDict && classSDict->declVisible()) || 
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   471
        (lde->kind()==LayoutDocEntry::FileNamespaces && namespaceSDict && namespaceSDict->declVisible())
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   472
       )
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   473
    {
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   474
      LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   475
      QCString label = lde->kind()==LayoutDocEntry::FileClasses ? "nested-classes" : "namespaces";
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   476
      writeSummaryLink(ol,label,ls->title,first);
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   477
    }
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   478
    else if (lde->kind()==LayoutDocEntry::MemberDecl)
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   479
    {
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   480
      LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   481
      MemberList * ml = getMemberList(lmd->type);
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   482
      if (ml && ml->declVisible())
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   483
      {
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   484
        writeSummaryLink(ol,ml->listTypeAsString(),lmd->title,first);
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   485
      }
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   486
    }
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   487
  }
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   488
  if (!first)
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   489
  {
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   490
    ol.writeString("  </div>\n");
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   491
  }
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   492
  ol.popGeneratorState();
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   493
}
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   494
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   495
/*! Write the documentation page for this file to the file of output
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   496
    generators \a ol. 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   497
*/
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   498
void FileDef::writeDocumentation(OutputList &ol)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   499
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   500
  //funcList->countDecMembers();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   501
  
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   502
  //QCString fn = name();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   503
  //if (Config_getBool("FULL_PATH_NAMES"))
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   504
  //{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   505
  //  fn.prepend(stripFromPath(getPath().copy()));
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   506
  //}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   507
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   508
  //printf("WriteDocumentation diskname=%s\n",diskname.data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   509
  
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   510
  QCString versionTitle;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   511
  if (!fileVersion.isEmpty())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   512
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   513
    versionTitle=("("+fileVersion+")");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   514
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   515
  QCString title = docname+versionTitle;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   516
  QCString pageTitle=theTranslator->trFileReference(docname);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   517
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   518
  if (Config_getBool("SHOW_DIRECTORIES") && getDirDef())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   519
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   520
    startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_FileVisible,TRUE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   521
    getDirDef()->writeNavigationPath(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   522
    ol.endQuickIndices();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   523
    QCString pageTitleShort=theTranslator->trFileReference(name());
4
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   524
    startTitle(ol,getOutputFileBase(),this);
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   525
    ol.pushGeneratorState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   526
      ol.disableAllBut(OutputGenerator::Html);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   527
      ol.parseText(pageTitleShort); // Html only
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   528
      ol.enableAll();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   529
      ol.disable(OutputGenerator::Html);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   530
      ol.parseText(pageTitle); // other output formats
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   531
    ol.popGeneratorState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   532
    addGroupListToTitle(ol,this);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   533
    endTitle(ol,getOutputFileBase(),title);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   534
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   535
  else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   536
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   537
    startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_FileVisible);
4
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   538
    startTitle(ol,getOutputFileBase(),this);
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   539
    ol.parseText(pageTitle);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   540
    addGroupListToTitle(ol,this);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   541
    endTitle(ol,getOutputFileBase(),title);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   542
  }
4
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   543
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   544
  ol.startContents();
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   545
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   546
  if (!fileVersion.isEmpty())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   547
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   548
    ol.disableAllBut(OutputGenerator::Html);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   549
    ol.startProjectNumber();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   550
    ol.docify(versionTitle);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   551
    ol.endProjectNumber();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   552
    ol.enableAll();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   553
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   554
  
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   555
  if (Doxygen::searchIndex)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   556
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   557
    Doxygen::searchIndex->setCurrentDoc(pageTitle,getOutputFileBase());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   558
    Doxygen::searchIndex->addWord(localName(),TRUE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   559
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   560
  
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   561
  if (!Config_getString("GENERATE_TAGFILE").isEmpty()) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   562
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   563
    Doxygen::tagFile << "  <compound kind=\"file\">" << endl;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   564
    Doxygen::tagFile << "    <name>" << convertToXML(name()) << "</name>" << endl;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   565
    Doxygen::tagFile << "    <path>" << convertToXML(getPath()) << "</path>" << endl;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   566
    Doxygen::tagFile << "    <filename>" 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   567
                     << convertToXML(getOutputFileBase()) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   568
                     << "</filename>" << endl;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   569
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   570
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   571
  //---------------------------------------- start flexible part -------------------------------
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   572
  
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   573
  QListIterator<LayoutDocEntry> eli(
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   574
      LayoutDocManager::instance().docEntries(LayoutDocManager::File));
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   575
  LayoutDocEntry *lde;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   576
  for (eli.toFirst();(lde=eli.current());++eli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   577
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   578
    switch (lde->kind())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   579
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   580
      case LayoutDocEntry::BriefDesc: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   581
        writeBriefDescription(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   582
        break; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   583
      case LayoutDocEntry::MemberDeclStart: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   584
        startMemberDeclarations(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   585
        break; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   586
      case LayoutDocEntry::FileIncludes:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   587
        writeIncludeFiles(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   588
        break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   589
      case LayoutDocEntry::FileIncludeGraph:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   590
        writeIncludeGraph(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   591
        break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   592
      case LayoutDocEntry::FileIncludedByGraph:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   593
        writeIncludedByGraph(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   594
        break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   595
      case LayoutDocEntry::FileSourceLink:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   596
        writeSourceLink(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   597
        break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   598
      case LayoutDocEntry::FileClasses: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   599
        {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   600
          LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   601
          writeClassDeclarations(ol,ls->title);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   602
        }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   603
        break; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   604
      case LayoutDocEntry::FileNamespaces: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   605
        {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   606
          LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   607
          writeNamespaceDeclarations(ol,ls->title);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   608
        }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   609
        break; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   610
      case LayoutDocEntry::MemberGroups: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   611
        writeMemberGroups(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   612
        break; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   613
      case LayoutDocEntry::MemberDecl: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   614
        {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   615
          LayoutDocEntryMemberDecl *lmd = (LayoutDocEntryMemberDecl*)lde;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   616
          writeMemberDeclarations(ol,lmd->type,lmd->title);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   617
        }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   618
        break; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   619
      case LayoutDocEntry::MemberDeclEnd: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   620
        endMemberDeclarations(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   621
        break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   622
      case LayoutDocEntry::DetailedDesc: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   623
        {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   624
          LayoutDocEntrySection *ls = (LayoutDocEntrySection*)lde;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   625
          writeDetailedDescription(ol,ls->title);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   626
        }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   627
        break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   628
      case LayoutDocEntry::MemberDefStart: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   629
        startMemberDocumentation(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   630
        break; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   631
      case LayoutDocEntry::MemberDef: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   632
        {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   633
          LayoutDocEntryMemberDef *lmd = (LayoutDocEntryMemberDef*)lde;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   634
          writeMemberDocumentation(ol,lmd->type,lmd->title);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   635
        }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   636
        break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   637
      case LayoutDocEntry::MemberDefEnd: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   638
        endMemberDocumentation(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   639
        break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   640
      case LayoutDocEntry::AuthorSection: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   641
        writeAuthorSection(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   642
        break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   643
      case LayoutDocEntry::ClassIncludes:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   644
      case LayoutDocEntry::ClassInheritanceGraph:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   645
      case LayoutDocEntry::ClassNestedClasses:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   646
      case LayoutDocEntry::ClassCollaborationGraph:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   647
      case LayoutDocEntry::ClassAllMembersLink:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   648
      case LayoutDocEntry::ClassUsedFiles:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   649
      case LayoutDocEntry::NamespaceNestedNamespaces:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   650
      case LayoutDocEntry::NamespaceClasses:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   651
      case LayoutDocEntry::GroupClasses: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   652
      case LayoutDocEntry::GroupNamespaces:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   653
      case LayoutDocEntry::GroupDirs: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   654
      case LayoutDocEntry::GroupNestedGroups: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   655
      case LayoutDocEntry::GroupFiles:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   656
      case LayoutDocEntry::GroupGraph: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   657
      case LayoutDocEntry::GroupPageDocs:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   658
      case LayoutDocEntry::DirSubDirs:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   659
      case LayoutDocEntry::DirFiles:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   660
      case LayoutDocEntry::DirGraph:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   661
        err("Internal inconsistency: member %d should not be part of "
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   662
            "LayoutDocManager::File entry list\n",lde->kind());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   663
        break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   664
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   665
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   666
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   667
  //---------------------------------------- end flexible part -------------------------------
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   668
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   669
  if (!Config_getString("GENERATE_TAGFILE").isEmpty()) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   670
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   671
    writeDocAnchorsToTagFile();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   672
    Doxygen::tagFile << "  </compound>" << endl;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   673
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   674
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   675
  endFile(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   676
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   677
  if (Config_getBool("SEPARATE_MEMBER_PAGES"))
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   678
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   679
    MemberList *ml = getMemberList(MemberList::allMembersList);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   680
    if (ml) ml->sort();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   681
    writeMemberPages(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   682
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   683
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   684
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   685
void FileDef::writeMemberPages(OutputList &ol)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   686
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   687
  ol.pushGeneratorState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   688
  ol.disableAllBut(OutputGenerator::Html);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   689
  
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   690
  QListIterator<MemberList> mli(m_memberLists);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   691
  MemberList *ml;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   692
  for (mli.toFirst();(ml=mli.current());++mli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   693
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   694
    if (ml->listType()&MemberList::documentationLists)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   695
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   696
      ml->writeDocumentationPage(ol,name(),this);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   697
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   698
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   699
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   700
  ol.popGeneratorState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   701
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   702
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   703
void FileDef::writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   704
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   705
  static bool createSubDirs=Config_getBool("CREATE_SUBDIRS");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   706
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   707
  ol.writeString("      <div class=\"navtab\">\n");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   708
  ol.writeString("        <table>\n");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   709
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   710
  MemberList *allMemberList = getMemberList(MemberList::allMembersList);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   711
  if (allMemberList)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   712
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   713
    MemberListIterator mli(*allMemberList);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   714
    MemberDef *md;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   715
    for (mli.toFirst();(md=mli.current());++mli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   716
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   717
      if (md->getFileDef()==this && md->getNamespaceDef()==0 && md->isLinkable())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   718
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   719
        ol.writeString("          <tr><td class=\"navtab\">");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   720
        if (md->isLinkableInProject())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   721
        {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   722
          if (md==currentMd) // selected item => highlight
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   723
          {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   724
            ol.writeString("<a class=\"qindexHL\" ");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   725
          }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   726
          else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   727
          {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   728
            ol.writeString("<a class=\"qindex\" ");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   729
          }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   730
          ol.writeString("href=\"");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   731
          if (createSubDirs) ol.writeString("../../");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   732
          ol.writeString(md->getOutputFileBase()+Doxygen::htmlFileExtension+"#"+md->anchor());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   733
          ol.writeString("\">");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   734
          ol.writeString(md->localName());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   735
          ol.writeString("</a>");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   736
        }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   737
        ol.writeString("</td></tr>\n");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   738
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   739
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   740
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   741
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   742
  ol.writeString("        </table>\n");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   743
  ol.writeString("      </div>\n");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   744
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   745
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   746
/*! Write a source listing of this file to the output */
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   747
void FileDef::writeSource(OutputList &ol)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   748
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   749
  static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   750
  static bool latexSourceCode   = Config_getBool("LATEX_SOURCE_CODE");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   751
  QCString title = docname;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   752
  if (!fileVersion.isEmpty())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   753
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   754
    title+=(" ("+fileVersion+")");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   755
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   756
  QCString pageTitle = theTranslator->trSourceFile(title);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   757
  ol.disable(OutputGenerator::Man);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   758
  ol.disable(OutputGenerator::RTF);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   759
  if (!latexSourceCode) ol.disable(OutputGenerator::Latex);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   760
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   761
  if (Config_getBool("SHOW_DIRECTORIES") && getDirDef())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   762
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   763
    startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible,TRUE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   764
    getDirDef()->writeNavigationPath(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   765
    ol.endQuickIndices();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   766
    startTitle(ol,getOutputFileBase());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   767
    ol.parseText(name());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   768
    endTitle(ol,getOutputFileBase(),title);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   769
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   770
  else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   771
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   772
    startFile(ol,getSourceFileBase(),0,pageTitle,HLI_FileVisible,TRUE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   773
    startTitle(ol,getSourceFileBase());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   774
    ol.parseText(title);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   775
    endTitle(ol,getSourceFileBase(),0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   776
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   777
4
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   778
  ol.startContents();
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   779
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   780
  if (isLinkable())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   781
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   782
    if (latexSourceCode) ol.disable(OutputGenerator::Latex);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   783
    ol.startTextLink(getOutputFileBase(),0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   784
    ol.parseText(theTranslator->trGotoDocumentation());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   785
    ol.endTextLink();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   786
    if (latexSourceCode) ol.enable(OutputGenerator::Latex);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   787
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   788
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   789
  ParserInterface *pIntf = Doxygen::parserManager->getParser(getDefFileExtension());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   790
  pIntf->resetCodeParserState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   791
  ol.startCodeFragment();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   792
  pIntf->parseCode(ol,0,
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   793
            fileToString(absFilePath(),filterSourceFiles),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   794
            FALSE,0,this
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   795
           );
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   796
  ol.endCodeFragment();
4
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
   797
  ol.endContents();
0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   798
  endFile(ol);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   799
  ol.enableAll();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   800
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   801
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   802
void FileDef::parseSource()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   803
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   804
  static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   805
  DevNullCodeDocInterface devNullIntf;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   806
  ParserInterface *pIntf = Doxygen::parserManager->getParser(getDefFileExtension());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   807
  pIntf->resetCodeParserState();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   808
  pIntf->parseCode(
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   809
            devNullIntf,0,
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   810
            fileToString(absFilePath(),filterSourceFiles),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   811
            FALSE,0,this
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   812
           );
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   813
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   814
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   815
void FileDef::addMembersToMemberGroup()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   816
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   817
  QListIterator<MemberList> mli(m_memberLists);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   818
  MemberList *ml;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   819
  for (mli.toFirst();(ml=mli.current());++mli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   820
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   821
    if (ml->listType()&MemberList::declarationLists)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   822
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   823
      ::addMembersToMemberGroup(ml,&memberGroupSDict,this);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   824
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   825
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   826
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   827
  // add members inside sections to their groups
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   828
  if (memberGroupSDict)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   829
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   830
    MemberGroupSDict::Iterator mgli(*memberGroupSDict);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   831
    MemberGroup *mg;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   832
    for (;(mg=mgli.current());++mgli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   833
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   834
      if (mg->allMembersInSameSection() && m_subGrouping)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   835
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   836
        //printf("----> addToDeclarationSection(%s)\n",mg->header().data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   837
        mg->addToDeclarationSection();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   838
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   839
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   840
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   841
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   842
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   843
/*! Adds member definition \a md to the list of all members of this file */
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   844
void FileDef::insertMember(MemberDef *md)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   845
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   846
  if (md->isHidden()) return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   847
  //printf("%s:FileDef::insertMember(%s (=%p) list has %d elements)\n",
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   848
  //    name().data(),md->name().data(),md,allMemberList.count());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   849
  MemberList *allMemberList = getMemberList(MemberList::allMembersList);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   850
  if (allMemberList && allMemberList->findRef(md)!=-1)  // TODO optimize the findRef!
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   851
  { 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   852
    return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   853
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   854
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   855
  if (allMemberList==0)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   856
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   857
    allMemberList = new MemberList(MemberList::allMembersList);;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   858
    m_memberLists.append(allMemberList);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   859
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   860
  allMemberList->append(md); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   861
  //::addFileMemberNameToIndex(md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   862
  switch (md->memberType())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   863
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   864
    case MemberDef::Variable:     
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   865
    case MemberDef::Property:     
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   866
      addMemberToList(MemberList::decVarMembers,md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   867
      addMemberToList(MemberList::docVarMembers,md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   868
      break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   869
    case MemberDef::Function: 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   870
      addMemberToList(MemberList::decFuncMembers,md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   871
      addMemberToList(MemberList::docFuncMembers,md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   872
      break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   873
    case MemberDef::Typedef:      
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   874
      addMemberToList(MemberList::decTypedefMembers,md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   875
      addMemberToList(MemberList::docTypedefMembers,md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   876
      break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   877
    case MemberDef::Enumeration:  
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   878
      addMemberToList(MemberList::decEnumMembers,md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   879
      addMemberToList(MemberList::docEnumMembers,md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   880
      break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   881
    case MemberDef::EnumValue:    // enum values are shown inside their enums
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   882
      break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   883
    case MemberDef::Define:       
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   884
      addMemberToList(MemberList::decDefineMembers,md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   885
      addMemberToList(MemberList::docDefineMembers,md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   886
      break;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   887
    default:
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   888
       err("FileDef::insertMembers(): "
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   889
           "member `%s' with class scope `%s' inserted in file scope `%s'!\n",
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   890
           md->name().data(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   891
           md->getClassDef() ? md->getClassDef()->name().data() : "<global>",
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   892
           name().data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   893
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   894
  //addMemberToGroup(md,groupId);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   895
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   896
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   897
/*! Adds compound definition \a cd to the list of all compounds of this file */
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   898
void FileDef::insertClass(ClassDef *cd)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   899
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   900
  if (cd->isHidden()) return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   901
  if (classSDict==0)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   902
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   903
    classSDict = new ClassSDict(17);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   904
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   905
  if (Config_getBool("SORT_BRIEF_DOCS"))
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   906
    classSDict->inSort(cd->name(),cd);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   907
  else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   908
    classSDict->append(cd->name(),cd);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   909
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   910
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   911
/*! Adds namespace definition \a nd to the list of all compounds of this file */
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   912
void FileDef::insertNamespace(NamespaceDef *nd)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   913
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   914
  if (nd->isHidden()) return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   915
  if (!nd->name().isEmpty() && 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   916
      (namespaceSDict==0 || namespaceSDict->find(nd->name())==0))
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   917
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   918
    if (namespaceSDict==0)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   919
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   920
      namespaceSDict = new NamespaceSDict;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   921
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   922
    if (Config_getBool("SORT_BRIEF_DOCS"))
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   923
      namespaceSDict->inSort(nd->name(),nd);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   924
    else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   925
      namespaceSDict->append(nd->name(),nd);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   926
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   927
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   928
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   929
void FileDef::addSourceRef(int line,Definition *d,MemberDef *md)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   930
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   931
  //printf("FileDef::addSourceDef(%d,%p,%p)\n",line,d,md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   932
  if (d)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   933
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   934
    if (srcDefDict==0)    srcDefDict    = new QIntDict<Definition>(257);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   935
    if (srcMemberDict==0) srcMemberDict = new QIntDict<MemberDef>(257);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   936
    srcDefDict->insert(line,d);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   937
    if (md) srcMemberDict->insert(line,md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   938
    //printf("Adding member %s with anchor %s at line %d to file %s\n",
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   939
    //    md->name().data(),md->anchor().data(),line,name().data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   940
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   941
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   942
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   943
Definition *FileDef::getSourceDefinition(int lineNr)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   944
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   945
  Definition *result=0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   946
  if (srcDefDict)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   947
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   948
    result = srcDefDict->find(lineNr);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   949
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   950
  return result;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   951
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   952
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   953
MemberDef *FileDef::getSourceMember(int lineNr)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   954
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   955
  MemberDef *result=0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   956
  if (srcMemberDict)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   957
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   958
    result = srcMemberDict->find(lineNr);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   959
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   960
  return result;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   961
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   962
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   963
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   964
void FileDef::addUsingDirective(NamespaceDef *nd)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   965
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   966
  if (usingDirList==0)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   967
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   968
    usingDirList = new NamespaceSDict;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   969
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   970
  if (usingDirList->find(nd->qualifiedName())==0)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   971
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   972
    usingDirList->append(nd->qualifiedName(),nd);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   973
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   974
  //printf("%p: FileDef::addUsingDirective: %s:%d\n",this,name().data(),usingDirList->count());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   975
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   976
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   977
NamespaceSDict *FileDef::getUsedNamespaces() const 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   978
{ 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   979
  //printf("%p: FileDef::getUsedNamespace: %s:%d\n",this,name().data(),usingDirList?usingDirList->count():0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   980
  return usingDirList; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   981
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   982
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   983
void FileDef::addUsingDeclaration(Definition *d)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   984
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   985
  if (usingDeclList==0)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   986
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   987
    usingDeclList = new SDict<Definition>(17);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   988
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   989
  if (usingDeclList->find(d->qualifiedName())==0)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   990
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   991
    usingDeclList->append(d->qualifiedName(),d);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   992
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   993
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   994
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   995
void FileDef::addIncludeDependency(FileDef *fd,const char *incName,bool local,
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   996
                                   bool imported)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   997
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   998
  //printf("FileDef::addIncludeDependency(%p,%s,%d)\n",fd,incName,local);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
   999
  QCString iName = fd ? fd->absFilePath().data() : incName;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1000
  if (!iName.isEmpty() && (!includeDict || includeDict->find(iName)==0))
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1001
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1002
    if (includeDict==0)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1003
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1004
      includeDict   = new QDict<IncludeInfo>(61);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1005
      includeList   = new QList<IncludeInfo>;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1006
      includeList->setAutoDelete(TRUE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1007
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1008
    IncludeInfo *ii = new IncludeInfo;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1009
    ii->fileDef     = fd;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1010
    ii->includeName = incName;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1011
    ii->local       = local;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1012
    ii->imported    = imported;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1013
    includeList->append(ii);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1014
    includeDict->insert(iName,ii);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1015
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1016
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1017
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1018
void FileDef::addIncludedUsingDirectives()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1019
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1020
  if (visited) return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1021
  visited=TRUE;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1022
  //printf("( FileDef::addIncludedUsingDirectives for file %s\n",name().data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1023
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1024
  NamespaceList nl;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1025
  if (includeList) // file contains #includes
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1026
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1027
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1028
      QListIterator<IncludeInfo> iii(*includeList);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1029
      IncludeInfo *ii;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1030
      for (iii.toFirst();(ii=iii.current());++iii) // foreach #include...
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1031
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1032
        if (ii->fileDef && !ii->fileDef->visited) // ...that is a known file
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1033
        {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1034
          // recurse into this file
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1035
          ii->fileDef->addIncludedUsingDirectives();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1036
        }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1037
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1038
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1039
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1040
      QListIterator<IncludeInfo> iii(*includeList);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1041
      IncludeInfo *ii;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1042
      // iterate through list from last to first
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1043
      for (iii.toLast();(ii=iii.current());--iii)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1044
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1045
        if (ii->fileDef && ii->fileDef!=this)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1046
        {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1047
          // add using directives
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1048
          NamespaceSDict *unl = ii->fileDef->usingDirList;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1049
          if (unl)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1050
          {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1051
            NamespaceSDict::Iterator nli(*unl);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1052
            NamespaceDef *nd;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1053
            for (nli.toLast();(nd=nli.current());--nli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1054
            {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1055
              // append each using directive found in a #include file
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1056
              if (usingDirList==0) usingDirList = new NamespaceSDict;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1057
              //printf("Prepending used namespace %s to the list of file %s\n",
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1058
              //    nd->name().data(),name().data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1059
              if (usingDirList->find(nd->qualifiedName())==0) // not yet added
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1060
              {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1061
                usingDirList->prepend(nd->qualifiedName(),nd);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1062
              }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1063
            }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1064
          }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1065
          // add using declarations
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1066
          SDict<Definition> *udl = ii->fileDef->usingDeclList;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1067
          if (udl)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1068
          {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1069
            SDict<Definition>::Iterator udi(*udl);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1070
            Definition *d;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1071
            for (udi.toLast();(d=udi.current());--udi)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1072
            {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1073
              //printf("Adding using declaration %s\n",d->name().data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1074
              if (usingDeclList==0)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1075
              {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1076
                usingDeclList = new SDict<Definition>(17);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1077
              }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1078
              if (usingDeclList->find(d->qualifiedName())==0)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1079
              {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1080
                usingDeclList->prepend(d->qualifiedName(),d);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1081
              }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1082
            }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1083
          }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1084
        }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1085
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1086
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1087
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1088
  //printf(") end FileDef::addIncludedUsingDirectives for file %s\n",name().data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1089
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1090
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1091
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1092
void FileDef::addIncludedByDependency(FileDef *fd,const char *incName,
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1093
                                      bool local,bool imported)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1094
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1095
  //printf("FileDef::addIncludedByDependency(%p,%s,%d)\n",fd,incName,local);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1096
  QCString iName = fd ? fd->absFilePath().data() : incName;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1097
  if (!iName.isEmpty() && (includedByDict==0 || includedByDict->find(iName)==0))
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1098
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1099
    if (includedByDict==0)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1100
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1101
      includedByDict = new QDict<IncludeInfo>(61);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1102
      includedByList = new QList<IncludeInfo>;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1103
      includedByList->setAutoDelete(TRUE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1104
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1105
    IncludeInfo *ii = new IncludeInfo;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1106
    ii->fileDef     = fd;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1107
    ii->includeName = incName;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1108
    ii->local       = local;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1109
    ii->imported    = imported;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1110
    includedByList->append(ii);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1111
    includedByDict->insert(iName,ii);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1112
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1113
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1114
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1115
bool FileDef::isIncluded(const QCString &name) const
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1116
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1117
  if (name.isEmpty()) return FALSE;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1118
  return includeDict!=0 && includeDict->find(name)!=0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1119
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1120
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1121
bool FileDef::generateSourceFile() const 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1122
{ 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1123
  QCString extension = name().right(4);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1124
  return !isReference() && 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1125
         (Config_getBool("SOURCE_BROWSER") || 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1126
           (Config_getBool("VERBATIM_HEADERS") && guessSection(name())==Entry::HEADER_SEC) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1127
         ) &&
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1128
         extension!=".doc" && extension!=".txt" && extension!=".dox"; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1129
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1130
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1131
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1132
void FileDef::addListReferences()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1133
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1134
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1135
    LockingPtr< QList<ListItemInfo> > xrefItems = xrefListItems();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1136
    addRefItem(xrefItems.pointer(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1137
               getOutputFileBase(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1138
               theTranslator->trFile(TRUE,TRUE),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1139
               getOutputFileBase(),name(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1140
               0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1141
              );
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1142
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1143
  if (memberGroupSDict)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1144
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1145
    MemberGroupSDict::Iterator mgli(*memberGroupSDict);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1146
    MemberGroup *mg;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1147
    for (;(mg=mgli.current());++mgli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1148
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1149
      mg->addListReferences(this);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1150
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1151
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1152
  QListIterator<MemberList> mli(m_memberLists);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1153
  MemberList *ml;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1154
  for (mli.toFirst();(ml=mli.current());++mli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1155
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1156
    if (ml->listType()&MemberList::documentationLists)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1157
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1158
      ml->addListReferences(this);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1159
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1160
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1161
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1162
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1163
//-------------------------------------------------------------------
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1164
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1165
static int findMatchingPart(const QCString &path,const QCString dir)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1166
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1167
  int si1;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1168
  int pos1=0,pos2=0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1169
  while ((si1=path.find('/',pos1))!=-1)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1170
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1171
    int si2=dir.find('/',pos2);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1172
    //printf("  found slash at pos %d in path %d: %s<->%s\n",si1,si2,
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1173
    //    path.mid(pos1,si1-pos2).data(),dir.mid(pos2).data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1174
    if (si2==-1 && path.mid(pos1,si1-pos2)==dir.mid(pos2)) // match at end
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1175
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1176
      return dir.length();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1177
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1178
    if (si1!=si2 || path.mid(pos1,si1-pos2)!=dir.mid(pos2,si2-pos2)) // no match in middle
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1179
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1180
      return QMAX(pos1-1,0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1181
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1182
    pos1=si1+1;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1183
    pos2=si2+1;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1184
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1185
  return 0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1186
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1187
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1188
static Directory *findDirNode(Directory *root,const QCString &name)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1189
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1190
  QListIterator<DirEntry> dli(root->children());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1191
  DirEntry *de;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1192
  for (dli.toFirst();(de=dli.current());++dli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1193
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1194
    if (de->kind()==DirEntry::Dir)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1195
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1196
      Directory *dir = (Directory *)de;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1197
      QCString dirName=dir->name();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1198
      int sp=findMatchingPart(name,dirName);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1199
      //printf("findMatchingPart(%s,%s)=%d\n",name.data(),dirName.data(),sp);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1200
      if (sp>0) // match found
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1201
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1202
        if ((uint)sp==dirName.length()) // whole directory matches
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1203
        {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1204
          // recurse into the directory
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1205
          return findDirNode(dir,name.mid(dirName.length()+1));
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1206
        } 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1207
        else // partial match => we need to split the path into three parts
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1208
        {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1209
          QCString baseName     =dirName.left(sp);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1210
          QCString oldBranchName=dirName.mid(sp+1);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1211
          QCString newBranchName=name.mid(sp+1);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1212
          // strip file name from path
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1213
          int newIndex=newBranchName.findRev('/');
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1214
          if (newIndex>0) newBranchName=newBranchName.left(newIndex);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1215
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1216
          //printf("Splitting off part in new branch \n"
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1217
          //    "base=%s old=%s new=%s\n",
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1218
          //    baseName.data(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1219
          //    oldBranchName.data(),
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1220
          //    newBranchName.data()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1221
          //      );
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1222
          Directory *base = new Directory(root,baseName);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1223
          Directory *newBranch = new Directory(base,newBranchName);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1224
          dir->reParent(base);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1225
          dir->rename(oldBranchName);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1226
          base->addChild(dir);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1227
          base->addChild(newBranch);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1228
          dir->setLast(FALSE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1229
          // remove DirEntry container from list (without deleting it)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1230
          root->children().setAutoDelete(FALSE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1231
          root->children().removeRef(dir);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1232
          root->children().setAutoDelete(TRUE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1233
          // add new branch to the root
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1234
          if (!root->children().isEmpty())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1235
          {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1236
            root->children().last()->setLast(FALSE); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1237
          }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1238
          root->addChild(base);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1239
          return newBranch;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1240
        }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1241
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1242
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1243
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1244
  int si=name.findRev('/');
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1245
  if (si==-1) // no subdir
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1246
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1247
    return root; // put the file under the root node.
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1248
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1249
  else // need to create a subdir 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1250
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1251
    QCString baseName = name.left(si);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1252
    //printf("new subdir %s\n",baseName.data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1253
    Directory *newBranch = new Directory(root,baseName);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1254
    if (!root->children().isEmpty())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1255
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1256
      root->children().last()->setLast(FALSE); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1257
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1258
    root->addChild(newBranch);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1259
    return newBranch;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1260
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1261
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1262
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1263
static void mergeFileDef(Directory *root,FileDef *fd)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1264
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1265
  QCString rootPath = root->name();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1266
  QCString filePath = fd->absFilePath();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1267
  //printf("merging %s\n",filePath.data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1268
  Directory *dirNode = findDirNode(root,filePath);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1269
  if (!dirNode->children().isEmpty())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1270
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1271
    dirNode->children().last()->setLast(FALSE); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1272
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1273
  DirEntry *e=new DirEntry(dirNode,fd);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1274
  dirNode->addChild(e);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1275
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1276
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1277
#if 0
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1278
static void generateIndent(QTextStream &t,DirEntry *de,int level)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1279
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1280
  if (de->parent())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1281
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1282
    generateIndent(t,de->parent(),level+1);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1283
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1284
  // from the root up to node n do...
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1285
  if (level==0) // item before a dir or document
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1286
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1287
    if (de->isLast())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1288
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1289
      if (de->kind()==DirEntry::Dir)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1290
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1291
        t << "<img " << FTV_IMGATTRIBS(plastnode) << "/>";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1292
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1293
      else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1294
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1295
        t << "<img " << FTV_IMGATTRIBS(lastnode) << "/>";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1296
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1297
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1298
    else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1299
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1300
      if (de->kind()==DirEntry::Dir)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1301
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1302
        t << "<img " << FTV_IMGATTRIBS(pnode) << "/>";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1303
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1304
      else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1305
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1306
        t << "<img " << FTV_IMGATTRIBS(node) << "/>";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1307
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1308
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1309
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1310
  else // item at another level
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1311
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1312
    if (de->isLast())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1313
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1314
      t << "<img " << FTV_IMGATTRIBS(blank) << "/>";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1315
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1316
    else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1317
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1318
      t << "<img " << FTV_IMGATTRIBS(vertline) << "/>";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1319
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1320
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1321
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1322
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1323
static void writeDirTreeNode(QTextStream &t,Directory *root,int level)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1324
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1325
  QCString indent;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1326
  indent.fill(' ',level*2);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1327
  QListIterator<DirEntry> dli(root->children());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1328
  DirEntry *de;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1329
  for (dli.toFirst();(de=dli.current());++dli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1330
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1331
    t << indent << "<p>";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1332
    generateIndent(t,de,0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1333
    if (de->kind()==DirEntry::Dir)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1334
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1335
      Directory *dir=(Directory *)de;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1336
      //printf("%s [dir]: %s (last=%d,dir=%d)\n",indent.data(),dir->name().data(),dir->isLast(),dir->kind()==DirEntry::Dir);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1337
      t << "<img " << FTV_IMGATTRIBS(folderclosed) << "/>";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1338
      t << dir->name();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1339
      t << "</p>\n";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1340
      t << indent << "<div>\n";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1341
      writeDirTreeNode(t,dir,level+1);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1342
      t << indent << "</div>\n";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1343
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1344
    else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1345
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1346
      //printf("%s [file]: %s (last=%d,dir=%d)\n",indent.data(),de->file()->name().data(),de->isLast(),de->kind()==DirEntry::Dir);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1347
      t << "<img " << FTV_IMGATTRIBS(doc) << "/>";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1348
      t << de->file()->name();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1349
      t << "</p>\n";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1350
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1351
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1352
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1353
#endif
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1354
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1355
static void addDirsAsGroups(Directory *root,GroupDef *parent,int level)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1356
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1357
  GroupDef *gd=0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1358
  if (root->kind()==DirEntry::Dir)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1359
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1360
    gd = new GroupDef("[generated]",
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1361
                      1,
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1362
                      root->path(), // name
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1363
                      root->name()  // title
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1364
                     );
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1365
    if (parent) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1366
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1367
      parent->addGroup(gd);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1368
      gd->makePartOfGroup(parent);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1369
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1370
    else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1371
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1372
      Doxygen::groupSDict->append(root->path(),gd);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1373
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1374
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1375
  QListIterator<DirEntry> dli(root->children());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1376
  DirEntry *de;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1377
  for (dli.toFirst();(de=dli.current());++dli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1378
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1379
    if (de->kind()==DirEntry::Dir)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1380
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1381
      addDirsAsGroups((Directory *)de,gd,level+1);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1382
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1383
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1384
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1385
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1386
void generateFileTree()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1387
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1388
  Directory *root=new Directory(0,"root");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1389
  root->setLast(TRUE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1390
  FileNameListIterator fnli(*Doxygen::inputNameList); 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1391
  FileName *fn;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1392
  for (fnli.toFirst();(fn=fnli.current());++fnli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1393
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1394
    FileNameIterator fni(*fn);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1395
    FileDef *fd;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1396
    for (;(fd=fni.current());++fni)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1397
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1398
      mergeFileDef(root,fd);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1399
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1400
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1401
  //t << "<div class=\"directory\">\n";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1402
  //writeDirTreeNode(t,root,0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1403
  //t << "</div>\n";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1404
  addDirsAsGroups(root,0,0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1405
  delete root;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1406
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1407
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1408
//-------------------------------------------------------------------
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1409
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1410
void FileDef::combineUsingRelations()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1411
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1412
  if (visited) return; // already done
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1413
  visited=TRUE;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1414
  if (usingDirList)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1415
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1416
    NamespaceSDict::Iterator nli(*usingDirList);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1417
    NamespaceDef *nd;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1418
    for (nli.toFirst();(nd=nli.current());++nli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1419
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1420
      nd->combineUsingRelations();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1421
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1422
    for (nli.toFirst();(nd=nli.current());++nli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1423
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1424
      // add used namespaces of namespace nd to this namespace
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1425
      if (nd->getUsedNamespaces())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1426
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1427
        NamespaceSDict::Iterator unli(*nd->getUsedNamespaces());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1428
        NamespaceDef *und;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1429
        for (unli.toFirst();(und=unli.current());++unli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1430
        {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1431
          //printf("Adding namespace %s to the using list of %s\n",und->qualifiedName().data(),qualifiedName().data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1432
          addUsingDirective(und);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1433
        }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1434
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1435
      // add used classes of namespace nd to this namespace
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1436
      if (nd->getUsedClasses())
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1437
      {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1438
        SDict<Definition>::Iterator cli(*nd->getUsedClasses());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1439
        Definition *ucd;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1440
        for (cli.toFirst();(ucd=cli.current());++cli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1441
        {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1442
          //printf("Adding class %s to the using list of %s\n",cd->qualifiedName().data(),qualifiedName().data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1443
          addUsingDeclaration(ucd);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1444
        }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1445
      }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1446
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1447
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1448
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1449
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1450
bool FileDef::isDocumentationFile() const
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1451
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1452
  return name().right(4)==".doc" ||
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1453
         name().right(4)==".txt" ||
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1454
         name().right(4)==".dox";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1455
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1456
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1457
void FileDef::acquireFileVersion()
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1458
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1459
  QCString vercmd = Config_getString("FILE_VERSION_FILTER");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1460
  if (!vercmd.isEmpty()) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1461
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1462
    msg("Version of %s : ",filepath.data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1463
    QCString cmd = vercmd+" \""+filepath+"\"";
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1464
    Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",cmd.data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1465
    FILE *f=portable_popen(cmd,"r");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1466
    if (!f)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1467
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1468
      err("Error: could not execute %s\n",vercmd.data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1469
      return;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1470
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1471
    const int bufSize=1024;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1472
    char buf[bufSize];
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1473
    int numRead = fread(buf,1,bufSize,f);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1474
    portable_pclose(f);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1475
    if (numRead > 0) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1476
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1477
      fileVersion = QCString(buf,numRead).stripWhiteSpace();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1478
      msg("%s\n",fileVersion.data());
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1479
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1480
    else 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1481
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1482
      msg("no version available\n");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1483
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1484
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1485
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1486
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1487
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1488
QCString FileDef::getSourceFileBase() const
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1489
{ 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1490
  if (Htags::useHtags)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1491
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1492
    return Htags::path2URL(filepath);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1493
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1494
  else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1495
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1496
    return convertNameToFile(diskname)+"_source"; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1497
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1498
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1499
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1500
/*! Returns the name of the verbatim copy of this file (if any). */
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1501
QCString FileDef::includeName() const 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1502
{ 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1503
  if (Htags::useHtags)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1504
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1505
    return Htags::path2URL(filepath);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1506
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1507
  else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1508
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1509
    return convertNameToFile(diskname)+"_source"; 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1510
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1511
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1512
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1513
MemberList *FileDef::createMemberList(MemberList::ListType lt)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1514
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1515
  m_memberLists.setAutoDelete(TRUE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1516
  QListIterator<MemberList> mli(m_memberLists);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1517
  MemberList *ml;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1518
  for (mli.toFirst();(ml=mli.current());++mli)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1519
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1520
    if (ml->listType()==lt)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1521
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1522
      return ml;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1523
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1524
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1525
  // not found, create a new member list
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1526
  ml = new MemberList(lt);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1527
  m_memberLists.append(ml);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1528
  return ml;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1529
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1530
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1531
void FileDef::addMemberToList(MemberList::ListType lt,MemberDef *md)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1532
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1533
  static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1534
  static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1535
  MemberList *ml = createMemberList(lt);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1536
  if (((ml->listType()&MemberList::declarationLists) && sortBriefDocs) ||
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1537
      ((ml->listType()&MemberList::documentationLists) && sortMemberDocs)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1538
     )
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1539
    ml->inSort(md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1540
  else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1541
    ml->append(md);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1542
  if (lt&MemberList::documentationLists)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1543
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1544
    ml->setInFile(TRUE);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1545
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1546
  if (ml->listType()&MemberList::declarationLists) md->setSectionList(this,ml);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1547
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1548
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1549
MemberList *FileDef::getMemberList(MemberList::ListType lt) const
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1550
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1551
  FileDef *that = (FileDef*)this;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1552
  MemberList *ml = that->m_memberLists.first();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1553
  while (ml)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1554
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1555
    if (ml->listType()==lt)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1556
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1557
      return ml;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1558
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1559
    ml = that->m_memberLists.next();
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1560
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1561
  return 0;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1562
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1563
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1564
void FileDef::writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1565
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1566
  static bool optVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1567
  MemberList * ml = getMemberList(lt);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1568
  if (ml) 
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1569
  {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1570
    if (optVhdl) // use specific declarations function
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1571
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1572
      VhdlDocGen::writeVhdlDeclarations(ml,ol,0,0,this);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1573
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1574
    else
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1575
    {
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1576
      ml->writeDeclarations(ol,0,0,this,0,title,0);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1577
    }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1578
  }
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1579
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1580
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1581
void FileDef::writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title)
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1582
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1583
  MemberList * ml = getMemberList(lt);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1584
  if (ml) ml->writeDocumentation(ol,name(),this,title);
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1585
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1586
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1587
bool FileDef::isLinkableInProject() const
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1588
{
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1589
  static bool showFiles = Config_getBool("SHOW_FILES");
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1590
  return hasDocumentation() && !isReference() && showFiles;
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1591
}
42188c7ea2d9 Initial contribution of ORB delivering Feature bug 1460
szarinda <>
parents:
diff changeset
  1592
4
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1593
bool FileDef::includes(FileDef *incFile,QDict<FileDef> *includedFiles) const
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1594
{
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1595
  if (incFile==this) return TRUE;
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1596
  //printf("%s::includes(%s)\n",name().data(),incFile->name().data());
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1597
  includedFiles->insert(absFilePath(),this);
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1598
  if (includeList)
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1599
  {
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1600
    QListIterator<IncludeInfo> ili(*includeList);
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1601
    IncludeInfo *ii;
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1602
    for (;(ii=ili.current());++ili)
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1603
    {
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1604
      if (ii->fileDef && 
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1605
          includedFiles->find(ii->fileDef->absFilePath())==0 &&
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1606
          ii->fileDef->includes(incFile,includedFiles)) return TRUE;
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1607
    }
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1608
  }
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1609
  return FALSE;
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1610
}
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1611
468f4c8d3d5b Orb version 0.2.0
Jonathan Harrington <jonathan.harrington@nokia.com>
parents: 0
diff changeset
  1612