Orb/Doxygen/src/vhdldocgen.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.
   211   ClassSDict::Iterator cli(*Doxygen::classSDict);
   211   ClassSDict::Iterator cli(*Doxygen::classSDict);
   212   for (cli.toFirst();cli.current();++cli)
   212   for (cli.toFirst();cli.current();++cli)
   213   {
   213   {
   214     cli.current()->visited=FALSE;
   214     cli.current()->visited=FALSE;
   215     ClassDef * cd = cli.current();
   215     ClassDef * cd = cli.current();
   216     if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ARCHITECTURECLASS)
   216     if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ARCHITECTURECLASS || 
       
   217         (VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKBODYCLASS)
   217     {
   218     {
   218       QCString bName=cd->name();
   219       QCString bName=cd->name();
   219       int i=bName.find("::");
   220       int i=bName.find("::");
   220       if (i>0)
   221       if (i>0)
   221       {
   222       {
   222         QCString entityName=bName.left(i);
   223         QCString entityName=bName.left(i);
       
   224         entityName.stripPrefix("_");
   223         ClassDef *classEntity=Doxygen::classSDict->find(entityName);
   225         ClassDef *classEntity=Doxygen::classSDict->find(entityName);
   224         // entity for architecutre ?
   226         // entity for architecutre ?
   225         if (classEntity)
   227         if (classEntity)
   226         {
   228         {
       
   229           // printf("\n entity %s  arch %s",entityName.data(),bName.data());
   227           classEntity->insertBaseClass(cd,bName,Public,Normal,0);
   230           classEntity->insertBaseClass(cd,bName,Public,Normal,0);
   228           cd->insertSubClass(classEntity,Public,Normal,0);
   231           cd->insertSubClass(classEntity,Public,Normal,0);
   229         }
   232         }
   230       }
   233       }
   231     }
   234     }
  1161     }
  1164     }
  1162     kk--;
  1165     kk--;
  1163   }//while
  1166   }//while
  1164 } // getFuncName
  1167 } // getFuncName
  1165 
  1168 
       
  1169 QCString VhdlDocGen::getProtectionName(int prot)
       
  1170 {
       
  1171   if (prot==VhdlDocGen::ENTITYCLASS)
       
  1172     return "entity";
       
  1173   else if (prot==VhdlDocGen::ARCHITECTURECLASS)
       
  1174     return "architecture";
       
  1175   else if (prot==VhdlDocGen::PACKAGECLASS)
       
  1176     return "package";
       
  1177   else if (prot==VhdlDocGen::PACKBODYCLASS)
       
  1178     return "package body";
       
  1179 
       
  1180   return "";
       
  1181 }
  1166 
  1182 
  1167 QCString VhdlDocGen::trTypeString(int type)
  1183 QCString VhdlDocGen::trTypeString(int type)
  1168 {
  1184 {
  1169   switch(type)
  1185   switch(type)
  1170   {
  1186   {
  2202   setGlobalType(ml);
  2218   setGlobalType(ml);
  2203   if (!membersHaveSpecificType(ml,type)) return;
  2219   if (!membersHaveSpecificType(ml,type)) return;
  2204 
  2220 
  2205   if (title) 
  2221   if (title) 
  2206   {
  2222   {
  2207     ol.startMemberHeader();
  2223     ol.startMemberHeader(ml->listTypeAsString());
  2208     ol.parseText(title);
  2224     ol.parseText(title);
  2209     ol.endMemberHeader();
  2225     ol.endMemberHeader();
  2210     ol.docify(" ");
  2226     ol.docify(" ");
  2211   }
  2227   }
  2212   if (subtitle && subtitle[0]!=0) 
  2228   if (subtitle && subtitle[0]!=0)