Public Types | Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
VhdlDocGen Class Reference

#include <vhdldocgen.h>

Public Types

enum  VhdlClasses { ENTITYCLASS, PACKBODYCLASS, ARCHITECTURECLASS, PACKAGECLASS }
 
enum  VhdlKeyWords {
  LIBRARY =1, ENTITY, PACKAGE_BODY, ARCHITECTURE,
  PACKAGE, ATTRIBUTE, SIGNAL, COMPONENT,
  CONSTANT, TYPE, SUBTYPE, FUNCTION,
  RECORD, PROCEDURE, USE, PROCESS,
  PORT, UNITS, GENERIC, INSTANTIATION,
  GROUP, VFILE, SHAREDVARIABLE, CONFIG,
  ALIAS, MISCELLANEOUS, UCF_CONST
}
 

Public Member Functions

 VhdlDocGen ()
 
virtual ~VhdlDocGen ()
 

Static Public Member Functions

static void init ()
 
static QCString convertFileNameToClassName (QCString name)
 
static bool isSubClass (ClassDef *cd, ClassDef *scd, bool followInstances, int level)
 
static QCString getIndexWord (const char *, int index)
 
static bool deleteCharRev (QCString &s, char c)
 
static void deleteAllChars (QCString &s, char c)
 
static void parseFuncProto (const char *text, QList< Argument > &, QCString &name, QCString &ret, bool doc=false)
 
static void computeVhdlComponentRelations ()
 
static QCStringfindKeyWord (const QCString &word)
 
static ClassDefgetPackageName (const QCString &name)
 
static MemberDeffindMember (const QCString &className, const QCString &memName)
 
static void findAllPackages (ClassDef *)
 
static MemberDeffindMemberDef (ClassDef *cd, const QCString &key, MemberListType type)
 
static ClassDefgetClass (const char *name)
 
static MemberDeffindFunction (const QList< Argument > &ql, const QCString &name, const QCString &package, bool type)
 
static QCString getClassTitle (const ClassDef *)
 
static void writeInlineClassLink (const ClassDef *, OutputList &ol)
 
static void writeTagFile (MemberDef *mdef, FTextStream &tagFile)
 
static bool isConstraint (const MemberDef *mdef)
 
static bool isConfig (const MemberDef *mdef)
 
static bool isAlias (const MemberDef *mdef)
 
static bool isLibrary (const MemberDef *mdef)
 
static bool isGeneric (const MemberDef *mdef)
 
static bool isPort (const MemberDef *mdef)
 
static bool isComponent (const MemberDef *mdef)
 
static bool isPackage (const MemberDef *mdef)
 
static bool isEntity (const MemberDef *mdef)
 
static bool isConstant (const MemberDef *mdef)
 
static bool isVType (const MemberDef *mdef)
 
static bool isSubType (const MemberDef *mdef)
 
static bool isVhdlFunction (const MemberDef *mdef)
 
static bool isProcess (const MemberDef *mdef)
 
static bool isSignal (const MemberDef *mdef)
 
static bool isAttribute (const MemberDef *mdef)
 
static bool isSignals (const MemberDef *mdef)
 
static bool isProcedure (const MemberDef *mdef)
 
static bool isRecord (const MemberDef *mdef)
 
static bool isArchitecture (const MemberDef *mdef)
 
static bool isUnit (const MemberDef *mdef)
 
static bool isPackageBody (const MemberDef *mdef)
 
static bool isVariable (const MemberDef *mdef)
 
static bool isFile (const MemberDef *mdef)
 
static bool isGroup (const MemberDef *mdef)
 
static bool isCompInst (const MemberDef *mdef)
 
static bool isMisc (const MemberDef *mdef)
 
static QCString trTypeString (uint64 type)
 
static QCString trVhdlType (uint64 type, bool sing=true)
 
static QCString trDesignUnitHierarchy ()
 
static QCString trDesignUnitList ()
 
static QCString trDesignUnitMembers ()
 
static QCString trDesignUnitListDescription ()
 
static QCString trDesignUnits ()
 
static QCString trDesignUnitIndex ()
 
static QCString trFunctionAndProc ()
 
static void prepareComment (QCString &)
 
static void formatString (const QCString &, OutputList &ol, const MemberDef *)
 
static void writeFormatString (const QCString &, OutputList &ol, const MemberDef *)
 
static void writeFunctionProto (OutputList &ol, const ArgumentList *al, const MemberDef *)
 
static void writeProcessProto (OutputList &ol, const ArgumentList *al, const MemberDef *)
 
static void writeProcedureProto (OutputList &ol, const ArgumentList *al, const MemberDef *)
 
static bool writeFuncProcDocu (const MemberDef *mdef, OutputList &ol, const ArgumentList *al, bool type=false)
 
static void writeRecordProto (const MemberDef *mdef, OutputList &ol, const ArgumentList *al)
 
static bool writeVHDLTypeDocumentation (const MemberDef *mdef, const Definition *d, OutputList &ol)
 
static void writeVhdlDeclarations (MemberList *, OutputList &, GroupDef *, ClassDef *, FileDef *, NamespaceDef *)
 
static void writeVHDLDeclaration (MemberDef *mdef, OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, bool inGroup)
 
static void writePlainVHDLDeclarations (MemberList *ml, OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, int specifier)
 
static void writeVHDLDeclarations (MemberList *ml, OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, const char *title, const char *subtitle, bool showEnumValues, int type)
 
static bool writeClassType (ClassDef *&, OutputList &ol, QCString &cname)
 
static QCString convertArgumentListToString (const ArgumentList *al, bool f)
 
static QCString getProcessNumber ()
 
static QCString getRecordNumber ()
 
static QCString getClassName (const ClassDef *)
 
static bool isNumber (const QCString &s)
 
static QCString getProtectionName (int prot)
 
static void parseUCF (const char *input, Entry *entity, QCString f, bool vendor)
 
static bool findConstraintFile (LayoutNavEntry *lne)
 
static ClassDeffindArchitecture (const ClassDef *cd)
 
static ClassDeffindArchitecture (QCString identifier, QCString entity_name)
 
static void writeSource (MemberDef *mdef, OutputList &ol, QCString &cname)
 
static void writeAlphbeticalClass (OutputList &ol, const ClassDef *cd, const QCString &)
 
static QCString parseForConfig (QCString &entity, QCString &arch)
 
static QCString parseForBinding (QCString &entity, QCString &arch)
 
static void addBaseClass (ClassDef *cd, ClassDef *ent)
 
static ClassDeffindVhdlClass (const char *className)
 
static void writeOverview (OutputList &ol)
 
static void writeOverview ()
 
static void createFlowChart (const MemberDef *)
 
static void setFlowMember (const MemberDef *flowMember)
 
static const MemberDefgetFlowMember ()
 
static bool isVhdlClass (const Entry *cu)
 
static void resetCodeVhdlParserState ()
 

Static Private Member Functions

static void findAllArchitectures (QList< QCString > &ql, const ClassDef *cd)
 
static bool compareArgList (ArgumentList *, ArgumentList *)
 
static void writeVhdlLink (const ClassDef *cdd, OutputList &ol, QCString &type, QCString &name, QCString &beh)
 
static void writeStringLink (const MemberDef *mdef, QCString mem, OutputList &ol)
 
static void writeRecUnitDocu (const MemberDef *md, OutputList &ol, QCString largs)
 
static void writeRecorUnit (QCString &largs, OutputList &ol, const MemberDef *mdef)
 

Detailed Description

Class for generating documentation specific for VHDL

Definition at line 43 of file vhdldocgen.h.

Member Enumeration Documentation

Enumerator
ENTITYCLASS 
PACKBODYCLASS 
ARCHITECTURECLASS 
PACKAGECLASS 

Definition at line 47 of file vhdldocgen.h.

48  {
49  ENTITYCLASS, // Overlays: Public
50  PACKBODYCLASS, // Overlays: Protected
51  ARCHITECTURECLASS, // Overlays: Private
52  PACKAGECLASS // Overlays: Package
53  };
Enumerator
LIBRARY 
ENTITY 
PACKAGE_BODY 
ARCHITECTURE 
PACKAGE 
ATTRIBUTE 
SIGNAL 
COMPONENT 
CONSTANT 
TYPE 
SUBTYPE 
FUNCTION 
RECORD 
PROCEDURE 
USE 
PROCESS 
PORT 
UNITS 
GENERIC 
INSTANTIATION 
GROUP 
VFILE 
SHAREDVARIABLE 
CONFIG 
ALIAS 
MISCELLANEOUS 
UCF_CONST 

Definition at line 55 of file vhdldocgen.h.

56  {
57  LIBRARY=1,
58  ENTITY,
61  PACKAGE,
62  ATTRIBUTE,
63  SIGNAL,
64  COMPONENT,
65  CONSTANT,
66  TYPE,
67  SUBTYPE,
68  FUNCTION,
69  RECORD,
70  PROCEDURE,
71  USE,
72  PROCESS,
73  PORT,
74  UNITS,
75  GENERIC,
77  GROUP,
78  VFILE,
80  CONFIG,
81  ALIAS,
83  UCF_CONST
84  };

Constructor & Destructor Documentation

VhdlDocGen::VhdlDocGen ( )

Definition at line 562 of file vhdldocgen.cpp.

563 {
564 }
VhdlDocGen::~VhdlDocGen ( )
virtual

Definition at line 566 of file vhdldocgen.cpp.

567 {
568 }

Member Function Documentation

void VhdlDocGen::addBaseClass ( ClassDef cd,
ClassDef ent 
)
static

Definition at line 3269 of file vhdldocgen.cpp.

3270 {
3271  if (cd->baseClasses())
3272  {
3273  BaseClassListIterator bcli(*cd->baseClasses());
3274  for ( ; bcli.current() ; ++bcli)
3275  {
3276  ClassDef *ccd=bcli.current()->classDef;
3277  if (ccd==ent)
3278  {
3279  QCString n = bcli.current()->usedName;
3280  int i = n.find('(');
3281  if(i<0)
3282  {
3283  bcli.current()->usedName.append("(2)");
3284  return;
3285  }
3286  static QRegExp reg("[0-9]+");
3287  QCString s=n.left(i);
3288  QCString r=n.right(n.length()-i);
3289  QCString t=r;
3292  r.setNum(r.toInt()+1);
3293  t.replace(reg,r.data());
3294  s.append(t.data());
3295  bcli.current()->usedName=s;
3296  bcli.current()->templSpecifiers=t;
3297  }
3298  }
3299  }
3300 }
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
static void deleteAllChars(QCString &s, char c)
uint length() const
Definition: qcstring.h:195
QCString left(uint len) const
Definition: qcstring.cpp:213
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
QCString right(uint len) const
Definition: qcstring.cpp:231
std::void_t< T > n
int toInt(bool *ok=0) const
Definition: qcstring.cpp:439
const char * data() const
Definition: qcstring.h:207
QCString & setNum(short n)
Definition: qcstring.cpp:469
cet::registry_via_id< success_t, val > reg
QCString & replace(uint index, uint len, const char *s)
Definition: qcstring.cpp:411
static QCString * s
Definition: config.cpp:1042
QCString & append(const char *s)
Definition: qcstring.cpp:383
BaseClassList * baseClasses() const
Definition: classdef.cpp:4399
static bool VhdlDocGen::compareArgList ( ArgumentList ,
ArgumentList  
)
staticprivate
void VhdlDocGen::computeVhdlComponentRelations ( )
static

Definition at line 3052 of file vhdldocgen.cpp.

3053 {
3054 
3055  QCString entity,arch,inst;
3057 
3058  for (uint iter=0;iter<confList.count(); iter++)
3059  {
3060  VhdlConfNode* conf= (VhdlConfNode *)confList.at(iter);
3061  if (!(conf->isInlineConf || conf->isLeaf))
3062  {
3063  continue;
3064  }
3065  assignBinding(conf);
3066  }
3067 
3069  QListIterator<Entry> eli(qsl);
3070  Entry *cur;
3071 
3072  for (eli.toFirst();(cur=eli.current());++eli)
3073  {
3074  if (cur->stat ) // was bind
3075  {
3076  continue;
3077  }
3078 
3079  if (cur->includeName=="entity" || cur->includeName=="component" )
3080  {
3081  entity=cur->includeName+" "+cur->type;
3082  QCString rr=VhdlDocGen::parseForBinding(entity,arch);
3083  }
3084  else if (cur->includeName.isEmpty())
3085  {
3086  entity=cur->type;
3087  }
3088 
3089  ClassDef *classEntity= VhdlDocGen::findVhdlClass(entity.data());//Doxygen::classSDict->find(entity);
3090  inst=VhdlDocGen::getIndexWord(cur->args.data(),0);
3091  ClassDef *cd=Doxygen::classSDict->find(inst);
3093 
3094  if (cd==0)
3095  {
3096  continue;
3097  }
3098 
3099  // if (classEntity==0)
3100  // err("%s:%d:Entity:%s%s",cur->fileName.data(),cur->startLine,entity.data()," could not be found");
3101 
3102  addInstance(classEntity,ar,cd,cur);
3103  }
3104 
3105 }
QCString includeName
include name (3 arg of \class)
Definition: entry.h:259
static QCString getIndexWord(const char *, int index)
bool stat
static ?
Definition: entry.h:245
QList< VhdlConfNode > & getVhdlConfiguration()
bool isEmpty() const
Definition: qcstring.h:189
Definition: entry.h:63
static QCString parseForBinding(QCString &entity, QCString &arch)
QList< Entry > & getVhdlInstList()
Definition: conf.py:1
type * at(uint i) const
Definition: qlist.h:94
uint count() const
Definition: qlist.h:66
QCString args
member argument string
Definition: entry.h:252
const char * data() const
Definition: qcstring.h:207
static void addInstance(ClassDef *entity, ClassDef *arch, ClassDef *inst, Entry *cur, ClassDef *archBind=NULL)
static ClassDef * findVhdlClass(const char *className)
T * find(const char *key)
Definition: sortdict.h:232
unsigned uint
Definition: qglobal.h:351
static ClassSDict * classSDict
Definition: doxygen.h:99
static void assignBinding(VhdlConfNode *conf)
bool isInlineConf
Definition: vhdljjparser.h:93
QCString type
member type
Definition: entry.h:236
Definition: qlist.h:54
QCString VhdlDocGen::convertArgumentListToString ( const ArgumentList al,
bool  f 
)
static

Definition at line 1741 of file vhdldocgen.cpp.

1742 {
1743  QCString argString;
1744  bool sem=FALSE;
1745  ArgumentListIterator ali(*al);
1746  Argument *arg;
1747 
1748  for (;(arg=ali.current());++ali)
1749  {
1750  if (sem) argString.append(", ");
1751  if (func)
1752  {
1753  argString+=arg->name;
1754  argString+=":";
1755  argString+=arg->type;
1756  }
1757  else
1758  {
1759  argString+=arg->defval+" ";
1760  argString+=arg->name+" :";
1761  argString+=arg->attrib+" ";
1762  argString+=arg->type;
1763  }
1764  sem=TRUE;
1765  }
1766  return argString;
1767 }
QCString type
Definition: arguments.h:67
QCString defval
Definition: arguments.h:71
const bool FALSE
Definition: qglobal.h:370
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
QCString attrib
Definition: arguments.h:66
QCString name
Definition: arguments.h:69
def func()
Definition: docstring.py:7
const bool TRUE
Definition: qglobal.h:371
QCString & append(const char *s)
Definition: qcstring.cpp:383
QCString VhdlDocGen::convertFileNameToClassName ( QCString  name)
static

Definition at line 2632 of file vhdldocgen.cpp.

2633 {
2634 
2635  QCString n=name;
2636  n=n.remove(0,6);
2637 
2638  int i=0;
2639 
2640  while((i=n.find("__"))>0)
2641  {
2642  n=n.remove(i,1);
2643  }
2644 
2645  while((i=n.find("_1"))>0)
2646  {
2647  n=n.replace(i,2,":");
2648  }
2649 
2650  return n;
2651 }
static QCString name
Definition: declinfo.cpp:673
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
QCString & replace(uint index, uint len, const char *s)
Definition: qcstring.cpp:411
void VhdlDocGen::createFlowChart ( const MemberDef mdef)
static

Definition at line 3316 of file vhdldocgen.cpp.

3317 {
3318  if (mdef==0) return;
3319 
3320  QCString codeFragment;
3321  MemberDef* mm=0;
3322  if((mm=findMemFlow(mdef))!=0)
3323  {
3324  // don't create the same flowchart twice
3326  return;
3327  }
3328  else
3329  {
3330  mdList.append(mdef);
3331  }
3332 
3333  //fprintf(stderr,"\n create flow mem %s %p\n",mdef->name().data(),mdef);
3334 
3335  int actualStart= mdef->getStartBodyLine();
3336  int actualEnd=mdef->getEndBodyLine();
3337  FileDef* fd=mdef->getFileDef();
3338  bool b=readCodeFragment( fd->absFilePath().data(), actualStart,actualEnd,codeFragment);
3339  if (!b) return;
3340 
3341  VHDLLanguageScanner *pIntf =(VHDLLanguageScanner*) Doxygen::parserManager->getParser(".vhd");
3343  Entry root;
3344  QStrList filesInSameTu;
3345  pIntf->startTranslationUnit("");
3346  pIntf->parseInput("",codeFragment.data(),&root,FALSE,filesInSameTu);
3347  pIntf->finishTranslationUnit();
3348 }
void finishTranslationUnit()
Definition: vhdljjparser.h:46
void append(const type *d)
Definition: qlist.h:73
Definition: entry.h:63
static MemberDef * findMemFlow(const MemberDef *mdef)
void parseInput(const char *fileName, const char *fileBuf, Entry *root, bool sameTranslationUnit, QStrList &filesInSameTranslationUnit)
const bool FALSE
Definition: qglobal.h:370
void startTranslationUnit(const char *)
Definition: vhdljjparser.h:45
FileDef * getFileDef() const
Definition: memberdef.cpp:4075
static ParserManager * parserManager
Definition: doxygen.h:141
static void setFlowMember(const MemberDef *flowMember)
Definition: vhdldocgen.cpp:90
const char * data() const
Definition: qcstring.h:207
static QList< MemberDef > mdList
QCString absFilePath() const
Definition: filedef.h:96
int getEndBodyLine() const
bool readCodeFragment(const char *fileName, int &startLine, int &endLine, QCString &result)
Definition: definition.cpp:728
int getStartBodyLine() const
static constexpr double mm
Definition: Units.h:65
static bool * b
Definition: config.cpp:1043
VHDL parser using state-based lexical scanning.
Definition: vhdljjparser.h:41
void VhdlDocGen::deleteAllChars ( QCString s,
char  c 
)
static

Definition at line 1296 of file vhdldocgen.cpp.

1297 {
1298  int index=s.findRev(c,-1,FALSE);
1299  while (index > -1)
1300  {
1301  QCString qcs=s.remove(index,1);
1302  s=qcs;
1303  index=s.findRev(c,-1,FALSE);
1304  }
1305 }
const bool FALSE
Definition: qglobal.h:370
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QCString & remove(uint index, uint len)
Definition: qcstring.cpp:391
bool VhdlDocGen::deleteCharRev ( QCString s,
char  c 
)
static

deletes a char backwards in a string

Definition at line 1284 of file vhdldocgen.cpp.

1285 {
1286  int index=s.findRev(c,-1,FALSE);
1287  if (index > -1)
1288  {
1289  QCString qcs=s.remove(index,1);
1290  s=qcs;
1291  return TRUE;
1292  }
1293  return FALSE;
1294 }
const bool FALSE
Definition: qglobal.h:370
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QCString & remove(uint index, uint len)
Definition: qcstring.cpp:391
const bool TRUE
Definition: qglobal.h:371
void VhdlDocGen::findAllArchitectures ( QList< QCString > &  ql,
const ClassDef cd 
)
staticprivate

Definition at line 1070 of file vhdldocgen.cpp.

1071 {
1072  ClassDef *citer;
1074  for ( ; (citer=cli.current()) ; ++cli )
1075  {
1076  QCString jj=citer->className();
1077  if (cd != citer && jj.contains('-')!=-1)
1078  {
1080  QCString temp=ql[1].utf8();
1081  if (qstricmp(cd->className(),temp)==0)
1082  {
1083  QCString *cl=new QCString(jj);
1084  qll.insert(0,cl);
1085  }
1086  }
1087  }// for
1088 }//findAllArchitectures
int contains(char c, bool cs=TRUE) const
Definition: qcstring.cpp:153
const bool FALSE
Definition: qglobal.h:370
QAsciiDict< Entry > cl
def cli(ctx)
Definition: main.py:7
QCString className() const
Definition: classdef.cpp:3914
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567
A list of strings.
Definition: qstringlist.h:51
friend class Iterator
Definition: sortdict.h:289
static QStringList split(const QString &sep, const QString &str, bool allowEmptyEntries=FALSE)
static ClassSDict * classSDict
Definition: doxygen.h:99
void VhdlDocGen::findAllPackages ( ClassDef cdef)
static

finds all included packages of an Entity or Package

Definition at line 870 of file vhdldocgen.cpp.

871 {
872  QList<ClassDef> cList;
873  if (packages.contains(cdef)) return;
875  MemberDef *md;
876 
877  if (!mem) return;
878 
879  MemberListIterator fmni(*mem);
880  for (fmni.toFirst();(md=fmni.current());++fmni)
881  {
882  if (VhdlDocGen::isPackage(md))
883  {
885  if (cd)
886  {
887  cList.append(cd);
889  packages.insert(cdef,cList);
890  }
891  }
892  }//for
893 
894 }// findAllPackages
void append(const type *d)
Definition: qlist.h:73
static ClassDef * getPackageName(const QCString &name)
Definition: vhdldocgen.cpp:705
const QCString & name() const
Definition: definition.h:114
static bool isPackage(const MemberDef *mdef)
static void findAllPackages(ClassDef *)
Definition: vhdldocgen.cpp:870
MemberList * getMemberList(MemberListType lt)
Definition: classdef.cpp:4021
static QMap< ClassDef *, QList< ClassDef > > packages
Definition: vhdldocgen.cpp:715
ClassDef * VhdlDocGen::findArchitecture ( const ClassDef cd)
static

Definition at line 1090 of file vhdldocgen.cpp.

1091 {
1092  ClassDef *citer;
1093  QCString nn=cd->name();
1095 
1096  for ( ; (citer=cli.current()) ; ++cli )
1097  {
1098  QCString jj=citer->name();
1100  if (ql.count()>1)
1101  {
1102  if (ql[0].utf8()==nn )
1103  {
1104  return citer;
1105  }
1106  }
1107  }
1108  return 0;
1109 }
const bool FALSE
Definition: qglobal.h:370
uint count() const
Definition: qvaluelist.h:394
def cli(ctx)
Definition: main.py:7
const QCString & name() const
Definition: definition.h:114
A list of strings.
Definition: qstringlist.h:51
friend class Iterator
Definition: sortdict.h:289
static QStringList split(const QString &sep, const QString &str, bool allowEmptyEntries=FALSE)
static ClassSDict * classSDict
Definition: doxygen.h:99
static ClassDef* VhdlDocGen::findArchitecture ( QCString  identifier,
QCString  entity_name 
)
static
bool VhdlDocGen::findConstraintFile ( LayoutNavEntry lne)
static

Definition at line 2794 of file vhdldocgen.cpp.

2795 {
2797  //LayoutNavEntry *cc = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files);
2799  LayoutNavEntry *kk = lne->parent();// find(LayoutNavEntry::Files);
2800  // LayoutNavEntry *kks = kk->parent();// find(LayoutNavEntry::Files);
2801  QCString file;
2802  QCString co("Constraints");
2803 
2804  QCString imgExt = getDotImageExtension();
2805  if (Config_getBool("HAVE_DOT") && imgExt=="svg")
2806  {
2808  QCString ofile("vhdl_design_overview");
2809  LayoutNavEntry *oo=new LayoutNavEntry( lne,LayoutNavEntry::MainPage,TRUE,ofile,ov,"");
2810  kk->addChild(oo);
2811  }
2812 
2813  uint i=0;
2814  while (i<count)
2815  {
2816  FileDef *fd=fn->at(i);
2817  if (fd->name().contains(".ucf") || fd->name().contains(".qsf"))
2818  {
2819  file = convertNameToFile(fd->name().data(),FALSE,FALSE);
2821  kk->addChild(ucf);
2822  break;
2823  }
2824  i++;
2825  }
2826  return FALSE;
2827 }
void addChild(LayoutNavEntry *e)
Definition: layout.h:155
int contains(char c, bool cs=TRUE) const
Definition: qcstring.cpp:153
const bool FALSE
Definition: qglobal.h:370
static FileNameList * inputNameList
Definition: doxygen.h:109
type * at(uint i) const
Definition: qlist.h:94
Base class for the layout of a navigation item at the top of the HTML pages.
Definition: layout.h:118
uint count() const
Definition: qlist.h:66
QAsciiDict< Entry > fn
QCString name() const
Definition: filedef.cpp:1193
const char * data() const
Definition: qcstring.h:207
#define Config_getBool(val)
Definition: config.cpp:664
QCString getDotImageExtension(void)
Definition: util.cpp:8562
type * getFirst() const
Definition: qlist.h:95
QCString convertNameToFile(const char *name, bool allowDots, bool allowUnderscore)
Definition: util.cpp:5354
virtual QCString trDesignOverview()=0
Translator * theTranslator
Definition: language.cpp:157
LayoutNavEntry * parent() const
Definition: layout.h:147
unsigned uint
Definition: qglobal.h:351
const bool TRUE
Definition: qglobal.h:371
MemberDef * VhdlDocGen::findFunction ( const QList< Argument > &  ql,
const QCString funcname,
const QCString package,
bool  type 
)
static

returns the function with the matching argument list is called in vhdlcode.l

Definition at line 901 of file vhdldocgen.cpp.

904 {
905  MemberDef* mdef=0;
906  //int funcType;
907  ClassDef *cdef=getClass(package.data());
908  if (cdef==0) return 0;
909 
911 
912  if (mem)
913  {
914  MemberListIterator fmni(*mem);
915  for (fmni.toFirst();(mdef=fmni.current());++fmni)
916  {
917  QCString mname=mdef->name();
918  if ((VhdlDocGen::isProcedure(mdef) || VhdlDocGen::isVhdlFunction(mdef)) && (compareString(funcname,mname)==0))
919  {
920  ArgumentList *alp = mdef->argumentList();
921 
922  // ArgumentList* arg2=mdef->getArgumentList();
923  if (alp==0) break;
924  ArgumentListIterator ali(*alp);
925  ArgumentListIterator ali1(ql);
926 
927  if (ali.count() != ali1.count()) break;
928 
929  Argument *arg,*arg1;
930  int equ=0;
931 
932  for (;(arg=ali.current()) && (arg1=ali1.current());++ali,++ali1)
933  {
934  equ+=abs(compareString(arg->type,arg1->type));
935 
936  QCString s1=arg->type;
937  QCString s2=arg1->type;
940  equ+=abs(compareString(s1,s2));
941  s1=arg->attrib;
942  s2=arg1->attrib;
945  equ+=abs(compareString(s1,s2));
946  // printf("\n 1. type [%s] name [%s] attrib [%s]",arg->type,arg->name,arg->attrib);
947  // printf("\n 2. type [%s] name [%s] attrib [%s]",arg1->type,arg1->name,arg1->attrib);
948  } // for
949  if (equ==0) return mdef;
950  }//if
951  }//for
952  }//if
953  return mdef;
954 } //findFunction
QCString type
Definition: arguments.h:67
This class represents an function or template argument list.
Definition: arguments.h:82
static void deleteAllChars(QCString &s, char c)
static ClassDef * getClass(const char *name)
Definition: vhdldocgen.cpp:693
static bool isProcedure(const MemberDef *mdef)
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
T abs(T value)
const QCString & name() const
Definition: definition.h:114
static int compareString(const QCString &s1, const QCString &s2)
Definition: vhdldocgen.cpp:158
const char * data() const
Definition: qcstring.h:207
static bool isVhdlFunction(const MemberDef *mdef)
QCString attrib
Definition: arguments.h:66
ArgumentList * argumentList() const
Definition: memberdef.cpp:4512
MemberList * getMemberList(MemberListType lt)
Definition: classdef.cpp:4021
QCString * VhdlDocGen::findKeyWord ( const QCString tmp)
static

returns the color of a keyword

Definition at line 667 of file vhdldocgen.cpp.

668 {
669  static QCString vhdlkeyword("vhdlkeyword");
670  static QCString vhdltype("comment");
671  static QCString vhdllogic("vhdllogic");
672  static QCString preprocessor("keywordflow");
673 
674  QCString word=tmp.lower();
675 
676  if (word.isEmpty() || word.at(0)=='\0') return 0;
677 
678  if (g_vhdlKeyDict0.find(word))
679  return &preprocessor;
680 
681  if (g_vhdlKeyDict1.find(word))
682  return &vhdltype;
683 
684  if (g_vhdlKeyDict2.find(word))
685  return &vhdllogic;
686 
687  if (g_vhdlKeyDict3.find(word))
688  return &vhdlkeyword;
689 
690  return 0;
691 }
bool isEmpty() const
Definition: qcstring.h:189
static QDict< QCString > g_vhdlKeyDict0(17, FALSE)
static QDict< QCString > g_vhdlKeyDict1(17, FALSE)
static QDict< QCString > g_vhdlKeyDict2(17, FALSE)
char & at(uint i) const
Definition: qcstring.h:326
static QDict< QCString > g_vhdlKeyDict3(17, FALSE)
QCString lower() const
Definition: qcstring.cpp:263
union ptb::content::word::word word
MemberDef * VhdlDocGen::findMember ( const QCString className,
const QCString memName 
)
static

Definition at line 717 of file vhdldocgen.cpp.

718 {
719  ClassDef* cd,*ecd;
720  MemberDef *mdef=0;
721 
722  cd=getClass(className);
723  //printf("VhdlDocGen::findMember(%s,%s)=%p\n",className.data(),memName.data(),cd);
724  if (cd==0) return 0;
725 
727  if (mdef) return mdef;
729  if (mdef) return mdef;
730 
731  // nothing found so far
732  // if we are an architecture or package body search in entity
733 
736  {
737  Definition *d = cd->getOuterScope();
738  // searching upper/lower case names
739 
740  QCString tt=d->name();
741  ecd =getClass(tt);
742  if (!ecd)
743  {
744  tt=tt.upper();
745  ecd =getClass(tt);
746  }
747  if (!ecd)
748  {
749  tt=tt.lower();
750  ecd =getClass(tt);
751  }
752 
753  if (ecd) //d && d->definitionType()==Definition::TypeClass)
754  {
755  //ClassDef *ecd = (ClassDef*)d;
757  if (mdef) return mdef;
759  if (mdef) return mdef;
760  }
761  }
762 
763 
766  {
767  Definition *d = cd->getOuterScope();
768 
769  QCString tt=d->name();
770  ClassDef *ecd =getClass(tt);
771  if (!ecd)
772  {
773  tt=tt.upper();
774  ecd =getClass(tt);
775  }
776  if (!ecd)
777  {
778  tt=tt.lower();
779  ecd =getClass(tt);
780  }
781  if (ecd) //d && d->definitionType()==Definition::TypeClass)
782  {
783  if(!packages.contains(ecd))
784  {
786  }
787  }
788  }
789  else
790  {
791  ecd=cd;
792  if (!packages.contains(ecd)) VhdlDocGen::findAllPackages(ecd);
793  }
794 
795  QMap<ClassDef*,QList<ClassDef> >::Iterator cList=packages.find(ecd);
796  if (cList.key()!=0)
797  {
798  QList<ClassDef> mlist=cList.data();
799  for (uint j=0;j<mlist.count();j++)
800  {
802  if (mdef) return mdef;
804  if (mdef) return mdef;
805  }
806  }
807  return 0;
808 
809 }//findMember
type * at(uint i) const
Definition: qlist.h:94
static ClassDef * getClass(const char *name)
Definition: vhdldocgen.cpp:693
Protection protection() const
Definition: classdef.cpp:4414
Definition: type_traits.h:61
uint count() const
Definition: qlist.h:66
QCString upper() const
Definition: qcstring.cpp:279
const QCString & name() const
Definition: definition.h:114
virtual Definition * getOuterScope() const
static MemberDef * findMemberDef(ClassDef *cd, const QCString &key, MemberListType type)
Definition: vhdldocgen.cpp:815
static void findAllPackages(ClassDef *)
Definition: vhdldocgen.cpp:870
QCString lower() const
Definition: qcstring.cpp:263
unsigned uint
Definition: qglobal.h:351
Definition: qmap.h:501
static QMap< ClassDef *, QList< ClassDef > > packages
Definition: vhdldocgen.cpp:715
MemberDef * VhdlDocGen::findMemberDef ( ClassDef cd,
const QCString key,
MemberListType  type 
)
static

This function returns the entity|package in which the key (type) is found

Definition at line 815 of file vhdldocgen.cpp.

816 {
817  MemberDef *md=0;
818  MemberList *ml=0;
819  QCString keyType=cd->symbolName()+"@"+key;
820  //printf("\n %s | %s | %s",cd->symbolName().data(),key.data(,),keyType.data());
821 
823  if (it.key())
824  {
825  md=it.data();
826  if (md)
827  {
828  return md;
829  }
830  }
831  if (qli.contains(cd))
832  {
833  return 0;
834  }
835  ml=cd->getMemberList(type);
836  qli.append(cd);
837  if (!ml)
838  {
839  return 0;
840  }
841  MemberListIterator fmni(*ml);
842  //int l=ml->count();
843  // fprintf(stderr,"\n loading enity %s %s: %d",cd->symbolName().data(),keyType.data(),l);
844 
845  for (fmni.toFirst();(md=fmni.current());++fmni)
846  {
847  QCString tkey=cd->symbolName()+"@"+md->name();
848  if (varMap.contains(tkey))
849  {
850  continue;
851  }
852  varMap.insert(tkey.data(),md);
853  }
854  it=varMap.find(keyType.data());
855  if (it.key())
856  {
857  md=it.data();
858  if (md)
859  {
860  return md;
861  }
862  }
863  return 0;
864 }//findMemberDef
QCString symbolName() const
void append(const type *d)
Definition: qlist.h:73
T & data()
Definition: qmap.h:115
const QCString & name() const
Definition: definition.h:114
def key(type, name=None)
Definition: graph.py:13
const char * data() const
Definition: qcstring.h:207
static QList< ClassDef > qli
Definition: vhdldocgen.cpp:714
const K & key() const
Definition: qmap.h:114
uint contains(const type *d) const
Definition: qlist.h:90
MemberList * getMemberList(MemberListType lt)
Definition: classdef.cpp:4021
static QMap< QCString, MemberDef * > varMap
Definition: vhdldocgen.cpp:713
ClassDef * VhdlDocGen::findVhdlClass ( const char *  className)
static

Definition at line 2893 of file vhdldocgen.cpp.

2894  {
2895 
2897  ClassDef *cd;
2898  for (;(cd=cli.current());++cli)
2899  {
2900  if (qstricmp(className,cd->name().data())==0)
2901  {
2902  return cd;
2903  }
2904  }
2905  return 0;
2906  }
static QCString className
Definition: declinfo.cpp:669
def cli(ctx)
Definition: main.py:7
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
friend class Iterator
Definition: sortdict.h:289
static ClassSDict * classSDict
Definition: doxygen.h:99
void VhdlDocGen::formatString ( const QCString s,
OutputList ol,
const MemberDef mdef 
)
static

inserts white spaces for better readings and writes a colored string to the output

Definition at line 1430 of file vhdldocgen.cpp.

1431 {
1432  QCString qcs = s;
1433  QCString temp;
1434  qcs.stripPrefix(":");
1435  qcs.stripPrefix("is");
1436  qcs.stripPrefix("IS");
1437  qcs.stripPrefix("of");
1438  qcs.stripPrefix("OF");
1439 
1440  // VhdlDocGen::deleteCharRev(qcs,';');
1441  //char white='\t';
1442  int len = qcs.length();
1443  unsigned int index=1;//temp.length();
1444 
1445  for (int j=0;j<len;j++)
1446  {
1447  char c=qcs[j];
1448  char b=c;
1449  if (j>0) b=qcs[j-1];
1450  if (c=='"' || c==',' || c=='\''|| c=='(' || c==')' || c==':' || c=='[' || c==']' ) // || (c==':' && b!='=')) // || (c=='=' && b!='>'))
1451  {
1452  if (temp.length()>=index && temp.at(index-1) != ' ')
1453  {
1454  temp+=" ";
1455  }
1456  temp+=c;
1457  temp+=" ";
1458  }
1459  else if (c=='=')
1460  {
1461  if (b==':') // := operator
1462  {
1463  temp.replace(index-1,1,"=");
1464  temp+=" ";
1465  }
1466  else // = operator
1467  {
1468  temp+=" ";
1469  temp+=c;
1470  temp+=" ";
1471  }
1472  }
1473  else
1474  {
1475  temp+=c;
1476  }
1477 
1478  index=temp.length();
1479  }// for
1480  temp=temp.stripWhiteSpace();
1481  // printf("\n [%s]",qcs.data());
1482  VhdlDocGen::writeFormatString(temp,ol,mdef);
1483 }
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
static void writeFormatString(const QCString &, OutputList &ol, const MemberDef *)
uint length() const
Definition: qcstring.h:195
char & at(uint i) const
Definition: qcstring.h:326
bool stripPrefix(const char *prefix)
Definition: qcstring.cpp:201
static bool * b
Definition: config.cpp:1043
QCString & replace(uint index, uint len, const char *s)
Definition: qcstring.cpp:411
static QCString * s
Definition: config.cpp:1042
ClassDef * VhdlDocGen::getClass ( const char *  name)
static

Definition at line 693 of file vhdldocgen.cpp.

694 {
695  if (name==0 || name[0]=='\0') return 0;
696 
697  ClassDef *cd=0;
698  QCString temp(name);
699  //temp=temp.lower();
700  temp=temp.stripWhiteSpace();
701  cd= Doxygen::classSDict->find(temp.data());
702  return cd;
703 }
static QCString name
Definition: declinfo.cpp:673
T * find(const char *key)
Definition: sortdict.h:232
static ClassSDict * classSDict
Definition: doxygen.h:99
QCString VhdlDocGen::getClassName ( const ClassDef cd)
static

Definition at line 977 of file vhdldocgen.cpp.

978 {
979  QCString temp;
980  if (cd==0) return "";
981 
983  {
984  temp=cd->name();
985  temp.stripPrefix("_");
986  return temp;
987  }
988 
989  return substitute(cd->className(),"::",".");
990 }
bool stripPrefix(const char *prefix)
Definition: qcstring.cpp:201
Protection protection() const
Definition: classdef.cpp:4414
QCString className() const
Definition: classdef.cpp:3914
const QCString & name() const
Definition: definition.h:114
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition: util.cpp:5088
QCString VhdlDocGen::getClassTitle ( const ClassDef cd)
static

returns the class title+ref

Definition at line 963 of file vhdldocgen.cpp.

964 {
965  QCString pageTitle;
966  if (cd==0) return "";
967  pageTitle=VhdlDocGen::getClassName(cd);
968  int ii=cd->protection();
969  pageTitle+=" ";
970  pageTitle+=theTranslator_vhdlType(ii+2,TRUE);
971  pageTitle+=" ";
972  return pageTitle;
973 } // getClassTitle
static QCString getClassName(const ClassDef *)
Definition: vhdldocgen.cpp:977
Protection protection() const
Definition: classdef.cpp:4414
#define theTranslator_vhdlType
Definition: vhdldocgen.cpp:64
const bool TRUE
Definition: qglobal.h:371
const MemberDef * VhdlDocGen::getFlowMember ( )
static

Definition at line 95 of file vhdldocgen.cpp.

96 {
97  return flowMember;
98 }
static const MemberDef * flowMember
Definition: vhdldocgen.cpp:88
QCString VhdlDocGen::getIndexWord ( const char *  c,
int  index 
)
static

Definition at line 1213 of file vhdldocgen.cpp.

1214 {
1215  QStringList ql;
1216  QCString temp(c);
1217  QRegExp reg("[\\s:|]");
1218 
1220 
1221  if (ql.count() > (unsigned int)index)
1222  {
1223  return ql[index].utf8();
1224  }
1225 
1226  return "";
1227 }
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
const bool FALSE
Definition: qglobal.h:370
uint count() const
Definition: qvaluelist.h:394
A list of strings.
Definition: qstringlist.h:51
cet::registry_via_id< success_t, val > reg
static QStringList split(const QString &sep, const QString &str, bool allowEmptyEntries=FALSE)
ClassDef * VhdlDocGen::getPackageName ( const QCString name)
static

Definition at line 705 of file vhdldocgen.cpp.

706 {
707  ClassDef* cd=0;
708  cd=getClass(name);
709 
710  return cd;
711 }
static ClassDef * getClass(const char *name)
Definition: vhdldocgen.cpp:693
QCString VhdlDocGen::getProcessNumber ( )
static

returns the next number of an anonymous process

Definition at line 1326 of file vhdldocgen.cpp.

1327 {
1328  static int stringCounter;
1329  char buf[8];
1330  QCString qcs("PROCESS_");
1331  sprintf(buf,"%d",stringCounter++);
1332  qcs.append(&buf[0]);
1333  return qcs;
1334 }
QCString VhdlDocGen::getProtectionName ( int  prot)
static

Definition at line 1230 of file vhdldocgen.cpp.

1231 {
1232  if (prot==VhdlDocGen::ENTITYCLASS)
1233  return "entity";
1234  else if (prot==VhdlDocGen::ARCHITECTURECLASS)
1235  return "architecture";
1236  else if (prot==VhdlDocGen::PACKAGECLASS)
1237  return "package";
1238  else if (prot==VhdlDocGen::PACKBODYCLASS)
1239  return "package body";
1240 
1241  return "";
1242 }
QCString VhdlDocGen::getRecordNumber ( )
static

returns the next number of a record|unit member

Definition at line 1314 of file vhdldocgen.cpp.

1315 {
1316  char buf[12];
1317  sprintf(buf,"%d",recordCounter++);
1318  QCString qcs(&buf[0]);
1319  return qcs;
1320 }
static int recordCounter
void VhdlDocGen::init ( )
static

Definition at line 570 of file vhdldocgen.cpp.

571 {
572 
573  // vhdl keywords inlcuded VHDL 2008
574 const char* g_vhdlKeyWordMap0[] =
575 {
576  "abs","access","after","alias","all","and","architecture","array","assert","assume","assume_guarantee","attribute",
577  "begin","block","body","buffer","bus",
578  "case","component","configuration","constant","context","cover",
579  "default","disconnect","downto",
580  "else","elsif","end","entity","exit",
581  "fairness","file","for","force","function",
582  "generate","generic","group","guarded",
583  "if","impure","in","inertial","inout","is",
584  "label","library","linkage","literal","loop",
585  "map","mod",
586  "nand","new","next","nor","not","null",
587  "of","on","open","or","others","out",
588  "package","parameter","port","postponed","procedure","process","property","proctected","pure",
589  "range","record","register","reject","release","restrict","restrict_guarantee","rem","report","rol","ror","return",
590  "select","sequence","severity","signal","shared","sla","sll","sra","srl","strong","subtype",
591  "then","to","transport","type",
592  "unaffected","units","until","use",
593  "variable","vmode","vprop","vunit",
594  "wait","when","while","with",
595  "xor","xnor",
596  0
597 };
598 
599 
600 // type
601 const char* g_vhdlKeyWordMap1[] =
602 {
603  "natural","unsigned","signed","string","boolean", "bit","bit_vector","character",
604  "std_ulogic","std_ulogic_vector","std_logic","std_logic_vector","integer",
605  "real","float","ufixed","sfixed","time",0
606 };
607 
608 // logic
609 const char* g_vhdlKeyWordMap2[] =
610 {
611  "abs","and","or","not","mod", "xor","rem","xnor","ror","rol","sla",
612  "sll",0
613 };
614 
615 // predefined attributes
616 const char* g_vhdlKeyWordMap3[] =
617 {
618 "base","left","right","high","low","ascending",
619 "image","value","pos","val","succ","pred","leftof","rightof","left","right","high","low",
620 "range","reverse_range","length","ascending","delayed","stable","quiet","transaction","event",
621 "active","last_event","last_active","last_value","driving","driving_value","simple_name","instance_name","path_name",0
622 };
623 
624  int j=0;
625  g_vhdlKeyDict0.setAutoDelete(TRUE);
626  g_vhdlKeyDict1.setAutoDelete(TRUE);
627  g_vhdlKeyDict2.setAutoDelete(TRUE);
628  g_vhdlKeyDict3.setAutoDelete(TRUE);
629 
630  while (g_vhdlKeyWordMap0[j])
631  {
632  g_vhdlKeyDict0.insert(g_vhdlKeyWordMap0[j],
633  new QCString(g_vhdlKeyWordMap0[j]));
634  j++;
635  }
636 
637  j=0;
638  while (g_vhdlKeyWordMap1[j])
639  {
640  g_vhdlKeyDict1.insert(g_vhdlKeyWordMap1[j],
641  new QCString(g_vhdlKeyWordMap1[j]));
642  j++;
643  }
644 
645  j=0;
646  while (g_vhdlKeyWordMap2[j])
647  {
648  g_vhdlKeyDict2.insert(g_vhdlKeyWordMap2[j],
649  new QCString(g_vhdlKeyWordMap2[j]));
650  j++;
651  }
652 
653  j=0;
654  while (g_vhdlKeyWordMap3[j])
655  {
656  g_vhdlKeyDict3.insert(g_vhdlKeyWordMap3[j],
657  new QCString(g_vhdlKeyWordMap3[j]));
658  j++;
659  }
660 
661 }// buildKeyMap
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)
const bool TRUE
Definition: qglobal.h:371
bool VhdlDocGen::isAlias ( const MemberDef mdef)
static

Definition at line 3361 of file vhdldocgen.cpp.

3362 { return mdef->getMemberSpecifiers()==VhdlDocGen::ALIAS; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isArchitecture ( const MemberDef mdef)
static

Definition at line 3395 of file vhdldocgen.cpp.

3396 { return mdef->getMemberSpecifiers()==VhdlDocGen::ARCHITECTURE; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isAttribute ( const MemberDef mdef)
static

Definition at line 3387 of file vhdldocgen.cpp.

3388 { return mdef->getMemberSpecifiers()==VhdlDocGen::ATTRIBUTE; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isCompInst ( const MemberDef mdef)
static

Definition at line 3407 of file vhdldocgen.cpp.

uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isComponent ( const MemberDef mdef)
static

Definition at line 3369 of file vhdldocgen.cpp.

3370 { return mdef->getMemberSpecifiers()==VhdlDocGen::COMPONENT; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isConfig ( const MemberDef mdef)
static

Definition at line 3359 of file vhdldocgen.cpp.

3360 { return mdef->getMemberSpecifiers()==VhdlDocGen::CONFIG; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isConstant ( const MemberDef mdef)
static

Definition at line 3375 of file vhdldocgen.cpp.

3376 { return mdef->getMemberSpecifiers()==VhdlDocGen::CONSTANT; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isConstraint ( const MemberDef mdef)
static

Definition at line 3357 of file vhdldocgen.cpp.

3358 { return mdef->getMemberSpecifiers()==VhdlDocGen::UCF_CONST; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isEntity ( const MemberDef mdef)
static

Definition at line 3373 of file vhdldocgen.cpp.

3374 { return mdef->getMemberSpecifiers()==VhdlDocGen::ENTITY; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isFile ( const MemberDef mdef)
static

Definition at line 3403 of file vhdldocgen.cpp.

3404 { return mdef->getMemberSpecifiers()==VhdlDocGen::VFILE; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isGeneric ( const MemberDef mdef)
static

Definition at line 3365 of file vhdldocgen.cpp.

3366 { return mdef->getMemberSpecifiers()==VhdlDocGen::GENERIC; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isGroup ( const MemberDef mdef)
static

Definition at line 3405 of file vhdldocgen.cpp.

3406 { return mdef->getMemberSpecifiers()==VhdlDocGen::GROUP; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isLibrary ( const MemberDef mdef)
static

Definition at line 3363 of file vhdldocgen.cpp.

3364 { return mdef->getMemberSpecifiers()==VhdlDocGen::LIBRARY; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isMisc ( const MemberDef mdef)
static

Definition at line 3409 of file vhdldocgen.cpp.

uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isNumber ( const QCString s)
static

returns TRUE if this string is a number

Definition at line 1412 of file vhdldocgen.cpp.

1413 {
1414  static QRegExp regg("[0-9][0-9eEfFbBcCdDaA_.#-+?xXzZ]*");
1415 
1416  if (s.isEmpty()) return FALSE;
1417  int j,len;
1418  j = regg.match(s.data(),0,&len);
1419  if ((j==0) && (len==(int)s.length())) return TRUE;
1420  return FALSE;
1421 
1422 }// isNumber
bool isEmpty() const
Definition: qcstring.h:189
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
uint length() const
Definition: qcstring.h:195
const bool FALSE
Definition: qglobal.h:370
const char * data() const
Definition: qcstring.h:207
const bool TRUE
Definition: qglobal.h:371
bool VhdlDocGen::isPackage ( const MemberDef mdef)
static

Definition at line 3371 of file vhdldocgen.cpp.

3372 { return mdef->getMemberSpecifiers()==VhdlDocGen::USE; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isPackageBody ( const MemberDef mdef)
static

Definition at line 3399 of file vhdldocgen.cpp.

3400 { return mdef->getMemberSpecifiers()==VhdlDocGen::PACKAGE_BODY; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isPort ( const MemberDef mdef)
static

Definition at line 3367 of file vhdldocgen.cpp.

3368 { return mdef->getMemberSpecifiers()==VhdlDocGen::PORT; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isProcedure ( const MemberDef mdef)
static

Definition at line 3391 of file vhdldocgen.cpp.

3392 { return mdef->getMemberSpecifiers()==VhdlDocGen::PROCEDURE; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isProcess ( const MemberDef mdef)
static

Definition at line 3383 of file vhdldocgen.cpp.

3384 { return mdef->getMemberSpecifiers()==VhdlDocGen::PROCESS; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isRecord ( const MemberDef mdef)
static

Definition at line 3393 of file vhdldocgen.cpp.

3394 { return mdef->getMemberSpecifiers()==VhdlDocGen::RECORD; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isSignal ( const MemberDef mdef)
static

Definition at line 3385 of file vhdldocgen.cpp.

3386 { return mdef->getMemberSpecifiers()==VhdlDocGen::SIGNAL; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isSignals ( const MemberDef mdef)
static

Definition at line 3389 of file vhdldocgen.cpp.

3390 { return mdef->getMemberSpecifiers()==VhdlDocGen::SIGNAL; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isSubClass ( ClassDef cd,
ClassDef scd,
bool  followInstances,
int  level 
)
static

Definition at line 3234 of file vhdldocgen.cpp.

3235 {
3236  bool found=FALSE;
3237  //printf("isBaseClass(cd=%s) looking for %s\n",name().data(),bcd->name().data());
3238  if (level>255)
3239  {
3240  err("Possible recursive class relation while inside %s and looking for %s\n",qPrint(cd->name()),qPrint(scd->name()));
3241  abort();
3242  return FALSE;
3243  }
3244 
3245  if (cd->subClasses())
3246  {
3247  BaseClassListIterator bcli(*cd->subClasses());
3248  for ( ; bcli.current() && !found ; ++bcli)
3249  {
3250  ClassDef *ccd=bcli.current()->classDef;
3251  if (!followInstances && ccd->templateMaster()) ccd=ccd->templateMaster();
3252  //printf("isSubClass() subclass %s\n",ccd->name().data());
3253  if (ccd==scd)
3254  {
3255  found=TRUE;
3256  }
3257  else
3258  {
3259  if (level <256)
3260  {
3261  found=ccd->isBaseClass(scd,followInstances,level+1);
3262  }
3263  }
3264  }
3265  }
3266  return found;
3267 }
BaseClassList * subClasses() const
Definition: classdef.cpp:4404
const bool FALSE
Definition: qglobal.h:370
bool isBaseClass(ClassDef *bcd, bool followInstances, int level=0)
Definition: classdef.cpp:2777
ClassDef * templateMaster() const
Definition: classdef.cpp:4439
const QCString & name() const
Definition: definition.h:114
void err(const char *fmt,...)
Definition: message.cpp:226
const char * qPrint(const char *s)
Definition: qcstring.h:797
const bool TRUE
Definition: qglobal.h:371
bool VhdlDocGen::isSubType ( const MemberDef mdef)
static

Definition at line 3379 of file vhdldocgen.cpp.

3380 { return mdef->getMemberSpecifiers()==VhdlDocGen::SUBTYPE; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isUnit ( const MemberDef mdef)
static

Definition at line 3397 of file vhdldocgen.cpp.

3398 { return mdef->getMemberSpecifiers()==VhdlDocGen::UNITS; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isVariable ( const MemberDef mdef)
static

Definition at line 3401 of file vhdldocgen.cpp.

uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
static bool VhdlDocGen::isVhdlClass ( const Entry cu)
inlinestatic

Definition at line 241 of file vhdldocgen.h.

242  {
243  return cu->spec==VhdlDocGen::ENTITY ||
244  cu->spec==VhdlDocGen::PACKAGE ||
247  }
uint64 spec
class/member specifiers
Definition: entry.h:243
bool VhdlDocGen::isVhdlFunction ( const MemberDef mdef)
static

Definition at line 3381 of file vhdldocgen.cpp.

3382 { return mdef->getMemberSpecifiers()==VhdlDocGen::FUNCTION; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool VhdlDocGen::isVType ( const MemberDef mdef)
static

Definition at line 3377 of file vhdldocgen.cpp.

3378 { return mdef->getMemberSpecifiers()==VhdlDocGen::TYPE; }
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
QCString VhdlDocGen::parseForBinding ( QCString entity,
QCString arch 
)
static

Definition at line 2862 of file vhdldocgen.cpp.

2863 {
2864  int index;
2865  QRegExp exp("[()\\s]");
2866 
2867  QCString label="";
2868  QStringList ql=QStringList::split(exp,entity,FALSE);
2869 
2870  if (ql.contains("open"))
2871  {
2872  return "open";
2873  }
2874 
2875  label=ql[0].utf8();
2876 
2877  entity = ql[1].utf8();
2878  if ((index=entity.findRev("."))>=0)
2879  {
2880  entity.remove(0,index+1);
2881  }
2882 
2883  if (ql.count()==3)
2884  {
2885  arch=ql[2].utf8();
2886  }
2887  return label;
2888 }
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
const bool FALSE
Definition: qglobal.h:370
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
uint count() const
Definition: qvaluelist.h:394
A list of strings.
Definition: qstringlist.h:51
uint contains(const T &x) const
Definition: qvaluelist.h:392
static QStringList split(const QString &sep, const QString &str, bool allowEmptyEntries=FALSE)
QCString & remove(uint index, uint len)
Definition: qcstring.cpp:391
QCString VhdlDocGen::parseForConfig ( QCString entity,
QCString arch 
)
static

Definition at line 2831 of file vhdldocgen.cpp.

2832 {
2833  int index;
2834  QCString label;
2835  if (!entity.contains(":")) return "";
2836 
2837  QRegExp exp("[:()\\s]");
2838  QStringList ql=QStringList::split(exp,entity,FALSE);
2839  //int ii=ql.findIndex(ent);
2840  assert(ql.count()>=2);
2841  label = ql[0].utf8();
2842  entity = ql[1].utf8();
2843  if ((index=entity.findRev("."))>=0)
2844  {
2845  entity.remove(0,index+1);
2846  }
2847 
2848  if (ql.count()==3)
2849  {
2850  arch= ql[2].utf8();
2851  ql=QStringList::split(exp,arch,FALSE);
2852  if (ql.count()>1) // expression
2853  {
2854  arch="";
2855  }
2856  }
2857  return label; // label
2858 }
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
int contains(char c, bool cs=TRUE) const
Definition: qcstring.cpp:153
const bool FALSE
Definition: qglobal.h:370
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
uint count() const
Definition: qvaluelist.h:394
A list of strings.
Definition: qstringlist.h:51
static QStringList split(const QString &sep, const QString &str, bool allowEmptyEntries=FALSE)
QCString & remove(uint index, uint len)
Definition: qcstring.cpp:391
void VhdlDocGen::parseFuncProto ( const char *  text,
QList< Argument > &  qlist,
QCString name,
QCString ret,
bool  doc = false 
)
static

parses a function proto

Parameters
textfunction string
qliststores the function types
namepoints to the function name
retStores the return type
doc???

Definition at line 1161 of file vhdldocgen.cpp.

1163 {
1164  (void)qlist; //unused
1165  int index,end;
1166  QCString s1(text);
1167  QCString temp;
1168 
1169  index=s1.find("(");
1170  end=s1.findRev(")");
1171 
1172  if ((end-index)>0)
1173  {
1174  temp=s1.mid(index+1,(end-index-1));
1175  //getFuncParams(qlist,temp);
1176  }
1177  if (doc)
1178  {
1179  name=s1.left(index);
1180  name=name.stripWhiteSpace();
1181  if ((end-index)>0)
1182  {
1183  ret="function";
1184  }
1185  return;
1186  }
1187  else
1188  {
1189  QCString s1(text);
1190  s1=s1.stripWhiteSpace();
1191  int i=s1.find("(",0,FALSE);
1192  int s=s1.find(QRegExp("[ \\t]"));
1193  if (i==-1 || i<s)
1194  s1=VhdlDocGen::getIndexWord(s1.data(),1);
1195  else // s<i, s=start of name, i=end of name
1196  s1=s1.mid(s,(i-s));
1197 
1198  name=s1.stripWhiteSpace();
1199  }
1200  index=s1.findRev("return",-1,FALSE);
1201  if (index !=-1)
1202  {
1203  ret=s1.mid(index+6,s1.length());
1204  ret=ret.stripWhiteSpace();
1205  VhdlDocGen::deleteCharRev(ret,';');
1206  }
1207 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
static QCString getIndexWord(const char *, int index)
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
const bool FALSE
Definition: qglobal.h:370
QCString left(uint len) const
Definition: qcstring.cpp:213
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
static bool deleteCharRev(QCString &s, char c)
QCString doc
static QCString * s
Definition: config.cpp:1042
void VhdlDocGen::parseUCF ( const char *  input,
Entry entity,
QCString  f,
bool  vendor 
)
static

Definition at line 2653 of file vhdldocgen.cpp.

2654 {
2655  QCString ucFile(input);
2656  int lineNo=0;
2657  QCString comment("#!");
2658  QCString brief;
2659 
2660  while (!ucFile.isEmpty())
2661  {
2662  int i=ucFile.find("\n");
2663  if (i<0) break;
2664  lineNo++;
2665  QCString temp=ucFile.left(i);
2666  temp=temp.stripWhiteSpace();
2667  bool bb=temp.stripPrefix("//");
2668 
2669  if (!temp.isEmpty())
2670  {
2671  if (temp.stripPrefix(comment) )
2672  {
2673  brief+=temp;
2674  brief.append("\\n");
2675  }
2676  else if (!temp.stripPrefix("#") && !bb)
2677  {
2678  if (altera)
2679  {
2680  int i=temp.find("-name");
2681  if (i>0)
2682  {
2683  temp=temp.remove(0,i+5);
2684  }
2685 
2686  temp.stripPrefix("set_location_assignment");
2687 
2688  initUCF(entity,0,temp,lineNo,fileName,brief);
2689  }
2690  else
2691  {
2692  QRegExp ee("[\\s=]");
2693  int i=temp.find(ee);
2694  QCString ff=temp.left(i);
2695  temp.stripPrefix(ff.data());
2696  ff.append("#");
2697  if (!temp.isEmpty())
2698  {
2699  initUCF(entity,ff.data(),temp,lineNo,fileName,brief);
2700  }
2701  }
2702  }
2703  }//temp
2704 
2705  ucFile=ucFile.remove(0,i+1);
2706  }// while
2707 }
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
bool brief
bool isEmpty() const
Definition: qcstring.h:189
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
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
int comment
static void initUCF(Entry *root, const char *type, QCString &qcs, int line, QCString &fileName, QCString &brief)
static int input(void)
Definition: code.cpp:15695
fileName
Definition: dumpTree.py:9
const char * data() const
Definition: qcstring.h:207
QCString & remove(uint index, uint len)
Definition: qcstring.cpp:391
QCString & append(const char *s)
Definition: qcstring.cpp:383
void VhdlDocGen::prepareComment ( QCString qcs)
static

strips the "--" prefixes of vhdl comments

Definition at line 1138 of file vhdldocgen.cpp.

1139 {
1140  const char* s="--!";
1141  int index=0;
1142 
1143  while (TRUE)
1144  {
1145  index=qcs.find(s,0,TRUE);
1146  if (index<0) break;
1147  qcs=qcs.remove(index,qstrlen(s));
1148  }
1149  qcs=qcs.stripWhiteSpace();
1150 }
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
Q_EXPORT uint qstrlen(const char *str)
Definition: qcstring.h:81
QCString & remove(uint index, uint len)
Definition: qcstring.cpp:391
static QCString * s
Definition: config.cpp:1042
const bool TRUE
Definition: qglobal.h:371
void VhdlDocGen::resetCodeVhdlParserState ( )
static

Definition at line 3350 of file vhdldocgen.cpp.

3351 {
3352  varMap.clear();
3353  qli.clear();
3354  packages.clear();
3355 }
void clear()
Definition: qlist.h:82
static QList< ClassDef > qli
Definition: vhdldocgen.cpp:714
static QMap< QCString, MemberDef * > varMap
Definition: vhdldocgen.cpp:713
static QMap< ClassDef *, QList< ClassDef > > packages
Definition: vhdldocgen.cpp:715
void VhdlDocGen::setFlowMember ( const MemberDef flowMember)
static

Definition at line 90 of file vhdldocgen.cpp.

91 {
92  flowMember=mem;
93 }
QCString VhdlDocGen::trDesignUnitHierarchy ( )
static

Definition at line 2515 of file vhdldocgen.cpp.

2516 {
2517  return "Design Unit Hierarchy";
2518 }
QCString VhdlDocGen::trDesignUnitIndex ( )
static

Definition at line 2536 of file vhdldocgen.cpp.

2537 {
2538  return "Design Unit Index";
2539 }
QCString VhdlDocGen::trDesignUnitList ( )
static

Definition at line 2520 of file vhdldocgen.cpp.

2521 {
2522  return "Design Unit List";
2523 }
QCString VhdlDocGen::trDesignUnitListDescription ( )
static

Definition at line 2530 of file vhdldocgen.cpp.

2531 {
2532  return "Here is a list of all design unit members with links to "
2533  "the Entities they belong to:";
2534 }
QCString VhdlDocGen::trDesignUnitMembers ( )
static

Definition at line 2525 of file vhdldocgen.cpp.

2526 {
2527  return "Design Unit Members";
2528 }
QCString VhdlDocGen::trDesignUnits ( )
static

Definition at line 2541 of file vhdldocgen.cpp.

2542 {
2543  return "Design Units";
2544 }
QCString VhdlDocGen::trFunctionAndProc ( )
static

Definition at line 2546 of file vhdldocgen.cpp.

2547 {
2548  return "Functions/Procedures/Processes";
2549 }
QCString VhdlDocGen::trTypeString ( uint64  type)
static

Definition at line 1244 of file vhdldocgen.cpp.

1245 {
1246  switch(type)
1247  {
1248  case VhdlDocGen::LIBRARY: return "Library";
1249  case VhdlDocGen::ENTITY: return "Entity";
1250  case VhdlDocGen::PACKAGE_BODY: return "Package Body";
1251  case VhdlDocGen::ATTRIBUTE: return "Attribute";
1252  case VhdlDocGen::PACKAGE: return "Package";
1253  case VhdlDocGen::SIGNAL: return "Signal";
1254  case VhdlDocGen::COMPONENT: return "Component";
1255  case VhdlDocGen::CONSTANT: return "Constant";
1256  case VhdlDocGen::TYPE: return "Type";
1257  case VhdlDocGen::SUBTYPE: return "Subtype";
1258  case VhdlDocGen::FUNCTION: return "Function";
1259  case VhdlDocGen::RECORD: return "Record";
1260  case VhdlDocGen::PROCEDURE: return "Procedure";
1261  case VhdlDocGen::ARCHITECTURE: return "Architecture";
1262  case VhdlDocGen::USE: return "Package";
1263  case VhdlDocGen::PROCESS: return "Process";
1264  case VhdlDocGen::PORT: return "Port";
1265  case VhdlDocGen::GENERIC: return "Generic";
1266  case VhdlDocGen::UNITS: return "Units";
1267  //case VhdlDocGen::PORTMAP: return "Port Map";
1268  case VhdlDocGen::SHAREDVARIABLE: return "Shared Variable";
1269  case VhdlDocGen::GROUP: return "Group";
1270  case VhdlDocGen::VFILE: return "File";
1271  case VhdlDocGen::INSTANTIATION: return "Instantiation";
1272  case VhdlDocGen::ALIAS: return "Alias";
1273  case VhdlDocGen::CONFIG: return "Configuration";
1274  case VhdlDocGen::MISCELLANEOUS: return "Miscellaneous";
1275  case VhdlDocGen::UCF_CONST: return "Constraints";
1276  default: return "";
1277  }
1278 } // convertType
QCString VhdlDocGen::trVhdlType ( uint64  type,
bool  sing = true 
)
static

Definition at line 2429 of file vhdldocgen.cpp.

2430 {
2431  switch(type)
2432  {
2433  case VhdlDocGen::LIBRARY:
2434  if (sing) return "Library";
2435  else return "Libraries";
2436  case VhdlDocGen::PACKAGE:
2437  if (sing) return "Package";
2438  else return "Packages";
2439  case VhdlDocGen::SIGNAL:
2440  if (sing) return "Signal";
2441  else return "Signals";
2442  case VhdlDocGen::COMPONENT:
2443  if (sing) return "Component";
2444  else return "Components";
2445  case VhdlDocGen::CONSTANT:
2446  if (sing) return "Constant";
2447  else return "Constants";
2448  case VhdlDocGen::ENTITY:
2449  if (sing) return "Entity";
2450  else return "Entities";
2451  case VhdlDocGen::TYPE:
2452  if (sing) return "Type";
2453  else return "Types";
2454  case VhdlDocGen::SUBTYPE:
2455  if (sing) return "Subtype";
2456  else return "Subtypes";
2457  case VhdlDocGen::FUNCTION:
2458  if (sing) return "Function";
2459  else return "Functions";
2460  case VhdlDocGen::RECORD:
2461  if (sing) return "Record";
2462  else return "Records";
2463  case VhdlDocGen::PROCEDURE:
2464  if (sing) return "Procedure";
2465  else return "Procedures";
2467  if (sing) return "Architecture";
2468  else return "Architectures";
2469  case VhdlDocGen::ATTRIBUTE:
2470  if (sing) return "Attribute";
2471  else return "Attributes";
2472  case VhdlDocGen::PROCESS:
2473  if (sing) return "Process";
2474  else return "Processes";
2475  case VhdlDocGen::PORT:
2476  if (sing) return "Port";
2477  else return "Ports";
2478  case VhdlDocGen::USE:
2479  if (sing) return "use clause";
2480  else return "Use Clauses";
2481  case VhdlDocGen::GENERIC:
2482  if (sing) return "Generic";
2483  else return "Generics";
2485  return "Package Body";
2486  case VhdlDocGen::UNITS:
2487  return "Units";
2489  if (sing) return "Shared Variable";
2490  return "Shared Variables";
2491  case VhdlDocGen::VFILE:
2492  if (sing) return "File";
2493  return "Files";
2494  case VhdlDocGen::GROUP:
2495  if (sing) return "Group";
2496  return "Groups";
2498  if (sing) return "Instantiation";
2499  else return "Instantiations";
2500  case VhdlDocGen::ALIAS:
2501  if (sing) return "Alias";
2502  return "Aliases";
2503  case VhdlDocGen::CONFIG:
2504  if (sing) return "Configuration";
2505  return "Configurations";
2507  return "Miscellaneous";
2508  case VhdlDocGen::UCF_CONST:
2509  return "Constraints";
2510  default:
2511  return "Class";
2512  }
2513 }
static void VhdlDocGen::writeAlphbeticalClass ( OutputList ol,
const ClassDef cd,
const QCString  
)
static
bool VhdlDocGen::writeClassType ( ClassDef *&  cd,
OutputList ol,
QCString cname 
)
static

Definition at line 2415 of file vhdldocgen.cpp.

2417 {
2418  int id=cd->protection();
2419  QCString qcs = VhdlDocGen::trTypeString(id+2);
2420  cname=VhdlDocGen::getClassName(cd);
2421  ol.startBold();
2422  ol.writeString(qcs.data());
2423  ol.writeString(" ");
2424  ol.endBold();
2425  //ol.insertMemberAlign();
2426  return FALSE;
2427 }// writeClassLink
void writeString(const char *text)
Definition: outputlist.h:119
const bool FALSE
Definition: qglobal.h:370
static QCString getClassName(const ClassDef *)
Definition: vhdldocgen.cpp:977
Protection protection() const
Definition: classdef.cpp:4414
void endBold()
Definition: outputlist.h:306
const char * data() const
Definition: qcstring.h:207
void startBold()
Definition: outputlist.h:304
static QCString trTypeString(uint64 type)
void VhdlDocGen::writeFormatString ( const QCString s,
OutputList ol,
const MemberDef mdef 
)
static

writes a colored and formatted string

Definition at line 1340 of file vhdldocgen.cpp.

1341 {
1342  QRegExp reg("[\\[\\]\\.\\/\\:\\<\\>\\:\\s\\,\\;\\'\\+\\-\\*\\|\\&\\=\\(\\)\"]");
1343  QCString qcs = s;
1344  qcs+=QCString(" ");// parsing the last sign
1345  QCString *ss;
1346  QCString find=qcs;
1347  QCString temp=qcs;
1348  char buf[2];
1349  buf[1]='\0';
1350 
1351  int j;
1352  int len;
1353  j = reg.match(temp.data(),0,&len);
1354 
1355  ol.startBold();
1356  if (j>=0)
1357  {
1358  while (j>=0)
1359  {
1360  find=find.left(j);
1361  buf[0]=temp[j];
1362  ss=VhdlDocGen::findKeyWord(find);
1363  bool k=isNumber(find); // is this a number
1364  if (k)
1365  {
1366  ol.docify(" ");
1367  startFonts(find,"vhdldigit",ol);
1368  ol.docify(" ");
1369  }
1370  else if (j != 0 && ss)
1371  {
1372  startFonts(find,ss->data(),ol);
1373  }
1374  else
1375  {
1376  if (j>0)
1377  {
1378  VhdlDocGen::writeStringLink(mdef,find,ol);
1379  }
1380  }
1381  startFonts(&buf[0],"vhdlchar",ol);
1382 
1383  QCString st=temp.remove(0,j+1);
1384  find=st;
1385  if (!find.isEmpty() && find.at(0)=='"')
1386  {
1387  int ii=find.find('"',2);
1388  if (ii>1)
1389  {
1390  QCString com=find.left(ii+1);
1391  startFonts(com,"keyword",ol);
1392  temp=find.remove(0,ii+1);
1393  }
1394  }
1395  else
1396  {
1397  temp=st;
1398  }
1399  j = reg.match(temp.data(),0,&len);
1400  }//while
1401  }//if
1402  else
1403  {
1404  startFonts(find,"vhdlchar",ol);
1405  }
1406  ol.endBold();
1407 }// writeFormatString
static bool isNumber(const QCString &s)
bool isEmpty() const
Definition: qcstring.h:189
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
char & at(uint i) const
Definition: qcstring.h:326
static void startFonts(const QCString &q, const char *keyword, OutputList &ol)
Definition: vhdldocgen.cpp:139
QCString left(uint len) const
Definition: qcstring.cpp:213
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
void endBold()
Definition: outputlist.h:306
static void writeStringLink(const MemberDef *mdef, QCString mem, OutputList &ol)
const char * data() const
Definition: qcstring.h:207
static QCString * findKeyWord(const QCString &word)
Definition: vhdldocgen.cpp:667
void startBold()
Definition: outputlist.h:304
cet::registry_via_id< success_t, val > reg
void docify(const char *s)
Definition: outputlist.h:145
QCString & remove(uint index, uint len)
Definition: qcstring.cpp:391
static QCString * s
Definition: config.cpp:1042
bool VhdlDocGen::writeFuncProcDocu ( const MemberDef md,
OutputList ol,
const ArgumentList al,
bool  type = false 
)
static

writes a function|procedure documentation to the output

Definition at line 1654 of file vhdldocgen.cpp.

1659 {
1660  if (al==0) return FALSE;
1661  //bool sem=FALSE;
1662  ol.enableAll();
1663 
1664  ArgumentListIterator ali(*al);
1665  int index=ali.count();
1666  if (index==0)
1667  {
1668  ol.docify(" ( ) ");
1669  return FALSE;
1670  }
1671  ol.endMemberDocName();
1673  //ol.startParameterName(FALSE);
1674  Argument *arg;
1675  bool first=TRUE;
1676  for (;(arg=ali.current());++ali)
1677  {
1678  ol.startParameterType(first,"");
1679  // if (first) ol.writeChar('(');
1680  QCString attl=arg->defval;
1681  bool bGen=attl.stripPrefix("gen!");
1682  if (bGen)
1683  VhdlDocGen::writeFormatString(QCString("generic "),ol,md);
1684 
1685 
1686  if (VhdlDocGen::isProcedure(md))
1687  {
1688  startFonts(arg->defval,"keywordtype",ol);
1689  ol.docify(" ");
1690  }
1691  ol.endParameterType();
1692 
1694  VhdlDocGen::writeFormatString(arg->name,ol,md);
1695 
1696  if (VhdlDocGen::isProcedure(md))
1697  {
1698  startFonts(arg->attrib,"stringliteral",ol);
1699  }
1700  else if (VhdlDocGen::isVhdlFunction(md))
1701  {
1702  startFonts(QCString("in"),"stringliteral",ol);
1703  }
1704 
1705  ol.docify(" ");
1707  ol.startEmphasis();
1709  if (!VhdlDocGen::isProcess(md))
1710  {
1711  // startFonts(arg->type,"vhdlkeyword",ol);
1712  VhdlDocGen::writeFormatString(arg->type,ol,md);
1713  }
1715  ol.endEmphasis();
1717 
1718  if (--index)
1719  {
1720  ol.docify(" , ");
1721  }
1722  else
1723  {
1724  // ol.docify(" ) ");
1726  break;
1727  }
1729 
1730  //sem=TRUE;
1731  first=FALSE;
1732  }
1733  //ol.endParameterList();
1734  return TRUE;
1735 
1736 } // writeDocFunProc
void startParameterType(bool first, const char *key)
Definition: outputlist.h:418
QCString type
Definition: arguments.h:67
static void writeFormatString(const QCString &, OutputList &ol, const MemberDef *)
QCString defval
Definition: arguments.h:71
static void startFonts(const QCString &q, const char *keyword, OutputList &ol)
Definition: vhdldocgen.cpp:139
const bool FALSE
Definition: qglobal.h:370
void endEmphasis()
Definition: outputlist.h:257
void startEmphasis()
Definition: outputlist.h:255
bool stripPrefix(const char *prefix)
Definition: qcstring.cpp:201
void startParameterName(bool one)
Definition: outputlist.h:422
static bool isProcedure(const MemberDef *mdef)
void endParameterName(bool last, bool one, bool bracket)
Definition: outputlist.h:424
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
void endParameterType()
Definition: outputlist.h:420
void disable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:79
void startParameterList(bool openBracket)
Definition: outputlist.h:426
void enable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:89
static bool isVhdlFunction(const MemberDef *mdef)
QCString attrib
Definition: arguments.h:66
static bool isProcess(const MemberDef *mdef)
QCString name
Definition: arguments.h:69
void endMemberDocName()
Definition: outputlist.h:416
void enableAll()
Definition: outputlist.cpp:59
void docify(const char *s)
Definition: outputlist.h:145
const bool TRUE
Definition: qglobal.h:371
void VhdlDocGen::writeFunctionProto ( OutputList ol,
const ArgumentList al,
const MemberDef mdef 
)
static

writes a function prototype to the output

Definition at line 1545 of file vhdldocgen.cpp.

1546 {
1547  if (al==0) return;
1548  ArgumentListIterator ali(*al);
1549  Argument *arg;
1550  bool sem=FALSE;
1551  int len=al->count();
1552  ol.startBold();
1553  ol.docify(" ( ");
1554  ol.endBold();
1555  if (len>2)
1556  {
1557  ol.lineBreak();
1558  }
1559  for (;(arg=ali.current());++ali)
1560  {
1561  ol.startBold();
1562  QCString att=arg->defval;
1563  bool bGen=att.stripPrefix("gen!");
1564 
1565  if (sem && len < 3)
1566  {
1567  ol.docify(" , ");
1568  }
1569 
1570  if (bGen)
1571  {
1572  VhdlDocGen::formatString(QCString("generic "),ol,mdef);
1573  }
1574  if (!att.isEmpty())
1575  {
1577  att+=" ";
1578  if (str)
1579  VhdlDocGen::formatString(att,ol,mdef);
1580  else
1581  startFonts(att,"vhdlchar",ol);
1582  }
1583 
1584  QCString nn=arg->name;
1585  nn+=": ";
1586  QCString ss=arg->type.stripWhiteSpace(); //.lower();
1587  QCString w=ss.stripWhiteSpace();//.upper();
1588  startFonts(nn,"vhdlchar",ol);
1589  startFonts("in ","stringliteral",ol);
1591  if (str)
1592  VhdlDocGen::formatString(w,ol,mdef);
1593  else
1594  startFonts(w,"vhdlchar",ol);
1595 
1596  if (arg->attrib)
1597  startFonts(arg->attrib,"vhdlchar",ol);
1598 
1599 
1600  sem=TRUE;
1601  ol.endBold();
1602  if (len > 2)
1603  {
1604  ol.lineBreak();
1605  }
1606  }
1607  ol.startBold();
1608  ol.docify(" )");
1609  const char *exp=mdef->excpString();
1610  if (exp)
1611  {
1612  ol.insertMemberAlign();
1613  ol.startBold();
1614  ol.docify("[ ");
1615  ol.docify(exp);
1616  ol.docify(" ]");
1617  ol.endBold();
1618  }
1619  ol.endBold();
1620 }
QCString type
Definition: arguments.h:67
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
bool isEmpty() const
Definition: qcstring.h:189
QCString defval
Definition: arguments.h:71
static void formatString(const QCString &, OutputList &ol, const MemberDef *)
void lineBreak(const char *style=0)
Definition: outputlist.h:302
static void startFonts(const QCString &q, const char *keyword, OutputList &ol)
Definition: vhdldocgen.cpp:139
const bool FALSE
Definition: qglobal.h:370
bool stripPrefix(const char *prefix)
Definition: qcstring.cpp:201
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
void endBold()
Definition: outputlist.h:306
uint count() const
Definition: qlist.h:66
static QCString * findKeyWord(const QCString &word)
Definition: vhdldocgen.cpp:667
void startBold()
Definition: outputlist.h:304
QCString attrib
Definition: arguments.h:66
const char * excpString() const
Definition: memberdef.cpp:4045
QCString name
Definition: arguments.h:69
void docify(const char *s)
Definition: outputlist.h:145
void insertMemberAlign(bool templ=FALSE)
Definition: outputlist.h:238
const bool TRUE
Definition: qglobal.h:371
static QCString str
void VhdlDocGen::writeInlineClassLink ( const ClassDef cd,
OutputList ol 
)
static

writes an inline link form entity|package to architecture|package body and vice verca

Definition at line 996 of file vhdldocgen.cpp.

997 {
998  QList<QCString> ql;
999  ql.setAutoDelete(TRUE);
1000  QCString nn=cd->className();
1001  int ii=(int)cd->protection()+2;
1002 
1003  QCString type;
1004  if (ii==VhdlDocGen::ENTITY)
1006  else if (ii==VhdlDocGen::ARCHITECTURE)
1008  else if (ii==VhdlDocGen::PACKAGE_BODY)
1010  else if (ii==VhdlDocGen::PACKAGE)
1012  else
1013  type+="";
1014 
1015  //type=type.lower();
1016  type+=" >> ";
1019 
1020  if (ii==VhdlDocGen::PACKAGE_BODY)
1021  {
1022  nn.stripPrefix("_");
1023  cd=getClass(nn.data());
1024  }
1025  else if (ii==VhdlDocGen::PACKAGE)
1026  {
1027  nn.prepend("_");
1028  cd=getClass(nn.data());
1029  }
1030  else if (ii==VhdlDocGen::ARCHITECTURE)
1031  {
1032  QStringList qlist=QStringList::split("-",nn,FALSE);
1033  nn=qlist[1].utf8();
1034  cd=VhdlDocGen::getClass(nn.data());
1035  }
1036 
1037  QCString opp;
1038  if (ii==VhdlDocGen::ENTITY)
1039  {
1041  int j=ql.count();
1042  for (int i=0;i<j;i++)
1043  {
1044  QCString *temp=ql.at(i);
1045  QStringList qlist=QStringList::split("-",*temp,FALSE);
1046  QCString s1=qlist[0].utf8();
1047  QCString s2=qlist[1].utf8();
1048  s1.stripPrefix("_");
1049  if (j==1) s1.resize(0);
1050  ClassDef*cc = getClass(temp->data());
1051  if (cc)
1052  {
1053  VhdlDocGen::writeVhdlLink(cc,ol,type,s2,s1);
1054  }
1055  }
1056  }
1057  else
1058  {
1059  VhdlDocGen::writeVhdlLink(cd,ol,type,nn,opp);
1060  }
1061 
1064 
1065 }// write
bool resize(uint newlen)
Definition: qcstring.h:225
const bool FALSE
Definition: qglobal.h:370
type * at(uint i) const
Definition: qlist.h:94
bool stripPrefix(const char *prefix)
Definition: qcstring.cpp:201
static ClassDef * getClass(const char *name)
Definition: vhdldocgen.cpp:693
Protection protection() const
Definition: classdef.cpp:4414
uint count() const
Definition: qlist.h:66
QCString className() const
Definition: classdef.cpp:3914
static void findAllArchitectures(QList< QCString > &ql, const ClassDef *cd)
A list of strings.
Definition: qstringlist.h:51
static void writeVhdlLink(const ClassDef *cdd, OutputList &ol, QCString &type, QCString &name, QCString &beh)
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
void disable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:79
const char * data() const
Definition: qcstring.h:207
void enable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:89
#define theTranslator_vhdlType
Definition: vhdldocgen.cpp:64
static QCString type
Definition: declinfo.cpp:672
static QStringList split(const QString &sep, const QString &str, bool allowEmptyEntries=FALSE)
void setAutoDelete(bool enable)
Definition: qlist.h:99
const bool TRUE
Definition: qglobal.h:371
static void VhdlDocGen::writeOverview ( OutputList ol)
static
void VhdlDocGen::writeOverview ( )
static

Definition at line 179 of file vhdldocgen.cpp.

180 {
182  ClassDef *cd;
183  bool found=FALSE;
184  for ( ; (cd=cli.current()) ; ++cli )
185  {
187  {
188  found=TRUE;
189  break;
190  }
191  }
192 
193  if (!found) return;
194 
195  QCString ov =Config_getString("HTML_OUTPUT");
196  QCString fileName=ov+"/vhdl_design.dot";
197  QFile f(fileName);
198  FTextStream t(&f);
199 
200  if (!f.open(IO_WriteOnly))
201  {
202  fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data());
203  return;
204  }
205 
206  startDot(t);
207 
208  for (cli.toFirst() ; (cd=cli.current()) ; ++cli )
209  {
211  {
212  continue;
213  }
214 
215  QList<MemberDef>* port= getPorts(cd);
216  if (port==0)
217  {
218  continue;
219  }
220  if (port->count()==0)
221  {
222  delete port;
223  port=NULL;
224  continue;
225  }
226 
227  startTable(t,cd->name());
228  writeClassToDot(t,cd);
229  writeTable(port,t);
230  endTabel(t);
231 
232  // writeVhdlPortToolTip(t,port,cd);
234  delete port;
235 
236  BaseClassList *bl=cd->baseClasses();
237  if (bl)
238  {
239  BaseClassListIterator bcli(*bl);
240  BaseClassDef *bcd;
241  for ( ; (bcd=bcli.current()) ; ++bcli )
242  {
243  ClassDef *bClass=bcd->classDef;
244  QCString dotn=cd->name()+":";
245  dotn+=cd->name();
246  QCString csc=bClass->name()+":";
247  csc+=bClass->name();
248  // fprintf(stderr,"\n <%s| %s>",dotn.data(),csc.data());
249  writeVhdlDotLink(t,dotn,csc,0);
250  }
251  }// if bl
252  }// for
253 
254  endDot(t);
255  // writePortLinks(t);
256  f.close();
257  createSVG();
258 }
ClassDef * classDef
Definition: classdef.h:520
static void writeTable(QList< MemberDef > *port, FTextStream &t)
Definition: vhdldocgen.cpp:497
#define IO_WriteOnly
Definition: qiodevice.h:62
static void writeVhdlDotLink(FTextStream &t, const QCString &a, const QCString &b, const QCString &style)
Definition: vhdldocgen.cpp:281
static void endDot(FTextStream &t)
Definition: vhdldocgen.cpp:270
const bool FALSE
Definition: qglobal.h:370
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
Protection protection() const
Definition: classdef.cpp:4414
def cli(ctx)
Definition: main.py:7
static void startTable(FTextStream &t, const QCString &className)
Definition: vhdldocgen.cpp:275
uint count() const
Definition: qlist.h:66
const QCString & name() const
Definition: definition.h:114
fileName
Definition: dumpTree.py:9
static void writeClassToDot(FTextStream &t, ClassDef *cd)
Definition: vhdldocgen.cpp:456
const char * data() const
Definition: qcstring.h:207
#define Config_getString(val)
Definition: config.cpp:660
static void startDot(FTextStream &t)
Definition: vhdldocgen.cpp:262
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
static void endTabel(FTextStream &t)
Definition: vhdldocgen.cpp:450
static QList< MemberDef > * getPorts(ClassDef *cd)
Definition: vhdldocgen.cpp:470
static void createSVG()
Definition: vhdldocgen.cpp:163
static void writeVhdlEntityToolTip(FTextStream &t, ClassDef *cd)
Definition: vhdldocgen.cpp:343
friend class Iterator
Definition: sortdict.h:289
static ClassSDict * classSDict
Definition: doxygen.h:99
const bool TRUE
Definition: qglobal.h:371
BaseClassList * baseClasses() const
Definition: classdef.cpp:4399
void VhdlDocGen::writePlainVHDLDeclarations ( MemberList ml,
OutputList ol,
ClassDef cd,
NamespaceDef nd,
FileDef fd,
GroupDef gd,
int  specifier 
)
static

Definition at line 2297 of file vhdldocgen.cpp.

2300 {
2301 
2302  SDict<QCString> pack(1009);
2303  pack.setAutoDelete(TRUE);
2304 
2305  bool first=TRUE;
2306  MemberDef *md;
2307  MemberListIterator mli(*mlist);
2308  for ( ; (md=mli.current()); ++mli )
2309  {
2310  int mems=md->getMemberSpecifiers();
2311  if (md->isBriefSectionVisible() && (mems==specifier) && (mems!=VhdlDocGen::LIBRARY) )
2312  {
2313  if (first) { ol.startMemberList();first=FALSE; }
2314  VhdlDocGen::writeVHDLDeclaration(md,ol,cd,nd,fd,gd,FALSE);
2315  } //if
2316  else if (md->isBriefSectionVisible() && (mems==specifier))
2317  {
2318  if (!pack.find(md->name().data()))
2319  {
2320  if (first) ol.startMemberList(),first=FALSE;
2321  VhdlDocGen::writeVHDLDeclaration(md,ol,cd,nd,fd,gd,FALSE);
2322  pack.append(md->name().data(),new QCString(md->name().data()));
2323  }
2324  } //if
2325  } //for
2326  if (!first) ol.endMemberList();
2327  pack.clear();
2328 }//plainDeclaration
static void writeVHDLDeclaration(MemberDef *mdef, OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, bool inGroup)
const bool FALSE
Definition: qglobal.h:370
void startMemberList()
Definition: outputlist.h:206
bool isBriefSectionVisible() const
Definition: memberdef.cpp:1289
const QCString & name() const
Definition: definition.h:114
const char * data() const
Definition: qcstring.h:207
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
const bool TRUE
Definition: qglobal.h:371
void endMemberList()
Definition: outputlist.h:208
void VhdlDocGen::writeProcedureProto ( OutputList ol,
const ArgumentList al,
const MemberDef mdef 
)
static

writes a procedure prototype to the output

Definition at line 1489 of file vhdldocgen.cpp.

1490 {
1491  ArgumentListIterator ali(*al);
1492  Argument *arg;
1493  bool sem=FALSE;
1494  int len=al->count();
1495  ol.docify("( ");
1496  if (len > 2)
1497  {
1498  ol.lineBreak();
1499  }
1500  for (;(arg=ali.current());++ali)
1501  {
1502  ol.startBold();
1503  if (sem && len <3)
1504  ol.writeChar(',');
1505 
1506  QCString nn=arg->name;
1507  nn+=": ";
1508 
1510  arg->defval+=" ";
1511  if (str)
1512  {
1513  startFonts(arg->defval,str->data(),ol);
1514  }
1515  else
1516  {
1517  startFonts(arg->defval,"vhdlchar",ol); // write type (variable,constant etc.)
1518  }
1519 
1520  startFonts(nn,"vhdlchar",ol); // write name
1521  if (qstricmp(arg->attrib,arg->type) != 0)
1522  {
1523  startFonts(arg->attrib.lower(),"stringliteral",ol); // write in|out
1524  }
1525  ol.docify(" ");
1526  VhdlDocGen::formatString(arg->type,ol,mdef);
1527  sem=TRUE;
1528  ol.endBold();
1529  if (len > 2)
1530  {
1531  ol.lineBreak();
1532  ol.docify(" ");
1533  }
1534  }//for
1535 
1536  ol.docify(" )");
1537 
1538 
1539 }
QCString type
Definition: arguments.h:67
QCString defval
Definition: arguments.h:71
static void formatString(const QCString &, OutputList &ol, const MemberDef *)
void lineBreak(const char *style=0)
Definition: outputlist.h:302
static void startFonts(const QCString &q, const char *keyword, OutputList &ol)
Definition: vhdldocgen.cpp:139
const bool FALSE
Definition: qglobal.h:370
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
void endBold()
Definition: outputlist.h:306
uint count() const
Definition: qlist.h:66
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567
void writeChar(char c)
Definition: outputlist.h:259
const char * data() const
Definition: qcstring.h:207
static QCString * findKeyWord(const QCString &word)
Definition: vhdldocgen.cpp:667
void startBold()
Definition: outputlist.h:304
QCString attrib
Definition: arguments.h:66
QCString name
Definition: arguments.h:69
QCString lower() const
Definition: qcstring.cpp:263
void docify(const char *s)
Definition: outputlist.h:145
const bool TRUE
Definition: qglobal.h:371
static QCString str
void VhdlDocGen::writeProcessProto ( OutputList ol,
const ArgumentList al,
const MemberDef mdef 
)
static

writes a process prototype to the output

Definition at line 1626 of file vhdldocgen.cpp.

1627 {
1628  if (al==0) return;
1629  ArgumentListIterator ali(*al);
1630  Argument *arg;
1631  bool sem=FALSE;
1632  ol.startBold();
1633  ol.docify(" ( ");
1634  for (;(arg=ali.current());++ali)
1635  {
1636  if (sem)
1637  {
1638  ol.docify(" , ");
1639  }
1640  QCString nn=arg->name;
1641  // startFonts(nn,"vhdlchar",ol);
1642  VhdlDocGen::writeFormatString(nn,ol,mdef);
1643  sem=TRUE;
1644  }
1645  ol.docify(" )");
1646  ol.endBold();
1647 }
static void writeFormatString(const QCString &, OutputList &ol, const MemberDef *)
const bool FALSE
Definition: qglobal.h:370
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
void endBold()
Definition: outputlist.h:306
void startBold()
Definition: outputlist.h:304
QCString name
Definition: arguments.h:69
void docify(const char *s)
Definition: outputlist.h:145
const bool TRUE
Definition: qglobal.h:371
static void VhdlDocGen::writeRecordProto ( const MemberDef mdef,
OutputList ol,
const ArgumentList al 
)
static
void VhdlDocGen::writeRecorUnit ( QCString largs,
OutputList ol,
const MemberDef mdef 
)
staticprivate

Definition at line 3187 of file vhdldocgen.cpp.

3188 {
3189  QStringList ql=QStringList::split("#",largs,FALSE);
3190  uint len=ql.count();
3191  for(uint i=0;i<len;i++)
3192  {
3193  QCString n=ql[i].utf8();
3194  VhdlDocGen::formatString(n,ol,mdef);
3195  if ((len-i)>1) ol.lineBreak();
3196  }
3197 }
static void formatString(const QCString &, OutputList &ol, const MemberDef *)
void lineBreak(const char *style=0)
Definition: outputlist.h:302
const bool FALSE
Definition: qglobal.h:370
uint count() const
Definition: qvaluelist.h:394
A list of strings.
Definition: qstringlist.h:51
std::void_t< T > n
static QStringList split(const QString &sep, const QString &str, bool allowEmptyEntries=FALSE)
unsigned uint
Definition: qglobal.h:351
void VhdlDocGen::writeRecUnitDocu ( const MemberDef md,
OutputList ol,
QCString  largs 
)
staticprivate

Definition at line 3200 of file vhdldocgen.cpp.

3204 {
3205 
3206  QStringList ql=QStringList::split("#",largs,FALSE);
3207  uint len=ql.count();
3209  bool first=TRUE;
3210 
3211  for(uint i=0;i<len;i++)
3212  {
3213  QCString n=ql[i].utf8();
3214  ol.startParameterType(first,"");
3215  ol.endParameterType();
3217  VhdlDocGen::formatString(n,ol,md);
3218  if ((len-i)>1)
3219  {
3221  }
3222  else
3223  {
3225  }
3226 
3227  first=FALSE;
3228  }
3229 
3230 }//#
void startParameterType(bool first, const char *key)
Definition: outputlist.h:418
static void formatString(const QCString &, OutputList &ol, const MemberDef *)
const bool FALSE
Definition: qglobal.h:370
uint count() const
Definition: qvaluelist.h:394
void startParameterName(bool one)
Definition: outputlist.h:422
void endParameterName(bool last, bool one, bool bracket)
Definition: outputlist.h:424
void endParameterType()
Definition: outputlist.h:420
A list of strings.
Definition: qstringlist.h:51
std::void_t< T > n
void startParameterList(bool openBracket)
Definition: outputlist.h:426
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
void VhdlDocGen::writeSource ( MemberDef mdef,
OutputList ol,
QCString cname 
)
static

Definition at line 2578 of file vhdldocgen.cpp.

2579 {
2581  // pIntf->resetCodeParserState();
2582 
2583  QCString codeFragment=mdef->documentation();
2584 
2585  if (cname.isEmpty())
2586  {
2587  writeLink(mdef,ol);
2588  int fi=0;
2589  int j=0;
2590  do
2591  {
2592  fi=codeFragment.find("\n",++fi);
2593  } while(fi>=0 && j++ <3);
2594 
2595  // show only the first four lines
2596  if (j==4)
2597  {
2598  codeFragment=codeFragment.left(fi);
2599  codeFragment.append("\n .... ");
2600  }
2601  }
2602 
2603  codeFragment.prepend("\n");
2604  ol.pushGeneratorState();
2605  ol.startCodeFragment();
2606  pIntf->parseCode(ol, // codeOutIntf
2607  0, // scope
2608  codeFragment, // input
2609  SrcLangExt_VHDL, // lang
2610  FALSE, // isExample
2611  0, // exampleName
2612  mdef->getFileDef(), // fileDef
2613  mdef->getStartBodyLine(), // startLine
2614  mdef->getEndBodyLine(), // endLine
2615  TRUE, // inlineFragment
2616  mdef, // memberDef
2617  TRUE // show line numbers
2618  );
2619 
2620  ol.endCodeFragment();
2621  ol.popGeneratorState();
2622 
2623  if (cname.isEmpty()) return;
2624 
2625  mdef->writeSourceDef(ol,cname);
2626  mdef->writeSourceRefs(ol,cname);
2627  mdef->writeSourceReffedBy(ol,cname);
2628 }
ParserInterface * getParser(const char *extension)
Definition: parserintf.h:191
bool isEmpty() const
Definition: qcstring.h:189
Abstract interface for programming language parsers.
Definition: parserintf.h:38
void startCodeFragment()
Definition: outputlist.h:244
const bool FALSE
Definition: qglobal.h:370
QCString left(uint len) const
Definition: qcstring.cpp:213
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
void endCodeFragment()
Definition: outputlist.h:246
FileDef * getFileDef() const
Definition: memberdef.cpp:4075
static ParserManager * parserManager
Definition: doxygen.h:141
void popGeneratorState()
Definition: outputlist.cpp:121
void pushGeneratorState()
Definition: outputlist.cpp:111
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
QCString documentation() const
Definition: memberdef.cpp:5085
int getEndBodyLine() const
int getStartBodyLine() const
static void writeLink(const MemberDef *mdef, OutputList &ol)
Definition: vhdldocgen.cpp:131
virtual void parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const char *exampleName=0, FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, MemberDef *memberDef=0, bool showLineNumbers=TRUE, Definition *searchCtx=0, bool collectXRefs=TRUE)=0
const bool TRUE
Definition: qglobal.h:371
QCString & append(const char *s)
Definition: qcstring.cpp:383
void VhdlDocGen::writeStringLink ( const MemberDef mdef,
QCString  mem,
OutputList ol 
)
staticprivate

writes a link if the string is linkable else a formatted string

Definition at line 2554 of file vhdldocgen.cpp.

2555 {
2556  if (mdef)
2557  {
2558  ClassDef *cd=mdef->getClassDef();
2559  if (cd)
2560  {
2561  QCString n=cd->name();
2562  MemberDef* memdef=VhdlDocGen::findMember(n,mem);
2563  if (memdef && memdef->isLinkable())
2564  {
2565  ol.startBold();
2566  writeLink(memdef,ol);
2567  ol.endBold();
2568  ol.docify(" ");
2569  return;
2570  }
2571  }
2572  }
2573  startFonts(mem,"vhdlchar",ol);
2574 }// found component
static void startFonts(const QCString &q, const char *keyword, OutputList &ol)
Definition: vhdldocgen.cpp:139
void endBold()
Definition: outputlist.h:306
const QCString & name() const
Definition: definition.h:114
std::void_t< T > n
ClassDef * getClassDef() const
Definition: memberdef.cpp:4070
void startBold()
Definition: outputlist.h:304
static void writeLink(const MemberDef *mdef, OutputList &ol)
Definition: vhdldocgen.cpp:131
static MemberDef * findMember(const QCString &className, const QCString &memName)
Definition: vhdldocgen.cpp:717
void docify(const char *s)
Definition: outputlist.h:145
bool isLinkable() const
Definition: memberdef.cpp:1161
void VhdlDocGen::writeTagFile ( MemberDef mdef,
FTextStream tagFile 
)
static

Definition at line 1920 of file vhdldocgen.cpp.

1921 {
1922  tagFile << " <member kind=\"";
1923  if (VhdlDocGen::isGeneric(mdef)) tagFile << "generic";
1924  if (VhdlDocGen::isPort(mdef)) tagFile << "port";
1925  if (VhdlDocGen::isEntity(mdef)) tagFile << "entity";
1926  if (VhdlDocGen::isComponent(mdef)) tagFile << "component";
1927  if (VhdlDocGen::isVType(mdef)) tagFile << "type";
1928  if (VhdlDocGen::isConstant(mdef)) tagFile << "constant";
1929  if (VhdlDocGen::isSubType(mdef)) tagFile << "subtype";
1930  if (VhdlDocGen::isVhdlFunction(mdef)) tagFile << "function";
1931  if (VhdlDocGen::isProcedure(mdef)) tagFile << "procedure";
1932  if (VhdlDocGen::isProcess(mdef)) tagFile << "process";
1933  if (VhdlDocGen::isSignals(mdef)) tagFile << "signal";
1934  if (VhdlDocGen::isAttribute(mdef)) tagFile << "attribute";
1935  if (VhdlDocGen::isRecord(mdef)) tagFile << "record";
1936  if (VhdlDocGen::isLibrary(mdef)) tagFile << "library";
1937  if (VhdlDocGen::isPackage(mdef)) tagFile << "package";
1938  if (VhdlDocGen::isVariable(mdef)) tagFile << "shared variable";
1939  if (VhdlDocGen::isFile(mdef)) tagFile << "file";
1940  if (VhdlDocGen::isGroup(mdef)) tagFile << "group";
1941  if (VhdlDocGen::isCompInst(mdef)) tagFile << "instantiation";
1942  if (VhdlDocGen::isAlias(mdef)) tagFile << "alias";
1943  if (VhdlDocGen::isCompInst(mdef)) tagFile << "configuration";
1944 
1945  tagFile << "\">" << endl;
1946  tagFile << " <type>" << convertToXML(mdef->typeString()) << "</type>" << endl;
1947  tagFile << " <name>" << convertToXML(mdef->name()) << "</name>" << endl;
1948  tagFile << " <anchorfile>" << convertToXML(mdef->getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl;
1949  tagFile << " <anchor>" << convertToXML(mdef->anchor()) << "</anchor>" << endl;
1950 
1951  if (VhdlDocGen::isVhdlFunction(mdef))
1952  tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),TRUE)) << "</arglist>" << endl;
1953  else if (VhdlDocGen::isProcedure(mdef))
1954  tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),FALSE)) << "</arglist>" << endl;
1955  else
1956  tagFile << " <arglist>" << convertToXML(mdef->argsString()) << "</arglist>" << endl;
1957 
1958  mdef->writeDocAnchorsToTagFile(tagFile);
1959  tagFile << " </member>" << endl;
1960 }
QCString convertToXML(const char *s)
Definition: util.cpp:5717
static bool isSubType(const MemberDef *mdef)
static bool isVType(const MemberDef *mdef)
static bool isFile(const MemberDef *mdef)
static bool isCompInst(const MemberDef *mdef)
static QCString htmlFileExtension
Definition: doxygen.h:130
static bool isLibrary(const MemberDef *mdef)
static bool isSignals(const MemberDef *mdef)
static bool isEntity(const MemberDef *mdef)
const bool FALSE
Definition: qglobal.h:370
static QCString convertArgumentListToString(const ArgumentList *al, bool f)
static bool isComponent(const MemberDef *mdef)
static bool isPort(const MemberDef *mdef)
static bool isAttribute(const MemberDef *mdef)
static bool isRecord(const MemberDef *mdef)
static bool isProcedure(const MemberDef *mdef)
void writeDocAnchorsToTagFile(FTextStream &)
Definition: definition.cpp:520
static bool isGeneric(const MemberDef *mdef)
const char * typeString() const
Definition: memberdef.cpp:4035
const QCString & name() const
Definition: definition.h:114
static bool isPackage(const MemberDef *mdef)
static bool isAlias(const MemberDef *mdef)
QCString anchor() const
Definition: memberdef.cpp:1031
static bool isVhdlFunction(const MemberDef *mdef)
static bool isConstant(const MemberDef *mdef)
ArgumentList * argumentList() const
Definition: memberdef.cpp:4512
static bool isProcess(const MemberDef *mdef)
static bool isGroup(const MemberDef *mdef)
QCString getOutputFileBase() const
Definition: memberdef.cpp:941
const char * argsString() const
Definition: memberdef.cpp:4040
static bool isVariable(const MemberDef *mdef)
const bool TRUE
Definition: qglobal.h:371
QTextStream & endl(QTextStream &s)
void VhdlDocGen::writeVHDLDeclaration ( MemberDef mdef,
OutputList ol,
ClassDef cd,
NamespaceDef nd,
FileDef fd,
GroupDef gd,
bool  inGroup 
)
static

printf("startMemberItem for %s\n",name().data());

Definition at line 1964 of file vhdldocgen.cpp.

1967 {
1968  Definition *d=0;
1969 
1970  ASSERT(cd!=0 || nd!=0 || fd!=0 || gd!=0 ||
1973  ); // member should belong to something
1974  if (cd) d=cd;
1975  else if (nd) d=nd;
1976  else if (fd) d=fd;
1977  else if (gd) d=gd;
1978  else d=(Definition*)mdef;
1979 
1980  // write search index info
1982  {
1986  }
1987 
1988  QCString cname = d->name();
1989  QCString cfname = d->getOutputFileBase();
1990 
1991  //HtmlHelp *htmlHelp=0;
1992  // bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP");
1993  // if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance();
1994 
1995  // search for the last anonymous scope in the member type
1996  ClassDef *annoClassDef=mdef->getClassDefOfAnonymousType();
1997 
1998  // start a new member declaration
1999  uint isAnonymous = (bool)(annoClassDef); // || m_impl->annMemb || m_impl->annEnumType;
2000  ///printf("startMemberItem for %s\n",name().data());
2001  int mm=mdef->getMemberSpecifiers();
2002  if (mm==VhdlDocGen::MISCELLANEOUS)
2003  isAnonymous=3;
2004 
2005  ol.startMemberItem( mdef->anchor(), isAnonymous ); //? 1 : m_impl->tArgList ? 3 : 0);
2006 
2007  // If there is no detailed description we need to write the anchor here.
2008  bool detailsVisible = mdef->isDetailedSectionLinkable();
2009  if (!detailsVisible) // && !m_impl->annMemb)
2010  {
2011  QCString doxyName=mdef->name().copy();
2012  if (!cname.isEmpty()) doxyName.prepend(cname+"::");
2013  QCString doxyArgs=mdef->argsString();
2014  ol.startDoxyAnchor(cfname,cname,mdef->anchor(),doxyName,doxyArgs);
2015 
2016  ol.pushGeneratorState();
2019  ol.docify("\n");
2020  ol.popGeneratorState();
2021 
2022  }
2023  // *** write type
2024  /*VHDL CHANGE */
2025  bool bRec,bUnit;
2026  QCString ltype(mdef->typeString());
2027  // ltype=ltype.replace(reg," ");
2028  QCString largs(mdef->argsString());
2029  // largs=largs.replace(reg," ");
2030  mdef->setType(ltype.data());
2031  mdef->setArgsString(largs.data());
2032  //ClassDef * plo=mdef->getClassDef();
2033  ClassDef *kl=0;
2034  ArgumentList *alp = mdef->argumentList();
2035  QCString nn;
2036  //VhdlDocGen::adjustRecordMember(mdef);
2037  if (gd) gd=0;
2038  switch (mm)
2039  {
2041  VhdlDocGen::writeSource(mdef,ol,nn);
2042  break;
2043  case VhdlDocGen::PROCEDURE:
2044  case VhdlDocGen::FUNCTION:
2045  ol.startBold();
2046  VhdlDocGen::formatString(ltype,ol,mdef);
2047  ol.endBold();
2048  ol.insertMemberAlign();
2049  ol.docify(" ");
2050 
2051  writeLink(mdef,ol);
2052  if (alp!=0 && mm==VhdlDocGen::FUNCTION)
2053  VhdlDocGen::writeFunctionProto(ol,alp,mdef);
2054 
2055  if (alp!=0 && mm==VhdlDocGen::PROCEDURE)
2056  VhdlDocGen::writeProcedureProto(ol,alp,mdef);
2057 
2058  break;
2059  case VhdlDocGen::USE:
2060  kl=VhdlDocGen::getClass(mdef->name());
2061  if (kl && ((VhdlDocGen::VhdlClasses)kl->protection()==VhdlDocGen::ENTITYCLASS)) break;
2062  writeLink(mdef,ol);
2063  ol.insertMemberAlign();
2064  ol.docify(" ");
2065 
2066  if (kl)
2067  {
2068  nn=kl->getOutputFileBase();
2069  ol.pushGeneratorState();
2071  ol.docify(" ");
2073  ol.startBold();
2074  ol.docify(name.data());
2075  name.resize(0);
2076  ol.endBold();
2077  name+=" <"+mdef->name()+">";
2078  ol.startEmphasis();
2079  ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),0,name.data());
2080  ol.popGeneratorState();
2081  }
2082  break;
2083  case VhdlDocGen::LIBRARY:
2084  writeLink(mdef,ol);
2085  ol.insertMemberAlign();
2086  if (largs=="context")
2087  {
2088  VhdlDocGen::writeRecorUnit(ltype,ol,mdef);
2089  }
2090 
2091  break;
2092 
2093  case VhdlDocGen::GENERIC:
2094  case VhdlDocGen::PORT:
2095  case VhdlDocGen::ALIAS:
2096 
2097  writeLink(mdef,ol);
2098  ol.docify(" ");
2099  ol.insertMemberAlign();
2100  if (mm==VhdlDocGen::GENERIC)
2101  {
2102  ol.startBold();
2103  VhdlDocGen::formatString(largs,ol,mdef);
2104  ol.endBold();
2105  }
2106  else
2107  {
2108  ol.docify(" ");
2109  ol.startBold();
2110  VhdlDocGen::formatString(ltype,ol,mdef);
2111  ol.endBold();
2112  ol.docify(" ");
2113  VhdlDocGen::formatString(largs,ol,mdef);
2114  }
2115  break;
2116  case VhdlDocGen::PROCESS:
2117  writeLink(mdef,ol);
2118  ol.insertMemberAlign();
2119  VhdlDocGen::writeProcessProto(ol,alp,mdef);
2120  break;
2121  case VhdlDocGen::PACKAGE:
2122  case VhdlDocGen::ENTITY:
2123  case VhdlDocGen::COMPONENT:
2125  case VhdlDocGen::CONFIG:
2126  if (VhdlDocGen::isCompInst(mdef) )
2127  {
2128  nn=largs;
2129  if(nn.stripPrefix("function") || nn.stripPrefix("package"))
2130  {
2131  VhdlDocGen::formatString(largs,ol,mdef);
2132  ol.insertMemberAlign();
2133  writeLink(mdef,ol);
2134  ol.docify(" ");
2135  VhdlDocGen::formatString(ltype,ol,mdef);
2136  break;
2137  }
2138 
2139  largs.prepend("::");
2140  largs.prepend(mdef->name().data());
2141  ol.writeObjectLink(mdef->getReference(),
2142  cfname,
2143  mdef->anchor(),
2144  mdef->name());
2145  }
2146  else
2147  writeLink(mdef,ol);
2148 
2149  ol.insertMemberAlign();
2150  ol.docify(" ");
2151 
2152  ol.startBold();
2153  ol.docify(ltype);
2154  ol.endBold();
2155  ol.docify(" ");
2156  if (VhdlDocGen::isComponent(mdef) ||
2157  VhdlDocGen::isConfig(mdef) ||
2158  VhdlDocGen::isCompInst(mdef))
2159  {
2160  if (VhdlDocGen::isConfig(mdef) || VhdlDocGen::isCompInst(mdef))
2161  {
2162  nn=ltype;
2163  }
2164  else
2165  {
2166  nn=mdef->name();
2167  }
2168  kl=getClass(nn.data());
2169  if (kl)
2170  {
2171  nn=kl->getOutputFileBase();
2172  ol.pushGeneratorState();
2174  ol.startEmphasis();
2175  QCString name("<Entity ");
2176  if (VhdlDocGen::isConfig(mdef) || VhdlDocGen::isCompInst(mdef))
2177  {
2178  name+=ltype+">";
2179  }
2180  else
2181  {
2182  name+=mdef->name()+"> ";
2183  }
2184  ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),0,name.data());
2185  ol.endEmphasis();
2186  ol.popGeneratorState();
2187  }
2188  }
2189  break;
2190  case VhdlDocGen::UCF_CONST:
2191  mm=mdef->name().findRev('_');
2192  if (mm>0)
2193  {
2194  mdef->setName(mdef->name().left(mm));
2195  }
2196  writeUCFLink(mdef,ol);
2197  break;
2198  case VhdlDocGen::SIGNAL:
2199  case VhdlDocGen::ATTRIBUTE:
2200  case VhdlDocGen::SUBTYPE:
2201  case VhdlDocGen::CONSTANT:
2203  case VhdlDocGen::VFILE:
2204  case VhdlDocGen::GROUP:
2205  writeLink(mdef,ol);
2206  ol.docify(" ");
2207  ol.insertMemberAlign();
2208  VhdlDocGen::formatString(ltype,ol,mdef);
2209  break;
2210  case VhdlDocGen::RECORD:
2211  case VhdlDocGen::UNITS:
2212  writeLink(mdef,ol);
2213  ol.docify(" ");
2214  ol.startBold();
2215  if (ltype.isEmpty()) {
2216  ol.docify(" ");
2217  }
2218  ol.insertMemberAlign();
2219  if (!ltype.isEmpty())
2220  VhdlDocGen::formatString(ltype,ol,mdef);
2221  ol.endBold();
2222  break;
2223  case VhdlDocGen::TYPE:
2224  bRec=largs.stripPrefix("record") ;
2225  bUnit=largs.stripPrefix("units") ;
2226  ol.startBold();
2227  if (bRec) ol.docify("record: ");
2228  if (bUnit) ol.docify("units: ");
2229  writeLink(mdef,ol);
2230  ol.insertMemberAlign();
2231  if (!bRec && !bUnit) VhdlDocGen::formatString(ltype,ol,mdef);
2232  if (bUnit) ol.lineBreak();
2233  if (bRec || bUnit)
2234  {
2235  writeRecorUnit(largs,ol,mdef);
2236  mdef->setType("");
2237  }
2238  ol.endBold();
2239  break;
2240 
2241  default: break;
2242  }
2243 
2244  bool htmlOn = ol.isEnabled(OutputGenerator::Html);
2245  if (htmlOn && /*Config_getBool("HTML_ALIGN_MEMBERS") &&*/ !ltype.isEmpty())
2246  {
2248  }
2249  if (!ltype.isEmpty()) ol.docify(" ");
2250 
2251  if (htmlOn)
2252  {
2254  }
2255 
2256  if (!detailsVisible)// && !m_impl->annMemb)
2257  {
2258  ol.endDoxyAnchor(cfname,mdef->anchor());
2259  }
2260 
2261  // name().data(),annoClassDef,annEnumType);
2262  // if(mm!=VhdlDocGen::MISCELLANEOUS)
2263  ol.endMemberItem();
2264  if (!mdef->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC") /* && !annMemb */)
2265  {
2266  QCString s=mdef->briefDescription();
2267  ol.startMemberDescription(mdef->anchor());
2268  ol.generateDoc(mdef->briefFile(),mdef->briefLine(),
2269  mdef->getOuterScope()?mdef->getOuterScope():d,
2270  mdef,s.data(),TRUE,FALSE,0,TRUE,FALSE);
2271  if (detailsVisible)
2272  {
2273  ol.pushGeneratorState();
2275  //ol.endEmphasis();
2276  ol.docify(" ");
2277  if (mdef->getGroupDef()!=0 && gd==0) // forward link to the group
2278  {
2279  ol.startTextLink(mdef->getOutputFileBase(),mdef->anchor());
2280  }
2281  else // local link
2282  {
2283  ol.startTextLink(0,mdef->anchor());
2284  }
2285  ol.endTextLink();
2286  //ol.startEmphasis();
2287  ol.popGeneratorState();
2288  }
2289  //ol.newParagraph();
2290  ol.endMemberDescription();
2291  }
2292  mdef->warnIfUndocumented();
2293 
2294 }// end writeVhdlDeclaration
static QCString name
Definition: declinfo.cpp:673
void startMemberItem(const char *anchor, int i1, const char *id=0)
Definition: outputlist.h:218
bool resize(uint newlen)
Definition: qcstring.h:225
void setType(const char *t)
Definition: memberdef.cpp:3902
void endMemberItem()
Definition: outputlist.h:220
This class represents an function or template argument list.
Definition: arguments.h:82
static bool isConfig(const MemberDef *mdef)
bool isEmpty() const
Definition: qcstring.h:189
QCString getReference() const
Definition: memberdef.cpp:1001
static void writeProcessProto(OutputList &ol, const ArgumentList *al, const MemberDef *)
static bool isCompInst(const MemberDef *mdef)
virtual void setName(const char *name)
Definition: definition.cpp:396
bool generateDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const char *exampleName=0, bool singleLine=FALSE, bool linkFromIndex=FALSE)
Definition: outputlist.cpp:131
static void formatString(const QCString &, OutputList &ol, const MemberDef *)
void disableAllBut(OutputGenerator::OutputType o)
Definition: outputlist.cpp:49
void lineBreak(const char *style=0)
Definition: outputlist.h:302
const bool FALSE
Definition: qglobal.h:370
static bool isComponent(const MemberDef *mdef)
void startMemberDescription(const char *anchor, const char *inheritId=0)
Definition: outputlist.h:308
void endEmphasis()
Definition: outputlist.h:257
void startEmphasis()
Definition: outputlist.h:255
QCString left(uint len) const
Definition: qcstring.cpp:213
bool stripPrefix(const char *prefix)
Definition: qcstring.cpp:201
void setArgsString(const char *as)
Definition: memberdef.cpp:4708
int briefLine() const
bool isEnabled(OutputGenerator::OutputType o)
Definition: outputlist.cpp:99
static void writeUCFLink(const MemberDef *mdef, OutputList &ol)
virtual QCString getOutputFileBase() const =0
QCString getReference() const
Definition: classdef.cpp:3814
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
void startTextLink(const char *file, const char *anchor)
Definition: outputlist.h:159
static ClassDef * getClass(const char *name)
Definition: vhdldocgen.cpp:693
Protection protection() const
Definition: classdef.cpp:4414
QCString copy() const
Definition: qcstring.h:250
void popGeneratorState()
Definition: outputlist.cpp:121
const char * typeString() const
Definition: memberdef.cpp:4035
void endBold()
Definition: outputlist.h:306
static SearchIndexIntf * searchIndex
Definition: doxygen.h:133
const QCString & name() const
Definition: definition.h:114
bool isDetailedSectionLinkable() const
Definition: memberdef.cpp:1852
void pushGeneratorState()
Definition: outputlist.cpp:111
QCString briefDescription(bool abbr=FALSE) const
Definition: memberdef.cpp:5073
virtual void addWord(const char *word, bool hiPriority)=0
static void writeFunctionProto(OutputList &ol, const ArgumentList *al, const MemberDef *)
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
void disable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:79
const char * data() const
Definition: qcstring.h:207
QCString anchor() const
Definition: memberdef.cpp:1031
void enable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:89
#define Config_getBool(val)
Definition: config.cpp:664
QCString briefFile() const
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
void startBold()
Definition: outputlist.h:304
#define theTranslator_vhdlType
Definition: vhdldocgen.cpp:64
void startDoxyAnchor(const char *fName, const char *manName, const char *anchor, const char *name, const char *args)
Definition: outputlist.h:266
QCString getOutputFileBase() const
Definition: classdef.cpp:3533
virtual Definition * getOuterScope() const
ArgumentList * argumentList() const
Definition: memberdef.cpp:4512
QCString qualifiedName() const
Definition: memberdef.cpp:3968
static void writeLink(const MemberDef *mdef, OutputList &ol)
Definition: vhdldocgen.cpp:131
void endDoxyAnchor(const char *fn, const char *anchor)
Definition: outputlist.h:270
virtual void setCurrentDoc(Definition *ctx, const char *anchor, bool isSourceFile)=0
static constexpr double mm
Definition: Units.h:65
void endMemberDescription()
Definition: outputlist.h:310
ClassDef * getClassDefOfAnonymousType()
Definition: memberdef.cpp:1236
const char * argsString() const
Definition: memberdef.cpp:4040
static void writeSource(MemberDef *mdef, OutputList &ol, QCString &cname)
void docify(const char *s)
Definition: outputlist.h:145
void insertMemberAlign(bool templ=FALSE)
Definition: outputlist.h:238
static void writeProcedureProto(OutputList &ol, const ArgumentList *al, const MemberDef *)
void writeObjectLink(const char *ref, const char *file, const char *anchor, const char *name)
Definition: outputlist.h:149
unsigned uint
Definition: qglobal.h:351
int bool
Definition: qglobal.h:345
void endTextLink()
Definition: outputlist.h:161
static QCString * s
Definition: config.cpp:1042
QCString localName() const
const bool TRUE
Definition: qglobal.h:371
static void writeRecorUnit(QCString &largs, OutputList &ol, const MemberDef *mdef)
#define ASSERT(x)
Definition: qglobal.h:590
void VhdlDocGen::writeVhdlDeclarations ( MemberList ml,
OutputList ol,
GroupDef gd,
ClassDef cd,
FileDef fd,
NamespaceDef nd 
)
static

Definition at line 1770 of file vhdldocgen.cpp.

1772 {
1794 
1795  // configurations must be added to global file definitions.
1798 
1799 }
const bool FALSE
Definition: qglobal.h:370
#define theTranslator_vhdlType
Definition: vhdldocgen.cpp:64
static void writeVHDLDeclarations(MemberList *ml, OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, const char *title, const char *subtitle, bool showEnumValues, int type)
void VhdlDocGen::writeVHDLDeclarations ( MemberList ml,
OutputList ol,
ClassDef cd,
NamespaceDef nd,
FileDef fd,
GroupDef gd,
const char *  title,
const char *  subtitle,
bool  showEnumValues,
int  type 
)
static

Definition at line 2358 of file vhdldocgen.cpp.

2361 {
2362  setGlobalType(ml);
2363  if (!membersHaveSpecificType(ml,type)) return;
2364 
2365  if (title)
2366  {
2368  ol.parseText(title);
2369  ol.endMemberHeader();
2370  ol.docify(" ");
2371  }
2372  if (subtitle && subtitle[0]!=0)
2373  {
2374  ol.startMemberSubtitle();
2375  ol.generateDoc("[generated]",-1,0,0,subtitle,FALSE,FALSE,0,TRUE,FALSE);
2376  ol.endMemberSubtitle();
2377  } //printf("memberGroupList=%p\n",memberGroupList);
2378 
2379  VhdlDocGen::writePlainVHDLDeclarations(ml,ol,cd,nd,fd,gd,type);
2380 
2381  if (ml->getMemberGroupList())
2382  {
2384  MemberGroup *mg;
2385  while ((mg=mgli.current()))
2386  {
2387  if (membersHaveSpecificType(mg->members(),type))
2388  {
2389  //printf("mg->header=%s\n",mg->header().data());
2390  bool hasHeader=mg->header()!="[NOHEADER]";
2391  ol.startMemberGroupHeader(hasHeader);
2392  if (hasHeader)
2393  {
2394  ol.parseText(mg->header());
2395  }
2396  ol.endMemberGroupHeader();
2397  if (!mg->documentation().isEmpty())
2398  {
2399  //printf("Member group has docs!\n");
2400  ol.startMemberGroupDocs();
2401  ol.generateDoc("[generated]",-1,0,0,mg->documentation()+"\n",FALSE,FALSE);
2402  ol.endMemberGroupDocs();
2403  }
2404  ol.startMemberGroup();
2405  //printf("--- mg->writePlainDeclarations ---\n");
2406  VhdlDocGen::writePlainVHDLDeclarations(mg->members(),ol,cd,nd,fd,gd,type);
2407  ol.endMemberGroup(hasHeader);
2408  }
2409  ++mgli;
2410  }
2411  }
2412 }// writeVHDLDeclarations
void endMemberGroupDocs()
Definition: outputlist.h:232
MemberGroupList * getMemberGroupList() const
Definition: memberlist.h:78
bool generateDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const char *exampleName=0, bool singleLine=FALSE, bool linkFromIndex=FALSE)
Definition: outputlist.cpp:131
static bool membersHaveSpecificType(MemberList *ml, uint64 type)
const bool FALSE
Definition: qglobal.h:370
void endMemberGroup(bool last)
Definition: outputlist.h:236
static constexpr double mg
Definition: Units.h:145
bool parseText(const QCString &textStr)
Definition: outputlist.cpp:175
void startMemberGroup()
Definition: outputlist.h:234
void endMemberHeader()
Definition: outputlist.h:196
void startMemberGroupDocs()
Definition: outputlist.h:230
void startMemberSubtitle()
Definition: outputlist.h:198
static void setGlobalType(MemberList *ml)
static void writePlainVHDLDeclarations(MemberList *ml, OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, int specifier)
static QCString type
Definition: declinfo.cpp:672
void startMemberHeader(const char *anchor)
Definition: outputlist.h:194
void endMemberSubtitle()
Definition: outputlist.h:200
void docify(const char *s)
Definition: outputlist.h:145
void endMemberGroupHeader()
Definition: outputlist.h:228
const bool TRUE
Definition: qglobal.h:371
void startMemberGroupHeader(bool b)
Definition: outputlist.h:226
void VhdlDocGen::writeVhdlLink ( const ClassDef cdd,
OutputList ol,
QCString type,
QCString name,
QCString beh 
)
staticprivate

Definition at line 1114 of file vhdldocgen.cpp.

1115 {
1116  if (ccd==0) return;
1117  ol.startBold();
1118  ol.docify(type.data());
1119  ol.endBold();
1120  nn.stripPrefix("_");
1121  ol.writeObjectLink(ccd->getReference(),ccd->getOutputFileBase(),0,nn.data());
1122 
1123  if (!behav.isEmpty())
1124  {
1125  behav.prepend(" ");
1126  ol.startBold();
1127  ol.docify(behav.data());
1128  ol.endBold();
1129  }
1130 
1131  ol.lineBreak();
1132 }
void lineBreak(const char *style=0)
Definition: outputlist.h:302
void endBold()
Definition: outputlist.h:306
const char * data() const
Definition: qcstring.h:207
void startBold()
Definition: outputlist.h:304
void docify(const char *s)
Definition: outputlist.h:145
void writeObjectLink(const char *ref, const char *file, const char *anchor, const char *name)
Definition: outputlist.h:149
bool VhdlDocGen::writeVHDLTypeDocumentation ( const MemberDef mdef,
const Definition d,
OutputList ol 
)
static

Definition at line 1836 of file vhdldocgen.cpp.

1837 {
1838  ClassDef *cd=(ClassDef*)d;
1839  bool hasParams = FALSE;
1840 
1841  if (cd==0) return hasParams;
1842 
1843  QCString ttype=mdef->typeString();
1844  QCString largs=mdef->argsString();
1845 
1847  {
1848  QCString nn=mdef->typeString();
1849  nn=nn.stripWhiteSpace();
1850  QCString na=cd->name();
1851  MemberDef* memdef=VhdlDocGen::findMember(na,nn);
1852  if (memdef && memdef->isLinkable())
1853  {
1854  ol.docify(" ");
1855 
1856  ol.startBold();
1857  writeLink(memdef,ol);
1858  ol.endBold();
1859  ol.docify(" ");
1860  }
1861  else
1862  {
1863  ol.docify(" ");
1864  VhdlDocGen::formatString(ttype,ol,mdef);
1865  ol.docify(" ");
1866  }
1867  ol.docify(mdef->name());
1868  hasParams = VhdlDocGen::writeFuncProcDocu(mdef,ol, mdef->argumentList());
1869  }
1870 
1871 
1872  if (mdef->isVariable())
1873  {
1874  if (VhdlDocGen::isConstraint(mdef))
1875  {
1876  writeLink(mdef,ol);
1877  ol.docify(" ");
1878 
1879  largs=largs.replace(QRegExp("#")," ");
1880  VhdlDocGen::formatString(largs,ol,mdef);
1881  return hasParams;
1882  }
1883  else
1884  {
1885  writeLink(mdef,ol);
1886  if (VhdlDocGen::isLibrary(mdef) || VhdlDocGen::isPackage(mdef))
1887  {
1888  return hasParams;
1889  }
1890  ol.docify(" ");
1891  }
1892 
1893  // QCString largs=mdef->argsString();
1894 
1895  bool c=largs=="context";
1896  bool brec=largs.stripPrefix("record") ;
1897 
1898  if (!brec && !c)
1899  VhdlDocGen::formatString(ttype,ol,mdef);
1900 
1901  if (c || brec || largs.stripPrefix("units"))
1902  {
1903  if (c)
1904  largs=ttype;
1905  VhdlDocGen::writeRecUnitDocu(mdef,ol,largs);
1906  return hasParams;
1907  }
1908 
1909  ol.docify(" ");
1910  if (VhdlDocGen::isPort(mdef) || VhdlDocGen::isGeneric(mdef))
1911  {
1912  // QCString largs=mdef->argsString();
1913  VhdlDocGen::formatString(largs,ol,mdef);
1914  ol.docify(" ");
1915  }
1916  }
1917  return hasParams;
1918 }
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
static bool isConstraint(const MemberDef *mdef)
static bool isLibrary(const MemberDef *mdef)
static void formatString(const QCString &, OutputList &ol, const MemberDef *)
const bool FALSE
Definition: qglobal.h:370
bool stripPrefix(const char *prefix)
Definition: qcstring.cpp:201
bool isVariable() const
Definition: memberdef.cpp:4140
static bool isPort(const MemberDef *mdef)
static bool isProcedure(const MemberDef *mdef)
static bool isGeneric(const MemberDef *mdef)
const char * typeString() const
Definition: memberdef.cpp:4035
void endBold()
Definition: outputlist.h:306
const QCString & name() const
Definition: definition.h:114
static bool isPackage(const MemberDef *mdef)
static bool isVhdlFunction(const MemberDef *mdef)
void startBold()
Definition: outputlist.h:304
ArgumentList * argumentList() const
Definition: memberdef.cpp:4512
static void writeLink(const MemberDef *mdef, OutputList &ol)
Definition: vhdldocgen.cpp:131
static bool isProcess(const MemberDef *mdef)
static void writeRecUnitDocu(const MemberDef *md, OutputList &ol, QCString largs)
static MemberDef * findMember(const QCString &className, const QCString &memName)
Definition: vhdldocgen.cpp:717
const char * argsString() const
Definition: memberdef.cpp:4040
void docify(const char *s)
Definition: outputlist.h:145
bool isLinkable() const
Definition: memberdef.cpp:1161
QCString & replace(uint index, uint len, const char *s)
Definition: qcstring.cpp:411
static bool writeFuncProcDocu(const MemberDef *mdef, OutputList &ol, const ArgumentList *al, bool type=false)

The documentation for this class was generated from the following files: