Orb/Doxygen/src/classlist.cpp
changeset 4 468f4c8d3d5b
parent 0 42188c7ea2d9
equal deleted inserted replaced
3:d8fccb2cd802 4:468f4c8d3d5b
     1 /******************************************************************************
     1 /******************************************************************************
     2  *
     2  *
     3  * 
     3  * 
     4  *
     4  *
     5  * Copyright (C) 1997-2008 by Dimitri van Heesch.
     5  * Copyright (C) 1997-2010 by Dimitri van Heesch.
     6  *
     6  *
     7  * Permission to use, copy, modify, and distribute this software and its
     7  * Permission to use, copy, modify, and distribute this software and its
     8  * documentation under the terms of the GNU General Public License is hereby 
     8  * documentation under the terms of the GNU General Public License is hereby 
     9  * granted. No representations are made about the suitability of this software 
     9  * granted. No representations are made about the suitability of this software 
    10  * for any purpose. It is provided "as is" without express or implied warranty.
    10  * for any purpose. It is provided "as is" without express or implied warranty.
    62 ClassListIterator::ClassListIterator(const ClassList &cllist) :
    62 ClassListIterator::ClassListIterator(const ClassList &cllist) :
    63   QListIterator<ClassDef>(cllist)
    63   QListIterator<ClassDef>(cllist)
    64 {
    64 {
    65 }
    65 }
    66 
    66 
       
    67 bool ClassSDict::declVisible(const ClassDef::CompoundType *filter) const
       
    68 {
       
    69   static bool hideUndocClasses = Config_getBool("HIDE_UNDOC_CLASSES");
       
    70   static bool extractLocalClasses = Config_getBool("EXTRACT_LOCAL_CLASSES");
       
    71   if (count()>0)
       
    72   {
       
    73     ClassSDict::Iterator sdi(*this);
       
    74     ClassDef *cd=0;
       
    75     for (sdi.toFirst();(cd=sdi.current());++sdi)
       
    76     {
       
    77       if (cd->name().find('@')==-1 && 
       
    78           (filter==0 || *filter==cd->compoundType())
       
    79          )
       
    80       {
       
    81         bool isLink = cd->isLinkable();
       
    82         if (isLink || 
       
    83              (!hideUndocClasses && 
       
    84               (!cd->isLocal() || extractLocalClasses)
       
    85              )
       
    86            )
       
    87         {
       
    88           return TRUE;
       
    89         }
       
    90       }
       
    91     }
       
    92   }
       
    93   return FALSE;
       
    94 }
       
    95 
    67 void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,
    96 void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *filter,
    68                                   const char *header,bool localNames)
    97                                   const char *header,bool localNames)
    69 {
    98 {
    70   static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
    99   static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
    71   static bool vhdlOpt    = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
   100   static bool vhdlOpt    = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
       
   101   static bool hideUndocClasses = Config_getBool("HIDE_UNDOC_CLASSES");
       
   102   static bool extractLocalClasses = Config_getBool("EXTRACT_LOCAL_CLASSES");
    72   if (count()>0)
   103   if (count()>0)
    73   {
   104   {
    74     ClassSDict::Iterator sdi(*this);
   105     ClassSDict::Iterator sdi(*this);
    75     ClassDef *cd=0;
   106     ClassDef *cd=0;
    76     bool found=FALSE;
   107     bool found=FALSE;
    80           (filter==0 || *filter==cd->compoundType())
   111           (filter==0 || *filter==cd->compoundType())
    81          )
   112          )
    82       {
   113       {
    83         bool isLink = cd->isLinkable();
   114         bool isLink = cd->isLinkable();
    84         if (isLink || 
   115         if (isLink || 
    85              (!Config_getBool("HIDE_UNDOC_CLASSES") && 
   116              (!hideUndocClasses && 
    86               (!cd->isLocal() || Config_getBool("EXTRACT_LOCAL_CLASSES"))
   117               (!cd->isLocal() || extractLocalClasses)
    87              )
   118              )
    88            )
   119            )
    89         {
   120         {
    90           if (!found)
   121           if (!found)
    91           {
   122           {
    92             ol.startMemberHeader();
   123             ol.startMemberHeader("nested-classes");
    93             if (header)
   124             if (header)
    94             {
   125             {
    95               ol.parseText(header);
   126               ol.parseText(header);
    96             }
   127             }
    97             else if (vhdlOpt)
   128             else if (vhdlOpt)