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< QCStringg_vhdlKeyDict0 (17, FALSE)
 
static QDict< QCStringg_vhdlKeyDict1 (17, FALSE)
 
static QDict< QCStringg_vhdlKeyDict2 (17, FALSE)
 
static QDict< QCStringg_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
 
static struct { ... }  flowCol
 

Macro Definition Documentation

#define DECLN
Value:

Definition at line 3419 of file vhdldocgen.cpp.

Definition at line 3431 of file vhdldocgen.cpp.

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

Definition at line 3427 of file vhdldocgen.cpp.

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

Definition at line 3432 of file vhdldocgen.cpp.

#define EMPTY   (EEND | FlowChart::ELSIF_NO)

Definition at line 3430 of file vhdldocgen.cpp.

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

Definition at line 3426 of file vhdldocgen.cpp.

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

Definition at line 3429 of file vhdldocgen.cpp.

#define FLOWLEN   (flowList.count()-1)

Definition at line 3433 of file vhdldocgen.cpp.

#define IFF   (FlowChart::ELSIF_NO | FlowChart::IF_NO)

Definition at line 3428 of file vhdldocgen.cpp.

#define LOOP
Value:

Definition at line 3424 of file vhdldocgen.cpp.

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

Definition at line 3423 of file vhdldocgen.cpp.

#define STARTL
Value:

Definition at line 3416 of file vhdldocgen.cpp.

#define theTranslator_vhdlType   VhdlDocGen::trVhdlType

Definition at line 64 of file vhdldocgen.cpp.

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.

3109 {
3110 
3111  QCString bName,n1;
3112  if (ar==0) return;
3113 
3114  if (classEntity==0)
3115  {
3116  //add component inst
3117  n1=cur->type;
3118  goto ferr;
3119  }
3120 
3121  if (classEntity==cd) return;
3122 
3123  bName=classEntity->name();
3124  // fprintf(stderr,"\naddInstance %s to %s %s %s\n", classEntity->name().data(),cd->name().data(),ar->name().data(),cur->name);
3125  n1=classEntity->name().data();
3126 
3127  if (!cd->isBaseClass(classEntity, true, 0))
3128  {
3129  cd->insertBaseClass(classEntity,n1,Public,Normal,0);
3130  }
3131  else
3132  {
3133  VhdlDocGen::addBaseClass(cd,classEntity);
3134  }
3135 
3136  if (!VhdlDocGen::isSubClass(classEntity,cd,true,0))
3137  {
3138  classEntity->insertSubClass(cd,Public,Normal,0);
3139  classEntity->setLanguage(SrcLangExt_VHDL);
3140  }
3141 
3142 ferr:
3143  QCString uu=cur->name;
3144  MemberDef *md=new MemberDef(
3145  ar->getDefFileName(), cur->startLine,cur->startColumn,
3146  n1,uu,uu, 0,
3147  Public, Normal, cur->stat,Member,
3149  0,
3150  0);
3151 
3152  if (ar->getOutputFileBase())
3153  {
3154  TagInfo tg;
3155  tg.anchor = 0;
3156  tg.fileName = ar->getOutputFileBase();
3157  tg.tagName = 0;
3158  md->setTagInfo(&tg);
3159  }
3160 
3161  //fprintf(stderr,"\n%s%s%s\n",md->name().data(),cur->brief.data(),cur->doc.data());
3162 
3165  md->setBriefDescription(cur->brief,cur->briefFile,cur->briefLine);
3166  md->setBodySegment(cur->startLine,-1) ;
3167  md->setDocumentation(cur->doc.data(),cur->docFile.data(),cur->docLine);
3168  FileDef *fd=ar->getFileDef();
3169  md->setBodyDef(fd);
3170 
3171 
3172  QCString info="Info: Elaborating entity "+n1;
3173  fd=ar->getFileDef();
3174  info+=" for hierarchy ";
3175  QRegExp epr("[|]");
3176  QCString label=cur->type+":"+cur->write+":"+cur->name;
3177  label.replace(epr,":");
3178  info+=label;
3179  fprintf(stderr,"\n[%s:%d:%s]\n",fd->fileName().data(),cur->startLine,info.data());
3180 
3181 
3182  ar->insertMember(md);
3183 
3184 }
bool stat
static ?
Definition: entry.h:245
void setTagInfo(TagInfo *i)
Definition: memberdef.cpp:3992
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
void setBodyDef(FileDef *fd)
Definition: types.h:26
void setLanguage(SrcLangExt lang)
int briefLine
line number at which the brief desc. was found
Definition: entry.h:264
int docLine
line number at which the documentation was found
Definition: entry.h:261
QCString name
member name
Definition: entry.h:237
Definition: entry.h:50
Definition: types.h:29
QCString anchor
Definition: entry.h:54
int startColumn
start column of entry in the source
Definition: entry.h:284
QCString tagName
Definition: entry.h:52
static void addBaseClass(ClassDef *cd, ClassDef *ent)
QCString brief
brief description (doc block)
Definition: entry.h:263
void setDocumentation(const char *d, const char *docFile, int docLine, bool stripWhiteSpace=TRUE)
Definition: memberdef.cpp:1126
int startLine
start line of entry in the source
Definition: entry.h:283
QCString write
property write accessor
Definition: entry.h:272
const char * data() const
Definition: qcstring.h:207
void setMemberSpecifiers(uint64 s)
Definition: memberdef.cpp:4638
QCString doc
documentation block (partly parsed)
Definition: entry.h:260
Definition: types.h:38
static bool isSubClass(ClassDef *cd, ClassDef *scd, bool followInstances, int level)
QCString fileName() const
Definition: filedef.h:81
QCString fileName
Definition: entry.h:53
QCString docFile
file in which the documentation was found
Definition: entry.h:262
void setBriefDescription(const char *b, const char *briefFile, int briefLine)
Definition: memberdef.cpp:1132
QCString & replace(uint index, uint len, const char *s)
Definition: qcstring.cpp:411
QCString type
member type
Definition: entry.h:236
QCString briefFile
file in which the brief desc. was found
Definition: entry.h:265
void setBodySegment(int bls, int ble)
void alignText ( QCString q)

Definition at line 3468 of file vhdldocgen.cpp.

3469 {
3470  if (q.length()<=80) return;
3471 
3472  if (q.length()>200)
3473  {
3474  q.resize(200);
3475  }
3476 
3477  q.append(" ...");
3478 
3479  QRegExp reg("[\\s|]");
3480  QCString str(q.data());
3481  QCString temp;
3482 
3483  while (str.length()>80)
3484  {
3485  int j=str.findRev(reg,80);
3486  if (j<=0)
3487  {
3488  temp+=str;
3489  q=temp;
3490  return;
3491  }
3492  else
3493  {
3494  QCString qcs=str.left(j);
3495  temp+=qcs+"\\";
3496  temp+="n";
3497  str.remove(0,j);
3498  }
3499  }//while
3500 
3501  q=temp+str;
3502 // #endif
3503 }
bool resize(uint newlen)
Definition: qcstring.h:225
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
uint length() const
Definition: qcstring.h:195
QCString left(uint len) const
Definition: qcstring.cpp:213
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
const char * data() const
Definition: qcstring.h:207
cet::registry_via_id< success_t, val > reg
QCString & remove(uint index, uint len)
Definition: qcstring.cpp:391
static QCString str
QCString & append(const char *s)
Definition: qcstring.cpp:383
void assignBinding ( VhdlConfNode conf)
static

Definition at line 2918 of file vhdldocgen.cpp.

2919 {
2920  QList<Entry> instList=getVhdlInstList();
2921  QListIterator<Entry> eli(instList);
2922  Entry *cur=0;
2923  ClassDef *archClass=0,*entClass=0;
2924  QCString archName;
2925  QCString arcBind,entBind;
2926 
2927  bool others,all;
2928  entBind=conf->binding;
2929  QCString conf2=VhdlDocGen::parseForBinding(entBind,arcBind);
2930 
2931  if (qstricmp(conf2,"configuration")==0)
2932  {
2934  VhdlConfNode* vconf;
2935  // bool found=false;
2936  for (uint iter=0;iter<confList.count(); iter++)
2937  {
2938  vconf= (VhdlConfNode *)confList.at(iter);
2940  if (n==entBind)
2941  {
2942  // found=true;
2943  entBind=VhdlDocGen::getIndexWord(vconf->confVhdl.data(),1);
2946  a=e+"::"+a;
2947  archClass= VhdlDocGen::findVhdlClass(a.data());//Doxygen::classSDict->find(a.data());
2948  entClass= VhdlDocGen::findVhdlClass(e.data());//Doxygen::classSDict->find(e.data());
2949  break;
2950  }
2951  }
2952  }
2953  else // conf2!=configuration
2954  {
2955  QCString a,c,e;
2956  if (conf->isInlineConf)
2957  {
2958  c=conf->confVhdl;
2959  e=VhdlDocGen::getIndexWord(conf->confVhdl.data(),0);
2960  }
2961  else
2962  {
2963  a=VhdlDocGen::getIndexWord(conf->compSpec.data(),0);
2964  e=VhdlDocGen::getIndexWord(conf->confVhdl.data(),1);
2965  c=e+"::"+a;
2966  }
2967  archClass= VhdlDocGen::findVhdlClass(c.data());//Doxygen::classSDict->find(a.data());
2968  entClass= VhdlDocGen::findVhdlClass(e.data()); //Doxygen::classSDict->find(e.data());
2969  }
2970 
2971  QCString label=conf->compSpec.lower();
2972  //label.prepend("|");
2973 
2974  if (!archClass)
2975  {
2976  // err("architecture %s not found ! ",conf->confVhdl.data());
2977  return;
2978  }
2979 
2980  archName=archClass->name();
2981  QCString allOt=VhdlDocGen::getIndexWord(conf->arch.data(),0);
2982  all=allOt.lower()=="all" ;
2983  others= allOt.lower()=="others";
2984 
2985  for (;(cur=eli.current());++eli)
2986  {
2987  if (cur->exception.lower()==label || conf->isInlineConf)
2988  {
2989  QCString archy;
2990 
2991  if (all || others)
2992  {
2993  archy=VhdlDocGen::getIndexWord(conf->arch.data(),1);
2994  }
2995  else
2996  {
2997  archy=conf->arch;
2998  }
2999 
3000  QCString inst1=VhdlDocGen::getIndexWord(archy.data(),0).lower();
3001  QCString comp=VhdlDocGen::getIndexWord(archy.data(),1).lower();
3002 
3003  QStringList ql=QStringList::split(",",inst1);
3004 
3005  for (uint j=0;j<ql.count();j++)
3006  {
3007  QCString archy1,sign1;
3008  if (all || others)
3009  {
3010  archy1=VhdlDocGen::getIndexWord(conf->arch.data(),1);
3011  sign1=cur->type;
3012  }
3013  else
3014  {
3015  archy1=comp+":"+ql[j].utf8();
3016  sign1=cur->type+":"+cur->name;
3017  }
3018 
3019  if (archy1==sign1.lower() && !cur->stat)
3020  {
3021  // fprintf(stderr," \n label [%s] [%s] [%s]",cur->exception.data(),cur->type.data(),cur->name.data());
3022  ClassDef *ent= VhdlDocGen::findVhdlClass(entBind.data());//Doxygen::classSDict->find(entBind.data());
3023 
3024  if (entClass==0 || ent==0)
3025  {
3026  continue;
3027  }
3028 
3029  addInstance(ent,archClass,entClass,cur);
3030  cur->stat=TRUE;
3031  break;
3032  }
3033  }// for
3034  }
3035  }//for each element in instList
3036 
3037 }//assignBinding
static QCString getIndexWord(const char *, int index)
bool stat
static ?
Definition: entry.h:245
QList< VhdlConfNode > & getVhdlConfiguration()
Definition: entry.h:63
static QCString parseForBinding(QCString &entity, QCString &arch)
QCString compSpec
Definition: vhdljjparser.h:90
QList< Entry > & getVhdlInstList()
QCString name
member name
Definition: entry.h:237
type * at(uint i) const
Definition: qlist.h:94
uint count() const
Definition: qvaluelist.h:394
uint count() const
Definition: qlist.h:66
const QCString & name() const
Definition: definition.h:114
const double e
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567
A list of strings.
Definition: qstringlist.h:51
std::void_t< T > n
const double a
QCString confVhdl
Definition: vhdljjparser.h:85
QCString exception
throw specification
Definition: entry.h:274
const char * data() const
Definition: qcstring.h:207
static void addInstance(ClassDef *entity, ClassDef *arch, ClassDef *inst, Entry *cur, ClassDef *archBind=NULL)
QCString binding
Definition: vhdljjparser.h:89
QCString arch
Definition: vhdljjparser.h:88
static ClassDef * findVhdlClass(const char *className)
static QInternalList< QTextCodec > * all
Definition: qtextcodec.cpp:63
QCString lower() const
Definition: qcstring.cpp:263
static QStringList split(const QString &sep, const QString &str, bool allowEmptyEntries=FALSE)
unsigned uint
Definition: qglobal.h:351
const bool TRUE
Definition: qglobal.h:371
bool isInlineConf
Definition: vhdljjparser.h:93
QCString type
member type
Definition: entry.h:236
static void codify ( FTextStream t,
const char *  str 
)
static

Definition at line 103 of file vhdldocgen.cpp.

104 {
105  if (str)
106  {
107  const char *p=str;
108  char c;
109  while (*p)
110  {
111  c=*p++;
112  switch(c)
113  {
114  case '<': t << "&lt;";
115  break;
116  case '>': t << "&gt;";
117  break;
118  case '&': t << "&amp;";
119  break;
120  case '\'': t << "&#39;";
121  break;
122  case '"': t << "&quot;";
123  break;
124  default: t << c;
125  break;
126  }
127  }
128  }
129 }
p
Definition: test.py:223
static QCString str
static int compareString ( const QCString s1,
const QCString s2 
)
static

Definition at line 158 of file vhdldocgen.cpp.

159 {
160  return qstricmp(s1.stripWhiteSpace(),s2.stripWhiteSpace());
161 }
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567
static void createSVG ( )
static

Definition at line 163 of file vhdldocgen.cpp.

164 {
165  QCString ov =Config_getString("HTML_OUTPUT");
166  QCString dir="-o \""+ov+"/vhdl_design_overview.html\"";
167  ov+="/vhdl_design.dot";
168 
169  QCString vlargs="-Tsvg \""+ov+"\" "+dir ;
170 
171  if (portable_system("dot",vlargs)!=0)
172  {
173  err("could not create dot file");
174  }
175 }
string dir
#define Config_getString(val)
Definition: config.cpp:660
void err(const char *fmt,...)
Definition: message.cpp:226
int portable_system(const char *command, const char *args, bool commandHasConsole)
Definition: portable.cpp:33
static void endDot ( FTextStream t)
static

Definition at line 270 of file vhdldocgen.cpp.

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

Definition at line 450 of file vhdldocgen.cpp.

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

Definition at line 3305 of file vhdldocgen.cpp.

3306 {
3307  for(uint j=0;j<mdList.count();j++)
3308  {
3309  MemberDef* md=(MemberDef*)mdList.at(j);
3310  if (md->name()==mdef->name() && md->getStartBodyLine()==mdef->getStartBodyLine())
3311  return md;
3312  }
3313  return 0;
3314 }
type * at(uint i) const
Definition: qlist.h:94
uint count() const
Definition: qlist.h:66
const QCString & name() const
Definition: definition.h:114
static QList< MemberDef > mdList
int getStartBodyLine() const
unsigned uint
Definition: qglobal.h:351
static QCString formatBriefNote ( const QCString brief,
ClassDef cd 
)
static

Definition at line 293 of file vhdldocgen.cpp.

294 {
295  QRegExp ep("[\n]");
296  QCString vForm;
297  QCString repl("<BR ALIGN=\"LEFT\"/>");
299 
300  int k=cd->briefLine();
301 
302  QStringList qsl=QStringList::split(ep,brief);
303  for(uint j=0;j<qsl.count();j++)
304  {
305  QCString qcs=qsl[j].data();
306  vForm+=parseCommentAsText(cd,NULL,qcs,file,k);
307  k++;
308  vForm+='\n';
309  }
310 
311  vForm.replace(ep,repl.data());
312  return vForm;
313 }
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
int briefLine() const
uint count() const
Definition: qvaluelist.h:394
QCString getDefFileName() const
QCString parseCommentAsText(const Definition *scope, const MemberDef *md, const QCString &doc, const QCString &fileName, int lineNr)
Definition: util.cpp:7242
A list of strings.
Definition: qstringlist.h:51
static QStringList split(const QString &sep, const QString &str, bool allowEmptyEntries=FALSE)
unsigned uint
Definition: qglobal.h:351
QCString & replace(uint index, uint len, const char *s)
Definition: qcstring.cpp:411
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.

471 {
472  MemberDef* md;
473  QList<MemberDef> *portList=new QList<MemberDef>;
475 
476  if (ml==0)
477  {
478  delete portList;
479  return 0;
480  }
481 
482  MemberListIterator fmni(*ml);
483 
484  for (fmni.toFirst();(md=fmni.current());++fmni)
485  {
487  {
488  portList->append(md);
489  }
490  }
491 
492  return portList;
493 }
void append(const type *d)
Definition: qlist.h:73
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
MemberList * getMemberList(MemberListType lt)
Definition: classdef.cpp:4021
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.

2710 {
2711  if (qcs.isEmpty())return;
2712  QRegExp reg("[\\s=]");
2713  QCString n;
2714  // bool bo=(qstricmp(type,qcs.data())==0);
2715 
2716  VhdlDocGen::deleteAllChars(qcs,';');
2717  qcs=qcs.stripWhiteSpace();
2718 
2719  int i= qcs.find(reg);
2720  if (i<0) return;
2721  if (i==0)
2722  {
2723  n=type;
2725  type="";
2726  }
2727  else
2728  {
2729  n=qcs.left(i);
2730  }
2731  qcs=qcs.remove(0,i+1);
2732  // qcs.prepend("|");
2733 
2734  qcs.stripPrefix("=");
2735 
2736  Entry* current=new Entry;
2737  current->spec=VhdlDocGen::UCF_CONST;
2738  current->section=Entry::VARIABLE_SEC;
2739  current->bodyLine=line;
2740  current->fileName=fileName;
2741  current->type="ucf_const";
2742  current->args+=qcs;
2743  current->lang= SrcLangExt_VHDL ;
2744 
2745  // adding dummy name for constraints like VOLTAGE=5,TEMPERATURE=20 C
2746  if (n.isEmpty())
2747  {
2748  n="dummy";
2750  }
2751 
2752  current->name= n+"_";
2754 
2755  if (!brief.isEmpty())
2756  {
2757  current->brief=brief;
2758  current->briefLine=line;
2759  current->briefFile=fileName;
2760  brief.resize(0);
2761  }
2762 
2763  root->addSubEntry(current);
2764 }
bool resize(uint newlen)
Definition: qcstring.h:225
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
uint64 spec
class/member specifiers
Definition: entry.h:243
bool brief
bool isEmpty() const
Definition: qcstring.h:189
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
static void deleteAllChars(QCString &s, char c)
Definition: entry.h:63
int briefLine
line number at which the brief desc. was found
Definition: entry.h:264
void addSubEntry(Entry *e)
Definition: entry.cpp:206
QCString name
member name
Definition: entry.h:237
QCString left(uint len) const
Definition: qcstring.cpp:213
bool stripPrefix(const char *prefix)
Definition: qcstring.cpp:201
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
static QCString getRecordNumber()
fileName
Definition: dumpTree.py:9
QCString brief
brief description (doc block)
Definition: entry.h:263
std::void_t< T > n
QCString args
member argument string
Definition: entry.h:252
static Entry * current
void line(double t, double *p, double &x, double &y, double &z)
static QCString type
Definition: declinfo.cpp:672
QCString fileName
file this entry was extracted from
Definition: entry.h:282
cet::registry_via_id< success_t, val > reg
SrcLangExt lang
programming language in which this entry was found
Definition: entry.h:286
QCString & remove(uint index, uint len)
Definition: qcstring.cpp:391
QCString & append(const char *s)
Definition: qcstring.cpp:383
QCString type
member type
Definition: entry.h:236
int section
entry type (see Sections);
Definition: entry.h:235
int bodyLine
line number of the definition in the source
Definition: entry.h:276
QCString briefFile
file in which the brief desc. was found
Definition: entry.h:265
static bool membersHaveSpecificType ( MemberList ml,
uint64  type 
)
static

Definition at line 2330 of file vhdldocgen.cpp.

2331 {
2332  if (ml==0) return FALSE;
2333  MemberDef *mdd=0;
2334  MemberListIterator mmli(*ml);
2335  for ( ; (mdd=mmli.current()); ++mmli )
2336  {
2337  if (mdd->getMemberSpecifiers()==type) //is type in class
2338  {
2339  return TRUE;
2340  }
2341  }
2342  if (ml->getMemberGroupList())
2343  {
2345  MemberGroup *mg;
2346  while ((mg=mgli.current()))
2347  {
2348  if (mg->members())
2349  {
2350  if (membersHaveSpecificType(mg->members(),type)) return TRUE;
2351  }
2352  ++mgli;
2353  }
2354  }
2355  return FALSE;
2356 }
MemberGroupList * getMemberGroupList() const
Definition: memberlist.h:78
static bool membersHaveSpecificType(MemberList *ml, uint64 type)
const bool FALSE
Definition: qglobal.h:370
static constexpr double mg
Definition: Units.h:145
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
static QCString type
Definition: declinfo.cpp:672
const bool TRUE
Definition: qglobal.h:371
static void setGlobalType ( MemberList ml)
static

Definition at line 1801 of file vhdldocgen.cpp.

1802 {
1803  if (ml==0) return;
1804  MemberDef *mdd=0;
1805  MemberListIterator mmli(*ml);
1806  for ( ; (mdd=mmli.current()); ++mmli )
1807  {
1808  if (qstrcmp(mdd->argsString(),"package")==0)
1809  {
1811  }
1812  else if (qstrcmp(mdd->argsString(),"configuration")==0)
1813  {
1815  }
1816  else if (qstrcmp(mdd->typeString(),"library")==0)
1817  {
1819  }
1820  else if (qstrcmp(mdd->typeString(),"use")==0)
1821  {
1823  }
1824  else if (qstricmp(mdd->typeString(),"misc")==0)
1825  {
1827  }
1828  else if (qstricmp(mdd->typeString(),"ucf_const")==0)
1829  {
1831  }
1832  }
1833 }
const char * typeString() const
Definition: memberdef.cpp:4035
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567
void setMemberSpecifiers(uint64 s)
Definition: memberdef.cpp:4638
const char * argsString() const
Definition: memberdef.cpp:4040
Q_EXPORT int qstrcmp(const char *str1, const char *str2)
Definition: qcstring.h:95
static QCString splitString ( QCString str,
char  c 
)
static

Definition at line 146 of file vhdldocgen.cpp.

147 {
148  QCString n=str;
149  int i=str.find(c);
150  if (i>0)
151  {
152  n=str.left(i);
153  str=str.remove(0,i+1);
154  }
155  return n;
156 }
QCString left(uint len) const
Definition: qcstring.cpp:213
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
std::void_t< T > n
QCString & remove(uint index, uint len)
Definition: qcstring.cpp:391
static QCString str
static void startDot ( FTextStream t)
static

Definition at line 262 of file vhdldocgen.cpp.

263 {
264  t << " digraph G { \n";
265  t << "rankdir=LR \n";
266  t << "concentrate=TRUE\n";
267  t << "stylesheet=\"doxygen.css\"\n";
268 }
static void startFonts ( const QCString q,
const char *  keyword,
OutputList ol 
)
static

Definition at line 139 of file vhdldocgen.cpp.

140 {
141  ol.startFontClass(keyword);
142  ol.docify(q.data());
143  ol.endFontClass();
144 }
void endFontClass()
Definition: outputlist.h:476
void startFontClass(const char *c)
Definition: outputlist.h:474
const char * data() const
Definition: qcstring.h:207
void docify(const char *s)
Definition: outputlist.h:145
static void startTable ( FTextStream t,
const QCString className 
)
static

Definition at line 275 of file vhdldocgen.cpp.

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

Definition at line 456 of file vhdldocgen.cpp.

457 {
458  t << "<TR><TD COLSPAN=\"2\" BGCOLOR=\"yellow\" ";
459  t << "PORT=\"";
460  t << cd->name();
461  t << "\" ";
462  t << "href=\"";
464  t << "\" ";
465  t << ">";
466  t << cd->name();
467  t << " </TD></TR>\n";
468 }
static QCString htmlFileExtension
Definition: doxygen.h:130
const QCString & name() const
Definition: definition.h:114
QCString getOutputFileBase() const
Definition: classdef.cpp:3533
static void writeColumn ( FTextStream t,
MemberDef md,
bool  start 
)
static

Definition at line 364 of file vhdldocgen.cpp.

365 {
366  QCString toolTip;
367 
368  static QRegExp reg("[%]");
369  bool bidir=(md!=0 &&( qstricmp(md->typeString(),"inout")==0));
370 
371  if (md)
372  {
373  toolTip=md->briefDescriptionAsTooltip();
374  if (!toolTip.isEmpty())
375  {
376  QCString largs = md->argsString();
377  if (!largs.isEmpty())
378  largs=largs.replace(reg," ");
379  toolTip+=" [";
380  toolTip+=largs;
381  toolTip+="]";
382  }
383  }
384  if (start)
385  {
386  t <<"<TR>\n";
387  }
388 
389  t << "<TD ALIGN=\"LEFT\" ";
390  if (md)
391  {
392  t << "href=\"";
394  t << "#" << md->anchor();
395  t<<"\" ";
396 
397  t<<" TOOLTIP=\"";
398  if (!toolTip.isEmpty())
399  {
400  codify(t,toolTip.data());
401  }
402  else
403  {
404  QCString largs = md->argsString();
405  if (!largs.isEmpty())
406  {
407  largs=largs.replace(reg," ");
408  codify(t,largs.data());
409  }
410  }
411  t << "\" ";
412 
413  t << " PORT=\"";
414  t << md->name();
415  t << "\" ";
416  }
417  if (!toolTip.isEmpty())
418  {
419  // if (!toolTip.isEmpty())
420 
421  if (bidir)
422  t << "BGCOLOR=\"orange\">";
423  else
424  t << "BGCOLOR=\"azure\">";
425  }
426  else if (bidir)
427  {
428  t << "BGCOLOR=\"pink\">";
429  }
430  else
431  {
432  t << "BGCOLOR=\"lightgrey\">";
433  }
434  if (md)
435  {
436  t << md->name();
437  }
438  else
439  {
440  t << " \n";
441  }
442  t << "</TD>\n";
443 
444  if (!start)
445  {
446  t << "</TR>\n";
447  }
448 }
bool isEmpty() const
Definition: qcstring.h:189
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
static QCString htmlFileExtension
Definition: doxygen.h:130
const char * typeString() const
Definition: memberdef.cpp:4035
const QCString & name() const
Definition: definition.h:114
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567
const char * data() const
Definition: qcstring.h:207
QCString anchor() const
Definition: memberdef.cpp:1031
QCString getOutputFileBase() const
Definition: memberdef.cpp:941
QCString briefDescriptionAsTooltip() const
const char * argsString() const
Definition: memberdef.cpp:4040
cet::registry_via_id< success_t, val > reg
static void codify(FTextStream &t, const char *str)
Definition: vhdldocgen.cpp:103
QCString & replace(uint index, uint len, const char *s)
Definition: qcstring.cpp:411
static void writeLink ( const MemberDef mdef,
OutputList ol 
)
static

Definition at line 131 of file vhdldocgen.cpp.

132 {
133  ol.writeObjectLink(mdef->getReference(),
134  mdef->getOutputFileBase(),
135  mdef->anchor(),
136  mdef->name());
137 }
QCString getReference() const
Definition: memberdef.cpp:1001
const QCString & name() const
Definition: definition.h:114
QCString anchor() const
Definition: memberdef.cpp:1031
QCString getOutputFileBase() const
Definition: memberdef.cpp:941
void writeObjectLink(const char *ref, const char *file, const char *anchor, const char *name)
Definition: outputlist.h:149
static void writeTable ( QList< MemberDef > *  port,
FTextStream t 
)
static

Definition at line 497 of file vhdldocgen.cpp.

498 {
499  MemberDef *md;
500  uint len=port->count();
501 
502  QList<MemberDef> inPorts;
503  QList<MemberDef> outPorts;
504 
505  uint j;
506  for (j=0;j<len;j++)
507  {
508  md=(MemberDef*)port->at(j);
509  QCString qc=md->typeString();
510  if(qc=="in")
511  {
512  inPorts.append(md);
513  }
514  else
515  {
516  outPorts.append(md);
517  }
518  }
519 
520  int inp = inPorts.count();
521  int outp = outPorts.count();
522  int maxLen;
523 
524  if (inp>=outp)
525  {
526  maxLen=inp;
527  }
528  else
529  {
530  maxLen=outp;
531  }
532 
533  int i;
534  for(i=0;i<maxLen;i++)
535  {
536  //write inports
537  if (i<inp)
538  {
539  md=(MemberDef*)inPorts.at(i);
540  writeColumn(t,md,TRUE);
541  }
542  else
543  {
544  writeColumn(t,NULL,TRUE);
545  }
546 
547  if (i<outp)
548  {
549  md=(MemberDef*)outPorts.at(i);
550  writeColumn(t,md,FALSE);
551  }
552  else
553  {
554  writeColumn(t,NULL,FALSE);
555  }
556  }
557 }
void append(const type *d)
Definition: qlist.h:73
const bool FALSE
Definition: qglobal.h:370
type * at(uint i) const
Definition: qlist.h:94
const char * typeString() const
Definition: memberdef.cpp:4035
uint count() const
Definition: qlist.h:66
static void writeColumn(FTextStream &t, MemberDef *md, bool start)
Definition: vhdldocgen.cpp:364
unsigned uint
Definition: qglobal.h:351
const bool TRUE
Definition: qglobal.h:371
static void writeUCFLink ( const MemberDef mdef,
OutputList ol 
)
static

Definition at line 2767 of file vhdldocgen.cpp.

2768 {
2769 
2770  QCString largs(mdef->argsString());
2771  QCString n= splitString(largs, '#');
2772  // VhdlDocGen::adjustRecordMember(mdef);
2773  bool equ=(n.length()==largs.length());
2774 
2775  if (!equ)
2776  {
2777  ol.writeString(n.data());
2778  ol.docify(" ");
2779  ol.insertMemberAlign();
2780  }
2781 
2782  if (mdef->name().contains("dummy")==0)
2783  {
2784  writeLink(mdef,ol);
2785  }
2786  if (equ)
2787  {
2788  ol.insertMemberAlign();
2789  }
2790  ol.docify(" ");
2791  VhdlDocGen::formatString(largs,ol,mdef);
2792 }
int contains(char c, bool cs=TRUE) const
Definition: qcstring.cpp:153
void writeString(const char *text)
Definition: outputlist.h:119
static void formatString(const QCString &, OutputList &ol, const MemberDef *)
const QCString & name() const
Definition: definition.h:114
static QCString splitString(QCString &str, char c)
Definition: vhdldocgen.cpp:146
std::void_t< T > n
static void writeLink(const MemberDef *mdef, OutputList &ol)
Definition: vhdldocgen.cpp:131
const char * argsString() const
Definition: memberdef.cpp:4040
void docify(const char *s)
Definition: outputlist.h:145
void insertMemberAlign(bool templ=FALSE)
Definition: outputlist.h:238
static void writeVhdlDotLink ( FTextStream t,
const QCString a,
const QCString b,
const QCString style 
)
static

Definition at line 281 of file vhdldocgen.cpp.

283 {
284  t << a << "->" << b;
285  if (!style.isEmpty())
286  {
287  t << "[style=" << style << "];\n";
288  }
289  t << "\n";
290 }
bool isEmpty() const
Definition: qcstring.h:189
static bool * b
Definition: config.cpp:1043
static void writeVhdlEntityToolTip ( FTextStream t,
ClassDef cd 
)
static

Definition at line 343 of file vhdldocgen.cpp.

344 {
345 
347 
348  if (brief.isEmpty()) return;
349 
350  brief=formatBriefNote(brief,cd);
351 
352  QCString node="node";
354  t << node <<"[shape=none margin=0.1, label=<\n";
355  t << "<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"2\" >\n ";
356  t << "<TR><TD BGCOLOR=\"lightcyan\"> ";
357  t << brief;
358  t << " </TD></TR></TABLE>>];";
359  QCString dotn=cd->name()+":";
360  dotn+=cd->name();
361  writeVhdlDotLink(t,dotn,node,"dotted");
362 }
bool brief
bool isEmpty() const
Definition: qcstring.h:189
static void writeVhdlDotLink(FTextStream &t, const QCString &a, const QCString &b, const QCString &style)
Definition: vhdldocgen.cpp:281
static QCString formatBriefNote(const QCString &brief, ClassDef *cd)
Definition: vhdldocgen.cpp:293
static QCString getRecordNumber()
const QCString & name() const
Definition: definition.h:114
virtual QCString briefDescription(bool abbreviate=FALSE) const

Variable Documentation

struct { ... } flowCol
Initial value:
=
{ "green",
"red",
"black",
"khaki",
"0.7 0.3 1.0",
"lightyellow",
"white",
"lightcyan"
}
const MemberDef* flowMember =0
static

Definition at line 88 of file vhdldocgen.cpp.

int ifcounter =0
static

Definition at line 3435 of file vhdldocgen.cpp.

QList<MemberDef> mdList
static

Definition at line 3303 of file vhdldocgen.cpp.

int nodeCounter =0
static

Definition at line 3436 of file vhdldocgen.cpp.

QMap<ClassDef*,QList<ClassDef> > packages
static

Definition at line 715 of file vhdldocgen.cpp.

QList<ClassDef> qli
static

Definition at line 714 of file vhdldocgen.cpp.

int recordCounter =0
static

Definition at line 1308 of file vhdldocgen.cpp.

QMap<QCString,MemberDef*> varMap
static

Definition at line 713 of file vhdldocgen.cpp.