Orb/Doxygen/src/docsets.cpp
changeset 4 468f4c8d3d5b
parent 0 42188c7ea2d9
equal deleted inserted replaced
3:d8fccb2cd802 4:468f4c8d3d5b
     1 /******************************************************************************
     1 /******************************************************************************
     2  *
     2  *
     3  * Copyright (C) 1997-2008 by Dimitri van Heesch.
     3  * Copyright (C) 1997-2010 by Dimitri van Heesch.
     4  *
     4  *
     5  * Permission to use, copy, modify, and distribute this software and its
     5  * Permission to use, copy, modify, and distribute this software and its
     6  * documentation under the terms of the GNU General Public License is hereby 
     6  * documentation under the terms of the GNU General Public License is hereby 
     7  * granted. No representations are made about the suitability of this software 
     7  * granted. No representations are made about the suitability of this software 
     8  * for any purpose. It is provided "as is" without express or implied warranty.
     8  * for any purpose. It is provided "as is" without express or implied warranty.
   281     case SrcLangExt_XML:    lang="xml"; break;        // DBUS XML
   281     case SrcLangExt_XML:    lang="xml"; break;        // DBUS XML
   282   }
   282   }
   283 
   283 
   284   if (md)
   284   if (md)
   285   {
   285   {
   286     if (!md->isLinkable()) return; // internal symbol
       
   287     if (context==0)
   286     if (context==0)
   288     {
   287     {
   289       if (md->getGroupDef())
   288       if (md->getGroupDef())
   290         context = md->getGroupDef();
   289         context = md->getGroupDef();
   291       else if (md->getFileDef())
   290       else if (md->getFileDef())
   292         context = md->getFileDef();
   291         context = md->getFileDef();
   293       if (context==0) return; // should not happen
   292     }
   294 
   293     if (context==0) return; // should not happen
   295       switch (md->memberType())
   294 
   296       {
   295     switch (md->memberType())
   297         case MemberDef::Define:
   296     {
   298           type="macro"; break;
   297       case MemberDef::Define:
   299         case MemberDef::Function:
   298         type="macro"; break;
   300           if (cd && (cd->compoundType()==ClassDef::Interface ||
   299       case MemberDef::Function:
   301                      cd->compoundType()==ClassDef::Class))
   300         if (cd && (cd->compoundType()==ClassDef::Interface ||
   302           {
   301               cd->compoundType()==ClassDef::Class))
   303             if (md->isStatic())
   302         {
   304               type="clm";         // class member
   303           if (md->isStatic())
   305             else
   304             type="clm";         // class member
   306               type="instm";       // instance member
       
   307           }
       
   308           else if (cd && cd->compoundType()==ClassDef::Protocol)
       
   309           {
       
   310             if (md->isStatic())
       
   311               type="intfcm";     // interface class member
       
   312             else
       
   313               type="intfm";      // interface member
       
   314           }
       
   315           else
   305           else
   316             type="func";
   306             type="instm";       // instance member
   317           break;
   307         }
   318         case MemberDef::Variable:
   308         else if (cd && cd->compoundType()==ClassDef::Protocol)
   319           type="data"; break;
   309         {
   320         case MemberDef::Typedef:
   310           if (md->isStatic())
   321           type="tdef"; break;
   311             type="intfcm";     // interface class member
   322         case MemberDef::Enumeration:
   312           else
   323           type="enum"; break;
   313             type="intfm";      // interface member
   324         case MemberDef::EnumValue:
   314         }
   325           type="econst"; break;
   315         else
   326           //case MemberDef::Prototype:
   316           type="func";
   327           //  type="prototype"; break;
   317         break;
   328         case MemberDef::Signal:
   318       case MemberDef::Variable:
   329           type="signal"; break;
   319         type="data"; break;
   330         case MemberDef::Slot:
   320       case MemberDef::Typedef:
   331           type="slot"; break;
   321         type="tdef"; break;
   332         case MemberDef::Friend:
   322       case MemberDef::Enumeration:
   333           type="ffunc"; break;
   323         type="enum"; break;
   334         case MemberDef::DCOP:
   324       case MemberDef::EnumValue:
   335           type="dcop"; break;
   325         type="econst"; break;
   336         case MemberDef::Property:
   326         //case MemberDef::Prototype:
   337           if (cd && cd->compoundType()==ClassDef::Protocol) 
   327         //  type="prototype"; break;
   338             type="intfp";         // interface property
   328       case MemberDef::Signal:
   339           else 
   329         type="signal"; break;
   340             type="instp";         // instance property
   330       case MemberDef::Slot:
   341           break;
   331         type="slot"; break;
   342         case MemberDef::Event:
   332       case MemberDef::Friend:
   343           type="event"; break;
   333         type="ffunc"; break;
   344       }
   334       case MemberDef::DCOP:
   345       writeToken(m_tts,md,type,lang,scope,md->anchor());
   335         type="dcop"; break;
   346     }
   336       case MemberDef::Property:
       
   337         if (cd && cd->compoundType()==ClassDef::Protocol) 
       
   338           type="intfp";         // interface property
       
   339         else 
       
   340           type="instp";         // instance property
       
   341         break;
       
   342       case MemberDef::Event:
       
   343         type="event"; break;
       
   344     }
       
   345     writeToken(m_tts,md,type,lang,scope,md->anchor());
   347   }
   346   }
   348   else if (context && context->isLinkable())
   347   else if (context && context->isLinkable())
   349   {
   348   {
   350     if (fd==0 && context->definitionType()==Definition::TypeFile)
   349     if (fd==0 && context->definitionType()==Definition::TypeFile)
   351     {
   350     {