Doxygen
Loading...
Searching...
No Matches
VhdlDocGen Class Reference

Class for generating documentation specific for VHDL. More...

#include <src/vhdldocgen.h>

Public Types

enum  VhdlClasses { ENTITYCLASS , PACKBODYCLASS , ARCHITECTURECLASS , PACKAGECLASS }
 

Static Public Member Functions

static VhdlClasses convert (Protection prot)
 
static void init ()
 
static QCString convertFileNameToClassName (const QCString &name)
 
static bool isSubClass (ClassDef *cd, ClassDef *scd, bool followInstances, int level)
 
static QCString getIndexWord (const QCString &, int index)
 
static bool deleteCharRev (QCString &s, char c)
 
static void deleteAllChars (QCString &s, char c)
 
static void parseFuncProto (const QCString &text, QCString &name, QCString &ret, bool doc=false)
 
static void computeVhdlComponentRelations ()
 
static const char * findKeyWord (const QCString &word)
 
static ClassDefgetPackageName (const QCString &name)
 
static const MemberDeffindMember (const QCString &className, const QCString &memName)
 
static void findAllPackages (ClassDef *)
 
static const MemberDeffindMemberDef (ClassDef *cd, const QCString &key, MemberListType type)
 This function returns the entity|package in which the key (type) is found.
 
static ClassDefgetClass (const QCString &name)
 
static const MemberDeffindFunction (const QCString &name, const QCString &package)
 
static QCString getClassTitle (const ClassDef *)
 
static void writeInlineClassLink (const ClassDef *, OutputList &ol)
 
static void writeTagFile (MemberDefMutable *mdef, TextStream &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 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 (const MemberList *, OutputList &, const GroupDef *, const ClassDef *, const FileDef *, const NamespaceDef *, const ModuleDef *)
 
static void writeVHDLDeclaration (MemberDefMutable *mdef, OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, bool inGroup)
 
static void writePlainVHDLDeclarations (const MemberList *ml, OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, VhdlSpecifier specifier)
 
static void writeVHDLDeclarations (const MemberList *ml, OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, const QCString &title, const QCString &subtitle, bool showEnumValues, VhdlSpecifier type)
 
static bool writeClassType (const 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 std::string &s)
 
static QCString getProtectionName (int prot)
 
static void parseUCF (const QCString &input, Entry *entity, const QCString &f, bool vendor)
 
static const ClassDeffindArchitecture (const ClassDef *cd)
 
static void correctMemberProperties (MemberDefMutable *md)
 
static void writeSource (const MemberDef *mdef, OutputList &ol, const QCString &cname)
 
static QCString parseForConfig (QCString &entity, QCString &arch)
 
static QCString parseForBinding (QCString &entity, QCString &arch)
 
static void addBaseClass (ClassDef *cd, ClassDef *ent)
 
static ClassDeffindVhdlClass (const QCString &className)
 
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 (std::vector< QCString > &ql, const ClassDef *cd)
 
static bool compareArgList (const ArgumentList &, const 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 writeRecordUnit (QCString &largs, QCString &ltype, OutputList &ol, MemberDefMutable *mdef)
 

Detailed Description

Class for generating documentation specific for VHDL.

Definition at line 69 of file vhdldocgen.h.

Member Enumeration Documentation

◆ VhdlClasses

Enumerator
ENTITYCLASS 
PACKBODYCLASS 
ARCHITECTURECLASS 
PACKAGECLASS 

Definition at line 73 of file vhdldocgen.h.

74 {
75 ENTITYCLASS, // Overlays: Public
76 PACKBODYCLASS, // Overlays: Protected
77 ARCHITECTURECLASS, // Overlays: Private
78 PACKAGECLASS // Overlays: Package
79 };
@ ARCHITECTURECLASS
Definition vhdldocgen.h:77

Member Function Documentation

◆ addBaseClass()

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

Definition at line 2357 of file vhdldocgen.cpp.

2358{
2359 BaseClassList bcl = cd->baseClasses();
2360 for (auto &bcd : bcl)
2361 {
2362 ClassDef *ccd = bcd.classDef;
2363 if (ccd==ent)
2364 {
2365 QCString n = bcd.usedName;
2366 int i = n.find('(');
2367 if(i<0)
2368 {
2369 bcd.usedName.append("(2)");
2370 return;
2371 }
2372 static const reg::Ex reg(R"(\d+)");
2373 QCString s=n.left(i);
2374 QCString r=n.right(n.length()-i);
2375 std::string t=r.str();
2378 r.setNum(r.toInt()+1);
2379 reg::replace(t, reg, r.str());
2380 s.append(t.c_str());
2381 bcd.usedName=s;
2382 bcd.templSpecifiers=t;
2383 }
2384 }
2385 cd->updateBaseClasses(bcl);
2386}
virtual void updateBaseClasses(const BaseClassList &bcd)=0
Update the list of base classes to the one passed.
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
int toInt(bool *ok=nullptr, int base=10) const
Definition qcstring.cpp:249
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153
const std::string & str() const
Definition qcstring.h:537
QCString & setNum(short n)
Definition qcstring.h:444
QCString & append(char c)
Definition qcstring.h:381
QCString right(size_t len) const
Definition qcstring.h:219
QCString left(size_t len) const
Definition qcstring.h:214
static void deleteAllChars(QCString &s, char c)
std::vector< BaseClassDef > BaseClassList
Definition classdef.h:81
std::string replace(std::string_view str, const Ex &re, std::string_view replacement)
Searching in a given input string for parts that match regular expression re and replaces those parts...
Definition regex.cpp:770

References QCString::append(), ClassDef::baseClasses(), deleteAllChars(), QCString::find(), QCString::left(), QCString::length(), reg::replace(), QCString::right(), QCString::setNum(), QCString::str(), QCString::toInt(), and ClassDef::updateBaseClasses().

Referenced by addInstance().

◆ compareArgList()

static bool VhdlDocGen::compareArgList ( const ArgumentList & ,
const ArgumentList &  )
staticprivate

◆ computeVhdlComponentRelations()

void VhdlDocGen::computeVhdlComponentRelations ( )
static

Definition at line 2152 of file vhdldocgen.cpp.

2153{
2154
2155 QCString entity,arch,inst;
2156
2157 for (const auto &cur : getVhdlInstList())
2158 {
2159 if (cur->isStatic ) // was bind
2160 {
2161 continue;
2162 }
2163
2164 if (cur->includeName=="entity" || cur->includeName=="component" )
2165 {
2166 entity=cur->includeName+" "+cur->type;
2167 QCString rr=VhdlDocGen::parseForBinding(entity,arch);
2168 }
2169 else if (cur->includeName.isEmpty())
2170 {
2171 entity=cur->type;
2172 }
2173
2174 ClassDefMutable *classEntity= toClassDefMutable(VhdlDocGen::findVhdlClass(entity));
2175 inst=VhdlDocGen::getIndexWord(cur->args,0);
2176 ClassDefMutable *cd=toClassDefMutable(Doxygen::classLinkedMap->find(inst));
2177 ClassDefMutable *ar=toClassDefMutable(Doxygen::classLinkedMap->find(cur->args));
2178
2179 if (cd==nullptr)
2180 {
2181 continue;
2182 }
2183
2184 // if (classEntity==nullptr)
2185 // err("%s:%d:Entity:%s%s",qPrint(cur->fileName),cur->startLine,qPrint(entity)," could not be found");
2186
2187 addInstance(classEntity,ar,cd,cur);
2188 }
2189
2190}
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:96
static ClassDef * findVhdlClass(const QCString &className)
static QCString parseForBinding(QCString &entity, QCString &arch)
static QCString getIndexWord(const QCString &, int index)
ClassDefMutable * toClassDefMutable(Definition *d)
static void addInstance(ClassDefMutable *entity, ClassDefMutable *arch, ClassDefMutable *inst, const std::shared_ptr< Entry > &cur)
const EntryList & getVhdlInstList()

References addInstance(), Doxygen::classLinkedMap, findVhdlClass(), getIndexWord(), getVhdlInstList(), parseForBinding(), and toClassDefMutable().

Referenced by parseInput().

◆ convert()

◆ convertArgumentListToString()

QCString VhdlDocGen::convertArgumentListToString ( const ArgumentList & al,
bool f )
static

Definition at line 1156 of file vhdldocgen.cpp.

1157{
1158 QCString argString;
1159 bool sem=FALSE;
1160
1161 for (const Argument &arg : al)
1162 {
1163 if (sem) argString.append(", ");
1164 if (func)
1165 {
1166 argString+=arg.name;
1167 argString+=":";
1168 argString+=arg.type;
1169 }
1170 else
1171 {
1172 argString+=arg.defval+" ";
1173 argString+=arg.name+" :";
1174 argString+=arg.attrib+" ";
1175 argString+=arg.type;
1176 }
1177 sem=TRUE;
1178 }
1179 return argString;
1180}
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34

References QCString::append(), FALSE, and TRUE.

Referenced by writeTagFile().

◆ convertFileNameToClassName()

QCString VhdlDocGen::convertFileNameToClassName ( const QCString & name)
static

Definition at line 1897 of file vhdldocgen.cpp.

1898{
1899
1900 QCString n=name;
1901 n=n.remove(0,6);
1902
1903 int i=0;
1904
1905 while((i=n.find("__"))>0)
1906 {
1907 n=n.remove(i,1);
1908 }
1909
1910 while((i=n.find("_1"))>0)
1911 {
1912 n=n.replace(i,2,":");
1913 }
1914
1915 return n;
1916}
QCString & remove(size_t index, size_t len)
Definition qcstring.h:427
QCString & replace(size_t index, size_t len, const char *s)
Definition qcstring.cpp:212

References QCString::find(), QCString::remove(), and QCString::replace().

◆ correctMemberProperties()

void VhdlDocGen::correctMemberProperties ( MemberDefMutable * md)
static

Definition at line 1214 of file vhdldocgen.cpp.

1215{
1216 if (md->argsString()=="package")
1217 {
1219 }
1220 else if (md->argsString()=="configuration")
1221 {
1223 }
1224 else if (md->typeString()=="library")
1225 {
1227 }
1228 else if (md->typeString()=="use")
1229 {
1231 }
1232 else if (md->typeString().lower()=="misc")
1233 {
1235 }
1236 else if (md->typeString().lower()=="ucf_const")
1237 {
1239 }
1240
1242 {
1243 int mm=md->name().findRev('_');
1244 if (mm>0)
1245 {
1246 md->setName(md->name().left(mm));
1247 }
1248 }
1249 else if (md->getVhdlSpecifiers()==VhdlSpecifier::TYPE)
1250 {
1251 QCString largs=md->argsString();
1252 bool bRec=largs.stripPrefix("record") ;
1253 bool bUnit=largs.stripPrefix("units") ;
1254 if (bRec || bUnit)
1255 {
1256 md->setType("");
1257 }
1258 }
1259}
virtual const QCString & name() const =0
virtual void setName(const QCString &name)=0
virtual QCString typeString() const =0
virtual VhdlSpecifier getVhdlSpecifiers() const =0
virtual QCString argsString() const =0
virtual void setVhdlSpecifiers(VhdlSpecifier s)=0
virtual void setType(const QCString &t)=0
QCString lower() const
Definition qcstring.h:234
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:91
bool stripPrefix(const QCString &prefix)
Definition qcstring.h:198
@ INSTANTIATION
Definition types.h:569
@ MISCELLANEOUS
Definition types.h:575

References MemberDef::argsString(), CONFIG, QCString::findRev(), MemberDef::getVhdlSpecifiers(), INSTANTIATION, QCString::left(), LIBRARY, QCString::lower(), MISCELLANEOUS, Definition::name(), DefinitionMutable::setName(), MemberDefMutable::setType(), MemberDefMutable::setVhdlSpecifiers(), QCString::stripPrefix(), TYPE, MemberDef::typeString(), UCF_CONST, and USE.

Referenced by vhdlCorrectMemberProperties().

◆ createFlowChart()

void VhdlDocGen::createFlowChart ( const MemberDef * mdef)
static

Definition at line 2403 of file vhdldocgen.cpp.

2404{
2405 if (mdef==nullptr) return;
2406
2407 QCString codeFragment;
2408 const MemberDef* mm=nullptr;
2409 if ((mm=findMemFlow(mdef))!=nullptr)
2410 {
2411 // don't create the same flowchart twice
2413 return;
2414 }
2415 else
2416 {
2417 mdList.push_back(mdef);
2418 }
2419
2420 //fprintf(stderr,"\n create flow mem %s %p\n",qPrint(mdef->name()),mdef);
2421
2422 int actualStart= mdef->getStartBodyLine();
2423 int actualEnd=mdef->getEndBodyLine();
2424 const FileDef* fd=mdef->getFileDef();
2425 bool b=readCodeFragment( fd->absFilePath(), false, actualStart, actualEnd, codeFragment);
2426 if (!b) return;
2427
2428 auto parser { Doxygen::parserManager->getOutlineParser(".vhd") };
2430 std::shared_ptr<Entry> root = std::make_shared<Entry>();
2431 StringVector filesInSameTu;
2432 parser->parseInput("",codeFragment.data(),root,nullptr);
2433}
virtual int getEndBodyLine() const =0
virtual int getStartBodyLine() const =0
static ParserManager * parserManager
Definition doxygen.h:131
virtual QCString absFilePath() const =0
virtual const FileDef * getFileDef() const =0
std::unique_ptr< OutlineParserInterface > getOutlineParser(const QCString &extension)
Gets the interface to the parser associated with a given extension.
Definition parserintf.h:209
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:159
static void setFlowMember(const MemberDef *flowMember)
std::vector< std::string > StringVector
Definition containers.h:33
bool readCodeFragment(const QCString &fileName, bool isMacro, int &startLine, int &endLine, QCString &result)
Reads a fragment from file fileName starting with line startLine and ending with line endLine.
static const MemberDef * findMemFlow(const MemberDef *mdef)
static std::vector< const MemberDef * > mdList

References FileDef::absFilePath(), QCString::data(), findMemFlow(), Definition::getEndBodyLine(), MemberDef::getFileDef(), Definition::getStartBodyLine(), mdList, Doxygen::parserManager, readCodeFragment(), and setFlowMember().

Referenced by DocVhdlFlow::parse().

◆ deleteAllChars()

void VhdlDocGen::deleteAllChars ( QCString & s,
char c )
static

Definition at line 727 of file vhdldocgen.cpp.

728{
729 int index=s.findRev(c,-1,FALSE);
730 while (index > -1)
731 {
732 s = s.remove(index,1);
733 index=s.findRev(c,-1,FALSE);
734 }
735}

References FALSE, QCString::findRev(), and QCString::remove().

Referenced by addBaseClass(), VHDLOutlineParser::createFunction(), and initUCF().

◆ deleteCharRev()

bool VhdlDocGen::deleteCharRev ( QCString & s,
char c )
static

deletes a char backwards in a string

Definition at line 716 of file vhdldocgen.cpp.

717{
718 int index=s.findRev(c,-1,FALSE);
719 if (index > -1)
720 {
721 s = s.remove(index,1);
722 return TRUE;
723 }
724 return FALSE;
725}

References FALSE, QCString::findRev(), QCString::remove(), and TRUE.

Referenced by parseFuncProto().

◆ findAllArchitectures()

void VhdlDocGen::findAllArchitectures ( std::vector< QCString > & ql,
const ClassDef * cd )
staticprivate

Definition at line 532 of file vhdldocgen.cpp.

533{
534 for (const auto &citer : *Doxygen::classLinkedMap)
535 {
536 QCString className=citer->className();
537 int pos = -1;
538 if (cd != citer.get() && (pos=className.find('-'))!=-1)
539 {
540 QCString postfix=className.mid(pos+1);
541 if (qstricmp(cd->className(),postfix)==0)
542 {
543 qll.push_back(className);
544 }
545 }
546 }// for
547}//findAllArchitectures
virtual QCString className() const =0
Returns the name of the class including outer classes, but not including namespaces.
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:226
int qstricmp(const char *s1, const char *s2)
Definition qcstring.cpp:442

References Doxygen::classLinkedMap, ClassDef::className(), QCString::find(), QCString::mid(), and qstricmp().

Referenced by writeInlineClassLink().

◆ findAllPackages()

void VhdlDocGen::findAllPackages ( ClassDef * cdef)
static

finds all included packages of an Entity or Package

Definition at line 362 of file vhdldocgen.cpp.

363{
364 std::lock_guard lock(g_vhdlMutex);
365 if (g_packages.find(cdef)!=g_packages.end()) return;
366 std::vector<ClassDef*> cList;
367 MemberList *mem=cdef->getMemberList(MemberListType::VariableMembers());
368 if (mem)
369 {
370 for (const auto &md : *mem)
371 {
372 if (VhdlDocGen::isPackage(md))
373 {
374 ClassDef* cd=VhdlDocGen::getPackageName(md->name());
375 if (cd)
376 {
377 cList.push_back(cd);
379 g_packages.emplace(cdef,cList);
380 }
381 }
382 }//for
383 }
384
385}// findAllPackages
virtual MemberList * getMemberList(MemberListType lt) const =0
Returns the members in the list identified by lt.
static void findAllPackages(ClassDef *)
static bool isPackage(const MemberDef *mdef)
static ClassDef * getPackageName(const QCString &name)
static std::map< ClassDef *, std::vector< ClassDef * > > g_packages
static std::recursive_mutex g_vhdlMutex

References findAllPackages(), g_packages, g_vhdlMutex, ClassDef::getMemberList(), getPackageName(), and isPackage().

Referenced by findAllPackages(), and findMember().

◆ findArchitecture()

const ClassDef * VhdlDocGen::findArchitecture ( const ClassDef * cd)
static

Definition at line 549 of file vhdldocgen.cpp.

550{
551 QCString nn=cd->name();
552 for (const auto &citer : *Doxygen::classLinkedMap)
553 {
554 QCString jj=citer->name();
555 StringVector ql=split(jj.str(),":");
556 if (ql.size()>1)
557 {
558 if (QCString(ql[0])==nn)
559 {
560 return citer.get();
561 }
562 }
563 }
564 return nullptr;
565}
StringVector split(const std::string &s, const std::string &delimiter)
split input string s by string delimiter delimiter.
Definition util.cpp:6946

References Doxygen::classLinkedMap, Definition::name(), split(), and QCString::str().

◆ findFunction()

const MemberDef * VhdlDocGen::findFunction ( const QCString & funcname,
const QCString & package )
static

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

Definition at line 392 of file vhdldocgen.cpp.

393{
394 ClassDef *cdef=getClass(package);
395 if (cdef==nullptr) return nullptr;
396
397 MemberList *mem=cdef->getMemberList(MemberListType::PubMethods());
398 if (mem)
399 {
400 for (const auto &mdef : *mem)
401 {
402 QCString mname=mdef->name();
403 if ((VhdlDocGen::isProcedure(mdef) || VhdlDocGen::isVhdlFunction(mdef)) && (compareString(funcname,mname)==0))
404 {
405 return mdef;
406 }//if
407 }//for
408 }//if
409 return nullptr;
410} //findFunction
static bool isVhdlFunction(const MemberDef *mdef)
static ClassDef * getClass(const QCString &name)
static bool isProcedure(const MemberDef *mdef)
static int compareString(const QCString &s1, const QCString &s2)

References compareString(), getClass(), ClassDef::getMemberList(), isProcedure(), and isVhdlFunction().

Referenced by writeFuncProto().

◆ findKeyWord()

const char * VhdlDocGen::findKeyWord ( const QCString & kw)
static

returns the color of a keyword

Definition at line 180 of file vhdldocgen.cpp.

181{
182 std::string word=kw.lower().str();
183
184 if (word.empty()) return nullptr;
185
187 return "keywordflow";
188
190 return "keywordtype";
191
193 return "vhdllogic";
194
196 return "vhdlkeyword";
197
198 return nullptr;
199}
std::string_view word
Definition util.cpp:980
static const std::unordered_set< std::string > g_vhdlKeyWordSet0
static const std::unordered_set< std::string > g_vhdlKeyWordSet2
static const std::unordered_set< std::string > g_vhdlKeyWordSet3
static const std::unordered_set< std::string > g_vhdlKeyWordSet1

References g_vhdlKeyWordSet0, g_vhdlKeyWordSet1, g_vhdlKeyWordSet2, g_vhdlKeyWordSet3, QCString::lower(), QCString::str(), and word.

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

◆ findMember()

const MemberDef * VhdlDocGen::findMember ( const QCString & className,
const QCString & memName )
static

Definition at line 217 of file vhdldocgen.cpp.

218{
219 std::lock_guard lock(g_vhdlMutex);
220 ClassDef *ecd=nullptr;
221 const MemberDef *mdef=nullptr;
222
223 ClassDef *cd=getClass(className);
224 //printf("VhdlDocGen::findMember(%s,%s)=%p\n",qPrint(className),qPrint(memName),cd);
225 if (cd==nullptr) return nullptr;
226
227 mdef=VhdlDocGen::findMemberDef(cd,memName,MemberListType::VariableMembers());
228 if (mdef) return mdef;
229 mdef=VhdlDocGen::findMemberDef(cd,memName,MemberListType::PubMethods());
230 if (mdef) return mdef;
231
232 // nothing found so far
233 // if we are an architecture or package body search in entity
234
237 {
238 Definition *d = cd->getOuterScope();
239 // searching upper/lower case names
240
241 QCString tt=d->name();
242 ecd =getClass(tt);
243 if (!ecd)
244 {
245 tt=tt.upper();
246 ecd =getClass(tt);
247 }
248 if (!ecd)
249 {
250 tt=tt.lower();
251 ecd =getClass(tt);
252 }
253
254 if (ecd) //d && d->definitionType()==Definition::TypeClass)
255 {
256 //ClassDef *ecd = (ClassDef*)d;
257 mdef=VhdlDocGen::findMemberDef(ecd,memName,MemberListType::VariableMembers());
258 if (mdef) return mdef;
259 mdef=VhdlDocGen::findMemberDef(cd,memName,MemberListType::PubMethods());
260 if (mdef) return mdef;
261 }
262 }
263
264
267 {
268 Definition *d = cd->getOuterScope();
269
270 QCString tt=d->name();
271 ClassDef *acd =getClass(tt);
272 if (!acd)
273 {
274 tt=tt.upper();
275 acd =getClass(tt);
276 }
277 if (!acd)
278 {
279 tt=tt.lower();
280 acd =getClass(tt);
281 }
282 if (acd) //d && d->definitionType()==Definition::TypeClass)
283 {
284 if(g_packages.find(acd)==g_packages.end())
285 {
287 }
288 }
289 }
290 else
291 {
292 ecd=cd;
293 if (g_packages.find(ecd)==g_packages.end()) VhdlDocGen::findAllPackages(ecd);
294 }
295
296 if (ecd)
297 {
298 auto cList_it = g_packages.find(ecd);
299 if (cList_it!=g_packages.end())
300 {
301 for (const auto &cdp : cList_it->second)
302 {
303 mdef=VhdlDocGen::findMemberDef(cdp,memName,MemberListType::VariableMembers());
304 if (mdef) return mdef;
305 mdef=VhdlDocGen::findMemberDef(cdp,memName,MemberListType::PubMethods());
306 if (mdef) return mdef;
307 }
308 }
309 }
310 return nullptr;
311
312}//findMember
virtual Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.
virtual Definition * getOuterScope() const =0
QCString upper() const
Definition qcstring.h:239
static const MemberDef * findMemberDef(ClassDef *cd, const QCString &key, MemberListType type)
This function returns the entity|package in which the key (type) is found.
static VhdlClasses convert(Protection prot)
Definition vhdldocgen.h:80

References ARCHITECTURECLASS, convert(), findAllPackages(), findMemberDef(), g_packages, g_vhdlMutex, getClass(), Definition::getOuterScope(), QCString::lower(), Definition::name(), PACKBODYCLASS, ClassDef::protection(), and QCString::upper().

Referenced by generateMemLink(), startCodeLine(), writeStringLink(), and writeVHDLTypeDocumentation().

◆ findMemberDef()

const 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 318 of file vhdldocgen.cpp.

319{
320 std::lock_guard lock(g_vhdlMutex);
321 QCString keyType=cd->symbolName()+"@"+key;
322 //printf("\n %s | %s | %s",qPrint(cd->symbolName()),key.data(,),qPrint(keyType));
323
324 auto it = g_varMap.find(keyType.str());
325 if (it!=g_varMap.end())
326 {
327 return it->second;
328 }
329 if (std::find(g_classList.begin(),g_classList.end(),cd)!=g_classList.end())
330 {
331 return nullptr;
332 }
333 const MemberList *ml=cd->getMemberList(type);
335 if (!ml)
336 {
337 return nullptr;
338 }
339 //int l=ml->count();
340 // fprintf(stderr,"\n loading entity %s %s: %d",qPrint(cd->symbolName()),qPrint(keyType),l);
341
342 for (const auto &md : *ml)
343 {
344 QCString tkey=cd->symbolName()+"@"+md->name();
345 if (g_varMap.find(tkey.str())==g_varMap.end())
346 {
347 g_varMap.emplace(tkey.str(),md);
348 }
349 }
350 it=g_varMap.find(keyType.str());
351 if (it!=g_varMap.end())
352 {
353 return it->second;
354 }
355 return nullptr;
356}//findMemberDef
virtual QCString symbolName() const =0
void push_back(const T &value)
Definition memberlist.h:47
static std::vector< ClassDef * > g_classList
static std::map< std::string, const MemberDef * > g_varMap

References g_classList, g_varMap, g_vhdlMutex, ClassDef::getMemberList(), QCString::str(), and Definition::symbolName().

Referenced by findMember().

◆ findVhdlClass()

ClassDef * VhdlDocGen::findVhdlClass ( const QCString & className)
static

Definition at line 2126 of file vhdldocgen.cpp.

2127{
2128 for (const auto &cd : *Doxygen::classLinkedMap)
2129 {
2130 if (qstricmp(className.data(),qPrint(cd->name()))==0)
2131 {
2132 return cd.get();
2133 }
2134 }
2135 return nullptr;
2136}
const char * qPrint(const char *s)
Definition qcstring.h:672

References Doxygen::classLinkedMap, QCString::data(), qPrint(), and qstricmp().

Referenced by computeVhdlComponentRelations().

◆ formatString()

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 851 of file vhdldocgen.cpp.

852{
853 QCString qcs = s;
854 QCString temp;
855 qcs.stripPrefix(":");
856 qcs.stripPrefix("is");
857 qcs.stripPrefix("IS");
858 qcs.stripPrefix("of");
859 qcs.stripPrefix("OF");
860
861 size_t len = qcs.length();
862 size_t index=1;
863
864 for (size_t j=0;j<len;j++)
865 {
866 char c=qcs[j];
867 char b=c;
868 if (j>0) b=qcs[j-1];
869 if (c=='"' || c==',' || c=='\''|| c=='(' || c==')' || c==':' || c=='[' || c==']' ) // || (c==':' && b!='=')) // || (c=='=' && b!='>'))
870 {
871 if (temp.length()>=index && temp.at(index-1) != ' ')
872 {
873 temp+=" ";
874 }
875 temp+=c;
876 temp+=" ";
877 }
878 else if (c=='=')
879 {
880 if (b==':') // := operator
881 {
882 temp.replace(index-1,1,"=");
883 temp+=" ";
884 }
885 else // = operator
886 {
887 temp+=" ";
888 temp+=c;
889 temp+=" ";
890 }
891 }
892 else
893 {
894 temp+=c;
895 }
896
897 index=temp.length();
898 }// for
899 temp=temp.stripWhiteSpace();
900 // printf("\n [%s]",qPrint(qcs));
901 VhdlDocGen::writeFormatString(temp,ol,mdef);
902}
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:578
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition qcstring.h:245
static void writeFormatString(const QCString &, OutputList &ol, const MemberDef *)

References QCString::at(), QCString::length(), QCString::replace(), QCString::stripPrefix(), QCString::stripWhiteSpace(), and writeFormatString().

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

◆ getClass()

ClassDef * VhdlDocGen::getClass ( const QCString & name)
static

Definition at line 201 of file vhdldocgen.cpp.

202{
203 if (name.isEmpty()) return nullptr;
204 return Doxygen::classLinkedMap->find(QCString(name).stripWhiteSpace());
205}
const T * find(const std::string &key) const
Find an object given the key.
Definition linkedmap.h:47
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
std::string_view stripWhiteSpace(std::string_view s)
Given a string view s, returns a new, narrower view on that string, skipping over any leading or trai...
Definition stringutil.h:72

References Doxygen::classLinkedMap, QCString::isEmpty(), and stripWhiteSpace().

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

◆ getClassName()

QCString VhdlDocGen::getClassName ( const ClassDef * cd)
static

Definition at line 446 of file vhdldocgen.cpp.

447{
448 QCString temp;
449 if (cd==nullptr) return "";
450
452 {
453 temp=cd->name();
454 temp.stripPrefix("_");
455 return temp;
456 }
457
458 return substitute(cd->className(),"::",".");
459}
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:477

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

Referenced by getClassTitle(), makeDisplayName(), and writeClassType().

◆ getClassTitle()

QCString VhdlDocGen::getClassTitle ( const ClassDef * cd)
static

returns the class title+ref

Definition at line 434 of file vhdldocgen.cpp.

435{
436 QCString pageTitle;
437 if (cd==nullptr) return "";
438 pageTitle=VhdlDocGen::getClassName(cd);
439 pageTitle+=" ";
441 return pageTitle;
442} // getClassTitle
static QCString getClassName(const ClassDef *)
#define theTranslator_vhdlType
static VhdlSpecifier getSpecifierTypeFromClass(const ClassDef *cd)

References getClassName(), getSpecifierTypeFromClass(), theTranslator_vhdlType, and TRUE.

Referenced by ClassDefImpl::title().

◆ getFlowMember()

◆ getIndexWord()

QCString VhdlDocGen::getIndexWord ( const QCString & c,
int index )
static

Definition at line 684 of file vhdldocgen.cpp.

685{
686 static const reg::Ex reg(R"([\s:|])");
687 auto ql=split(c.str(),reg);
688
689 if (index < static_cast<int>(ql.size()))
690 {
691 return QCString(ql[index]);
692 }
693
694 return "";
695}

References split(), and QCString::str().

Referenced by computeVhdlComponentRelations(), and parseFuncProto().

◆ getPackageName()

ClassDef * VhdlDocGen::getPackageName ( const QCString & name)
static

Definition at line 207 of file vhdldocgen.cpp.

208{
209 return getClass(name);
210}

References getClass().

Referenced by findAllPackages().

◆ getProcessNumber()

QCString VhdlDocGen::getProcessNumber ( )
static

returns the next number of an anonymous process

Definition at line 756 of file vhdldocgen.cpp.

757{
758 static int stringCounter;
759 QCString qcs("PROCESS_");
760 char buf[8];
761 qsnprintf(buf,8,"%d",stringCounter++);
762 qcs.append(&buf[0]);
763 return qcs;
764}
#define qsnprintf
Definition qcstring.h:49

References QCString::append(), and qsnprintf.

◆ getProtectionName()

QCString VhdlDocGen::getProtectionName ( int prot)
static

Definition at line 698 of file vhdldocgen.cpp.

699{
700 if (prot==VhdlDocGen::ENTITYCLASS)
701 return "entity";
702 else if (prot==VhdlDocGen::ARCHITECTURECLASS)
703 return "architecture";
704 else if (prot==VhdlDocGen::PACKAGECLASS)
705 return "package";
706 else if (prot==VhdlDocGen::PACKBODYCLASS)
707 return "package body";
708
709 return "";
710}

References ARCHITECTURECLASS, ENTITYCLASS, PACKAGECLASS, and PACKBODYCLASS.

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

◆ getRecordNumber()

QCString VhdlDocGen::getRecordNumber ( )
static

returns the next number of a record|unit member

Definition at line 744 of file vhdldocgen.cpp.

745{
746 char buf[12];
747 qsnprintf(buf,12,"%d",recordCounter++);
748 QCString qcs(&buf[0]);
749 return qcs;
750}
static int recordCounter

References qsnprintf, and recordCounter.

Referenced by VHDLOutlineParser::checkInlineCode(), and initUCF().

◆ init()

void VhdlDocGen::init ( )
static

Definition at line 173 of file vhdldocgen.cpp.

174{
175}

Referenced by VHDLCodeParser::parseCode().

◆ isAlias()

bool VhdlDocGen::isAlias ( const MemberDef * mdef)
static

Definition at line 2447 of file vhdldocgen.cpp.

2448{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::ALIAS; }

References ALIAS, and MemberDef::getVhdlSpecifiers().

Referenced by writeTagFile().

◆ isArchitecture()

bool VhdlDocGen::isArchitecture ( const MemberDef * mdef)
static

Definition at line 2481 of file vhdldocgen.cpp.

References ARCHITECTURE, and MemberDef::getVhdlSpecifiers().

◆ isAttribute()

bool VhdlDocGen::isAttribute ( const MemberDef * mdef)
static

Definition at line 2473 of file vhdldocgen.cpp.

References ATTRIBUTE, and MemberDef::getVhdlSpecifiers().

Referenced by writeTagFile().

◆ isCompInst()

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

Definition at line 2493 of file vhdldocgen.cpp.

References MemberDef::getVhdlSpecifiers(), and INSTANTIATION.

Referenced by writeTagFile(), and writeVHDLDeclaration().

◆ isComponent()

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

Definition at line 2455 of file vhdldocgen.cpp.

References COMPONENT, and MemberDef::getVhdlSpecifiers().

Referenced by writeTagFile(), and writeVHDLDeclaration().

◆ isConfig()

bool VhdlDocGen::isConfig ( const MemberDef * mdef)
static

Definition at line 2445 of file vhdldocgen.cpp.

2446{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::CONFIG; }

References CONFIG, and MemberDef::getVhdlSpecifiers().

Referenced by writeVHDLDeclaration().

◆ isConstant()

bool VhdlDocGen::isConstant ( const MemberDef * mdef)
static

Definition at line 2461 of file vhdldocgen.cpp.

2462{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::CONSTANT; }

References CONSTANT, and MemberDef::getVhdlSpecifiers().

Referenced by writeTagFile().

◆ isConstraint()

bool VhdlDocGen::isConstraint ( const MemberDef * mdef)
static

Definition at line 2443 of file vhdldocgen.cpp.

References MemberDef::getVhdlSpecifiers(), and UCF_CONST.

Referenced by writeVHDLTypeDocumentation().

◆ isEntity()

bool VhdlDocGen::isEntity ( const MemberDef * mdef)
static

Definition at line 2459 of file vhdldocgen.cpp.

2460{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::ENTITY; }

References ENTITY, and MemberDef::getVhdlSpecifiers().

Referenced by writeTagFile().

◆ isFile()

bool VhdlDocGen::isFile ( const MemberDef * mdef)
static

Definition at line 2489 of file vhdldocgen.cpp.

2490{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::VFILE; }

References MemberDef::getVhdlSpecifiers(), and VFILE.

Referenced by writeTagFile().

◆ isGeneric()

bool VhdlDocGen::isGeneric ( const MemberDef * mdef)
static

Definition at line 2451 of file vhdldocgen.cpp.

2452{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::GENERIC; }

References GENERIC, and MemberDef::getVhdlSpecifiers().

Referenced by writeTagFile(), and writeVHDLTypeDocumentation().

◆ isGroup()

bool VhdlDocGen::isGroup ( const MemberDef * mdef)
static

Definition at line 2491 of file vhdldocgen.cpp.

2492{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::GROUP; }

References MemberDef::getVhdlSpecifiers(), and GROUP.

Referenced by writeTagFile().

◆ isLibrary()

bool VhdlDocGen::isLibrary ( const MemberDef * mdef)
static

Definition at line 2449 of file vhdldocgen.cpp.

2450{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::LIBRARY; }

References MemberDef::getVhdlSpecifiers(), and LIBRARY.

Referenced by writeTagFile(), and writeVHDLTypeDocumentation().

◆ isMisc()

bool VhdlDocGen::isMisc ( const MemberDef * mdef)
static

◆ isNumber()

bool VhdlDocGen::isNumber ( const std::string & s)
static

returns TRUE if this string is a number

Definition at line 839 of file vhdldocgen.cpp.

840{
841 static const reg::Ex regg(R"([0-9][0-9eEfFbBcCdDaA_.#+?xXzZ-]*)");
842 return reg::match(s,regg);
843}// isNumber
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
Definition regex.cpp:759

References reg::match().

Referenced by checkVhdlString(), writeFormatString(), and writeWord().

◆ isPackage()

bool VhdlDocGen::isPackage ( const MemberDef * mdef)
static

Definition at line 2457 of file vhdldocgen.cpp.

2458{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::USE; }

References MemberDef::getVhdlSpecifiers(), and USE.

Referenced by findAllPackages(), writeTagFile(), and writeVHDLTypeDocumentation().

◆ isPackageBody()

bool VhdlDocGen::isPackageBody ( const MemberDef * mdef)
static

Definition at line 2485 of file vhdldocgen.cpp.

References MemberDef::getVhdlSpecifiers(), and PACKAGE_BODY.

◆ isPort()

bool VhdlDocGen::isPort ( const MemberDef * mdef)
static

Definition at line 2453 of file vhdldocgen.cpp.

2454{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::PORT; }

References MemberDef::getVhdlSpecifiers(), and PORT.

Referenced by writeTagFile(), and writeVHDLTypeDocumentation().

◆ isProcedure()

bool VhdlDocGen::isProcedure ( const MemberDef * mdef)
static

◆ isProcess()

bool VhdlDocGen::isProcess ( const MemberDef * mdef)
static

◆ isRecord()

bool VhdlDocGen::isRecord ( const MemberDef * mdef)
static

Definition at line 2479 of file vhdldocgen.cpp.

2480{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::RECORD; }

References MemberDef::getVhdlSpecifiers(), and RECORD.

Referenced by writeTagFile().

◆ isSignal()

bool VhdlDocGen::isSignal ( const MemberDef * mdef)
static

Definition at line 2471 of file vhdldocgen.cpp.

2472{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::SIGNAL; }

References MemberDef::getVhdlSpecifiers(), and SIGNAL.

◆ isSignals()

bool VhdlDocGen::isSignals ( const MemberDef * mdef)
static

Definition at line 2475 of file vhdldocgen.cpp.

2476{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::SIGNAL; }

References MemberDef::getVhdlSpecifiers(), and SIGNAL.

Referenced by writeTagFile().

◆ isSubClass()

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

Definition at line 2323 of file vhdldocgen.cpp.

2324{
2325 bool found=FALSE;
2326 //printf("isBaseClass(cd=%s) looking for %s\n",qPrint(name()),qPrint(bcd->name()));
2327 if (level>255)
2328 {
2329 err("Possible recursive class relation while inside %s and looking for %s\n",qPrint(cd->name()),qPrint(scd->name()));
2330 abort();
2331 }
2332
2333 for (const auto &bcd :cd->subClasses())
2334 {
2335 const ClassDef *ccd=bcd.classDef;
2336 if (!followInstances && ccd->templateMaster()) ccd=ccd->templateMaster();
2337 //printf("isSubClass() subclass %s\n",qPrint(ccd->name()));
2338 if (ccd==scd)
2339 {
2340 found=true;
2341 }
2342 else
2343 {
2344 if (level <256)
2345 {
2346 level = ccd->isBaseClass(scd,followInstances);
2347 if (level>0)
2348 {
2349 found=true;
2350 }
2351 }
2352 }
2353 }
2354 return found;
2355}
virtual int isBaseClass(const ClassDef *bcd, bool followInstances, const QCString &templSpec=QCString()) const =0
Returns TRUE iff bcd is a direct or indirect base class of this class.
virtual const ClassDef * templateMaster() const =0
Returns the template master of which this class is an instance.
virtual const BaseClassList & subClasses() const =0
Returns the list of sub classes that directly derive from this class.
#define err(fmt,...)
Definition message.h:84
bool found
Definition util.cpp:984

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

Referenced by addInstance().

◆ isSubType()

bool VhdlDocGen::isSubType ( const MemberDef * mdef)
static

Definition at line 2465 of file vhdldocgen.cpp.

2466{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::SUBTYPE; }

References MemberDef::getVhdlSpecifiers(), and SUBTYPE.

Referenced by writeTagFile().

◆ isUnit()

bool VhdlDocGen::isUnit ( const MemberDef * mdef)
static

Definition at line 2483 of file vhdldocgen.cpp.

2484{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::UNITS; }

References MemberDef::getVhdlSpecifiers(), and UNITS.

◆ isVariable()

bool VhdlDocGen::isVariable ( const MemberDef * mdef)
static

Definition at line 2487 of file vhdldocgen.cpp.

References MemberDef::getVhdlSpecifiers(), and SHAREDVARIABLE.

Referenced by writeTagFile().

◆ isVhdlClass()

static bool VhdlDocGen::isVhdlClass ( const Entry * cu)
inlinestatic

Definition at line 212 of file vhdldocgen.h.

213 {
214 return cu->vhdlSpec==VhdlSpecifier::ENTITY ||
218 }
VhdlSpecifier vhdlSpec
VHDL specifiers.
Definition entry.h:183

References ARCHITECTURE, ENTITY, PACKAGE, PACKAGE_BODY, and Entry::vhdlSpec.

Referenced by VHDLOutlineParser::mapLibPackage().

◆ isVhdlFunction()

bool VhdlDocGen::isVhdlFunction ( const MemberDef * mdef)
static

◆ isVType()

bool VhdlDocGen::isVType ( const MemberDef * mdef)
static

Definition at line 2463 of file vhdldocgen.cpp.

2464{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::TYPE; }

References MemberDef::getVhdlSpecifiers(), and TYPE.

Referenced by writeTagFile().

◆ parseForBinding()

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

Definition at line 2092 of file vhdldocgen.cpp.

2093{
2094 static const reg::Ex exp(R"([()\s])");
2095
2096 auto ql = split(entity.str(),exp);
2097
2098 if (findIndex(ql,"open")!=-1)
2099 {
2100 return "open";
2101 }
2102
2103 if (ql.size()<2)
2104 {
2105 return "";
2106 }
2107
2108 std::string label=ql[0];
2109 entity = ql[1];
2110 int index=entity.findRev(".");
2111 if (index!=-1)
2112 {
2113 entity.remove(0,index+1);
2114 }
2115
2116 if (ql.size()==3)
2117 {
2118 arch=ql[2];
2119 }
2120 return QCString(label);
2121}
int findIndex(const StringVector &sv, const std::string &s)
find the index of a string in a vector of strings, returns -1 if the string could not be found
Definition util.cpp:6982

References findIndex(), QCString::findRev(), QCString::remove(), split(), and QCString::str().

Referenced by computeVhdlComponentRelations().

◆ parseForConfig()

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

Definition at line 2060 of file vhdldocgen.cpp.

2061{
2062 if (!entity.contains(":")) return "";
2063
2064 static const reg::Ex exp(R"([:()\s])");
2065 auto ql=split(entity.str(),exp);
2066 if (ql.size()<2)
2067 {
2068 return "";
2069 }
2070 QCString label(ql[0]);
2071 entity = ql[1];
2072 int index = entity.findRev(".");
2073 if (index!=-1)
2074 {
2075 entity.remove(0,index+1);
2076 }
2077
2078 if (ql.size()==3)
2079 {
2080 arch = ql[2];
2081 ql=split(arch.str(),exp);
2082 if (ql.size()>1) // expression
2083 {
2084 arch="";
2085 }
2086 }
2087 return label; // label
2088}
int contains(char c, bool cs=TRUE) const
Definition qcstring.cpp:143

References QCString::contains(), QCString::findRev(), QCString::remove(), split(), and QCString::str().

◆ parseFuncProto()

void VhdlDocGen::parseFuncProto ( const QCString & text,
QCString & name,
QCString & ret,
bool doc = false )
static

parses a function proto

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

Definition at line 634 of file vhdldocgen.cpp.

635{
636 QCString s1(text);
637 QCString temp;
638
639 int index=s1.find("(");
640 if (index<0) index=0;
641 int end=s1.findRev(")");
642
643 if ((end-index)>0)
644 {
645 temp=s1.mid(index+1,(end-index-1));
646 //getFuncParams(qlist,temp);
647 }
648 if (doc)
649 {
650 name=s1.left(index);
651 name=name.stripWhiteSpace();
652 if ((end-index)>0)
653 {
654 ret="function";
655 }
656 return;
657 }
658 else
659 {
660 s1=s1.stripWhiteSpace();
661 int i=s1.find('(');
662 int s=s1.find(' ');
663 if (s==-1) s=s1.find('\t');
664 if (i==-1 || i<s)
666 else // s<i, s=start of name, i=end of name
667 s1=s1.mid(s,(i-s));
668
669 name=s1.stripWhiteSpace();
670 }
671 index=s1.findRev("return",-1,FALSE);
672 if (index !=-1)
673 {
674 ret=s1.mid(index+6,s1.length());
675 ret=ret.stripWhiteSpace();
677 }
678}
static bool deleteCharRev(QCString &s, char c)
DirIterator end(const DirIterator &) noexcept
Definition dir.cpp:175

References deleteCharRev(), end(), FALSE, QCString::find(), QCString::findRev(), getIndexWord(), QCString::left(), QCString::length(), QCString::mid(), and QCString::stripWhiteSpace().

Referenced by writeFuncProto().

◆ parseUCF()

void VhdlDocGen::parseUCF ( const QCString & input,
Entry * entity,
const QCString & f,
bool vendor )
static

Definition at line 1918 of file vhdldocgen.cpp.

1919{
1920 QCString ucFile(input);
1921 int lineNo=0;
1922 QCString comment("#!");
1923 QCString brief;
1924
1925 while (!ucFile.isEmpty())
1926 {
1927 int i=ucFile.find("\n");
1928 if (i<0) break;
1929 lineNo++;
1930 QCString temp=ucFile.left(i);
1931 temp=temp.stripWhiteSpace();
1932 bool bb=temp.stripPrefix("//");
1933
1934 if (!temp.isEmpty())
1935 {
1936 if (temp.stripPrefix(comment) )
1937 {
1938 brief+=temp;
1939 brief.append("\\n");
1940 }
1941 else if (!temp.stripPrefix("#") && !bb)
1942 {
1943 if (altera)
1944 {
1945 int in=temp.find("-name");
1946 if (in>0)
1947 {
1948 temp=temp.remove(0,in+5);
1949 }
1950
1951 temp.stripPrefix("set_location_assignment");
1952
1953 initUCF(entity,QCString(),temp,lineNo,fileName,brief);
1954 }
1955 else
1956 {
1957 static const reg::Ex ee(R"([\s=])");
1958 int in=findIndex(temp.str(),ee);
1959 if (in<0) in=0;
1960 QCString ff=temp.left(in);
1961 temp.stripPrefix(ff);
1962 ff.append("#");
1963 if (!temp.isEmpty())
1964 {
1965 initUCF(entity,ff,temp,lineNo,fileName,brief);
1966 }
1967 }
1968 }
1969 }//temp
1970
1971 ucFile=ucFile.remove(0,i+1);
1972 }// while
1973}
static void initUCF(Entry *root, const QCString &type, QCString &qcs, int line, const QCString &fileName, QCString &brief)
const char * comment

References QCString::append(), comment, QCString::find(), findIndex(), initUCF(), QCString::isEmpty(), QCString::left(), QCString::remove(), QCString::str(), QCString::stripPrefix(), and QCString::stripWhiteSpace().

Referenced by VHDLOutlineParser::parseInput().

◆ prepareComment()

void VhdlDocGen::prepareComment ( QCString & qcs)
static

strips the "--!" prefixes of vhdl comments

Definition at line 594 of file vhdldocgen.cpp.

595{
596 qcs=qcs.stripWhiteSpace();
597 if (qcs.isEmpty()) return;
598
599 const char* sc="--!";
600 if (qcs.startsWith(sc)) qcs = qcs.mid(qstrlen(sc));
601 static const reg::Ex re(R"(\n[ \t]*--!)");
602 std::string s = qcs.str();
603 reg::Iterator iter(s,re);
604 reg::Iterator end;
605 std::string result;
606 size_t p=0;
607 size_t sl=s.length();
608 for ( ; iter!=end ; ++iter)
609 {
610 const auto &match = *iter;
611 size_t i = match.position();
612 result+="\n";
613 result+=s.substr(p,i-p);
614 p = match.position()+match.length();
615 }
616 if (p<sl)
617 {
618 result+="\n";
619 result+=s.substr(p);
620 }
621
622 qcs = result;
623 qcs=qcs.stripWhiteSpace();
624}
bool startsWith(const char *s) const
Definition qcstring.h:492
uint32_t qstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
Definition qcstring.h:58

References end(), QCString::isEmpty(), QCString::mid(), qstrlen(), QCString::startsWith(), QCString::str(), and QCString::stripWhiteSpace().

Referenced by VHDLOutlineParser::checkInlineCode(), VHDLOutlineParser::checkMultiComment(), and VHDLOutlineParser::handleCommentBlock().

◆ resetCodeVhdlParserState()

void VhdlDocGen::resetCodeVhdlParserState ( )
static

Definition at line 2435 of file vhdldocgen.cpp.

2436{
2437 std::lock_guard lock(g_vhdlMutex);
2438 g_varMap.clear();
2439 g_classList.clear();
2440 g_packages.clear();
2441}

References g_classList, g_packages, g_varMap, and g_vhdlMutex.

◆ setFlowMember()

void VhdlDocGen::setFlowMember ( const MemberDef * flowMember)
static

Definition at line 77 of file vhdldocgen.cpp.

78{
79 flowMember=mem;
80}

References flowMember.

Referenced by createFlowChart().

◆ writeClassType()

bool VhdlDocGen::writeClassType ( const ClassDef * cd,
OutputList & ol,
QCString & cname )
static

Definition at line 1797 of file vhdldocgen.cpp.

1799{
1801 cname=VhdlDocGen::getClassName(cd);
1802 ol.startBold();
1803 ol.writeString(qcs);
1804 ol.writeString(" ");
1805 ol.endBold();
1806 //ol.insertMemberAlign();
1807 return FALSE;
1808}// writeClassLink
void writeString(const QCString &text)
Definition outputlist.h:412
void startBold()
Definition outputlist.h:562
void endBold()
Definition outputlist.h:564
virtual QCString trVhdlType(VhdlSpecifier type, bool single)=0
Translator * theTranslator
Definition language.cpp:71

References OutputList::endBold(), FALSE, getClassName(), getSpecifierTypeFromClass(), OutputList::startBold(), theTranslator, TRUE, and OutputList::writeString().

◆ writeFormatString()

void VhdlDocGen::writeFormatString ( const QCString & s,
OutputList & ol,
const MemberDef * mdef )
static

writes a colored and formatted string

Definition at line 770 of file vhdldocgen.cpp.

771{
772 static const reg::Ex reg(R"([\[\]./<>:\s,;'+*|&=()\"-])");
773 QCString qcs = s;
774 qcs+=QCString(" ");// parsing the last sign
775 QCString find=qcs;
776 QCString temp=qcs;
777 char buf[2];
778 buf[1]='\0';
779
780 int j = findIndex(temp.str(),reg);
781
782 ol.startBold();
783 if (j>=0)
784 {
785 while (j>=0)
786 {
787 find=find.left(j);
788 buf[0]=temp[j];
789 const char *ss=VhdlDocGen::findKeyWord(find);
790 bool k=isNumber(find.str()); // is this a number
791 if (k)
792 {
793 ol.docify(" ");
794 startFonts(find,"vhdldigit",ol);
795 ol.docify(" ");
796 }
797 else if (j != 0 && ss)
798 {
799 startFonts(find,ss,ol);
800 }
801 else
802 {
803 if (j>0)
804 {
805 VhdlDocGen::writeStringLink(mdef,find,ol);
806 }
807 }
808 startFonts(&buf[0],"vhdlchar",ol);
809
810 QCString st=temp.remove(0,j+1);
811 find=st;
812 if (!find.isEmpty() && find.at(0)=='"')
813 {
814 int ii=find.find('"',2);
815 if (ii>1)
816 {
817 QCString com=find.left(ii+1);
818 startFonts(com,"keyword",ol);
819 temp=find.remove(0,ii+1);
820 }
821 }
822 else
823 {
824 temp=st;
825 }
826 j = findIndex(temp.str(),reg);
827 }//while
828 }//if
829 else
830 {
831 startFonts(find,"vhdlchar",ol);
832 }
833 ol.endBold();
834}// writeFormatString
void docify(const QCString &s)
Definition outputlist.h:438
static bool isNumber(const std::string &s)
static void writeStringLink(const MemberDef *mdef, QCString mem, OutputList &ol)
static const char * findKeyWord(const QCString &word)
static void startFonts(const QCString &q, const char *keyword, OutputList &ol)

References QCString::at(), OutputList::docify(), OutputList::endBold(), QCString::find(), findIndex(), findKeyWord(), QCString::isEmpty(), isNumber(), QCString::left(), QCString::remove(), OutputList::startBold(), startFonts(), QCString::str(), and writeStringLink().

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

◆ writeFuncProcDocu()

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 1067 of file vhdldocgen.cpp.

1072{
1073 //bool sem=FALSE;
1074 ol.enableAll();
1075
1076 size_t index=al.size();
1077 if (index==0)
1078 {
1079 ol.docify(" ( ) ");
1080 return FALSE;
1081 }
1082 ol.endMemberDocName();
1084 //ol.startParameterName(FALSE);
1085 bool first=TRUE;
1086 for (const Argument &arg : al)
1087 {
1088 ol.startParameterType(first,"");
1089 // if (first) ol.writeChar('(');
1090 QCString attl=arg.defval;
1091
1092 //bool bGen=attl.stripPrefix("generic");
1093 //if (bGen)
1094 // VhdlDocGen::writeFormatString(QCString("generic "),ol,md);
1095
1096
1098 {
1099 startFonts(arg.defval,"keywordtype",ol);
1100 ol.docify(" ");
1101 }
1102 ol.endParameterType();
1103
1105 VhdlDocGen::writeFormatString(arg.name,ol,md);
1106
1108 {
1109 startFonts(arg.attrib,"stringliteral",ol);
1110 }
1111 else if (VhdlDocGen::isVhdlFunction(md))
1112 {
1113 startFonts(QCString("in"),"stringliteral",ol);
1114 }
1115
1116 ol.docify(" ");
1118 ol.startEmphasis();
1120 if (!VhdlDocGen::isProcess(md))
1121 {
1122 // startFonts(arg.type,"vhdlkeyword",ol);
1123 VhdlDocGen::writeFormatString(arg.type,ol,md);
1124 }
1126 ol.endEmphasis();
1128
1129 if (--index)
1130 {
1131 ol.docify(" , ");
1132 }
1133 else
1134 {
1135 // ol.docify(" ) ");
1136 ol.endParameterName();
1138 ol.endParameterExtra(true,false,true);
1139 break;
1140 }
1141 ol.endParameterName();
1143 ol.endParameterExtra(false,false,false);
1144
1145 //sem=TRUE;
1146 first=FALSE;
1147 }
1148 //ol.endParameterList();
1149 return TRUE;
1150
1151} // writeDocFunProc
size_t size() const
Definition arguments.h:93
void endParameterExtra(bool last, bool one, bool bracket)
Definition outputlist.h:693
void disable(OutputType o)
void endMemberDocName()
Definition outputlist.h:681
void startParameterExtra()
Definition outputlist.h:691
void startParameterList(bool openBracket)
Definition outputlist.h:699
void enable(OutputType o)
void endEmphasis()
Definition outputlist.h:528
void startParameterType(bool first, const QCString &key)
Definition outputlist.h:683
void endParameterName()
Definition outputlist.h:689
void startEmphasis()
Definition outputlist.h:526
void endParameterType()
Definition outputlist.h:685
void startParameterName(bool one)
Definition outputlist.h:687
void enableAll()
static bool isProcess(const MemberDef *mdef)

References OutputList::disable(), OutputList::docify(), OutputList::enable(), OutputList::enableAll(), OutputList::endEmphasis(), OutputList::endMemberDocName(), OutputList::endParameterExtra(), OutputList::endParameterName(), OutputList::endParameterType(), FALSE, isProcedure(), isProcess(), isVhdlFunction(), Man, ArgumentList::size(), OutputList::startEmphasis(), startFonts(), OutputList::startParameterExtra(), OutputList::startParameterList(), OutputList::startParameterName(), OutputList::startParameterType(), TRUE, and writeFormatString().

Referenced by writeVHDLTypeDocumentation().

◆ writeFunctionProto()

void VhdlDocGen::writeFunctionProto ( OutputList & ol,
const ArgumentList & al,
const MemberDef * mdef )
static

writes a function prototype to the output

Definition at line 963 of file vhdldocgen.cpp.

964{
965 if (!al.hasParameters()) return;
966 bool sem=FALSE;
967 size_t len=al.size();
968 ol.startBold();
969 ol.docify(" ( ");
970 ol.endBold();
971 if (len>2)
972 {
973 ol.lineBreak();
974 }
975 for (const Argument &arg : al)
976 {
977 ol.startBold();
978 QCString att=arg.defval;
979 bool bGen=att.stripPrefix("generic");
980
981 if (sem && len < 3)
982 {
983 ol.docify(" , ");
984 }
985
986 if (bGen)
987 {
988 VhdlDocGen::formatString(QCString("generic "),ol,mdef);
989 }
990 if (!att.isEmpty())
991 {
992 const char *str=VhdlDocGen::findKeyWord(att);
993 att+=" ";
994 if (str)
995 VhdlDocGen::formatString(att,ol,mdef);
996 else
997 startFonts(att,"vhdlchar",ol);
998 }
999
1000 QCString nn=arg.name;
1001 nn+=": ";
1002 QCString ss=arg.type.stripWhiteSpace(); //.lower();
1003 QCString w=ss.stripWhiteSpace();//.upper();
1004 startFonts(nn,"vhdlchar",ol);
1005 startFonts("in ","stringliteral",ol);
1006 const char *str=VhdlDocGen::findKeyWord(ss);
1007 if (str)
1008 VhdlDocGen::formatString(w,ol,mdef);
1009 else
1010 startFonts(w,"vhdlchar",ol);
1011
1012 if (!arg.attrib.isEmpty())
1013 startFonts(arg.attrib,"vhdlchar",ol);
1014
1015 sem=TRUE;
1016 ol.endBold();
1017 if (len > 2)
1018 {
1019 ol.lineBreak();
1020 }
1021 }
1022 ol.startBold();
1023 ol.docify(" )");
1024 QCString exp=mdef->excpString();
1025 if (!exp.isEmpty())
1026 {
1027 ol.insertMemberAlign();
1028 ol.startBold();
1029 ol.docify("[ ");
1030 ol.docify(exp);
1031 ol.docify(" ]");
1032 ol.endBold();
1033 }
1034 ol.endBold();
1035}
bool hasParameters() const
Definition arguments.h:69
virtual QCString excpString() const =0
void insertMemberAlign(bool templ=FALSE)
Definition outputlist.h:518
void lineBreak(const QCString &style=QCString())
Definition outputlist.h:560
static void formatString(const QCString &, OutputList &ol, const MemberDef *)

References OutputList::docify(), OutputList::endBold(), MemberDef::excpString(), FALSE, findKeyWord(), formatString(), ArgumentList::hasParameters(), OutputList::insertMemberAlign(), QCString::isEmpty(), OutputList::lineBreak(), ArgumentList::size(), OutputList::startBold(), startFonts(), QCString::stripPrefix(), QCString::stripWhiteSpace(), and TRUE.

Referenced by writeVHDLDeclaration().

◆ writeInlineClassLink()

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 465 of file vhdldocgen.cpp.

466{
467 std::vector<QCString> ql;
468 QCString nn=cd->className();
470
472
473 //type=type.lower();
474 type+=" >> ";
477
479 {
480 nn.stripPrefix("_");
481 cd=getClass(nn);
482 }
483 else if (ii==VhdlDocGen::PACKAGECLASS)
484 {
485 nn.prepend("_");
486 cd=getClass(nn);
487 }
489 {
490 StringVector qlist=split(nn.str(),"-");
491 if (qlist.size()>1)
492 {
493 nn=qlist[1];
495 }
496 }
497
498 QCString opp;
500 {
502 for (const auto &s : ql)
503 {
504 StringVector qlist=split(s.str(),"-");
505 if (qlist.size()>2)
506 {
507 QCString s1(qlist[0]);
508 QCString s2(qlist[1]);
509 s1.stripPrefix("_");
510 if (ql.size()==1) s1.clear();
511 ClassDef *cc = getClass(s);
512 if (cc)
513 {
514 VhdlDocGen::writeVhdlLink(cc,ol,type,s2,s1);
515 }
516 }
517 }
518 }
519 else
520 {
521 VhdlDocGen::writeVhdlLink(cd,ol,type,nn,opp);
522 }
523
526
527}// write
QCString & prepend(const char *s)
Definition qcstring.h:407
static void writeVhdlLink(const ClassDef *cdd, OutputList &ol, QCString &type, QCString &name, QCString &beh)
static void findAllArchitectures(std::vector< QCString > &ql, const ClassDef *cd)

References ARCHITECTURECLASS, ClassDef::className(), QCString::clear(), convert(), OutputList::disable(), OutputList::enable(), ENTITYCLASS, findAllArchitectures(), getClass(), getSpecifierTypeFromClass(), Man, PACKAGECLASS, PACKBODYCLASS, QCString::prepend(), ClassDef::protection(), RTF, split(), QCString::str(), QCString::stripPrefix(), theTranslator_vhdlType, TRUE, and writeVhdlLink().

Referenced by ClassDefImpl::writeMemberDeclarations().

◆ writePlainVHDLDeclarations()

void VhdlDocGen::writePlainVHDLDeclarations ( const MemberList * ml,
OutputList & ol,
const ClassDef * cd,
const NamespaceDef * nd,
const FileDef * fd,
const GroupDef * gd,
const ModuleDef * mod,
VhdlSpecifier specifier )
static

Definition at line 1691 of file vhdldocgen.cpp.

1695{
1696
1697 StringSet pack;
1698
1699 bool first=TRUE;
1700 for (const auto &imd : *mlist)
1701 {
1702 MemberDefMutable *md = toMemberDefMutable(imd);
1703 if (md)
1704 {
1706 if (md->isBriefSectionVisible() && (mems==specifier) && (mems!=VhdlSpecifier::LIBRARY) )
1707 {
1708 if (first) { ol.startMemberList();first=FALSE; }
1709 VhdlDocGen::writeVHDLDeclaration(md,ol,cd,nd,fd,gd,mod,FALSE);
1710 } //if
1711 else if (md->isBriefSectionVisible() && (mems==specifier))
1712 {
1713 if (pack.find(md->name().str())==pack.end())
1714 {
1715 if (first) ol.startMemberList(),first=FALSE;
1716 VhdlDocGen::writeVHDLDeclaration(md,ol,cd,nd,fd,gd,mod,FALSE);
1717 pack.insert(md->name().str());
1718 }
1719 } //if
1720 } //if
1721 } //for
1722 if (!first) ol.endMemberList();
1723}//plainDeclaration
virtual bool isBriefSectionVisible() const =0
void startMemberList()
Definition outputlist.h:482
void endMemberList()
Definition outputlist.h:484
static void writeVHDLDeclaration(MemberDefMutable *mdef, OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, bool inGroup)
std::set< std::string > StringSet
Definition containers.h:31
MemberDefMutable * toMemberDefMutable(Definition *d)
VhdlSpecifier
Definition types.h:548

References OutputList::endMemberList(), FALSE, MemberDef::getVhdlSpecifiers(), MemberDef::isBriefSectionVisible(), LIBRARY, Definition::name(), OutputList::startMemberList(), QCString::str(), toMemberDefMutable(), TRUE, and writeVHDLDeclaration().

Referenced by writeVHDLDeclarations().

◆ writeProcedureProto()

void VhdlDocGen::writeProcedureProto ( OutputList & ol,
const ArgumentList & al,
const MemberDef * mdef )
static

writes a procedure prototype to the output

Definition at line 908 of file vhdldocgen.cpp.

909{
910 bool sem=FALSE;
911 size_t len=al.size();
912 ol.docify("( ");
913 if (len > 2)
914 {
915 ol.lineBreak();
916 }
917 for (const Argument &arg : al)
918 {
919 ol.startBold();
920 if (sem && len <3)
921 ol.writeChar(',');
922
923 QCString nn=arg.name;
924 nn+=": ";
925
926 QCString defval = arg.defval;
927 const char *str=VhdlDocGen::findKeyWord(defval);
928 defval+=" ";
929 if (str)
930 {
931 startFonts(defval,str,ol);
932 }
933 else
934 {
935 startFonts(defval,"vhdlchar",ol); // write type (variable,constant etc.)
936 }
937
938 startFonts(nn,"vhdlchar",ol); // write name
939 if (qstricmp(arg.attrib,arg.type) != 0)
940 {
941 startFonts(arg.attrib.lower(),"stringliteral",ol); // write in|out
942 }
943 ol.docify(" ");
944 VhdlDocGen::formatString(arg.type,ol,mdef);
945 sem=TRUE;
946 ol.endBold();
947 if (len > 2)
948 {
949 ol.lineBreak();
950 ol.docify(" ");
951 }
952 }//for
953
954 ol.docify(" )");
955
956
957}
void writeChar(char c)
Definition outputlist.h:530

References OutputList::docify(), OutputList::endBold(), FALSE, findKeyWord(), formatString(), OutputList::lineBreak(), qstricmp(), ArgumentList::size(), OutputList::startBold(), startFonts(), TRUE, and OutputList::writeChar().

Referenced by writeVHDLDeclaration().

◆ writeProcessProto()

void VhdlDocGen::writeProcessProto ( OutputList & ol,
const ArgumentList & al,
const MemberDef * mdef )
static

writes a process prototype to the output

Definition at line 1041 of file vhdldocgen.cpp.

1042{
1043 if (!al.hasParameters()) return;
1044 bool sem=FALSE;
1045 ol.startBold();
1046 ol.docify(" ( ");
1047 for (const Argument &arg : al)
1048 {
1049 if (sem)
1050 {
1051 ol.docify(" , ");
1052 }
1053 QCString nn=arg.name;
1054 // startFonts(nn,"vhdlchar",ol);
1056 sem=TRUE;
1057 }
1058 ol.docify(" )");
1059 ol.endBold();
1060}

References OutputList::docify(), OutputList::endBold(), FALSE, ArgumentList::hasParameters(), OutputList::startBold(), TRUE, and writeFormatString().

Referenced by writeVHDLDeclaration().

◆ writeRecordProto()

static void VhdlDocGen::writeRecordProto ( const MemberDef * mdef,
OutputList & ol,
const ArgumentList & al )
static

References flowMember.

◆ writeRecordUnit()

void VhdlDocGen::writeRecordUnit ( QCString & largs,
QCString & ltype,
OutputList & ol,
MemberDefMutable * mdef )
staticprivate

Definition at line 2267 of file vhdldocgen.cpp.

2268{
2269 int i=mdef->name().find('~');
2270 if (i>0)
2271 {
2272 //sets the real record member name
2273 mdef->setName(mdef->name().left(i));
2274 }
2275
2276 writeLink(mdef,ol);
2277 ol.startBold();
2278 ol.insertMemberAlign();
2279 if (!ltype.isEmpty())
2280 {
2281 VhdlDocGen::formatString(ltype,ol,mdef);
2282 }
2283 ol.endBold();
2284}
static void writeLink(const MemberDef *mdef, OutputList &ol)

References OutputList::endBold(), QCString::find(), formatString(), OutputList::insertMemberAlign(), QCString::isEmpty(), QCString::left(), Definition::name(), DefinitionMutable::setName(), OutputList::startBold(), and writeLink().

Referenced by writeVHDLDeclaration().

◆ writeRecUnitDocu()

void VhdlDocGen::writeRecUnitDocu ( const MemberDef * md,
OutputList & ol,
QCString largs )
staticprivate

Definition at line 2287 of file vhdldocgen.cpp.

2291{
2292
2293 StringVector ql=split(largs.str(),"#");
2294 size_t len=ql.size();
2296 bool first=TRUE;
2297
2298 for(size_t i=0;i<len;i++)
2299 {
2300 QCString n=QCString(ql[i]);
2301 ol.startParameterType(first,"");
2302 ol.endParameterType();
2304 VhdlDocGen::formatString(n,ol,md);
2305 ol.endParameterName();
2307 if ((len-i)>1)
2308 {
2309 ol.endParameterExtra(false,false,false);
2310 }
2311 else
2312 {
2313 ol.endParameterExtra(true,false,true);
2314 }
2315
2316 first=FALSE;
2317 }
2318
2319}//#

References OutputList::endParameterExtra(), OutputList::endParameterName(), OutputList::endParameterType(), FALSE, formatString(), split(), OutputList::startParameterExtra(), OutputList::startParameterList(), OutputList::startParameterName(), OutputList::startParameterType(), QCString::str(), and TRUE.

Referenced by writeVHDLTypeDocumentation().

◆ writeSource()

void VhdlDocGen::writeSource ( const MemberDef * mdef,
OutputList & ol,
const QCString & cname )
static

Definition at line 1837 of file vhdldocgen.cpp.

1838{
1839 auto intf = Doxygen::parserManager->getCodeParser(".vhd");
1840 // pIntf->resetCodeParserState();
1841
1842 QCString codeFragment=mdef->documentation();
1843
1844 if (cname.isEmpty())
1845 {
1846 writeLink(mdef,ol);
1847 int fi=0;
1848 int j=0;
1849 do
1850 {
1851 fi=codeFragment.find("\n",++fi);
1852 } while(fi>=0 && j++ <3);
1853
1854 // show only the first four lines
1855 if (j==4)
1856 {
1857 codeFragment=codeFragment.left(fi);
1858 codeFragment.append("\n .... ");
1859 }
1860 }
1861
1862 codeFragment.prepend("\n");
1863 ol.pushGeneratorState();
1864 auto &codeOL = ol.codeGenerators();
1865 codeOL.startCodeFragment("DoxyCode");
1866 intf->parseCode( codeOL, // codeOutIntf
1867 QCString(), // scope
1868 codeFragment, // input
1869 SrcLangExt::VHDL, // lang
1870 Config_getBool(STRIP_CODE_COMMENTS),
1871 FALSE, // isExample
1872 QCString(), // exampleName
1873 mdef->getFileDef(), // fileDef
1874 mdef->getStartBodyLine(), // startLine
1875 mdef->getEndBodyLine(), // endLine
1876 TRUE, // inlineFragment
1877 mdef, // memberDef
1878 TRUE // show line numbers
1879 );
1880
1881 codeOL.endCodeFragment("DoxyCode");
1882 ol.popGeneratorState();
1883
1884 if (cname.isEmpty()) return;
1885
1886 MemberDefMutable *mdm = toMemberDefMutable(const_cast<MemberDef*>(mdef));
1887 if (mdm)
1888 {
1889 mdm->writeSourceDef(ol);
1890 if (mdef->hasReferencesRelation()) mdm->writeSourceRefs(ol,cname);
1891 if (mdef->hasReferencedByRelation()) mdm->writeSourceReffedBy(ol,cname);
1892 }
1893}
virtual QCString documentation() const =0
virtual void writeSourceRefs(OutputList &ol, const QCString &scopeName) const =0
virtual void writeSourceDef(OutputList &ol) const =0
virtual void writeSourceReffedBy(OutputList &ol, const QCString &scopeName) const =0
virtual bool hasReferencesRelation() const =0
virtual bool hasReferencedByRelation() const =0
void startCodeFragment(const QCString &style)
Definition outputlist.h:278
const OutputCodeList & codeGenerators() const
Definition outputlist.h:357
void pushGeneratorState()
void popGeneratorState()
std::unique_ptr< CodeParserInterface > getCodeParser(const QCString &extension)
Gets the interface to the parser associated with a given extension.
Definition parserintf.h:218
#define Config_getBool(name)
Definition config.h:33

References QCString::append(), OutputList::codeGenerators(), Config_getBool, Definition::documentation(), FALSE, QCString::find(), Definition::getEndBodyLine(), MemberDef::getFileDef(), Definition::getStartBodyLine(), MemberDef::hasReferencedByRelation(), MemberDef::hasReferencesRelation(), QCString::isEmpty(), QCString::left(), Doxygen::parserManager, OutputList::popGeneratorState(), QCString::prepend(), OutputList::pushGeneratorState(), OutputCodeList::startCodeFragment(), toMemberDefMutable(), TRUE, VHDL, writeLink(), DefinitionMutable::writeSourceDef(), DefinitionMutable::writeSourceReffedBy(), and DefinitionMutable::writeSourceRefs().

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

◆ writeStringLink()

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 1813 of file vhdldocgen.cpp.

1814{
1815 if (mdef)
1816 {
1817 const ClassDef *cd=mdef->getClassDef();
1818 if (cd)
1819 {
1820 QCString n=cd->name();
1821 const MemberDef* memdef=VhdlDocGen::findMember(n,mem);
1822 if (memdef && memdef->isLinkable())
1823 {
1824 ol.startBold();
1825 writeLink(memdef,ol);
1826 ol.endBold();
1827 ol.docify(" ");
1828 return;
1829 }
1830 }
1831 }
1832 startFonts(mem,"vhdlchar",ol);
1833}// found component
virtual bool isLinkable() const =0
virtual const ClassDef * getClassDef() const =0
static const MemberDef * findMember(const QCString &className, const QCString &memName)

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

Referenced by writeFormatString().

◆ writeTagFile()

void VhdlDocGen::writeTagFile ( MemberDefMutable * mdef,
TextStream & tagFile )
static

Definition at line 1346 of file vhdldocgen.cpp.

1347{
1348 tagFile << " <member kind=\"";
1349 if (VhdlDocGen::isGeneric(mdef)) tagFile << "generic";
1350 if (VhdlDocGen::isPort(mdef)) tagFile << "port";
1351 if (VhdlDocGen::isEntity(mdef)) tagFile << "entity";
1352 if (VhdlDocGen::isComponent(mdef)) tagFile << "component";
1353 if (VhdlDocGen::isVType(mdef)) tagFile << "type";
1354 if (VhdlDocGen::isConstant(mdef)) tagFile << "constant";
1355 if (VhdlDocGen::isSubType(mdef)) tagFile << "subtype";
1356 if (VhdlDocGen::isVhdlFunction(mdef)) tagFile << "function";
1357 if (VhdlDocGen::isProcedure(mdef)) tagFile << "procedure";
1358 if (VhdlDocGen::isProcess(mdef)) tagFile << "process";
1359 if (VhdlDocGen::isSignals(mdef)) tagFile << "signal";
1360 if (VhdlDocGen::isAttribute(mdef)) tagFile << "attribute";
1361 if (VhdlDocGen::isRecord(mdef)) tagFile << "record";
1362 if (VhdlDocGen::isLibrary(mdef)) tagFile << "library";
1363 if (VhdlDocGen::isPackage(mdef)) tagFile << "package";
1364 if (VhdlDocGen::isVariable(mdef)) tagFile << "shared variable";
1365 if (VhdlDocGen::isFile(mdef)) tagFile << "file";
1366 if (VhdlDocGen::isGroup(mdef)) tagFile << "group";
1367 if (VhdlDocGen::isCompInst(mdef)) tagFile << "instantiation";
1368 if (VhdlDocGen::isAlias(mdef)) tagFile << "alias";
1369 if (VhdlDocGen::isCompInst(mdef)) tagFile << "configuration";
1370
1371 QCString fn = mdef->getOutputFileBase();
1373 tagFile << "\">\n";
1374 tagFile << " <type>" << convertToXML(mdef->typeString()) << "</type>\n";
1375 tagFile << " <name>" << convertToXML(mdef->name()) << "</name>\n";
1376 tagFile << " <anchorfile>" << convertToXML(fn) << "</anchorfile>\n";
1377 tagFile << " <anchor>" << convertToXML(mdef->anchor()) << "</anchor>\n";
1378
1380 tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),TRUE)) << "</arglist>\n";
1381 else if (VhdlDocGen::isProcedure(mdef))
1382 tagFile << " <arglist>" << convertToXML(VhdlDocGen::convertArgumentListToString(mdef->argumentList(),FALSE)) << "</arglist>\n";
1383 else
1384 tagFile << " <arglist>" << convertToXML(mdef->argsString()) << "</arglist>\n";
1385
1386 mdef->writeDocAnchorsToTagFile(tagFile);
1387 tagFile << " </member>\n";
1388}
virtual QCString anchor() const =0
virtual QCString getOutputFileBase() const =0
virtual void writeDocAnchorsToTagFile(TextStream &) const =0
virtual const ArgumentList & argumentList() const =0
static bool isGroup(const MemberDef *mdef)
static QCString convertArgumentListToString(const ArgumentList &al, bool f)
static bool isConstant(const MemberDef *mdef)
static bool isAttribute(const MemberDef *mdef)
static bool isLibrary(const MemberDef *mdef)
static bool isEntity(const MemberDef *mdef)
static bool isPort(const MemberDef *mdef)
static bool isFile(const MemberDef *mdef)
static bool isSignals(const MemberDef *mdef)
static bool isVariable(const MemberDef *mdef)
static bool isVType(const MemberDef *mdef)
static bool isSubType(const MemberDef *mdef)
static bool isCompInst(const MemberDef *mdef)
static bool isRecord(const MemberDef *mdef)
static bool isComponent(const MemberDef *mdef)
static bool isGeneric(const MemberDef *mdef)
static bool isAlias(const MemberDef *mdef)
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:4266
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5243

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

Referenced by MemberList::writeTagFile().

◆ writeVHDLDeclaration()

void VhdlDocGen::writeVHDLDeclaration ( MemberDefMutable * mdef,
OutputList & ol,
const ClassDef * cd,
const NamespaceDef * nd,
const FileDef * fd,
const GroupDef * gd,
const ModuleDef * mod,
bool inGroup )
static

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

Definition at line 1392 of file vhdldocgen.cpp.

1395{
1396 const Definition *d=nullptr;
1397
1398 ASSERT(cd!=nullptr || nd!=nullptr || fd!=nullptr || gd!=nullptr || mod!=nullptr ||
1401 ); // member should belong to something
1402 if (cd) d=cd;
1403 else if (nd) d=nd;
1404 else if (fd) d=fd;
1405 else if (mod) d=mod;
1406 else if (gd) d=gd;
1407 else d=mdef;
1408
1409 // write search index info
1410 if (Doxygen::searchIndex.enabled())
1411 {
1415 }
1416
1417 QCString cname = d->name();
1418 QCString cfname = d->getOutputFileBase();
1419
1420 //HtmlHelp *htmlHelp=nullptr;
1421 // bool hasHtmlHelp = Config_getBool(GENERATE_HTML) && Config_getBool(GENERATE_HTMLHELP);
1422 // if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance();
1423
1424 // search for the last anonymous scope in the member type
1425 ClassDef *annoClassDef=mdef->getClassDefOfAnonymousType();
1426
1427 // start a new member declaration
1430 ///printf("startMemberItem for %s\n",qPrint(name()));
1434
1435 ol.startMemberItem( mdef->anchor(), memType );
1436
1437 // If there is no detailed description we need to write the anchor here.
1438 bool detailsVisible = mdef->hasDetailedDescription();
1439 if (!detailsVisible) // && !m_impl->annMemb)
1440 {
1441 QCString doxyName=mdef->name();
1442 if (!cname.isEmpty()) doxyName.prepend(cname+"::");
1443 QCString doxyArgs=mdef->argsString();
1444 ol.startDoxyAnchor(cfname,cname,mdef->anchor(),doxyName,doxyArgs);
1445 ol.addLabel(cfname,mdef->anchor());
1446
1447 ol.pushGeneratorState();
1450 ol.docify("\n");
1451 ol.popGeneratorState();
1452
1453 }
1454 // *** write type
1455 /*VHDL CHANGE */
1456
1457 QCString ltype(mdef->typeString());
1458 QCString largs(mdef->argsString());
1459
1460 ClassDef *kl=nullptr;
1461 const ArgumentList &al = mdef->argumentList();
1462 QCString nn;
1463 //VhdlDocGen::adjustRecordMember(mdef);
1464 if (gd) gd=nullptr;
1465 switch (mm)
1466 {
1468 VhdlDocGen::writeSource(mdef,ol,nn);
1469 break;
1472 ol.startBold();
1473 VhdlDocGen::formatString(ltype,ol,mdef);
1474 ol.endBold();
1475 ol.insertMemberAlign();
1476 ol.docify(" ");
1477
1478 writeLink(mdef,ol);
1479 if (al.hasParameters() && mm==VhdlSpecifier::FUNCTION)
1481
1484
1485 break;
1486 case VhdlSpecifier::USE:
1487 kl=VhdlDocGen::getClass(mdef->name());
1488 if (kl && (VhdlDocGen::convert(kl->protection())==VhdlDocGen::ENTITYCLASS)) break;
1489 writeLink(mdef,ol);
1490 ol.insertMemberAlign();
1491 ol.docify(" ");
1492
1493 if (kl)
1494 {
1495 nn=kl->getOutputFileBase();
1496 ol.pushGeneratorState();
1498 ol.docify(" ");
1500 ol.startBold();
1501 ol.docify(name);
1502 name.clear();
1503 ol.endBold();
1504 name+=" <"+mdef->name()+">";
1505 ol.startEmphasis();
1506 ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),QCString(),name);
1507 ol.popGeneratorState();
1508 }
1509 break;
1511 writeLink(mdef,ol);
1512 ol.insertMemberAlign();
1513 if (largs=="context")
1514 {
1515 VhdlDocGen::writeRecordUnit(ltype,largs,ol,mdef);
1516 }
1517
1518 break;
1519
1523
1524 writeLink(mdef,ol);
1525 ol.docify(" ");
1526 if (mm==VhdlSpecifier::GENERIC)
1527 {
1528 ol.insertMemberAlign();
1529 ol.startBold();
1530 VhdlDocGen::formatString(largs,ol,mdef);
1531 ol.endBold();
1532 }
1533 else
1534 {
1535 ol.insertMemberAlignLeft(memType, false);
1536 ol.docify(" ");
1537 ol.startBold();
1538 VhdlDocGen::formatString(ltype,ol,mdef);
1539 ol.endBold();
1540 ol.insertMemberAlign();
1541 ol.docify(" ");
1542 VhdlDocGen::formatString(largs,ol,mdef);
1543 }
1544 break;
1546 writeLink(mdef,ol);
1547 ol.insertMemberAlign();
1549 break;
1555 if (VhdlDocGen::isCompInst(mdef) )
1556 {
1557 nn=largs;
1558 if(nn.stripPrefix("function") || nn.stripPrefix("package"))
1559 {
1560 VhdlDocGen::formatString(largs,ol,mdef);
1561 ol.insertMemberAlign();
1562 writeLink(mdef,ol);
1563 ol.docify(" ");
1564 VhdlDocGen::formatString(ltype,ol,mdef);
1565 break;
1566 }
1567
1568 largs.prepend("::");
1569 largs.prepend(mdef->name());
1570 ol.writeObjectLink(mdef->getReference(),
1571 cfname,
1572 mdef->anchor(),
1573 mdef->name());
1574 }
1575 else
1576 writeLink(mdef,ol);
1577
1578 ol.insertMemberAlign();
1579 ol.docify(" ");
1580 ol.startBold();
1581 ol.docify(ltype);
1582 ol.endBold();
1583 ol.docify(" ");
1584 if (VhdlDocGen::isComponent(mdef) ||
1585 VhdlDocGen::isConfig(mdef) ||
1587 {
1589 {
1590 nn=ltype;
1591 }
1592 else
1593 {
1594 nn=mdef->name();
1595 }
1596 kl=getClass(nn);
1597 if (kl)
1598 {
1599 nn=kl->getOutputFileBase();
1600 ol.pushGeneratorState();
1602 ol.startEmphasis();
1603 QCString name("<Entity ");
1605 {
1606 name+=ltype+">";
1607 }
1608 else
1609 {
1610 name+=mdef->name()+"> ";
1611 }
1612 ol.writeObjectLink(kl->getReference(),kl->getOutputFileBase(),QCString(),name);
1613 ol.endEmphasis();
1614 ol.popGeneratorState();
1615 }
1616 }
1617 break;
1619 writeUCFLink(mdef,ol);
1620 break;
1629 writeLink(mdef,ol);
1630 ol.docify(" ");
1631 ol.insertMemberAlign();
1632 VhdlDocGen::formatString(ltype,ol,mdef);
1633 break;
1636 writeRecordUnit(largs,ltype,ol,mdef);
1637 break;
1638
1639 default: break;
1640 }
1641
1642 bool htmlOn = ol.isEnabled(OutputType::Html);
1643 if (htmlOn && /*Config_getBool(HTML_ALIGN_MEMBERS) &&*/ !ltype.isEmpty())
1644 {
1646 }
1647 if (!ltype.isEmpty()) ol.docify(" ");
1648
1649 if (htmlOn)
1650 {
1652 }
1653
1654 if (!detailsVisible)// && !m_impl->annMemb)
1655 {
1656 ol.endDoxyAnchor(cfname,mdef->anchor());
1657 }
1658
1659 ol.endMemberItem(memType);
1660 if (!mdef->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC) /* && !annMemb */)
1661 {
1662 QCString s=mdef->briefDescription();
1663 ol.startMemberDescription(mdef->anchor(), QCString(), mm == VhdlSpecifier::PORT);
1664 ol.generateDoc(mdef->briefFile(),mdef->briefLine(),
1665 mdef->getOuterScope()?mdef->getOuterScope():d,
1666 mdef,s,TRUE,FALSE,
1667 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
1668 if (detailsVisible)
1669 {
1670 ol.pushGeneratorState();
1672 ol.docify(" ");
1673 if (mdef->getGroupDef()!=nullptr && gd==nullptr) // forward link to the group
1674 {
1675 ol.startTextLink(mdef->getOutputFileBase(),mdef->anchor());
1676 }
1677 else // local link
1678 {
1679 ol.startTextLink(QCString(),mdef->anchor());
1680 }
1681 ol.endTextLink();
1682 ol.popGeneratorState();
1683 }
1685 }
1686 mdef->warnIfUndocumented();
1687
1688}// end writeVhdlDeclaration
virtual const QCString & localName() const =0
virtual int briefLine() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual QCString getReference() const =0
virtual QCString qualifiedName() const =0
virtual QCString briefFile() const =0
static SearchIndexIntf searchIndex
Definition doxygen.h:124
virtual bool hasDetailedDescription() const =0
virtual void warnIfUndocumented() const =0
virtual GroupDef * getGroupDef()=0
virtual ClassDef * getClassDefOfAnonymousType() const =0
bool isEnabled(OutputType o)
void insertMemberAlignLeft(OutputGenerator::MemberItemType typ=OutputGenerator::MemberItemType::Normal, bool templ=FALSE)
Definition outputlist.h:520
void endMemberDescription()
Definition outputlist.h:568
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition outputlist.h:440
void startMemberDescription(const QCString &anchor, const QCString &inheritId=QCString(), bool typ=false)
Definition outputlist.h:566
void endDoxyAnchor(const QCString &fn, const QCString &anchor)
Definition outputlist.h:542
void endTextLink()
Definition outputlist.h:445
void endMemberItem(OutputGenerator::MemberItemType type)
Definition outputlist.h:496
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
void addLabel(const QCString &fName, const QCString &anchor)
Definition outputlist.h:544
void disableAllBut(OutputType o)
void startDoxyAnchor(const QCString &fName, const QCString &manName, const QCString &anchor, const QCString &name, const QCString &args)
Definition outputlist.h:538
void startMemberItem(const QCString &anchor, OutputGenerator::MemberItemType type, const QCString &id=QCString())
Definition outputlist.h:494
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:443
void clear()
Definition qcstring.h:169
void addWord(const QCString &word, bool hiPriority)
void setCurrentDoc(const Definition *ctx, const QCString &anchor, bool isSourceFile)
static void writeSource(const MemberDef *mdef, OutputList &ol, const QCString &cname)
static void writeProcessProto(OutputList &ol, const ArgumentList &al, const MemberDef *)
static void writeProcedureProto(OutputList &ol, const ArgumentList &al, const MemberDef *)
static bool isConfig(const MemberDef *mdef)
static void writeFunctionProto(OutputList &ol, const ArgumentList &al, const MemberDef *)
static void writeRecordUnit(QCString &largs, QCString &ltype, OutputList &ol, MemberDefMutable *mdef)
#define ASSERT(x)
Definition qcstring.h:39
static void writeUCFLink(const MemberDef *mdef, OutputList &ol)

References OutputList::addLabel(), ALIAS, Definition::anchor(), OutputGenerator::AnonymousStart, MemberDef::argsString(), MemberDef::argumentList(), ASSERT, ATTRIBUTE, Definition::briefDescription(), Definition::briefFile(), Definition::briefLine(), QCString::clear(), COMPONENT, CONFIG, Config_getBool, CONSTANT, convert(), OutputList::disable(), OutputList::disableAllBut(), OutputList::docify(), OutputList::enable(), OutputList::endBold(), OutputList::endDoxyAnchor(), OutputList::endEmphasis(), OutputList::endMemberDescription(), OutputList::endMemberItem(), OutputList::endTextLink(), ENTITY, ENTITYCLASS, FALSE, formatString(), FUNCTION, OutputList::generateDoc(), GENERIC, getClass(), MemberDef::getClassDefOfAnonymousType(), MemberDef::getGroupDef(), Definition::getOuterScope(), Definition::getOutputFileBase(), Definition::getReference(), MemberDef::getVhdlSpecifiers(), GROUP, MemberDef::hasDetailedDescription(), ArgumentList::hasParameters(), Html, OutputList::insertMemberAlign(), OutputList::insertMemberAlignLeft(), INSTANTIATION, isCompInst(), isComponent(), isConfig(), QCString::isEmpty(), OutputList::isEnabled(), Latex, LIBRARY, Definition::localName(), Man, MISCELLANEOUS, Definition::name(), OutputGenerator::Normal, PACKAGE, OutputList::popGeneratorState(), PORT, QCString::prepend(), PROCEDURE, PROCESS, ClassDef::protection(), OutputList::pushGeneratorState(), Definition::qualifiedName(), RECORD, Doxygen::searchIndex, SHAREDVARIABLE, SIGNAL, OutputList::startBold(), OutputList::startDoxyAnchor(), OutputList::startEmphasis(), OutputList::startMemberDescription(), OutputList::startMemberItem(), OutputList::startTextLink(), QCString::stripPrefix(), SUBTYPE, OutputGenerator::Templated, theTranslator_vhdlType, TRUE, TYPE, MemberDef::typeString(), UCF_CONST, UNITS, USE, VFILE, MemberDef::warnIfUndocumented(), writeFunctionProto(), writeLink(), OutputList::writeObjectLink(), writeProcedureProto(), writeProcessProto(), writeRecordUnit(), writeSource(), and writeUCFLink().

Referenced by writePlainVHDLDeclarations().

◆ writeVHDLDeclarations()

void VhdlDocGen::writeVHDLDeclarations ( const MemberList * ml,
OutputList & ol,
const ClassDef * cd,
const NamespaceDef * nd,
const FileDef * fd,
const GroupDef * gd,
const ModuleDef * mod,
const QCString & title,
const QCString & subtitle,
bool showEnumValues,
VhdlSpecifier type )
static

Definition at line 1745 of file vhdldocgen.cpp.

1748{
1749 if (!membersHaveSpecificType(ml,type)) return;
1750
1751 if (!title.isEmpty())
1752 {
1753 ol.startMemberHeader(convertToId(title),type == VhdlSpecifier::PORT ? 3 : 2);
1754 ol.parseText(title);
1755 ol.endMemberHeader();
1756 ol.docify(" ");
1757 }
1758 if (!subtitle.isEmpty())
1759 {
1761 ol.generateDoc("[generated]",-1,nullptr,nullptr,subtitle,FALSE,FALSE,
1762 QCString(),TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
1763 ol.endMemberSubtitle();
1764 } //printf("memberGroupList=%p\n",memberGroupList);
1765
1766 VhdlDocGen::writePlainVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,type);
1767
1768 for (const auto &mg : ml->getMemberGroupList())
1769 {
1770 if (membersHaveSpecificType(&mg->members(),type))
1771 {
1772 //printf("mg->header=%s\n",qPrint(mg->header()));
1773 bool hasHeader=!mg->header().isEmpty();
1774 ol.startMemberGroupHeader(hasHeader);
1775 if (hasHeader)
1776 {
1777 ol.parseText(mg->header());
1778 }
1780 if (!mg->documentation().isEmpty())
1781 {
1782 //printf("Member group has docs!\n");
1784 ol.generateDoc("[generated]",-1,nullptr,nullptr,mg->documentation()+"\n",FALSE,FALSE,
1785 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT));
1786 ol.endMemberGroupDocs();
1787 }
1788 ol.startMemberGroup();
1789 //printf("--- mg->writePlainDeclarations ---\n");
1790 VhdlDocGen::writePlainVHDLDeclarations(&mg->members(),ol,cd,nd,fd,gd,mod,type);
1791 ol.endMemberGroup(hasHeader);
1792 }
1793 }
1794}// writeVHDLDeclarations
const MemberGroupRefList & getMemberGroupList() const
Definition memberlist.h:144
void startMemberGroupHeader(bool b)
Definition outputlist.h:506
void endMemberGroupDocs()
Definition outputlist.h:512
void startMemberGroup()
Definition outputlist.h:514
void endMemberGroupHeader()
Definition outputlist.h:508
void endMemberGroup(bool last)
Definition outputlist.h:516
void startMemberGroupDocs()
Definition outputlist.h:510
void endMemberHeader()
Definition outputlist.h:472
void endMemberSubtitle()
Definition outputlist.h:476
void startMemberSubtitle()
Definition outputlist.h:474
void parseText(const QCString &textStr)
void startMemberHeader(const QCString &anchor, int typ=2)
Definition outputlist.h:470
static void writePlainVHDLDeclarations(const MemberList *ml, OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, VhdlSpecifier specifier)
QCString convertToId(const QCString &s)
Definition util.cpp:4226
static bool membersHaveSpecificType(const MemberList *ml, VhdlSpecifier type)

References Config_getBool, convertToId(), OutputList::docify(), OutputList::endMemberGroup(), OutputList::endMemberGroupDocs(), OutputList::endMemberGroupHeader(), OutputList::endMemberHeader(), OutputList::endMemberSubtitle(), FALSE, OutputList::generateDoc(), MemberList::getMemberGroupList(), QCString::isEmpty(), membersHaveSpecificType(), OutputList::parseText(), PORT, OutputList::startMemberGroup(), OutputList::startMemberGroupDocs(), OutputList::startMemberGroupHeader(), OutputList::startMemberHeader(), OutputList::startMemberSubtitle(), TRUE, and writePlainVHDLDeclarations().

Referenced by writeVhdlDeclarations().

◆ writeVhdlDeclarations()

void VhdlDocGen::writeVhdlDeclarations ( const MemberList * ml,
OutputList & ol,
const GroupDef * gd,
const ClassDef * cd,
const FileDef * fd,
const NamespaceDef * nd,
const ModuleDef * mod )
static

Definition at line 1183 of file vhdldocgen.cpp.

1185{
1207
1208 // configurations must be added to global file definitions.
1211
1212}
static void writeVHDLDeclarations(const MemberList *ml, OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, const QCString &title, const QCString &subtitle, bool showEnumValues, VhdlSpecifier type)

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

Referenced by MemberList::writeDeclarations(), ClassDefImpl::writeMemberDeclarations(), FileDefImpl::writeMemberDeclarations(), and GroupDefImpl::writeMemberDeclarations().

◆ writeVhdlLink()

void VhdlDocGen::writeVhdlLink ( const ClassDef * cdd,
OutputList & ol,
QCString & type,
QCString & name,
QCString & beh )
staticprivate

Definition at line 570 of file vhdldocgen.cpp.

571{
572 if (ccd==nullptr) return;
573 ol.startBold();
574 ol.docify(type);
575 ol.endBold();
576 nn.stripPrefix("_");
577 ol.writeObjectLink(ccd->getReference(),ccd->getOutputFileBase(),QCString(),nn);
578
579 if (!behav.isEmpty())
580 {
581 behav.prepend(" ");
582 ol.startBold();
583 ol.docify(behav);
584 ol.endBold();
585 }
586
587 ol.lineBreak();
588}

References OutputList::docify(), OutputList::endBold(), Definition::getOutputFileBase(), Definition::getReference(), QCString::isEmpty(), OutputList::lineBreak(), QCString::prepend(), OutputList::startBold(), QCString::stripPrefix(), and OutputList::writeObjectLink().

Referenced by writeInlineClassLink().

◆ writeVHDLTypeDocumentation()

bool VhdlDocGen::writeVHDLTypeDocumentation ( const MemberDef * mdef,
const Definition * d,
OutputList & ol )
static

Definition at line 1262 of file vhdldocgen.cpp.

1263{
1264 const ClassDef *cd=toClassDef(d);
1265 bool hasParams = FALSE;
1266
1267 if (cd==nullptr) return hasParams;
1268
1269 QCString ttype=mdef->typeString();
1270 QCString largs=mdef->argsString();
1271
1273 {
1274 QCString nn=mdef->typeString();
1275 nn=nn.stripWhiteSpace();
1276 QCString na=cd->name();
1277 const MemberDef* memdef=VhdlDocGen::findMember(na,nn);
1278 if (memdef && memdef->isLinkable())
1279 {
1280 ol.docify(" ");
1281
1282 ol.startBold();
1283 writeLink(memdef,ol);
1284 ol.endBold();
1285 ol.docify(" ");
1286 }
1287 else
1288 {
1289 ol.docify(" ");
1290 VhdlDocGen::formatString(ttype,ol,mdef);
1291 ol.docify(" ");
1292 }
1293 ol.docify(mdef->name());
1294 hasParams = VhdlDocGen::writeFuncProcDocu(mdef,ol, mdef->argumentList());
1295 }
1296
1297
1298 if (mdef->isVariable())
1299 {
1300 if (VhdlDocGen::isConstraint(mdef))
1301 {
1302 writeLink(mdef,ol);
1303 ol.docify(" ");
1304
1305 largs=substitute(largs,"#"," ");
1306 VhdlDocGen::formatString(largs,ol,mdef);
1307 return hasParams;
1308 }
1309 else
1310 {
1311 writeLink(mdef,ol);
1313 {
1314 return hasParams;
1315 }
1316 ol.docify(" ");
1317 }
1318
1319 // QCString largs=mdef->argsString();
1320
1321 bool c=largs=="context";
1322 bool brec=largs.stripPrefix("record") ;
1323
1324 if (!brec && !c)
1325 VhdlDocGen::formatString(ttype,ol,mdef);
1326
1327 if (c || brec || largs.stripPrefix("units"))
1328 {
1329 if (c)
1330 largs=ttype;
1331 VhdlDocGen::writeRecUnitDocu(mdef,ol,largs);
1332 return hasParams;
1333 }
1334
1335 ol.docify(" ");
1336 if (VhdlDocGen::isPort(mdef) || VhdlDocGen::isGeneric(mdef))
1337 {
1338 // QCString largs=mdef->argsString();
1339 VhdlDocGen::formatString(largs,ol,mdef);
1340 ol.docify(" ");
1341 }
1342 }
1343 return hasParams;
1344}
virtual bool isVariable() const =0
static void writeRecUnitDocu(const MemberDef *md, OutputList &ol, QCString largs)
static bool isConstraint(const MemberDef *mdef)
static bool writeFuncProcDocu(const MemberDef *mdef, OutputList &ol, const ArgumentList &al, bool type=false)
ClassDef * toClassDef(Definition *d)

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

Referenced by MemberDefImpl::writeDocumentation().


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