My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 QCString * findKeyWord (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.

{
ENTITYCLASS, // Overlays: Public
PACKBODYCLASS, // Overlays: Protected
ARCHITECTURECLASS, // Overlays: Private
PACKAGECLASS // Overlays: Package
};
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.

Constructor & Destructor Documentation

VhdlDocGen::VhdlDocGen ( )

Definition at line 562 of file vhdldocgen.cpp.

{
}
VhdlDocGen::~VhdlDocGen ( )
virtual

Definition at line 566 of file vhdldocgen.cpp.

{
}

Member Function Documentation

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

Definition at line 3269 of file vhdldocgen.cpp.

References ClassDef::baseClasses(), and deleteAllChars().

Referenced by addInstance().

{
if (cd->baseClasses())
{
for ( ; bcli.current() ; ++bcli)
{
ClassDef *ccd=bcli.current()->classDef;
if (ccd==ent)
{
QCString n = bcli.current()->usedName;
int i = n.find('(');
if(i<0)
{
bcli.current()->usedName.append("(2)");
return;
}
static QRegExp reg("[0-9]+");
QCString s=n.left(i);
QCString r=n.right(n.length()-i);
QCString t=r;
r.setNum(r.toInt()+1);
t.replace(reg,r.data());
s.append(t.data());
bcli.current()->usedName=s;
bcli.current()->templSpecifiers=t;
}
}
}
}
static bool VhdlDocGen::compareArgList ( ArgumentList ,
ArgumentList  
)
staticprivate
void VhdlDocGen::computeVhdlComponentRelations ( )
static

Definition at line 3052 of file vhdldocgen.cpp.

References addInstance(), Entry::args, assignBinding(), Doxygen::classSDict, SDict< T >::find(), findVhdlClass(), getIndexWord(), getVhdlConfiguration(), getVhdlInstList(), Entry::includeName, VhdlConfNode::isInlineConf, VhdlConfNode::isLeaf, parseForBinding(), Entry::stat, and Entry::type.

Referenced by parseInput().

{
QCString entity,arch,inst;
QList<VhdlConfNode> confList = getVhdlConfiguration();
for (uint iter=0;iter<confList.count(); iter++)
{
VhdlConfNode* conf= (VhdlConfNode *)confList.at(iter);
if (!(conf->isInlineConf || conf->isLeaf))
{
continue;
}
}
QList<Entry> qsl= getVhdlInstList();
QListIterator<Entry> eli(qsl);
Entry *cur;
for (eli.toFirst();(cur=eli.current());++eli)
{
if (cur->stat ) // was bind
{
continue;
}
if (cur->includeName=="entity" || cur->includeName=="component" )
{
entity=cur->includeName+" "+cur->type;
QCString rr=VhdlDocGen::parseForBinding(entity,arch);
}
else if (cur->includeName.isEmpty())
{
entity=cur->type;
}
ClassDef *classEntity= VhdlDocGen::findVhdlClass(entity.data());//Doxygen::classSDict->find(entity);
inst=VhdlDocGen::getIndexWord(cur->args.data(),0);
if (cd==0)
{
continue;
}
// if (classEntity==0)
// err("%s:%d:Entity:%s%s",cur->fileName.data(),cur->startLine,entity.data()," could not be found");
addInstance(classEntity,ar,cd,cur);
}
}
QCString VhdlDocGen::convertArgumentListToString ( const ArgumentList al,
bool  f 
)
static

Definition at line 1741 of file vhdldocgen.cpp.

References Argument::attrib, Argument::defval, Argument::name, and Argument::type.

Referenced by writeTagFile().

{
QCString argString;
bool sem=FALSE;
Argument *arg;
for (;(arg=ali.current());++ali)
{
if (sem) argString.append(", ");
if (func)
{
argString+=arg->name;
argString+=":";
argString+=arg->type;
}
else
{
argString+=arg->defval+" ";
argString+=arg->name+" :";
argString+=arg->attrib+" ";
argString+=arg->type;
}
sem=TRUE;
}
return argString;
}
QCString VhdlDocGen::convertFileNameToClassName ( QCString  name)
static

Definition at line 2632 of file vhdldocgen.cpp.

References Definition::name().

{
QCString n=name;
n=n.remove(0,6);
int i=0;
while((i=n.find("__"))>0)
{
n=n.remove(i,1);
}
while((i=n.find("_1"))>0)
{
n=n.replace(i,2,":");
}
return n;
}
void VhdlDocGen::createFlowChart ( const MemberDef mdef)
static

Definition at line 3316 of file vhdldocgen.cpp.

References FileDef::absFilePath(), findMemFlow(), VHDLLanguageScanner::finishTranslationUnit(), Definition::getEndBodyLine(), MemberDef::getFileDef(), Definition::getStartBodyLine(), mdList, VHDLLanguageScanner::parseInput(), Doxygen::parserManager, readCodeFragment(), setFlowMember(), and VHDLLanguageScanner::startTranslationUnit().

Referenced by DocVhdlFlow::parse().

{
if (mdef==0) return;
QCString codeFragment;
MemberDef* mm=0;
if((mm=findMemFlow(mdef))!=0)
{
// don't create the same flowchart twice
return;
}
else
{
mdList.append(mdef);
}
//fprintf(stderr,"\n create flow mem %s %p\n",mdef->name().data(),mdef);
int actualStart= mdef->getStartBodyLine();
int actualEnd=mdef->getEndBodyLine();
FileDef* fd=mdef->getFileDef();
bool b=readCodeFragment( fd->absFilePath().data(), actualStart,actualEnd,codeFragment);
if (!b) return;
Entry root;
QStrList filesInSameTu;
pIntf->parseInput("",codeFragment.data(),&root,FALSE,filesInSameTu);
}
void VhdlDocGen::deleteAllChars ( QCString &  s,
char  c 
)
static

Definition at line 1296 of file vhdldocgen.cpp.

Referenced by addBaseClass(), findFunction(), and initUCF().

{
int index=s.findRev(c,-1,FALSE);
while (index > -1)
{
QCString qcs=s.remove(index,1);
s=qcs;
index=s.findRev(c,-1,FALSE);
}
}
bool VhdlDocGen::deleteCharRev ( QCString &  s,
char  c 
)
static

deletes a char backwards in a string

Definition at line 1284 of file vhdldocgen.cpp.

Referenced by parseFuncProto().

{
int index=s.findRev(c,-1,FALSE);
if (index > -1)
{
QCString qcs=s.remove(index,1);
s=qcs;
return TRUE;
}
return FALSE;
}
void VhdlDocGen::findAllArchitectures ( QList< QCString > &  ql,
const ClassDef cd 
)
staticprivate

Definition at line 1070 of file vhdldocgen.cpp.

References ClassDef::className(), Doxygen::classSDict, SDict< ClassDef >::Iterator, and split().

Referenced by writeInlineClassLink().

{
ClassDef *citer;
for ( ; (citer=cli.current()) ; ++cli )
{
QCString jj=citer->className();
if (cd != citer && jj.contains('-')!=-1)
{
QStringList ql=QStringList::split("-",jj,FALSE);
QCString temp=ql[1].utf8();
if (qstricmp(cd->className(),temp)==0)
{
QCString *cl=new QCString(jj);
qll.insert(0,cl);
}
}
}// for
}//findAllArchitectures
void VhdlDocGen::findAllPackages ( ClassDef cdef)
static

finds all included packages of an Entity or Package

Definition at line 870 of file vhdldocgen.cpp.

References ClassDef::getMemberList(), getPackageName(), isPackage(), MemberListType_variableMembers, Definition::name(), and packages.

Referenced by findMember().

{
QList<ClassDef> cList;
if (packages.contains(cdef)) return;
MemberDef *md;
if (!mem) return;
MemberListIterator fmni(*mem);
for (fmni.toFirst();(md=fmni.current());++fmni)
{
{
if (cd)
{
cList.append(cd);
packages.insert(cdef,cList);
}
}
}//for
}// findAllPackages
ClassDef * VhdlDocGen::findArchitecture ( const ClassDef cd)
static

Definition at line 1090 of file vhdldocgen.cpp.

References Doxygen::classSDict, SDict< ClassDef >::Iterator, Definition::name(), and split().

{
ClassDef *citer;
QCString nn=cd->name();
for ( ; (citer=cli.current()) ; ++cli )
{
QCString jj=citer->name();
QStringList ql=QStringList::split(":",jj,FALSE);
if (ql.count()>1)
{
if (ql[0].utf8()==nn )
{
return citer;
}
}
}
return 0;
}
static ClassDef* VhdlDocGen::findArchitecture ( QCString  identifier,
QCString  entity_name 
)
static
bool VhdlDocGen::findConstraintFile ( LayoutNavEntry lne)
static

Definition at line 2794 of file vhdldocgen.cpp.

References LayoutNavEntry::addChild(), Config_getBool, convertNameToFile(), getDotImageExtension(), Doxygen::inputNameList, LayoutNavEntry::MainPage, FileDef::name(), LayoutNavEntry::parent(), theTranslator, and Translator::trDesignOverview().

{
//LayoutNavEntry *cc = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files);
uint count=Doxygen::inputNameList->count();
LayoutNavEntry *kk = lne->parent();// find(LayoutNavEntry::Files);
// LayoutNavEntry *kks = kk->parent();// find(LayoutNavEntry::Files);
QCString file;
QCString co("Constraints");
QCString imgExt = getDotImageExtension();
if (Config_getBool(HAVE_DOT) && imgExt=="svg")
{
QCString ov = theTranslator->trDesignOverview();
QCString ofile("vhdl_design_overview");
LayoutNavEntry *oo=new LayoutNavEntry( lne,LayoutNavEntry::MainPage,TRUE,ofile,ov,"");
kk->addChild(oo);
}
uint i=0;
while (i<count)
{
FileDef *fd=fn->at(i);
if (fd->name().contains(".ucf") || fd->name().contains(".qsf"))
{
file = convertNameToFile(fd->name().data(),FALSE,FALSE);
kk->addChild(ucf);
break;
}
i++;
}
return FALSE;
}
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.

References MemberDef::argumentList(), Argument::attrib, compareString(), deleteAllChars(), getClass(), ClassDef::getMemberList(), isProcedure(), isVhdlFunction(), MemberListType_pubMethods, Definition::name(), and Argument::type.

{
MemberDef* mdef=0;
//int funcType;
ClassDef *cdef=getClass(package.data());
if (cdef==0) return 0;
if (mem)
{
MemberListIterator fmni(*mem);
for (fmni.toFirst();(mdef=fmni.current());++fmni)
{
QCString mname=mdef->name();
if ((VhdlDocGen::isProcedure(mdef) || VhdlDocGen::isVhdlFunction(mdef)) && (compareString(funcname,mname)==0))
{
ArgumentList *alp = mdef->argumentList();
// ArgumentList* arg2=mdef->getArgumentList();
if (alp==0) break;
if (ali.count() != ali1.count()) break;
Argument *arg,*arg1;
int equ=0;
for (;(arg=ali.current()) && (arg1=ali1.current());++ali,++ali1)
{
equ+=abs(compareString(arg->type,arg1->type));
QCString s1=arg->type;
QCString s2=arg1->type;
equ+=abs(compareString(s1,s2));
s1=arg->attrib;
s2=arg1->attrib;
equ+=abs(compareString(s1,s2));
// printf("\n 1. type [%s] name [%s] attrib [%s]",arg->type,arg->name,arg->attrib);
// printf("\n 2. type [%s] name [%s] attrib [%s]",arg1->type,arg1->name,arg1->attrib);
} // for
if (equ==0) return mdef;
}//if
}//for
}//if
return mdef;
} //findFunction
QCString * VhdlDocGen::findKeyWord ( const QCString &  tmp)
static

returns the color of a keyword

Definition at line 667 of file vhdldocgen.cpp.

References g_vhdlKeyDict0(), g_vhdlKeyDict1(), g_vhdlKeyDict2(), and g_vhdlKeyDict3().

Referenced by writeFormatString(), writeFunctionProto(), and writeProcedureProto().

{
static QCString vhdlkeyword("vhdlkeyword");
static QCString vhdltype("comment");
static QCString vhdllogic("vhdllogic");
static QCString preprocessor("keywordflow");
QCString word=tmp.lower();
if (word.isEmpty() || word.at(0)=='\0') return 0;
if (g_vhdlKeyDict0.find(word))
return &preprocessor;
if (g_vhdlKeyDict1.find(word))
return &vhdltype;
if (g_vhdlKeyDict2.find(word))
return &vhdllogic;
if (g_vhdlKeyDict3.find(word))
return &vhdlkeyword;
return 0;
}
MemberDef * VhdlDocGen::findMember ( const QCString &  className,
const QCString &  memName 
)
static

Definition at line 717 of file vhdldocgen.cpp.

References ARCHITECTURECLASS, findAllPackages(), findMemberDef(), getClass(), Definition::getOuterScope(), MemberListType_pubMethods, MemberListType_variableMembers, Definition::name(), packages, PACKBODYCLASS, and ClassDef::protection().

Referenced by writeStringLink(), and writeVHDLTypeDocumentation().

{
ClassDef* cd,*ecd;
MemberDef *mdef=0;
cd=getClass(className);
//printf("VhdlDocGen::findMember(%s,%s)=%p\n",className.data(),memName.data(),cd);
if (cd==0) return 0;
if (mdef) return mdef;
if (mdef) return mdef;
// nothing found so far
// if we are an architecture or package body search in entity
{
// searching upper/lower case names
QCString tt=d->name();
ecd =getClass(tt);
if (!ecd)
{
tt=tt.upper();
ecd =getClass(tt);
}
if (!ecd)
{
tt=tt.lower();
ecd =getClass(tt);
}
if (ecd) //d && d->definitionType()==Definition::TypeClass)
{
//ClassDef *ecd = (ClassDef*)d;
if (mdef) return mdef;
if (mdef) return mdef;
}
}
{
QCString tt=d->name();
ClassDef *ecd =getClass(tt);
if (!ecd)
{
tt=tt.upper();
ecd =getClass(tt);
}
if (!ecd)
{
tt=tt.lower();
ecd =getClass(tt);
}
if (ecd) //d && d->definitionType()==Definition::TypeClass)
{
if(!packages.contains(ecd))
{
}
}
}
else
{
ecd=cd;
if (!packages.contains(ecd)) VhdlDocGen::findAllPackages(ecd);
}
QMap<ClassDef*,QList<ClassDef> >::Iterator cList=packages.find(ecd);
if (cList.key()!=0)
{
QList<ClassDef> mlist=cList.data();
for (uint j=0;j<mlist.count();j++)
{
if (mdef) return mdef;
if (mdef) return mdef;
}
}
return 0;
}//findMember
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.

References ClassDef::getMemberList(), Definition::name(), qli, Definition::symbolName(), and varMap.

Referenced by findMember().

{
MemberDef *md=0;
MemberList *ml=0;
QCString keyType=cd->symbolName()+"@"+key;
//printf("\n %s | %s | %s",cd->symbolName().data(),key.data(,),keyType.data());
QMap<QCString, MemberDef*>::Iterator it =varMap.find(keyType);
if (it.key())
{
md=it.data();
if (md)
{
return md;
}
}
if (qli.contains(cd))
{
return 0;
}
ml=cd->getMemberList(type);
qli.append(cd);
if (!ml)
{
return 0;
}
MemberListIterator fmni(*ml);
//int l=ml->count();
// fprintf(stderr,"\n loading entity %s %s: %d",cd->symbolName().data(),keyType.data(),l);
for (fmni.toFirst();(md=fmni.current());++fmni)
{
QCString tkey=cd->symbolName()+"@"+md->name();
if (varMap.contains(tkey))
{
continue;
}
varMap.insert(tkey.data(),md);
}
it=varMap.find(keyType.data());
if (it.key())
{
md=it.data();
if (md)
{
return md;
}
}
return 0;
}//findMemberDef
ClassDef * VhdlDocGen::findVhdlClass ( const char *  className)
static

Definition at line 2893 of file vhdldocgen.cpp.

References Doxygen::classSDict, SDict< ClassDef >::Iterator, and Definition::name().

Referenced by assignBinding(), and computeVhdlComponentRelations().

{
ClassDef *cd;
for (;(cd=cli.current());++cli)
{
if (qstricmp(className,cd->name().data())==0)
{
return cd;
}
}
return 0;
}
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.

References writeFormatString().

Referenced by writeFunctionProto(), writeProcedureProto(), writeRecorUnit(), writeRecUnitDocu(), writeUCFLink(), writeVHDLDeclaration(), and writeVHDLTypeDocumentation().

{
QCString qcs = s;
QCString temp;
qcs.stripPrefix(":");
qcs.stripPrefix("is");
qcs.stripPrefix("IS");
qcs.stripPrefix("of");
qcs.stripPrefix("OF");
// VhdlDocGen::deleteCharRev(qcs,';');
//char white='\t';
int len = qcs.length();
unsigned int index=1;//temp.length();
for (int j=0;j<len;j++)
{
char c=qcs[j];
char b=c;
if (j>0) b=qcs[j-1];
if (c=='"' || c==',' || c=='\''|| c=='(' || c==')' || c==':' || c=='[' || c==']' ) // || (c==':' && b!='=')) // || (c=='=' && b!='>'))
{
if (temp.length()>=index && temp.at(index-1) != ' ')
{
temp+=" ";
}
temp+=c;
temp+=" ";
}
else if (c=='=')
{
if (b==':') // := operator
{
temp.replace(index-1,1,"=");
temp+=" ";
}
else // = operator
{
temp+=" ";
temp+=c;
temp+=" ";
}
}
else
{
temp+=c;
}
index=temp.length();
}// for
temp=temp.stripWhiteSpace();
// printf("\n [%s]",qcs.data());
}
ClassDef * VhdlDocGen::getClass ( const char *  name)
static

Definition at line 693 of file vhdldocgen.cpp.

References Doxygen::classSDict, and SDict< T >::find().

Referenced by findFunction(), findMember(), getPackageName(), writeInlineClassLink(), and writeVHDLDeclaration().

{
if (name==0 || name[0]=='\0') return 0;
ClassDef *cd=0;
QCString temp(name);
//temp=temp.lower();
temp=temp.stripWhiteSpace();
cd= Doxygen::classSDict->find(temp.data());
return cd;
}
QCString VhdlDocGen::getClassName ( const ClassDef cd)
static

Definition at line 977 of file vhdldocgen.cpp.

References ClassDef::className(), Definition::name(), PACKBODYCLASS, ClassDef::protection(), and substitute().

Referenced by ClassDef::displayName(), getClassTitle(), and writeClassType().

{
QCString temp;
if (cd==0) return "";
{
temp=cd->name();
temp.stripPrefix("_");
return temp;
}
return substitute(cd->className(),"::",".");
}
QCString VhdlDocGen::getClassTitle ( const ClassDef cd)
static

returns the class title+ref

Definition at line 963 of file vhdldocgen.cpp.

References getClassName(), ClassDef::protection(), and theTranslator_vhdlType.

Referenced by ClassDef::title().

{
QCString pageTitle;
if (cd==0) return "";
pageTitle=VhdlDocGen::getClassName(cd);
int ii=cd->protection();
pageTitle+=" ";
pageTitle+=theTranslator_vhdlType(ii+2,TRUE);
pageTitle+=" ";
return pageTitle;
} // getClassTitle
const MemberDef * VhdlDocGen::getFlowMember ( )
static
QCString VhdlDocGen::getIndexWord ( const char *  c,
int  index 
)
static

Definition at line 1213 of file vhdldocgen.cpp.

References split().

Referenced by assignBinding(), computeVhdlComponentRelations(), parseFuncProto(), and startCodeBlock().

{
QStringList ql;
QCString temp(c);
QRegExp reg("[\\s:|]");
ql=QStringList::split(reg,temp,FALSE);
if (ql.count() > (unsigned int)index)
{
return ql[index].utf8();
}
return "";
}
ClassDef * VhdlDocGen::getPackageName ( const QCString &  name)
static

Definition at line 705 of file vhdldocgen.cpp.

References getClass().

Referenced by findAllPackages().

{
ClassDef* cd=0;
return cd;
}
QCString VhdlDocGen::getProcessNumber ( )
static

returns the next number of an anonymous process

Definition at line 1326 of file vhdldocgen.cpp.

{
static int stringCounter;
char buf[8];
QCString qcs("PROCESS_");
sprintf(buf,"%d",stringCounter++);
qcs.append(&buf[0]);
return qcs;
}
QCString VhdlDocGen::getProtectionName ( int  prot)
static

Definition at line 1230 of file vhdldocgen.cpp.

References ARCHITECTURECLASS, ENTITYCLASS, PACKAGECLASS, and PACKBODYCLASS.

Referenced by writeAnnotatedClassList(), and ClassDef::writeDeclarationLink().

{
return "entity";
return "architecture";
else if (prot==VhdlDocGen::PACKAGECLASS)
return "package";
else if (prot==VhdlDocGen::PACKBODYCLASS)
return "package body";
return "";
}
QCString VhdlDocGen::getRecordNumber ( )
static

returns the next number of a record|unit member

Definition at line 1314 of file vhdldocgen.cpp.

References recordCounter.

Referenced by initUCF(), startCodeBlock(), and writeVhdlEntityToolTip().

{
char buf[12];
sprintf(buf,"%d",recordCounter++);
QCString qcs(&buf[0]);
return qcs;
}
void VhdlDocGen::init ( )
static

Definition at line 570 of file vhdldocgen.cpp.

References g_vhdlKeyDict0(), g_vhdlKeyDict1(), g_vhdlKeyDict2(), and g_vhdlKeyDict3().

{
// vhdl keywords included VHDL 2008
const char* g_vhdlKeyWordMap0[] =
{
"abs","access","after","alias","all","and","architecture","array","assert","assume","assume_guarantee","attribute",
"begin","block","body","buffer","bus",
"case","component","configuration","constant","context","cover",
"default","disconnect","downto",
"else","elsif","end","entity","exit",
"fairness","file","for","force","function",
"generate","generic","group","guarded",
"if","impure","in","inertial","inout","is",
"label","library","linkage","literal","loop",
"map","mod",
"nand","new","next","nor","not","null",
"of","on","open","or","others","out",
"package","parameter","port","postponed","procedure","process","property","proctected","pure",
"range","record","register","reject","release","restrict","restrict_guarantee","rem","report","rol","ror","return",
"select","sequence","severity","signal","shared","sla","sll","sra","srl","strong","subtype",
"then","to","transport","type",
"unaffected","units","until","use",
"variable","vmode","vprop","vunit",
"wait","when","while","with",
"xor","xnor",
0
};
// type
const char* g_vhdlKeyWordMap1[] =
{
"natural","unsigned","signed","string","boolean", "bit","bit_vector","character",
"std_ulogic","std_ulogic_vector","std_logic","std_logic_vector","integer",
"real","float","ufixed","sfixed","time",0
};
// logic
const char* g_vhdlKeyWordMap2[] =
{
"abs","and","or","not","mod", "xor","rem","xnor","ror","rol","sla",
"sll",0
};
// predefined attributes
const char* g_vhdlKeyWordMap3[] =
{
"base","left","right","high","low","ascending",
"image","value","pos","val","succ","pred","leftof","rightof","left","right","high","low",
"range","reverse_range","length","ascending","delayed","stable","quiet","transaction","event",
"active","last_event","last_active","last_value","driving","driving_value","simple_name","instance_name","path_name",0
};
int j=0;
g_vhdlKeyDict0.setAutoDelete(TRUE);
g_vhdlKeyDict1.setAutoDelete(TRUE);
g_vhdlKeyDict2.setAutoDelete(TRUE);
g_vhdlKeyDict3.setAutoDelete(TRUE);
while (g_vhdlKeyWordMap0[j])
{
g_vhdlKeyDict0.insert(g_vhdlKeyWordMap0[j],
new QCString(g_vhdlKeyWordMap0[j]));
j++;
}
j=0;
while (g_vhdlKeyWordMap1[j])
{
g_vhdlKeyDict1.insert(g_vhdlKeyWordMap1[j],
new QCString(g_vhdlKeyWordMap1[j]));
j++;
}
j=0;
while (g_vhdlKeyWordMap2[j])
{
g_vhdlKeyDict2.insert(g_vhdlKeyWordMap2[j],
new QCString(g_vhdlKeyWordMap2[j]));
j++;
}
j=0;
while (g_vhdlKeyWordMap3[j])
{
g_vhdlKeyDict3.insert(g_vhdlKeyWordMap3[j],
new QCString(g_vhdlKeyWordMap3[j]));
j++;
}
}// buildKeyMap
bool VhdlDocGen::isAlias ( const MemberDef mdef)
static

Definition at line 3361 of file vhdldocgen.cpp.

References ALIAS, and MemberDef::getMemberSpecifiers().

Referenced by writeTagFile().

bool VhdlDocGen::isArchitecture ( const MemberDef mdef)
static

Definition at line 3395 of file vhdldocgen.cpp.

References ARCHITECTURE, and MemberDef::getMemberSpecifiers().

bool VhdlDocGen::isAttribute ( const MemberDef mdef)
static

Definition at line 3387 of file vhdldocgen.cpp.

References ATTRIBUTE, and MemberDef::getMemberSpecifiers().

Referenced by writeTagFile().

bool VhdlDocGen::isCompInst ( const MemberDef mdef)
static
bool VhdlDocGen::isComponent ( const MemberDef mdef)
static

Definition at line 3369 of file vhdldocgen.cpp.

References COMPONENT, and MemberDef::getMemberSpecifiers().

Referenced by writeTagFile(), and writeVHDLDeclaration().

bool VhdlDocGen::isConfig ( const MemberDef mdef)
static

Definition at line 3359 of file vhdldocgen.cpp.

References CONFIG, and MemberDef::getMemberSpecifiers().

Referenced by writeVHDLDeclaration().

bool VhdlDocGen::isConstant ( const MemberDef mdef)
static

Definition at line 3375 of file vhdldocgen.cpp.

References CONSTANT, and MemberDef::getMemberSpecifiers().

Referenced by writeTagFile().

bool VhdlDocGen::isConstraint ( const MemberDef mdef)
static

Definition at line 3357 of file vhdldocgen.cpp.

References MemberDef::getMemberSpecifiers(), and UCF_CONST.

Referenced by writeVHDLTypeDocumentation().

bool VhdlDocGen::isEntity ( const MemberDef mdef)
static

Definition at line 3373 of file vhdldocgen.cpp.

References ENTITY, and MemberDef::getMemberSpecifiers().

Referenced by writeTagFile().

bool VhdlDocGen::isFile ( const MemberDef mdef)
static

Definition at line 3403 of file vhdldocgen.cpp.

References MemberDef::getMemberSpecifiers(), and VFILE.

Referenced by writeTagFile().

bool VhdlDocGen::isGeneric ( const MemberDef mdef)
static

Definition at line 3365 of file vhdldocgen.cpp.

References GENERIC, and MemberDef::getMemberSpecifiers().

Referenced by writeTagFile(), and writeVHDLTypeDocumentation().

bool VhdlDocGen::isGroup ( const MemberDef mdef)
static

Definition at line 3405 of file vhdldocgen.cpp.

References MemberDef::getMemberSpecifiers(), and GROUP.

Referenced by writeTagFile().

bool VhdlDocGen::isLibrary ( const MemberDef mdef)
static

Definition at line 3363 of file vhdldocgen.cpp.

References MemberDef::getMemberSpecifiers(), and LIBRARY.

Referenced by writeTagFile(), and writeVHDLTypeDocumentation().

bool VhdlDocGen::isMisc ( const MemberDef mdef)
static
bool VhdlDocGen::isNumber ( const QCString &  s)
static

returns TRUE if this string is a number

Definition at line 1412 of file vhdldocgen.cpp.

Referenced by writeFormatString().

{
static QRegExp regg("[0-9][0-9eEfFbBcCdDaA_.#-+?xXzZ]*");
if (s.isEmpty()) return FALSE;
int j,len;
j = regg.match(s.data(),0,&len);
if ((j==0) && (len==(int)s.length())) return TRUE;
return FALSE;
}// isNumber
bool VhdlDocGen::isPackage ( const MemberDef mdef)
static
bool VhdlDocGen::isPackageBody ( const MemberDef mdef)
static

Definition at line 3399 of file vhdldocgen.cpp.

References MemberDef::getMemberSpecifiers(), and PACKAGE_BODY.

bool VhdlDocGen::isPort ( const MemberDef mdef)
static

Definition at line 3367 of file vhdldocgen.cpp.

References MemberDef::getMemberSpecifiers(), and PORT.

Referenced by writeTagFile(), and writeVHDLTypeDocumentation().

bool VhdlDocGen::isProcedure ( const MemberDef mdef)
static
bool VhdlDocGen::isProcess ( const MemberDef mdef)
static
bool VhdlDocGen::isRecord ( const MemberDef mdef)
static

Definition at line 3393 of file vhdldocgen.cpp.

References MemberDef::getMemberSpecifiers(), and RECORD.

Referenced by writeTagFile().

bool VhdlDocGen::isSignal ( const MemberDef mdef)
static

Definition at line 3385 of file vhdldocgen.cpp.

References MemberDef::getMemberSpecifiers(), and SIGNAL.

bool VhdlDocGen::isSignals ( const MemberDef mdef)
static

Definition at line 3389 of file vhdldocgen.cpp.

References MemberDef::getMemberSpecifiers(), and SIGNAL.

Referenced by writeTagFile().

bool VhdlDocGen::isSubClass ( ClassDef cd,
ClassDef scd,
bool  followInstances,
int  level 
)
static

Definition at line 3234 of file vhdldocgen.cpp.

References err(), ClassDef::isBaseClass(), Definition::name(), ClassDef::subClasses(), and ClassDef::templateMaster().

Referenced by addInstance().

{
bool found=FALSE;
//printf("isBaseClass(cd=%s) looking for %s\n",name().data(),bcd->name().data());
if (level>255)
{
err("Possible recursive class relation while inside %s and looking for %s\n",qPrint(cd->name()),qPrint(scd->name()));
abort();
return FALSE;
}
if (cd->subClasses())
{
for ( ; bcli.current() && !found ; ++bcli)
{
ClassDef *ccd=bcli.current()->classDef;
if (!followInstances && ccd->templateMaster()) ccd=ccd->templateMaster();
//printf("isSubClass() subclass %s\n",ccd->name().data());
if (ccd==scd)
{
found=TRUE;
}
else
{
if (level <256)
{
found=ccd->isBaseClass(scd,followInstances,level+1);
}
}
}
}
return found;
}
bool VhdlDocGen::isSubType ( const MemberDef mdef)
static

Definition at line 3379 of file vhdldocgen.cpp.

References MemberDef::getMemberSpecifiers(), and SUBTYPE.

Referenced by writeTagFile().

bool VhdlDocGen::isUnit ( const MemberDef mdef)
static

Definition at line 3397 of file vhdldocgen.cpp.

References MemberDef::getMemberSpecifiers(), and UNITS.

bool VhdlDocGen::isVariable ( const MemberDef mdef)
static

Definition at line 3401 of file vhdldocgen.cpp.

References MemberDef::getMemberSpecifiers(), and SHAREDVARIABLE.

Referenced by writeTagFile().

static bool VhdlDocGen::isVhdlClass ( const Entry cu)
inlinestatic
bool VhdlDocGen::isVhdlFunction ( const MemberDef mdef)
static
bool VhdlDocGen::isVType ( const MemberDef mdef)
static

Definition at line 3377 of file vhdldocgen.cpp.

References MemberDef::getMemberSpecifiers(), and TYPE.

Referenced by writeTagFile().

QCString VhdlDocGen::parseForBinding ( QCString &  entity,
QCString &  arch 
)
static

Definition at line 2862 of file vhdldocgen.cpp.

References split().

Referenced by assignBinding(), and computeVhdlComponentRelations().

{
int index;
QRegExp exp("[()\\s]");
QCString label="";
QStringList ql=QStringList::split(exp,entity,FALSE);
if (ql.contains("open"))
{
return "open";
}
label=ql[0].utf8();
entity = ql[1].utf8();
if ((index=entity.findRev("."))>=0)
{
entity.remove(0,index+1);
}
if (ql.count()==3)
{
arch=ql[2].utf8();
}
return label;
}
QCString VhdlDocGen::parseForConfig ( QCString &  entity,
QCString &  arch 
)
static

Definition at line 2831 of file vhdldocgen.cpp.

References split().

{
int index;
QCString label;
if (!entity.contains(":")) return "";
QRegExp exp("[:()\\s]");
QStringList ql=QStringList::split(exp,entity,FALSE);
//int ii=ql.findIndex(ent);
assert(ql.count()>=2);
label = ql[0].utf8();
entity = ql[1].utf8();
if ((index=entity.findRev("."))>=0)
{
entity.remove(0,index+1);
}
if (ql.count()==3)
{
arch= ql[2].utf8();
ql=QStringList::split(exp,arch,FALSE);
if (ql.count()>1) // expression
{
arch="";
}
}
return label; // label
}
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.

References deleteCharRev(), and getIndexWord().

{
(void)qlist; //unused
int index,end;
QCString s1(text);
QCString temp;
index=s1.find("(");
end=s1.findRev(")");
if ((end-index)>0)
{
temp=s1.mid(index+1,(end-index-1));
//getFuncParams(qlist,temp);
}
if (doc)
{
name=s1.left(index);
name=name.stripWhiteSpace();
if ((end-index)>0)
{
ret="function";
}
return;
}
else
{
QCString s1(text);
s1=s1.stripWhiteSpace();
int i=s1.find("(",0,FALSE);
int s=s1.find(QRegExp("[ \\t]"));
if (i==-1 || i<s)
s1=VhdlDocGen::getIndexWord(s1.data(),1);
else // s<i, s=start of name, i=end of name
s1=s1.mid(s,(i-s));
name=s1.stripWhiteSpace();
}
index=s1.findRev("return",-1,FALSE);
if (index !=-1)
{
ret=s1.mid(index+6,s1.length());
ret=ret.stripWhiteSpace();
}
}
void VhdlDocGen::parseUCF ( const char *  input,
Entry entity,
QCString  f,
bool  vendor 
)
static

Definition at line 2653 of file vhdldocgen.cpp.

References brief, comment, and initUCF().

Referenced by VHDLLanguageScanner::parseInput().

{
QCString ucFile(input);
int lineNo=0;
QCString comment("#!");
QCString brief;
while (!ucFile.isEmpty())
{
int i=ucFile.find("\n");
if (i<0) break;
lineNo++;
QCString temp=ucFile.left(i);
temp=temp.stripWhiteSpace();
bool bb=temp.stripPrefix("//");
if (!temp.isEmpty())
{
if (temp.stripPrefix(comment) )
{
brief+=temp;
brief.append("\\n");
}
else if (!temp.stripPrefix("#") && !bb)
{
if (altera)
{
int i=temp.find("-name");
if (i>0)
{
temp=temp.remove(0,i+5);
}
temp.stripPrefix("set_location_assignment");
initUCF(entity,0,temp,lineNo,fileName,brief);
}
else
{
QRegExp ee("[\\s=]");
int i=temp.find(ee);
QCString ff=temp.left(i);
temp.stripPrefix(ff.data());
ff.append("#");
if (!temp.isEmpty())
{
initUCF(entity,ff.data(),temp,lineNo,fileName,brief);
}
}
}
}//temp
ucFile=ucFile.remove(0,i+1);
}// while
}
void VhdlDocGen::prepareComment ( QCString &  qcs)
static

strips the "&ndash;" prefixes of vhdl comments

Definition at line 1138 of file vhdldocgen.cpp.

Referenced by checkMultiComment(), and startCodeBlock().

{
const char* s="--!";
int index=0;
while (TRUE)
{
index=qcs.find(s,0,TRUE);
if (index<0) break;
qcs=qcs.remove(index,qstrlen(s));
}
qcs=qcs.stripWhiteSpace();
}
void VhdlDocGen::resetCodeVhdlParserState ( )
static

Definition at line 3350 of file vhdldocgen.cpp.

References packages, qli, and varMap.

Referenced by VHDLLanguageScanner::parseInput().

{
varMap.clear();
qli.clear();
packages.clear();
}
void VhdlDocGen::setFlowMember ( const MemberDef flowMember)
static

Definition at line 90 of file vhdldocgen.cpp.

Referenced by createFlowChart(), and OutputList::writeDoc().

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

Definition at line 2515 of file vhdldocgen.cpp.

Referenced by LayoutParser::startNavEntry(), and ClassHierarchyContext::Private::title().

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

Definition at line 2536 of file vhdldocgen.cpp.

Referenced by RTFGenerator::endIndexSection(), and writeIndex().

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

Definition at line 2520 of file vhdldocgen.cpp.

Referenced by LayoutParser::startNavEntry(), and ClassTreeContext::Private::title().

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

Definition at line 2530 of file vhdldocgen.cpp.

Referenced by LayoutParser::startNavEntry().

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

Definition at line 2525 of file vhdldocgen.cpp.

Referenced by LayoutParser::startNavEntry().

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

Definition at line 2541 of file vhdldocgen.cpp.

Referenced by LayoutParser::startNavEntry(), and ClassIndexContext::Private::title().

{
return "Design Units";
}
QCString VhdlDocGen::trFunctionAndProc ( )
static
QCString VhdlDocGen::trTypeString ( uint64  type)
static

Definition at line 1244 of file vhdldocgen.cpp.

References ALIAS, ARCHITECTURE, ATTRIBUTE, COMPONENT, CONFIG, CONSTANT, ENTITY, FUNCTION, GENERIC, GROUP, INSTANTIATION, LIBRARY, MISCELLANEOUS, PACKAGE, PACKAGE_BODY, PORT, PROCEDURE, PROCESS, RECORD, SHAREDVARIABLE, SIGNAL, SUBTYPE, TYPE, UCF_CONST, UNITS, USE, and VFILE.

Referenced by MemberDef::getLabels(), and writeClassType().

{
switch(type)
{
case VhdlDocGen::LIBRARY: return "Library";
case VhdlDocGen::ENTITY: return "Entity";
case VhdlDocGen::PACKAGE_BODY: return "Package Body";
case VhdlDocGen::ATTRIBUTE: return "Attribute";
case VhdlDocGen::PACKAGE: return "Package";
case VhdlDocGen::SIGNAL: return "Signal";
case VhdlDocGen::COMPONENT: return "Component";
case VhdlDocGen::CONSTANT: return "Constant";
case VhdlDocGen::TYPE: return "Type";
case VhdlDocGen::SUBTYPE: return "Subtype";
case VhdlDocGen::FUNCTION: return "Function";
case VhdlDocGen::RECORD: return "Record";
case VhdlDocGen::PROCEDURE: return "Procedure";
case VhdlDocGen::ARCHITECTURE: return "Architecture";
case VhdlDocGen::USE: return "Package";
case VhdlDocGen::PROCESS: return "Process";
case VhdlDocGen::PORT: return "Port";
case VhdlDocGen::GENERIC: return "Generic";
case VhdlDocGen::UNITS: return "Units";
//case VhdlDocGen::PORTMAP: return "Port Map";
case VhdlDocGen::SHAREDVARIABLE: return "Shared Variable";
case VhdlDocGen::GROUP: return "Group";
case VhdlDocGen::VFILE: return "File";
case VhdlDocGen::INSTANTIATION: return "Instantiation";
case VhdlDocGen::ALIAS: return "Alias";
case VhdlDocGen::CONFIG: return "Configuration";
case VhdlDocGen::MISCELLANEOUS: return "Miscellaneous";
case VhdlDocGen::UCF_CONST: return "Constraints";
default: return "";
}
} // convertType
QCString VhdlDocGen::trVhdlType ( uint64  type,
bool  sing = true 
)
static

Definition at line 2429 of file vhdldocgen.cpp.

References ALIAS, ARCHITECTURE, ATTRIBUTE, COMPONENT, CONFIG, CONSTANT, ENTITY, FUNCTION, GENERIC, GROUP, INSTANTIATION, LIBRARY, MISCELLANEOUS, PACKAGE, PACKAGE_BODY, PORT, PROCEDURE, PROCESS, RECORD, SHAREDVARIABLE, SIGNAL, SUBTYPE, TYPE, UCF_CONST, UNITS, USE, and VFILE.

Referenced by LayoutParser::init(), ClassDef::internalInsertMember(), ClassDef::writeDeclarationLink(), and ClassDef::writeMemberList().

{
switch(type)
{
if (sing) return "Library";
else return "Libraries";
if (sing) return "Package";
else return "Packages";
if (sing) return "Signal";
else return "Signals";
if (sing) return "Component";
else return "Components";
if (sing) return "Constant";
else return "Constants";
if (sing) return "Entity";
else return "Entities";
if (sing) return "Type";
else return "Types";
if (sing) return "Subtype";
else return "Subtypes";
if (sing) return "Function";
else return "Functions";
if (sing) return "Record";
else return "Records";
if (sing) return "Procedure";
else return "Procedures";
if (sing) return "Architecture";
else return "Architectures";
if (sing) return "Attribute";
else return "Attributes";
if (sing) return "Process";
else return "Processes";
if (sing) return "Port";
else return "Ports";
if (sing) return "use clause";
else return "Use Clauses";
if (sing) return "Generic";
else return "Generics";
return "Package Body";
return "Units";
if (sing) return "Shared Variable";
return "Shared Variables";
if (sing) return "File";
return "Files";
if (sing) return "Group";
return "Groups";
if (sing) return "Instantiation";
else return "Instantiations";
if (sing) return "Alias";
return "Aliases";
if (sing) return "Configuration";
return "Configurations";
return "Miscellaneous";
return "Constraints";
default:
return "Class";
}
}
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.

References OutputList::endBold(), getClassName(), ClassDef::protection(), OutputList::startBold(), trTypeString(), and OutputList::writeString().

{
int id=cd->protection();
QCString qcs = VhdlDocGen::trTypeString(id+2);
ol.startBold();
ol.writeString(qcs.data());
ol.writeString(" ");
ol.endBold();
//ol.insertMemberAlign();
return FALSE;
}// writeClassLink
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.

References OutputList::docify(), OutputList::endBold(), findKeyWord(), isNumber(), OutputList::startBold(), startFonts(), and writeStringLink().

Referenced by formatString(), writeFuncProcDocu(), and writeProcessProto().

{
QRegExp reg("[\\[\\]\\.\\/\\:\\<\\>\\:\\s\\,\\;\\'\\+\\-\\*\\|\\&\\=\\(\\)\"]");
QCString qcs = s;
qcs+=QCString(" ");// parsing the last sign
QCString *ss;
QCString find=qcs;
QCString temp=qcs;
char buf[2];
buf[1]='\0';
int j;
int len;
j = reg.match(temp.data(),0,&len);
ol.startBold();
if (j>=0)
{
while (j>=0)
{
find=find.left(j);
buf[0]=temp[j];
bool k=isNumber(find); // is this a number
if (k)
{
ol.docify(" ");
startFonts(find,"vhdldigit",ol);
ol.docify(" ");
}
else if (j != 0 && ss)
{
startFonts(find,ss->data(),ol);
}
else
{
if (j>0)
{
}
}
startFonts(&buf[0],"vhdlchar",ol);
QCString st=temp.remove(0,j+1);
find=st;
if (!find.isEmpty() && find.at(0)=='"')
{
int ii=find.find('"',2);
if (ii>1)
{
QCString com=find.left(ii+1);
startFonts(com,"keyword",ol);
temp=find.remove(0,ii+1);
}
}
else
{
temp=st;
}
j = reg.match(temp.data(),0,&len);
}//while
}//if
else
{
startFonts(find,"vhdlchar",ol);
}
ol.endBold();
}// writeFormatString
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.

References Argument::attrib, Argument::defval, OutputList::disable(), OutputList::docify(), OutputList::enable(), OutputList::enableAll(), OutputList::endEmphasis(), OutputList::endMemberDocName(), OutputList::endParameterName(), OutputList::endParameterType(), isProcedure(), isProcess(), isVhdlFunction(), OutputGenerator::Man, Argument::name, OutputList::startEmphasis(), startFonts(), OutputList::startParameterList(), OutputList::startParameterName(), OutputList::startParameterType(), Argument::type, and writeFormatString().

Referenced by writeVHDLTypeDocumentation().

{
if (al==0) return FALSE;
//bool sem=FALSE;
ol.enableAll();
int index=ali.count();
if (index==0)
{
ol.docify(" ( ) ");
return FALSE;
}
//ol.startParameterName(FALSE);
Argument *arg;
bool first=TRUE;
for (;(arg=ali.current());++ali)
{
ol.startParameterType(first,"");
// if (first) ol.writeChar('(');
QCString attl=arg->defval;
bool bGen=attl.stripPrefix("gen!");
if (bGen)
VhdlDocGen::writeFormatString(QCString("generic "),ol,md);
{
startFonts(arg->defval,"keywordtype",ol);
ol.docify(" ");
}
{
startFonts(arg->attrib,"stringliteral",ol);
}
{
startFonts(QCString("in"),"stringliteral",ol);
}
ol.docify(" ");
{
// startFonts(arg->type,"vhdlkeyword",ol);
}
if (--index)
{
ol.docify(" , ");
}
else
{
// ol.docify(" ) ");
ol.endParameterName(TRUE,FALSE,TRUE);
break;
}
ol.endParameterName(FALSE,FALSE,FALSE);
//sem=TRUE;
first=FALSE;
}
//ol.endParameterList();
return TRUE;
} // writeDocFunProc
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.

References Argument::attrib, Argument::defval, OutputList::docify(), OutputList::endBold(), MemberDef::excpString(), findKeyWord(), formatString(), OutputList::insertMemberAlign(), OutputList::lineBreak(), Argument::name, OutputList::startBold(), startFonts(), and Argument::type.

Referenced by writeVHDLDeclaration().

{
if (al==0) return;
Argument *arg;
bool sem=FALSE;
int len=al->count();
ol.startBold();
ol.docify(" ( ");
ol.endBold();
if (len>2)
{
ol.lineBreak();
}
for (;(arg=ali.current());++ali)
{
ol.startBold();
QCString att=arg->defval;
bool bGen=att.stripPrefix("gen!");
if (sem && len < 3)
{
ol.docify(" , ");
}
if (bGen)
{
VhdlDocGen::formatString(QCString("generic "),ol,mdef);
}
if (!att.isEmpty())
{
QCString *str=VhdlDocGen::findKeyWord(att);
att+=" ";
if (str)
else
startFonts(att,"vhdlchar",ol);
}
QCString nn=arg->name;
nn+=": ";
QCString ss=arg->type.stripWhiteSpace(); //.lower();
QCString w=ss.stripWhiteSpace();//.upper();
startFonts(nn,"vhdlchar",ol);
startFonts("in ","stringliteral",ol);
QCString *str=VhdlDocGen::findKeyWord(ss);
if (str)
else
startFonts(w,"vhdlchar",ol);
if (arg->attrib)
startFonts(arg->attrib,"vhdlchar",ol);
sem=TRUE;
ol.endBold();
if (len > 2)
{
ol.lineBreak();
}
}
ol.startBold();
ol.docify(" )");
const char *exp=mdef->excpString();
if (exp)
{
ol.startBold();
ol.docify("[ ");
ol.docify(exp);
ol.docify(" ]");
ol.endBold();
}
ol.endBold();
}
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.

References ARCHITECTURE, ClassDef::className(), OutputList::disable(), OutputList::enable(), ENTITY, findAllArchitectures(), getClass(), OutputGenerator::Man, PACKAGE, PACKAGE_BODY, ClassDef::protection(), OutputGenerator::RTF, split(), theTranslator_vhdlType, and writeVhdlLink().

Referenced by ClassDef::writeMemberDeclarations().

{
QList<QCString> ql;
ql.setAutoDelete(TRUE);
QCString nn=cd->className();
int ii=(int)cd->protection()+2;
QCString type;
else if (ii==VhdlDocGen::PACKAGE)
else
type+="";
//type=type.lower();
type+=" >> ";
{
nn.stripPrefix("_");
cd=getClass(nn.data());
}
else if (ii==VhdlDocGen::PACKAGE)
{
nn.prepend("_");
cd=getClass(nn.data());
}
{
QStringList qlist=QStringList::split("-",nn,FALSE);
nn=qlist[1].utf8();
cd=VhdlDocGen::getClass(nn.data());
}
QCString opp;
{
int j=ql.count();
for (int i=0;i<j;i++)
{
QCString *temp=ql.at(i);
QStringList qlist=QStringList::split("-",*temp,FALSE);
QCString s1=qlist[0].utf8();
QCString s2=qlist[1].utf8();
s1.stripPrefix("_");
if (j==1) s1.resize(0);
ClassDef*cc = getClass(temp->data());
if (cc)
{
VhdlDocGen::writeVhdlLink(cc,ol,type,s2,s1);
}
}
}
else
{
VhdlDocGen::writeVhdlLink(cd,ol,type,nn,opp);
}
}// write
static void VhdlDocGen::writeOverview ( OutputList ol)
static
void VhdlDocGen::writeOverview ( )
static

Definition at line 179 of file vhdldocgen.cpp.

References ClassDef::baseClasses(), BaseClassDef::classDef, Doxygen::classSDict, Config_getString, createSVG(), endDot(), endTabel(), ENTITYCLASS, getPorts(), SDict< ClassDef >::Iterator, Definition::name(), ClassDef::protection(), startDot(), startTable(), writeClassToDot(), writeTable(), writeVhdlDotLink(), and writeVhdlEntityToolTip().

{
ClassDef *cd;
bool found=FALSE;
for ( ; (cd=cli.current()) ; ++cli )
{
{
found=TRUE;
break;
}
}
if (!found) return;
QCString ov =Config_getString(HTML_OUTPUT);
QCString fileName=ov+"/vhdl_design.dot";
QFile f(fileName);
FTextStream t(&f);
if (!f.open(IO_WriteOnly))
{
fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data());
return;
}
for (cli.toFirst() ; (cd=cli.current()) ; ++cli )
{
{
continue;
}
QList<MemberDef>* port= getPorts(cd);
if (port==0)
{
continue;
}
if (port->count()==0)
{
delete port;
port=NULL;
continue;
}
startTable(t,cd->name());
writeTable(port,t);
// writeVhdlPortToolTip(t,port,cd);
delete port;
if (bl)
{
for ( ; (bcd=bcli.current()) ; ++bcli )
{
ClassDef *bClass=bcd->classDef;
QCString dotn=cd->name()+":";
dotn+=cd->name();
QCString csc=bClass->name()+":";
csc+=bClass->name();
// fprintf(stderr,"\n <%s| %s>",dotn.data(),csc.data());
writeVhdlDotLink(t,dotn,csc,0);
}
}// if bl
}// for
endDot(t);
// writePortLinks(t);
f.close();
}
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.

References SDict< T >::append(), SDict< T >::clear(), OutputList::endMemberList(), SDict< T >::find(), MemberDef::getMemberSpecifiers(), MemberDef::isBriefSectionVisible(), LIBRARY, Definition::name(), SDict< T >::setAutoDelete(), OutputList::startMemberList(), and writeVHDLDeclaration().

Referenced by writeVHDLDeclarations().

{
SDict<QCString> pack(1009);
pack.setAutoDelete(TRUE);
bool first=TRUE;
MemberDef *md;
MemberListIterator mli(*mlist);
for ( ; (md=mli.current()); ++mli )
{
int mems=md->getMemberSpecifiers();
if (md->isBriefSectionVisible() && (mems==specifier) && (mems!=VhdlDocGen::LIBRARY) )
{
if (first) { ol.startMemberList();first=FALSE; }
VhdlDocGen::writeVHDLDeclaration(md,ol,cd,nd,fd,gd,FALSE);
} //if
else if (md->isBriefSectionVisible() && (mems==specifier))
{
if (!pack.find(md->name().data()))
{
if (first) ol.startMemberList(),first=FALSE;
VhdlDocGen::writeVHDLDeclaration(md,ol,cd,nd,fd,gd,FALSE);
pack.append(md->name().data(),new QCString(md->name().data()));
}
} //if
} //for
if (!first) ol.endMemberList();
pack.clear();
}//plainDeclaration
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.

References Argument::attrib, Argument::defval, OutputList::docify(), OutputList::endBold(), findKeyWord(), formatString(), OutputList::lineBreak(), Argument::name, OutputList::startBold(), startFonts(), Argument::type, and OutputList::writeChar().

Referenced by writeVHDLDeclaration().

{
Argument *arg;
bool sem=FALSE;
int len=al->count();
ol.docify("( ");
if (len > 2)
{
ol.lineBreak();
}
for (;(arg=ali.current());++ali)
{
ol.startBold();
if (sem && len <3)
ol.writeChar(',');
QCString nn=arg->name;
nn+=": ";
QCString *str=VhdlDocGen::findKeyWord(arg->defval);
arg->defval+=" ";
if (str)
{
startFonts(arg->defval,str->data(),ol);
}
else
{
startFonts(arg->defval,"vhdlchar",ol); // write type (variable,constant etc.)
}
startFonts(nn,"vhdlchar",ol); // write name
if (qstricmp(arg->attrib,arg->type) != 0)
{
startFonts(arg->attrib.lower(),"stringliteral",ol); // write in|out
}
ol.docify(" ");
sem=TRUE;
ol.endBold();
if (len > 2)
{
ol.lineBreak();
ol.docify(" ");
}
}//for
ol.docify(" )");
}
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.

References OutputList::docify(), OutputList::endBold(), Argument::name, OutputList::startBold(), and writeFormatString().

Referenced by writeVHDLDeclaration().

{
if (al==0) return;
Argument *arg;
bool sem=FALSE;
ol.startBold();
ol.docify(" ( ");
for (;(arg=ali.current());++ali)
{
if (sem)
{
ol.docify(" , ");
}
QCString nn=arg->name;
// startFonts(nn,"vhdlchar",ol);
sem=TRUE;
}
ol.docify(" )");
ol.endBold();
}
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.

References formatString(), OutputList::lineBreak(), and split().

Referenced by writeVHDLDeclaration().

{
QStringList ql=QStringList::split("#",largs,FALSE);
uint len=ql.count();
for(uint i=0;i<len;i++)
{
QCString n=ql[i].utf8();
if ((len-i)>1) ol.lineBreak();
}
}
void VhdlDocGen::writeRecUnitDocu ( const MemberDef md,
OutputList ol,
QCString  largs 
)
staticprivate

Definition at line 3200 of file vhdldocgen.cpp.

References OutputList::endParameterName(), OutputList::endParameterType(), formatString(), split(), OutputList::startParameterList(), OutputList::startParameterName(), and OutputList::startParameterType().

Referenced by writeVHDLTypeDocumentation().

{
QStringList ql=QStringList::split("#",largs,FALSE);
uint len=ql.count();
bool first=TRUE;
for(uint i=0;i<len;i++)
{
QCString n=ql[i].utf8();
ol.startParameterType(first,"");
if ((len-i)>1)
{
ol.endParameterName(FALSE,FALSE,FALSE);
}
else
{
ol.endParameterName(TRUE,FALSE,TRUE);
}
first=FALSE;
}
}//#
void VhdlDocGen::writeSource ( MemberDef mdef,
OutputList ol,
QCString &  cname 
)
static

Definition at line 2578 of file vhdldocgen.cpp.

References MemberDef::documentation(), OutputList::endCodeFragment(), Definition::getEndBodyLine(), MemberDef::getFileDef(), ParserManager::getParser(), Definition::getStartBodyLine(), ParserInterface::parseCode(), Doxygen::parserManager, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), SrcLangExt_VHDL, OutputList::startCodeFragment(), and writeLink().

Referenced by MemberDef::writeDocumentation(), and writeVHDLDeclaration().

{
// pIntf->resetCodeParserState();
QCString codeFragment=mdef->documentation();
if (cname.isEmpty())
{
writeLink(mdef,ol);
int fi=0;
int j=0;
do
{
fi=codeFragment.find("\n",++fi);
} while(fi>=0 && j++ <3);
// show only the first four lines
if (j==4)
{
codeFragment=codeFragment.left(fi);
codeFragment.append("\n .... ");
}
}
codeFragment.prepend("\n");
pIntf->parseCode(ol, // codeOutIntf
0, // scope
codeFragment, // input
SrcLangExt_VHDL, // lang
FALSE, // isExample
0, // exampleName
mdef->getFileDef(), // fileDef
mdef->getStartBodyLine(), // startLine
mdef->getEndBodyLine(), // endLine
TRUE, // inlineFragment
mdef, // memberDef
TRUE // show line numbers
);
if (cname.isEmpty()) return;
mdef->writeSourceDef(ol,cname);
mdef->writeSourceRefs(ol,cname);
mdef->writeSourceReffedBy(ol,cname);
}
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.

References OutputList::docify(), OutputList::endBold(), findMember(), MemberDef::getClassDef(), MemberDef::isLinkable(), Definition::name(), OutputList::startBold(), startFonts(), and writeLink().

Referenced by writeFormatString().

{
if (mdef)
{
ClassDef *cd=mdef->getClassDef();
if (cd)
{
QCString n=cd->name();
if (memdef && memdef->isLinkable())
{
ol.startBold();
writeLink(memdef,ol);
ol.endBold();
ol.docify(" ");
return;
}
}
}
startFonts(mem,"vhdlchar",ol);
}// found component
void VhdlDocGen::writeTagFile ( MemberDef mdef,
FTextStream tagFile 
)
static

Definition at line 1920 of file vhdldocgen.cpp.

References MemberDef::anchor(), MemberDef::argsString(), MemberDef::argumentList(), convertArgumentListToString(), convertToXML(), endl(), MemberDef::getOutputFileBase(), Doxygen::htmlFileExtension, isAlias(), isAttribute(), isCompInst(), isComponent(), isConstant(), isEntity(), isFile(), isGeneric(), isGroup(), isLibrary(), isPackage(), isPort(), isProcedure(), isProcess(), isRecord(), isSignals(), isSubType(), isVariable(), isVhdlFunction(), isVType(), Definition::name(), MemberDef::typeString(), and Definition::writeDocAnchorsToTagFile().

Referenced by MemberList::writeTagFile().

{
tagFile << " <member kind=\"";
if (VhdlDocGen::isGeneric(mdef)) tagFile << "generic";
if (VhdlDocGen::isPort(mdef)) tagFile << "port";
if (VhdlDocGen::isEntity(mdef)) tagFile << "entity";
if (VhdlDocGen::isComponent(mdef)) tagFile << "component";
if (VhdlDocGen::isVType(mdef)) tagFile << "type";
if (VhdlDocGen::isConstant(mdef)) tagFile << "constant";
if (VhdlDocGen::isSubType(mdef)) tagFile << "subtype";
if (VhdlDocGen::isVhdlFunction(mdef)) tagFile << "function";
if (VhdlDocGen::isProcedure(mdef)) tagFile << "procedure";
if (VhdlDocGen::isProcess(mdef)) tagFile << "process";
if (VhdlDocGen::isSignals(mdef)) tagFile << "signal";
if (VhdlDocGen::isAttribute(mdef)) tagFile << "attribute";
if (VhdlDocGen::isRecord(mdef)) tagFile << "record";
if (VhdlDocGen::isLibrary(mdef)) tagFile << "library";
if (VhdlDocGen::isPackage(mdef)) tagFile << "package";
if (VhdlDocGen::isVariable(mdef)) tagFile << "shared variable";
if (VhdlDocGen::isFile(mdef)) tagFile << "file";
if (VhdlDocGen::isGroup(mdef)) tagFile << "group";
if (VhdlDocGen::isCompInst(mdef)) tagFile << "instantiation";
if (VhdlDocGen::isAlias(mdef)) tagFile << "alias";
if (VhdlDocGen::isCompInst(mdef)) tagFile << "configuration";
tagFile << "\">" << endl;
tagFile << " <type>" << convertToXML(mdef->typeString()) << "</type>" << endl;
tagFile << " <name>" << convertToXML(mdef->name()) << "</name>" << endl;
tagFile << " <anchorfile>" << convertToXML(mdef->getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl;
tagFile << " <anchor>" << convertToXML(mdef->anchor()) << "</anchor>" << endl;
tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),TRUE)) << "</arglist>" << endl;
else if (VhdlDocGen::isProcedure(mdef))
tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),FALSE)) << "</arglist>" << endl;
else
tagFile << " <arglist>" << convertToXML(mdef->argsString()) << "</arglist>" << endl;
mdef->writeDocAnchorsToTagFile(tagFile);
tagFile << " </member>" << endl;
}
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.

References SearchIndexIntf::addWord(), ALIAS, MemberDef::anchor(), MemberDef::argsString(), MemberDef::argumentList(), ATTRIBUTE, MemberDef::briefDescription(), Definition::briefFile(), Definition::briefLine(), COMPONENT, CONFIG, Config_getBool, CONSTANT, OutputList::disable(), OutputList::disableAllBut(), OutputList::docify(), OutputList::enable(), OutputList::endBold(), OutputList::endDoxyAnchor(), OutputList::endEmphasis(), OutputList::endMemberDescription(), OutputList::endMemberItem(), OutputList::endTextLink(), ENTITY, ENTITYCLASS, formatString(), FUNCTION, OutputList::generateDoc(), GENERIC, getClass(), MemberDef::getClassDefOfAnonymousType(), MemberDef::getMemberSpecifiers(), Definition::getOuterScope(), ClassDef::getOutputFileBase(), Definition::getOutputFileBase(), MemberDef::getReference(), ClassDef::getReference(), GROUP, OutputGenerator::Html, OutputList::insertMemberAlign(), INSTANTIATION, isCompInst(), isComponent(), isConfig(), MemberDef::isDetailedSectionLinkable(), OutputList::isEnabled(), OutputGenerator::Latex, LIBRARY, OutputList::lineBreak(), Definition::localName(), OutputGenerator::Man, MISCELLANEOUS, Definition::name(), PACKAGE, OutputList::popGeneratorState(), PORT, PROCEDURE, PROCESS, ClassDef::protection(), OutputList::pushGeneratorState(), MemberDef::qualifiedName(), RECORD, Doxygen::searchIndex, MemberDef::setArgsString(), SearchIndexIntf::setCurrentDoc(), Definition::setName(), MemberDef::setType(), SHAREDVARIABLE, SIGNAL, OutputList::startBold(), OutputList::startDoxyAnchor(), OutputList::startEmphasis(), OutputList::startMemberDescription(), OutputList::startMemberItem(), OutputList::startTextLink(), SUBTYPE, theTranslator_vhdlType, TYPE, MemberDef::typeString(), UCF_CONST, UNITS, USE, VFILE, MemberDef::warnIfUndocumented(), writeFunctionProto(), writeLink(), OutputList::writeObjectLink(), writeProcedureProto(), writeProcessProto(), writeRecorUnit(), writeSource(), and writeUCFLink().

Referenced by writePlainVHDLDeclarations().

{
Definition *d=0;
ASSERT(cd!=0 || nd!=0 || fd!=0 || gd!=0 ||
); // member should belong to something
if (cd) d=cd;
else if (nd) d=nd;
else if (fd) d=fd;
else if (gd) d=gd;
else d=(Definition*)mdef;
// write search index info
{
}
QCString cname = d->name();
QCString cfname = d->getOutputFileBase();
//HtmlHelp *htmlHelp=0;
// bool hasHtmlHelp = Config_getBool(GENERATE_HTML) && Config_getBool(GENERATE_HTMLHELP);
// if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance();
// search for the last anonymous scope in the member type
ClassDef *annoClassDef=mdef->getClassDefOfAnonymousType();
// start a new member declaration
uint isAnonymous = (bool)(annoClassDef); // || m_impl->annMemb || m_impl->annEnumType;
int mm=mdef->getMemberSpecifiers();
isAnonymous=3;
ol.startMemberItem( mdef->anchor(), isAnonymous ); //? 1 : m_impl->tArgList ? 3 : 0);
// If there is no detailed description we need to write the anchor here.
bool detailsVisible = mdef->isDetailedSectionLinkable();
if (!detailsVisible) // && !m_impl->annMemb)
{
QCString doxyName=mdef->name().copy();
if (!cname.isEmpty()) doxyName.prepend(cname+"::");
QCString doxyArgs=mdef->argsString();
ol.startDoxyAnchor(cfname,cname,mdef->anchor(),doxyName,doxyArgs);
ol.docify("\n");
}
// *** write type
/*VHDL CHANGE */
bool bRec,bUnit;
QCString ltype(mdef->typeString());
// ltype=ltype.replace(reg," ");
QCString largs(mdef->argsString());
// largs=largs.replace(reg," ");
mdef->setType(ltype.data());
mdef->setArgsString(largs.data());
//ClassDef * plo=mdef->getClassDef();
ClassDef *kl=0;
ArgumentList *alp = mdef->argumentList();
QCString nn;
//VhdlDocGen::adjustRecordMember(mdef);
if (gd) gd=0;
switch (mm)
{
break;
ol.startBold();
VhdlDocGen::formatString(ltype,ol,mdef);
ol.endBold();
ol.docify(" ");
writeLink(mdef,ol);
if (alp!=0 && mm==VhdlDocGen::FUNCTION)
if (alp!=0 && mm==VhdlDocGen::PROCEDURE)
break;
writeLink(mdef,ol);
ol.docify(" ");
if (kl)
{
ol.docify(" ");
ol.startBold();
ol.docify(name.data());
name.resize(0);
ol.endBold();
name+=" <"+mdef->name()+">";
ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),0,name.data());
}
break;
writeLink(mdef,ol);
if (largs=="context")
{
}
break;
writeLink(mdef,ol);
ol.docify(" ");
{
ol.startBold();
VhdlDocGen::formatString(largs,ol,mdef);
ol.endBold();
}
else
{
ol.docify(" ");
ol.startBold();
VhdlDocGen::formatString(ltype,ol,mdef);
ol.endBold();
ol.docify(" ");
VhdlDocGen::formatString(largs,ol,mdef);
}
break;
writeLink(mdef,ol);
break;
{
nn=largs;
if(nn.stripPrefix("function") || nn.stripPrefix("package"))
{
VhdlDocGen::formatString(largs,ol,mdef);
writeLink(mdef,ol);
ol.docify(" ");
VhdlDocGen::formatString(ltype,ol,mdef);
break;
}
largs.prepend("::");
largs.prepend(mdef->name().data());
cfname,
mdef->anchor(),
mdef->name());
}
else
writeLink(mdef,ol);
ol.docify(" ");
ol.startBold();
ol.docify(ltype);
ol.endBold();
ol.docify(" ");
{
{
nn=ltype;
}
else
{
nn=mdef->name();
}
kl=getClass(nn.data());
if (kl)
{
QCString name("<Entity ");
{
name+=ltype+">";
}
else
{
name+=mdef->name()+"> ";
}
ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),0,name.data());
}
}
break;
mm=mdef->name().findRev('_');
if (mm>0)
{
mdef->setName(mdef->name().left(mm));
}
writeUCFLink(mdef,ol);
break;
writeLink(mdef,ol);
ol.docify(" ");
VhdlDocGen::formatString(ltype,ol,mdef);
break;
writeLink(mdef,ol);
ol.docify(" ");
ol.startBold();
if (ltype.isEmpty()) {
ol.docify(" ");
}
if (!ltype.isEmpty())
VhdlDocGen::formatString(ltype,ol,mdef);
ol.endBold();
break;
bRec=largs.stripPrefix("record") ;
bUnit=largs.stripPrefix("units") ;
ol.startBold();
if (bRec) ol.docify("record: ");
if (bUnit) ol.docify("units: ");
writeLink(mdef,ol);
if (!bRec && !bUnit) VhdlDocGen::formatString(ltype,ol,mdef);
if (bUnit) ol.lineBreak();
if (bRec || bUnit)
{
writeRecorUnit(largs,ol,mdef);
mdef->setType("");
}
ol.endBold();
break;
default: break;
}
bool htmlOn = ol.isEnabled(OutputGenerator::Html);
if (htmlOn && /*Config_getBool(HTML_ALIGN_MEMBERS) &&*/ !ltype.isEmpty())
{
}
if (!ltype.isEmpty()) ol.docify(" ");
if (htmlOn)
{
}
if (!detailsVisible)// && !m_impl->annMemb)
{
ol.endDoxyAnchor(cfname,mdef->anchor());
}
// name().data(),annoClassDef,annEnumType);
// if(mm!=VhdlDocGen::MISCELLANEOUS)
if (!mdef->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC) /* && !annMemb */)
{
QCString s=mdef->briefDescription();
ol.generateDoc(mdef->briefFile(),mdef->briefLine(),
mdef->getOuterScope()?mdef->getOuterScope():d,
mdef,s.data(),TRUE,FALSE,0,TRUE,FALSE);
if (detailsVisible)
{
//ol.endEmphasis();
ol.docify(" ");
if (mdef->getGroupDef()!=0 && gd==0) // forward link to the group
{
ol.startTextLink(mdef->getOutputFileBase(),mdef->anchor());
}
else // local link
{
ol.startTextLink(0,mdef->anchor());
}
//ol.startEmphasis();
}
//ol.newParagraph();
}
mdef->warnIfUndocumented();
}// end writeVhdlDeclaration
void VhdlDocGen::writeVhdlDeclarations ( MemberList ml,
OutputList ol,
GroupDef gd,
ClassDef cd,
FileDef fd,
NamespaceDef nd 
)
static

Definition at line 1770 of file vhdldocgen.cpp.

References ALIAS, ATTRIBUTE, COMPONENT, CONFIG, CONSTANT, FUNCTION, GENERIC, GROUP, INSTANTIATION, LIBRARY, MISCELLANEOUS, PORT, PROCEDURE, PROCESS, RECORD, SHAREDVARIABLE, SIGNAL, SUBTYPE, theTranslator_vhdlType, TYPE, UCF_CONST, UNITS, USE, VFILE, and writeVHDLDeclarations().

Referenced by MemberList::writeDeclarations(), GroupDef::writeMemberDeclarations(), FileDef::writeMemberDeclarations(), and ClassDef::writeMemberDeclarations().

{
// configurations must be added to global file definitions.
}
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.

References OutputList::docify(), OutputList::endMemberGroup(), OutputList::endMemberGroupDocs(), OutputList::endMemberGroupHeader(), OutputList::endMemberHeader(), OutputList::endMemberSubtitle(), OutputList::generateDoc(), MemberList::getMemberGroupList(), MemberGroup::header(), membersHaveSpecificType(), OutputList::parseText(), setGlobalType(), OutputList::startMemberGroup(), OutputList::startMemberGroupDocs(), OutputList::startMemberGroupHeader(), OutputList::startMemberHeader(), OutputList::startMemberSubtitle(), and writePlainVHDLDeclarations().

Referenced by writeVhdlDeclarations().

{
if (!membersHaveSpecificType(ml,type)) return;
if (title)
{
ol.startMemberHeader(title);
ol.parseText(title);
ol.docify(" ");
}
if (subtitle && subtitle[0]!=0)
{
ol.generateDoc("[generated]",-1,0,0,subtitle,FALSE,FALSE,0,TRUE,FALSE);
} //printf("memberGroupList=%p\n",memberGroupList);
VhdlDocGen::writePlainVHDLDeclarations(ml,ol,cd,nd,fd,gd,type);
if (ml->getMemberGroupList())
{
while ((mg=mgli.current()))
{
if (membersHaveSpecificType(mg->members(),type))
{
//printf("mg->header=%s\n",mg->header().data());
bool hasHeader=mg->header()!="[NOHEADER]";
ol.startMemberGroupHeader(hasHeader);
if (hasHeader)
{
ol.parseText(mg->header());
}
if (!mg->documentation().isEmpty())
{
//printf("Member group has docs!\n");
ol.generateDoc("[generated]",-1,0,0,mg->documentation()+"\n",FALSE,FALSE);
}
//printf("--- mg->writePlainDeclarations ---\n");
VhdlDocGen::writePlainVHDLDeclarations(mg->members(),ol,cd,nd,fd,gd,type);
ol.endMemberGroup(hasHeader);
}
++mgli;
}
}
}// writeVHDLDeclarations
void VhdlDocGen::writeVhdlLink ( const ClassDef cdd,
OutputList ol,
QCString &  type,
QCString &  name,
QCString &  beh 
)
staticprivate

Definition at line 1114 of file vhdldocgen.cpp.

References OutputList::docify(), OutputList::endBold(), ClassDef::getOutputFileBase(), ClassDef::getReference(), OutputList::lineBreak(), OutputList::startBold(), and OutputList::writeObjectLink().

Referenced by writeInlineClassLink().

{
if (ccd==0) return;
ol.startBold();
ol.docify(type.data());
ol.endBold();
nn.stripPrefix("_");
ol.writeObjectLink(ccd->getReference(),ccd->getOutputFileBase(),0,nn.data());
if (!behav.isEmpty())
{
behav.prepend(" ");
ol.startBold();
ol.docify(behav.data());
ol.endBold();
}
ol.lineBreak();
}
bool VhdlDocGen::writeVHDLTypeDocumentation ( const MemberDef mdef,
const Definition d,
OutputList ol 
)
static

Definition at line 1836 of file vhdldocgen.cpp.

References MemberDef::argsString(), MemberDef::argumentList(), OutputList::docify(), OutputList::endBold(), findMember(), formatString(), isConstraint(), isGeneric(), isLibrary(), MemberDef::isLinkable(), isPackage(), isPort(), isProcedure(), isProcess(), MemberDef::isVariable(), isVhdlFunction(), Definition::name(), OutputList::startBold(), MemberDef::typeString(), writeFuncProcDocu(), writeLink(), and writeRecUnitDocu().

Referenced by MemberDef::writeDocumentation().

{
ClassDef *cd=(ClassDef*)d;
bool hasParams = FALSE;
if (cd==0) return hasParams;
QCString ttype=mdef->typeString();
QCString largs=mdef->argsString();
{
QCString nn=mdef->typeString();
nn=nn.stripWhiteSpace();
QCString na=cd->name();
if (memdef && memdef->isLinkable())
{
ol.docify(" ");
ol.startBold();
writeLink(memdef,ol);
ol.endBold();
ol.docify(" ");
}
else
{
ol.docify(" ");
VhdlDocGen::formatString(ttype,ol,mdef);
ol.docify(" ");
}
ol.docify(mdef->name());
hasParams = VhdlDocGen::writeFuncProcDocu(mdef,ol, mdef->argumentList());
}
if (mdef->isVariable())
{
{
writeLink(mdef,ol);
ol.docify(" ");
largs=largs.replace(QRegExp("#")," ");
VhdlDocGen::formatString(largs,ol,mdef);
return hasParams;
}
else
{
writeLink(mdef,ol);
{
return hasParams;
}
ol.docify(" ");
}
// QCString largs=mdef->argsString();
bool c=largs=="context";
bool brec=largs.stripPrefix("record") ;
if (!brec && !c)
VhdlDocGen::formatString(ttype,ol,mdef);
if (c || brec || largs.stripPrefix("units"))
{
if (c)
largs=ttype;
return hasParams;
}
ol.docify(" ");
{
// QCString largs=mdef->argsString();
VhdlDocGen::formatString(largs,ol,mdef);
ol.docify(" ");
}
}
return hasParams;
}

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