My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions | Variables
vhdldocgen.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <qcstring.h>
#include <qfileinfo.h>
#include <qstringlist.h>
#include <qmap.h>
#include "vhdldocgen.h"
#include "message.h"
#include "config.h"
#include "doxygen.h"
#include "util.h"
#include "language.h"
#include "commentscan.h"
#include "index.h"
#include "definition.h"
#include "searchindex.h"
#include "outputlist.h"
#include "parserintf.h"
#include "layout.h"
#include "arguments.h"
#include "portable.h"
#include "memberlist.h"
#include "memberdef.h"
#include "groupdef.h"
#include "classlist.h"
#include "namespacedef.h"
#include "filename.h"
#include "membergroup.h"
#include "plantuml.h"
#include "vhdljjparser.h"
#include "VhdlParser.h"
#include "vhdlcode.h"

Go to the source code of this file.

Macros

#define theTranslator_vhdlType   VhdlDocGen::trVhdlType
 
#define STARTL
 
#define DECLN
 
#define STARTFIN   (FlowChart::START_NO | FlowChart::END_NO)
 
#define LOOP
 
#define ENDCL   (FlowChart::END_CASE | FlowChart::END_LOOP)
 
#define EEND   (FlowChart::ENDIF_NO | FlowChart::ELSE_NO )
 
#define IFF   (FlowChart::ELSIF_NO | FlowChart::IF_NO)
 
#define EXITNEXT   (FlowChart::EXIT_NO | FlowChart::NEXT_NO )
 
#define EMPTY   (EEND | FlowChart::ELSIF_NO)
 
#define EE   (FlowChart::ELSE_NO | FlowChart::ELSIF_NO)
 
#define EMPTNODE   (ENDCL | EEND | FlowChart::ELSIF_NO)
 
#define FLOWLEN   (flowList.count()-1)
 

Functions

static QDict< QCString > g_vhdlKeyDict0 (17, FALSE)
 
static QDict< QCString > g_vhdlKeyDict1 (17, FALSE)
 
static QDict< QCString > g_vhdlKeyDict2 (17, FALSE)
 
static QDict< QCString > g_vhdlKeyDict3 (17, FALSE)
 
static void initUCF (Entry *root, const char *type, QCString &qcs, int line, QCString &fileName, QCString &brief)
 
static void writeUCFLink (const MemberDef *mdef, OutputList &ol)
 
static void assignBinding (VhdlConfNode *conf)
 
static void addInstance (ClassDef *entity, ClassDef *arch, ClassDef *inst, Entry *cur, ClassDef *archBind=NULL)
 
static void createSVG ()
 
static void startDot (FTextStream &t)
 
static void startTable (FTextStream &t, const QCString &className)
 
static QList< MemberDef > * getPorts (ClassDef *cd)
 
static void writeVhdlEntityToolTip (FTextStream &t, ClassDef *cd)
 
static void endDot (FTextStream &t)
 
static void writeTable (QList< MemberDef > *port, FTextStream &t)
 
static void endTabel (FTextStream &t)
 
static void writeClassToDot (FTextStream &t, ClassDef *cd)
 
static void writeVhdlDotLink (FTextStream &t, const QCString &a, const QCString &b, const QCString &style)
 
static void codify (FTextStream &t, const char *str)
 
static void writeLink (const MemberDef *mdef, OutputList &ol)
 
static void startFonts (const QCString &q, const char *keyword, OutputList &ol)
 
static QCString splitString (QCString &str, char c)
 
static int compareString (const QCString &s1, const QCString &s2)
 
static QCString formatBriefNote (const QCString &brief, ClassDef *cd)
 
static void writeColumn (FTextStream &t, MemberDef *md, bool start)
 
static void setGlobalType (MemberList *ml)
 
static bool membersHaveSpecificType (MemberList *ml, uint64 type)
 
static MemberDeffindMemFlow (const MemberDef *mdef)
 
void alignText (QCString &q)
 

Variables

static const MemberDefflowMember =0
 
static QMap< QCString,
MemberDef * > 
varMap
 
static QList< ClassDefqli
 
static QMap< ClassDef *, QList
< ClassDef > > 
packages
 
static int recordCounter =0
 
static QList< MemberDefmdList
 
static int ifcounter =0
 
static int nodeCounter =0
 
struct {
   const char *   textNodeLink
 
   const char *   yesNodeLink
 
   const char *   noNodeLink
 
   const char *   comment
 
   const char *   decisionNode
 
   const char *   varNode
 
   const char *   startEndNode
 
   const char *   textNode
 
flowCol
 

Macro Definition Documentation

#define DECLN
Value:
FlowChart::ELSIF_NO | FlowChart::IF_NO | \
FlowChart::FOR_NO | FlowChart::WHILE_NO | \
FlowChart::CASE_NO | FlowChart::LOOP_NO )

Definition at line 3419 of file vhdldocgen.cpp.

Referenced by FlowChart::writeShape().

Definition at line 3431 of file vhdldocgen.cpp.

#define EEND   (FlowChart::ENDIF_NO | FlowChart::ELSE_NO )

Definition at line 3427 of file vhdldocgen.cpp.

Referenced by FlowChart::writeFlowLinks(), and FlowChart::writeShape().

#define EMPTNODE   (ENDCL | EEND | FlowChart::ELSIF_NO)

Definition at line 3432 of file vhdldocgen.cpp.

Referenced by FlowChart::printNode().

#define EMPTY   (EEND | FlowChart::ELSIF_NO)

Definition at line 3430 of file vhdldocgen.cpp.

Referenced by FlowChart::colTextNodes().

#define ENDCL   (FlowChart::END_CASE | FlowChart::END_LOOP)

Definition at line 3426 of file vhdldocgen.cpp.

Referenced by FlowChart::writeShape().

#define EXITNEXT   (FlowChart::EXIT_NO | FlowChart::NEXT_NO )

Definition at line 3429 of file vhdldocgen.cpp.

Referenced by FlowChart::writeShape().

#define FLOWLEN   (flowList.count()-1)
#define IFF   (FlowChart::ELSIF_NO | FlowChart::IF_NO)
#define LOOP
Value:
FlowChart::LOOP_NO )

Definition at line 3424 of file vhdldocgen.cpp.

Referenced by FlowChart::findLabel(), FlowChart::findPrevLoop(), and FlowChart::writeShape().

#define STARTFIN   (FlowChart::START_NO | FlowChart::END_NO)

Definition at line 3423 of file vhdldocgen.cpp.

Referenced by FlowChart::writeShape().

#define STARTL
Value:
FlowChart::FOR_NO | FlowChart::CASE_NO | \
FlowChart::LOOP_NO | WHEN_NO)

Definition at line 3416 of file vhdldocgen.cpp.

Referenced by FlowChart::FlowChart(), FlowChart::printNode(), and FlowChart::writeEdge().

#define theTranslator_vhdlType   VhdlDocGen::trVhdlType

Function Documentation

static void addInstance ( ClassDef entity,
ClassDef arch,
ClassDef inst,
Entry cur,
ClassDef archBind = NULL 
)
static

Definition at line 3107 of file vhdldocgen.cpp.

References VhdlDocGen::addBaseClass(), TagInfo::anchor, Entry::brief, Entry::briefFile, Entry::briefLine, Entry::doc, Entry::docFile, Entry::docLine, TagInfo::fileName, FileDef::fileName(), Definition::getDefFileName(), ClassDef::getFileDef(), ClassDef::getOutputFileBase(), ClassDef::insertBaseClass(), ClassDef::insertMember(), ClassDef::insertSubClass(), VhdlDocGen::INSTANTIATION, ClassDef::isBaseClass(), VhdlDocGen::isSubClass(), Member, MemberDef::MemberDef(), MemberType_Variable, Definition::name(), Entry::name, Normal, Public, Definition::setBodyDef(), Definition::setBodySegment(), MemberDef::setBriefDescription(), MemberDef::setDocumentation(), Definition::setLanguage(), MemberDef::setMemberSpecifiers(), MemberDef::setTagInfo(), SrcLangExt_VHDL, Entry::startColumn, Entry::startLine, Entry::stat, TagInfo::tagName, Entry::type, and Entry::write.

Referenced by assignBinding(), and VhdlDocGen::computeVhdlComponentRelations().

{
QCString bName,n1;
if (ar==0) return;
if (classEntity==0)
{
//add component inst
n1=cur->type;
goto ferr;
}
if (classEntity==cd) return;
bName=classEntity->name();
// fprintf(stderr,"\naddInstance %s to %s %s %s\n", classEntity->name().data(),cd->name().data(),ar->name().data(),cur->name);
n1=classEntity->name().data();
if (!cd->isBaseClass(classEntity, true, 0))
{
cd->insertBaseClass(classEntity,n1,Public,Normal,0);
}
else
{
VhdlDocGen::addBaseClass(cd,classEntity);
}
if (!VhdlDocGen::isSubClass(classEntity,cd,true,0))
{
classEntity->insertSubClass(cd,Public,Normal,0);
classEntity->setLanguage(SrcLangExt_VHDL);
}
ferr:
QCString uu=cur->name;
ar->getDefFileName(), cur->startLine,cur->startColumn,
n1,uu,uu, 0,
0,
0);
if (ar->getOutputFileBase())
{
TagInfo tg;
tg.anchor = 0;
tg.fileName = ar->getOutputFileBase();
tg.tagName = 0;
md->setTagInfo(&tg);
}
//fprintf(stderr,"\n%s%s%s\n",md->name().data(),cur->brief.data(),cur->doc.data());
md->setBodySegment(cur->startLine,-1) ;
md->setDocumentation(cur->doc.data(),cur->docFile.data(),cur->docLine);
FileDef *fd=ar->getFileDef();
md->setBodyDef(fd);
QCString info="Info: Elaborating entity "+n1;
fd=ar->getFileDef();
info+=" for hierarchy ";
QRegExp epr("[|]");
QCString label=cur->type+":"+cur->write+":"+cur->name;
label.replace(epr,":");
info+=label;
fprintf(stderr,"\n[%s:%d:%s]\n",fd->fileName().data(),cur->startLine,info.data());
ar->insertMember(md);
}
void alignText ( QCString &  q)

Definition at line 3468 of file vhdldocgen.cpp.

Referenced by FlowChart::writeShape().

{
if (q.length()<=80) return;
if (q.length()>200)
{
q.resize(200);
}
q.append(" ...");
QRegExp reg("[\\s|]");
QCString str(q.data());
QCString temp;
while (str.length()>80)
{
int j=str.findRev(reg,80);
if (j<=0)
{
temp+=str;
q=temp;
return;
}
else
{
QCString qcs=str.left(j);
temp+=qcs+"\\";
temp+="n";
str.remove(0,j);
}
}//while
q=temp+str;
// #endif
}
void assignBinding ( VhdlConfNode conf)
static

Definition at line 2918 of file vhdldocgen.cpp.

References addInstance(), VhdlConfNode::arch, VhdlConfNode::binding, VhdlConfNode::compSpec, VhdlConfNode::confVhdl, Entry::exception, VhdlDocGen::findVhdlClass(), VhdlDocGen::getIndexWord(), getVhdlConfiguration(), getVhdlInstList(), VhdlConfNode::isInlineConf, Definition::name(), Entry::name, VhdlDocGen::parseForBinding(), split(), Entry::stat, and Entry::type.

Referenced by VhdlDocGen::computeVhdlComponentRelations().

{
QList<Entry> instList=getVhdlInstList();
QListIterator<Entry> eli(instList);
Entry *cur=0;
ClassDef *archClass=0,*entClass=0;
QCString archName;
QCString arcBind,entBind;
bool others,all;
entBind=conf->binding;
QCString conf2=VhdlDocGen::parseForBinding(entBind,arcBind);
if (qstricmp(conf2,"configuration")==0)
{
QList<VhdlConfNode> confList = getVhdlConfiguration();
VhdlConfNode* vconf;
// bool found=false;
for (uint iter=0;iter<confList.count(); iter++)
{
vconf= (VhdlConfNode *)confList.at(iter);
QCString n=VhdlDocGen::getIndexWord(vconf->confVhdl.data(),0);
if (n==entBind)
{
// found=true;
entBind=VhdlDocGen::getIndexWord(vconf->confVhdl.data(),1);
QCString a=VhdlDocGen::getIndexWord(conf->compSpec.data(),0);
QCString e=VhdlDocGen::getIndexWord(conf->confVhdl.data(),1);
a=e+"::"+a;
archClass= VhdlDocGen::findVhdlClass(a.data());//Doxygen::classSDict->find(a.data());
entClass= VhdlDocGen::findVhdlClass(e.data());//Doxygen::classSDict->find(e.data());
break;
}
}
}
else // conf2!=configuration
{
QCString a,c,e;
if (conf->isInlineConf)
{
c=conf->confVhdl;
}
else
{
c=e+"::"+a;
}
archClass= VhdlDocGen::findVhdlClass(c.data());//Doxygen::classSDict->find(a.data());
entClass= VhdlDocGen::findVhdlClass(e.data()); //Doxygen::classSDict->find(e.data());
}
QCString label=conf->compSpec.lower();
//label.prepend("|");
if (!archClass)
{
// err("architecture %s not found ! ",conf->confVhdl.data());
return;
}
archName=archClass->name();
QCString allOt=VhdlDocGen::getIndexWord(conf->arch.data(),0);
all=allOt.lower()=="all" ;
others= allOt.lower()=="others";
for (;(cur=eli.current());++eli)
{
if (cur->exception.lower()==label || conf->isInlineConf)
{
QCString archy;
if (all || others)
{
archy=VhdlDocGen::getIndexWord(conf->arch.data(),1);
}
else
{
archy=conf->arch;
}
QCString inst1=VhdlDocGen::getIndexWord(archy.data(),0).lower();
QCString comp=VhdlDocGen::getIndexWord(archy.data(),1).lower();
QStringList ql=QStringList::split(",",inst1);
for (uint j=0;j<ql.count();j++)
{
QCString archy1,sign1;
if (all || others)
{
archy1=VhdlDocGen::getIndexWord(conf->arch.data(),1);
sign1=cur->type;
}
else
{
archy1=comp+":"+ql[j].utf8();
sign1=cur->type+":"+cur->name;
}
if (archy1==sign1.lower() && !cur->stat)
{
// fprintf(stderr," \n label [%s] [%s] [%s]",cur->exception.data(),cur->type.data(),cur->name.data());
ClassDef *ent= VhdlDocGen::findVhdlClass(entBind.data());//Doxygen::classSDict->find(entBind.data());
if (entClass==0 || ent==0)
{
continue;
}
addInstance(ent,archClass,entClass,cur);
cur->stat=TRUE;
break;
}
}// for
}
}//for each element in instList
}//assignBinding
static void codify ( FTextStream t,
const char *  str 
)
static

Definition at line 103 of file vhdldocgen.cpp.

Referenced by writeColumn().

{
if (str)
{
const char *p=str;
char c;
while (*p)
{
c=*p++;
switch(c)
{
case '<': t << "&lt;";
break;
case '>': t << "&gt;";
break;
case '&': t << "&amp;";
break;
case '\'': t << "&#39;";
break;
case '"': t << "&quot;";
break;
default: t << c;
break;
}
}
}
}
static int compareString ( const QCString &  s1,
const QCString &  s2 
)
static

Definition at line 158 of file vhdldocgen.cpp.

Referenced by VhdlDocGen::findFunction().

{
return qstricmp(s1.stripWhiteSpace(),s2.stripWhiteSpace());
}
static void createSVG ( )
static

Definition at line 163 of file vhdldocgen.cpp.

References Config_getString, err(), and portable_system().

Referenced by VhdlDocGen::writeOverview().

{
QCString ov =Config_getString(HTML_OUTPUT);
QCString dir="-o \""+ov+"/vhdl_design_overview.html\"";
ov+="/vhdl_design.dot";
QCString vlargs="-Tsvg \""+ov+"\" "+dir ;
if (portable_system("dot",vlargs)!=0)
{
err("could not create dot file");
}
}
static void endDot ( FTextStream t)
static

Definition at line 270 of file vhdldocgen.cpp.

Referenced by VhdlDocGen::writeOverview().

{
t <<" } \n";
}
static void endTabel ( FTextStream t)
static

Definition at line 450 of file vhdldocgen.cpp.

Referenced by VhdlDocGen::writeOverview().

{
t << "</TABLE>>\n";
t << "] \n";
}
static MemberDef* findMemFlow ( const MemberDef mdef)
static

Definition at line 3305 of file vhdldocgen.cpp.

References Definition::getStartBodyLine(), mdList, and Definition::name().

Referenced by VhdlDocGen::createFlowChart().

{
for(uint j=0;j<mdList.count();j++)
{
MemberDef* md=(MemberDef*)mdList.at(j);
if (md->name()==mdef->name() && md->getStartBodyLine()==mdef->getStartBodyLine())
return md;
}
return 0;
}
static QCString formatBriefNote ( const QCString &  brief,
ClassDef cd 
)
static

Definition at line 293 of file vhdldocgen.cpp.

References Definition::briefLine(), Definition::getDefFileName(), parseCommentAsText(), and split().

Referenced by writeVhdlEntityToolTip().

{
QRegExp ep("[\n]");
QCString vForm;
QCString repl("<BR ALIGN=\"LEFT\"/>");
QCString file=cd->getDefFileName();
int k=cd->briefLine();
QStringList qsl=QStringList::split(ep,brief);
for(uint j=0;j<qsl.count();j++)
{
QCString qcs=qsl[j].data();
vForm+=parseCommentAsText(cd,NULL,qcs,file,k);
k++;
vForm+='\n';
}
vForm.replace(ep,repl.data());
return vForm;
}
static QDict<QCString> g_vhdlKeyDict0 ( 17  ,
FALSE   
)
static
static QDict<QCString> g_vhdlKeyDict1 ( 17  ,
FALSE   
)
static
static QDict<QCString> g_vhdlKeyDict2 ( 17  ,
FALSE   
)
static
static QDict<QCString> g_vhdlKeyDict3 ( 17  ,
FALSE   
)
static
static QList< MemberDef > * getPorts ( ClassDef cd)
static

Definition at line 470 of file vhdldocgen.cpp.

References ClassDef::getMemberList(), MemberDef::getMemberSpecifiers(), MemberListType_variableMembers, and VhdlDocGen::PORT.

Referenced by VhdlDocGen::writeOverview().

{
MemberDef* md;
QList<MemberDef> *portList=new QList<MemberDef>;
if (ml==0)
{
delete portList;
return 0;
}
MemberListIterator fmni(*ml);
for (fmni.toFirst();(md=fmni.current());++fmni)
{
{
portList->append(md);
}
}
return portList;
}
static void initUCF ( Entry root,
const char *  type,
QCString &  qcs,
int  line,
QCString &  fileName,
QCString &  brief 
)
static

Definition at line 2709 of file vhdldocgen.cpp.

References Entry::addSubEntry(), Entry::args, Entry::bodyLine, brief, Entry::brief, Entry::briefFile, Entry::briefLine, VhdlDocGen::deleteAllChars(), Entry::fileName, VhdlDocGen::getRecordNumber(), Entry::lang, Entry::name, Entry::section, Entry::spec, SrcLangExt_VHDL, Entry::type, VhdlDocGen::UCF_CONST, and Entry::VARIABLE_SEC.

Referenced by VhdlDocGen::parseUCF().

{
if (qcs.isEmpty())return;
QRegExp reg("[\\s=]");
QCString n;
// bool bo=(qstricmp(type,qcs.data())==0);
qcs=qcs.stripWhiteSpace();
int i= qcs.find(reg);
if (i<0) return;
if (i==0)
{
n=type;
type="";
}
else
{
n=qcs.left(i);
}
qcs=qcs.remove(0,i+1);
// qcs.prepend("|");
qcs.stripPrefix("=");
Entry* current=new Entry;
current->bodyLine=line;
current->fileName=fileName;
current->type="ucf_const";
current->args+=qcs;
current->lang= SrcLangExt_VHDL ;
// adding dummy name for constraints like VOLTAGE=5,TEMPERATURE=20 C
if (n.isEmpty())
{
n="dummy";
}
current->name= n+"_";
current->name.append(VhdlDocGen::getRecordNumber().data());
if (!brief.isEmpty())
{
current->brief=brief;
current->briefLine=line;
current->briefFile=fileName;
brief.resize(0);
}
root->addSubEntry(current);
}
static bool membersHaveSpecificType ( MemberList ml,
uint64  type 
)
static

Definition at line 2330 of file vhdldocgen.cpp.

References MemberList::getMemberGroupList(), and MemberDef::getMemberSpecifiers().

Referenced by VhdlDocGen::writeVHDLDeclarations().

{
if (ml==0) return FALSE;
MemberDef *mdd=0;
MemberListIterator mmli(*ml);
for ( ; (mdd=mmli.current()); ++mmli )
{
if (mdd->getMemberSpecifiers()==type) //is type in class
{
return TRUE;
}
}
if (ml->getMemberGroupList())
{
while ((mg=mgli.current()))
{
if (mg->members())
{
if (membersHaveSpecificType(mg->members(),type)) return TRUE;
}
++mgli;
}
}
return FALSE;
}
static void setGlobalType ( MemberList ml)
static

Definition at line 1801 of file vhdldocgen.cpp.

References MemberDef::argsString(), VhdlDocGen::CONFIG, VhdlDocGen::INSTANTIATION, VhdlDocGen::LIBRARY, VhdlDocGen::MISCELLANEOUS, MemberDef::setMemberSpecifiers(), MemberDef::typeString(), VhdlDocGen::UCF_CONST, and VhdlDocGen::USE.

Referenced by VhdlDocGen::writeVHDLDeclarations().

{
if (ml==0) return;
MemberDef *mdd=0;
MemberListIterator mmli(*ml);
for ( ; (mdd=mmli.current()); ++mmli )
{
if (qstrcmp(mdd->argsString(),"package")==0)
{
}
else if (qstrcmp(mdd->argsString(),"configuration")==0)
{
}
else if (qstrcmp(mdd->typeString(),"library")==0)
{
}
else if (qstrcmp(mdd->typeString(),"use")==0)
{
}
else if (qstricmp(mdd->typeString(),"misc")==0)
{
}
else if (qstricmp(mdd->typeString(),"ucf_const")==0)
{
}
}
}
static QCString splitString ( QCString &  str,
char  c 
)
static

Definition at line 146 of file vhdldocgen.cpp.

Referenced by writeUCFLink().

{
QCString n=str;
int i=str.find(c);
if (i>0)
{
n=str.left(i);
str=str.remove(0,i+1);
}
return n;
}
static void startDot ( FTextStream t)
static

Definition at line 262 of file vhdldocgen.cpp.

Referenced by VhdlDocGen::writeOverview().

{
t << " digraph G { \n";
t << "rankdir=LR \n";
t << "concentrate=TRUE\n";
t << "stylesheet=\"doxygen.css\"\n";
}
static void startFonts ( const QCString &  q,
const char *  keyword,
OutputList ol 
)
static
static void startTable ( FTextStream t,
const QCString &  className 
)
static

Definition at line 275 of file vhdldocgen.cpp.

Referenced by VhdlDocGen::writeOverview().

{
t << className <<" [ shape=none , fontname=\"arial\", fontcolor=\"blue\" , \n";
t << "label=<<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\">\n";
}
static void writeClassToDot ( FTextStream t,
ClassDef cd 
)
static

Definition at line 456 of file vhdldocgen.cpp.

References ClassDef::getOutputFileBase(), Doxygen::htmlFileExtension, and Definition::name().

Referenced by VhdlDocGen::writeOverview().

{
t << "<TR><TD COLSPAN=\"2\" BGCOLOR=\"yellow\" ";
t << "PORT=\"";
t << cd->name();
t << "\" ";
t << "href=\"";
t << "\" ";
t << ">";
t << cd->name();
t << " </TD></TR>\n";
}
static void writeColumn ( FTextStream t,
MemberDef md,
bool  start 
)
static

Definition at line 364 of file vhdldocgen.cpp.

References MemberDef::anchor(), MemberDef::argsString(), Definition::briefDescriptionAsTooltip(), codify(), MemberDef::getOutputFileBase(), Doxygen::htmlFileExtension, Definition::name(), and MemberDef::typeString().

Referenced by writeTable().

{
QCString toolTip;
static QRegExp reg("[%]");
bool bidir=(md!=0 &&( qstricmp(md->typeString(),"inout")==0));
if (md)
{
if (!toolTip.isEmpty())
{
QCString largs = md->argsString();
if (!largs.isEmpty())
largs=largs.replace(reg," ");
toolTip+=" [";
toolTip+=largs;
toolTip+="]";
}
}
if (start)
{
t <<"<TR>\n";
}
t << "<TD ALIGN=\"LEFT\" ";
if (md)
{
t << "href=\"";
t << "#" << md->anchor();
t<<"\" ";
t<<" TOOLTIP=\"";
if (!toolTip.isEmpty())
{
codify(t,toolTip.data());
}
else
{
QCString largs = md->argsString();
if (!largs.isEmpty())
{
largs=largs.replace(reg," ");
codify(t,largs.data());
}
}
t << "\" ";
t << " PORT=\"";
t << md->name();
t << "\" ";
}
if (!toolTip.isEmpty())
{
// if (!toolTip.isEmpty())
if (bidir)
t << "BGCOLOR=\"orange\">";
else
t << "BGCOLOR=\"azure\">";
}
else if (bidir)
{
t << "BGCOLOR=\"pink\">";
}
else
{
t << "BGCOLOR=\"lightgrey\">";
}
if (md)
{
t << md->name();
}
else
{
t << " \n";
}
t << "</TD>\n";
if (!start)
{
t << "</TR>\n";
}
}
static void writeLink ( const MemberDef mdef,
OutputList ol 
)
static
static void writeTable ( QList< MemberDef > *  port,
FTextStream t 
)
static

Definition at line 497 of file vhdldocgen.cpp.

References MemberDef::typeString(), and writeColumn().

Referenced by VhdlDocGen::writeOverview().

{
MemberDef *md;
uint len=port->count();
QList<MemberDef> inPorts;
QList<MemberDef> outPorts;
uint j;
for (j=0;j<len;j++)
{
md=(MemberDef*)port->at(j);
QCString qc=md->typeString();
if(qc=="in")
{
inPorts.append(md);
}
else
{
outPorts.append(md);
}
}
int inp = inPorts.count();
int outp = outPorts.count();
int maxLen;
if (inp>=outp)
{
maxLen=inp;
}
else
{
maxLen=outp;
}
int i;
for(i=0;i<maxLen;i++)
{
//write inports
if (i<inp)
{
md=(MemberDef*)inPorts.at(i);
writeColumn(t,md,TRUE);
}
else
{
writeColumn(t,NULL,TRUE);
}
if (i<outp)
{
md=(MemberDef*)outPorts.at(i);
writeColumn(t,md,FALSE);
}
else
{
writeColumn(t,NULL,FALSE);
}
}
}
static void writeUCFLink ( const MemberDef mdef,
OutputList ol 
)
static

Definition at line 2767 of file vhdldocgen.cpp.

References MemberDef::argsString(), OutputList::docify(), VhdlDocGen::formatString(), OutputList::insertMemberAlign(), Definition::name(), splitString(), writeLink(), and OutputList::writeString().

Referenced by VhdlDocGen::writeVHDLDeclaration().

{
QCString largs(mdef->argsString());
QCString n= splitString(largs, '#');
// VhdlDocGen::adjustRecordMember(mdef);
bool equ=(n.length()==largs.length());
if (!equ)
{
ol.writeString(n.data());
ol.docify(" ");
}
if (mdef->name().contains("dummy")==0)
{
writeLink(mdef,ol);
}
if (equ)
{
}
ol.docify(" ");
VhdlDocGen::formatString(largs,ol,mdef);
}
static void writeVhdlDotLink ( FTextStream t,
const QCString &  a,
const QCString &  b,
const QCString &  style 
)
static

Definition at line 281 of file vhdldocgen.cpp.

Referenced by VhdlDocGen::writeOverview(), and writeVhdlEntityToolTip().

{
t << a << "->" << b;
if (!style.isEmpty())
{
t << "[style=" << style << "];\n";
}
t << "\n";
}
static void writeVhdlEntityToolTip ( FTextStream t,
ClassDef cd 
)
static

Definition at line 343 of file vhdldocgen.cpp.

References brief, Definition::briefDescription(), formatBriefNote(), VhdlDocGen::getRecordNumber(), Definition::name(), and writeVhdlDotLink().

Referenced by VhdlDocGen::writeOverview().

{
QCString brief=cd->briefDescription();
if (brief.isEmpty()) return;
brief=formatBriefNote(brief,cd);
QCString node="node";
t << node <<"[shape=none margin=0.1, label=<\n";
t << "<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"2\" >\n ";
t << "<TR><TD BGCOLOR=\"lightcyan\"> ";
t << brief;
t << " </TD></TR></TABLE>>];";
QCString dotn=cd->name()+":";
dotn+=cd->name();
writeVhdlDotLink(t,dotn,node,"dotted");
}

Variable Documentation

const char* comment

Definition at line 3446 of file vhdldocgen.cpp.

Referenced by VhdlDocGen::parseUCF().

const char* decisionNode

Definition at line 3447 of file vhdldocgen.cpp.

struct { ... } flowCol
Initial value:
=
{ "green",
"red",
"black",
"khaki",
"0.7 0.3 1.0",
"lightyellow",
"white",
"lightcyan"
}

Referenced by FlowChart::buildCommentNodes(), FlowChart::writeEdge(), and FlowChart::writeShape().

const MemberDef* flowMember =0
static

Definition at line 88 of file vhdldocgen.cpp.

Referenced by VhdlDocGen::getFlowMember().

int ifcounter =0
static
QList<MemberDef> mdList
static

Definition at line 3303 of file vhdldocgen.cpp.

Referenced by VhdlDocGen::createFlowChart(), and findMemFlow().

int nodeCounter =0
static

Definition at line 3436 of file vhdldocgen.cpp.

Referenced by FlowChart::delFlowList(), and FlowChart::FlowChart().

const char* noNodeLink

Definition at line 3443 of file vhdldocgen.cpp.

QMap<ClassDef*,QList<ClassDef> > packages
static
QList<ClassDef> qli
static
int recordCounter =0
static

Definition at line 1308 of file vhdldocgen.cpp.

Referenced by VhdlDocGen::getRecordNumber().

const char* startEndNode

Definition at line 3449 of file vhdldocgen.cpp.

const char* textNode

Definition at line 3450 of file vhdldocgen.cpp.

const char* textNodeLink

Definition at line 3441 of file vhdldocgen.cpp.

QMap<QCString,MemberDef*> varMap
static
const char* varNode

Definition at line 3448 of file vhdldocgen.cpp.

const char* yesNodeLink

Definition at line 3442 of file vhdldocgen.cpp.