Doxygen
Loading...
Searching...
No Matches
vhdldocgen.cpp
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2015 by Dimitri van Heesch.
4 *
5 * Permission to use, copy, modify, and distribute this software and its
6 * documentation under the terms of the GNU General Public License is hereby
7 * granted. No representations are made about the suitability of this software
8 * for any purpose. It is provided "as is" without express or implied warranty.
9 * See the GNU General Public License for more details.
10 *
11 * Documents produced by Doxygen are derivative works derived from the
12 * input used in their production; they are not affected by this license.
13 *
14 */
15/******************************************************************************
16 * Parser for VHDL subset
17 * written by M. Kreis
18 * supports VHDL-87/93/2008
19 * does not support VHDL-AMS
20 ******************************************************************************/
21
22// global includes
23#include <stdio.h>
24#include <stdlib.h>
25#include <assert.h>
26#include <string.h>
27#include <map>
28#include <algorithm>
29#include <unordered_set>
30#include <mutex>
31
32/* --------------------------------------------------------------- */
33
34// local includes
35#include "qcstring.h"
36#include "vhdldocgen.h"
37#include "message.h"
38#include "config.h"
39#include "doxygen.h"
40#include "util.h"
41#include "language.h"
42#include "commentscan.h"
43#include "definition.h"
44#include "searchindex.h"
45#include "outputlist.h"
46#include "parserintf.h"
47#include "layout.h"
48#include "arguments.h"
49#include "portable.h"
50#include "memberlist.h"
51#include "memberdef.h"
52#include "groupdef.h"
53#include "classlist.h"
54#include "namespacedef.h"
55#include "filename.h"
56#include "membergroup.h"
57#include "memberdef.h"
58#include "membername.h"
59#include "plantuml.h"
60#include "vhdljjparser.h"
61#include "VhdlParser.h"
62#include "regex.h"
63#include "plantuml.h"
64#include "textstream.h"
65#include "moduledef.h"
66
67//#define DEBUGFLOW
68#define theTranslator_vhdlType theTranslator->trVhdlType
69
70static void initUCF(Entry* root,const QCString &type,QCString &qcs,int line,const QCString & fileName,QCString & brief);
71static void writeUCFLink(const MemberDef* mdef,OutputList &ol);
72static void addInstance(ClassDefMutable* entity, ClassDefMutable* arch, ClassDefMutable *inst,
73 const std::shared_ptr<Entry> &cur);
74
75static const MemberDef *flowMember=nullptr;
76
78{
79 flowMember=mem;
80}
81
83{
84 return flowMember;
85}
86
87//--------------------------------------------------------------------------------------------------
88
89static void writeLink(const MemberDef* mdef,OutputList &ol)
90{
92 mdef->getOutputFileBase(),
93 mdef->anchor(),
94 mdef->name());
95}
96
97static void startFonts(const QCString& q, const char *keyword,OutputList& ol)
98{
99 auto &codeOL = ol.codeGenerators();
100 codeOL.startFontClass(keyword);
101 codeOL.codify(q);
102 codeOL.endFontClass();
103}
104
105static QCString splitString(QCString& str,char c)
106{
107 QCString n=str;
108 int i=str.find(c);
109 if (i>0)
110 {
111 n=str.left(i);
112 str=str.remove(0,i+1);
113 }
114 return n;
115}
116
117static int compareString(const QCString& s1,const QCString& s2)
118{
119 return qstricmp(s1.stripWhiteSpace(),s2.stripWhiteSpace());
120}
121
122//--------------------------------------------------------------------------------------------------
123
124 // vhdl keywords included VHDL 2008
125static const std::unordered_set< std::string > g_vhdlKeyWordSet0 =
126{
127 "abs","access","after","alias","all","and","architecture","array","assert","assume","assume_guarantee","attribute",
128 "begin","block","body","buffer","bus",
129 "case","component","configuration","constant","context","cover",
130 "default","disconnect","downto",
131 "else","elsif","end","entity","exit",
132 "fairness","file","for","force","function",
133 "generate","generic","group","guarded",
134 "if","impure","in","inertial","inout","is",
135 "label","library","linkage","literal","loop",
136 "map","mod",
137 "nand","new","next","nor","not","null",
138 "of","on","open","or","others","out",
139 "package","parameter","port","postponed","procedure","process","property","protected","pure",
140 "range","record","register","reject","release","restrict","restrict_guarantee","rem","report","rol","ror","return",
141 "select","sequence","severity","signal","shared","sla","sll","sra","srl","strong","subtype",
142 "then","to","transport","type",
143 "unaffected","units","until","use",
144 "variable","vmode","vprop","vunit",
145 "wait","when","while","with",
146 "xor","xnor"
147};
148
149
150// type
151static const std::unordered_set< std::string> g_vhdlKeyWordSet1 =
152{
153 "natural","unsigned","signed","string","boolean", "bit","bit_vector","character",
154 "std_ulogic","std_ulogic_vector","std_logic","std_logic_vector","integer",
155 "real","float","ufixed","sfixed","time","positive"
156};
157
158// logic
159static const std::unordered_set< std::string > g_vhdlKeyWordSet2 =
160{
161 "abs","and","or","not","mod","xor","rem","xnor","ror","rol","sla","sll"
162};
163
164// predefined attributes
165static const std::unordered_set< std::string > g_vhdlKeyWordSet3 =
166{
167 "base","left","right","high","low","ascending",
168 "image","value","pos","val","succ","pred","leftof","rightof","left","right","high","low",
169 "range","reverse_range","length","ascending","delayed","stable","quiet","transaction","event",
170 "active","last_event","last_active","last_value","driving","driving_value","simple_name","instance_name","path_name"
171};
172
174{
175}
176
177/*!
178 * returns the color of a keyword
179 */
180const char* VhdlDocGen::findKeyWord(const QCString& kw)
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}
200
202{
203 if (name.isEmpty()) return nullptr;
204 return Doxygen::classLinkedMap->find(QCString(name).stripWhiteSpace());
205}
206
208{
209 return getClass(name);
210}
211
212static std::recursive_mutex g_vhdlMutex;
213static std::map<std::string,const MemberDef*> g_varMap;
214static std::vector<ClassDef*> g_classList;
215static std::map<ClassDef*,std::vector<ClassDef*> > g_packages;
216
217const MemberDef* VhdlDocGen::findMember(const QCString& className, const QCString& memName)
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
313
314/**
315 * This function returns the entity|package
316 * in which the key (type) is found
317 */
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
357
358/*!
359 * finds all included packages of an Entity or Package
360 */
361
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
386
387/*!
388 * returns the function with the matching argument list
389 * is called in vhdlcode.l
390 */
391
392const MemberDef* VhdlDocGen::findFunction(const QCString& funcname, const QCString& package)
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
411
412
413
429
430/*!
431 * returns the class title+ref
432 */
433
435{
436 QCString pageTitle;
437 if (cd==nullptr) return "";
438 pageTitle=VhdlDocGen::getClassName(cd);
439 pageTitle+=" ";
441 return pageTitle;
442} // getClassTitle
443
444/* returns the class name without their prefixes */
445
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}
460
461/*!
462 * writes an inline link form entity|package to architecture|package body and vice verca
463 */
464
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
528
529/*
530 * finds all architectures which belongs to an entity
531 */
532void VhdlDocGen::findAllArchitectures(std::vector<QCString>& qll,const ClassDef *cd)
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
548
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}
566/*
567 * writes the link entity >> .... or architecture >> ...
568 */
569
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}
589
590
591/*!
592 * strips the "--!" prefixes of vhdl comments
593 */
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}
625
626
627/*!
628 * parses a function proto
629 * @param text function string
630 * @param name points to the function name
631 * @param ret Stores the return type
632 * @param doc ???
633 */
634void VhdlDocGen::parseFuncProto(const QCString &text,QCString& name,QCString& ret,bool doc)
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}
679
680/*
681 * returns the n'th word of a string
682 */
683
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}
696
697
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}
711
712/*!
713 * deletes a char backwards in a string
714 */
715
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}
726
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}
736
737
738static int recordCounter=0;
739
740/*!
741 * returns the next number of a record|unit member
742 */
743
745{
746 char buf[12];
747 qsnprintf(buf,12,"%d",recordCounter++);
748 QCString qcs(&buf[0]);
749 return qcs;
750}
751
752/*!
753 * returns the next number of an anonymous process
754 */
755
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}
765
766/*!
767 * writes a colored and formatted string
768 */
769
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
835
836/*!
837 * returns TRUE if this string is a number
838 */
839bool VhdlDocGen::isNumber(const std::string& s)
840{
841 static const reg::Ex regg(R"([0-9][0-9eEfFbBcCdDaA_.#+?xXzZ-]*)");
842 return reg::match(s,regg);
843}// isNumber
844
845
846/*!
847 * inserts white spaces for better readings
848 * and writes a colored string to the output
849 */
850
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}
903
904/*!
905 * writes a procedure prototype to the output
906 */
907
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}
958
959/*!
960 * writes a function prototype to the output
961 */
962
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}
1036
1037/*!
1038 * writes a process prototype to the output
1039 */
1040
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}
1061
1062
1063/*!
1064 * writes a function|procedure documentation to the output
1065 */
1066
1068 const MemberDef *md,
1069 OutputList& ol,
1070 const ArgumentList &al,
1071 bool /*type*/)
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
1152
1153
1154
1155
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}
1181
1182
1184 OutputList& ol,const GroupDef* gd,const ClassDef* cd,const FileDef *fd,const NamespaceDef* nd,const ModuleDef *mod)
1185{
1207
1208 // configurations must be added to global file definitions.
1211
1212}
1213
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}
1260
1261/* writes a vhdl type documentation */
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}
1345
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}
1389
1390/* writes a vhdl type declaration */
1391
1393 const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,const ModuleDef *mod,
1394 bool /*inGroup*/)
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
1689
1690
1692 const MemberList* mlist,OutputList &ol,
1693 const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,const ModuleDef *mod,
1694 VhdlSpecifier specifier)
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
1724
1726{
1727 if (ml==nullptr) return FALSE;
1728 for (const auto &mdd : *ml)
1729 {
1730 if (mdd->getVhdlSpecifiers()==type) //is type in class
1731 {
1732 return TRUE;
1733 }
1734 }
1735 for (const auto &mg : ml->getMemberGroupList())
1736 {
1737 if (!mg->members().empty())
1738 {
1739 if (membersHaveSpecificType(&mg->members(),type)) return TRUE;
1740 }
1741 }
1742 return FALSE;
1743}
1744
1746 const ClassDef *cd,const NamespaceDef *nd,const FileDef *fd,const GroupDef *gd,const ModuleDef *mod,
1747 const QCString &title,const QCString &subtitle,bool /*showEnumValues*/,VhdlSpecifier type)
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
1795
1796
1798 OutputList &ol ,QCString & cname)
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
1809
1810
1811/*! writes a link if the string is linkable else a formatted string */
1812
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
1834
1835
1836
1837void VhdlDocGen::writeSource(const MemberDef* mdef,OutputList& ol,const QCString &cname)
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}
1894
1895
1896
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}
1917
1918void VhdlDocGen::parseUCF(const QCString &input,Entry* entity,const QCString &fileName,bool altera)
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}
1974
1975static void initUCF(Entry* root,const QCString &type,QCString &qcs,
1976 int line,const QCString &fileName,QCString & brief)
1977{
1978 if (qcs.isEmpty())return;
1979 QCString n;
1980
1982 qcs=qcs.stripWhiteSpace();
1983
1984 static const reg::Ex reg(R"([\s=])");
1985 int i = findIndex(qcs.str(),reg);
1986 if (i<0) return;
1987 if (i==0)
1988 {
1989 n=type;
1991 }
1992 else
1993 {
1994 n=qcs.left(i);
1995 }
1996 qcs=qcs.remove(0,i+1);
1997 // qcs.prepend("|");
1998
1999 qcs.stripPrefix("=");
2000
2001 std::shared_ptr<Entry> current = std::make_shared<Entry>();
2002 current->vhdlSpec=VhdlSpecifier::UCF_CONST;
2003 current->section=EntryType::makeVariable();
2004 current->bodyLine=line;
2005 current->fileName=fileName;
2006 current->type="ucf_const";
2007 current->args+=qcs;
2008 current->lang= SrcLangExt::VHDL ;
2009
2010 // adding dummy name for constraints like VOLTAGE=5,TEMPERATURE=20 C
2011 if (n.isEmpty())
2012 {
2013 n="dummy";
2015 }
2016
2017 current->name= n+"_";
2018 current->name.append(VhdlDocGen::getRecordNumber());
2019
2020 if (!brief.isEmpty())
2021 {
2022 current->brief=brief;
2023 current->briefLine=line;
2024 current->briefFile=fileName;
2025 brief.clear();
2026 }
2027
2028 root->moveToSubEntryAndKeep(current);
2029}
2030
2031
2032static void writeUCFLink(const MemberDef* mdef,OutputList &ol)
2033{
2034
2035 QCString largs(mdef->argsString());
2036 QCString n= splitString(largs, '#');
2037 // VhdlDocGen::adjustRecordMember(mdef);
2038 bool equ=(n.length()==largs.length());
2039
2040 if (!equ)
2041 {
2042 ol.writeString(n);
2043 ol.docify(" ");
2044 ol.insertMemberAlign();
2045 }
2046
2047 if (mdef->name().contains("dummy")==0)
2048 {
2049 writeLink(mdef,ol);
2050 }
2051 if (equ)
2052 {
2053 ol.insertMemberAlign();
2054 }
2055 ol.docify(" ");
2056 VhdlDocGen::formatString(largs,ol,mdef);
2057}
2058
2059// for cell_inst : [entity] work.proto [ (label|expr) ]
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}
2089
2090// use (configuration|entity|open) work.test [(cellfor)];
2091
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}
2122
2123
2124
2125// find class with upper/lower letters
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}
2137
2138
2139/*
2140
2141// file foo.vhd
2142// entity foo
2143// .....
2144// end entity
2145
2146// file foo_arch.vhd
2147// architecture xxx of foo is
2148// ........
2149// end architecture
2150
2151*/
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}
2191
2192static void addInstance(ClassDefMutable* classEntity, ClassDefMutable* ar,
2193 ClassDefMutable *cd , const std::shared_ptr<Entry> &cur)
2194{
2195
2196 QCString bName,n1;
2197 if (ar==nullptr) return;
2198
2199 if (classEntity==nullptr)
2200 {
2201 //add component inst
2202 n1=cur->type;
2203 goto ferr;
2204 }
2205
2206 if (classEntity==cd) return;
2207
2208 bName=classEntity->name();
2209 // fprintf(stderr,"\naddInstance %s to %s %s %s\n",qPrint( classEntity->name()),qPrint(cd->name()),qPrint(ar->name()),cur->name);
2210 n1=classEntity->name();
2211
2212 if (!cd->isBaseClass(classEntity, true))
2213 {
2215 }
2216 else
2217 {
2218 VhdlDocGen::addBaseClass(cd,classEntity);
2219 }
2220
2221 if (!VhdlDocGen::isSubClass(classEntity,cd,true,0))
2222 {
2224 classEntity->setLanguage(SrcLangExt::VHDL);
2225 }
2226
2227ferr:
2228 QCString uu=cur->name;
2229 auto md = createMemberDef(
2230 ar->getDefFileName(), cur->startLine,cur->startColumn,
2231 n1,uu,uu, QCString(),
2234 cur->isStatic,
2237 ArgumentList(),
2238 ArgumentList(),
2239 "");
2240 auto mmd = toMemberDefMutable(md.get());
2241
2242 if (!ar->getOutputFileBase().isEmpty())
2243 {
2244 TagInfo tg;
2245 tg.anchor = nullptr;
2246 tg.fileName = ar->getOutputFileBase();
2247 tg.tagName = nullptr;
2248 mmd->setTagInfo(&tg);
2249 }
2250
2251 //fprintf(stderr,"\n%s%s%s\n",qPrint(md->name()),qPrint(cur->brief),qPrint(cur->doc));
2252
2253 mmd->setLanguage(SrcLangExt::VHDL);
2254 mmd->setVhdlSpecifiers(VhdlSpecifier::INSTANTIATION);
2255 mmd->setBriefDescription(cur->brief,cur->briefFile,cur->briefLine);
2256 mmd->setBodySegment(cur->startLine,cur->startLine,-1) ;
2257 mmd->setDocumentation(cur->doc,cur->docFile,cur->docLine);
2258 FileDef *fd=ar->getFileDef();
2259 mmd->setBodyDef(fd);
2260 ar->insertMember(md.get());
2262 mn->push_back(std::move(md));
2263
2264}
2265
2266
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}
2285
2286
2288 const MemberDef *md,
2289 OutputList& ol,
2290 QCString largs)
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}//#
2320
2321
2322
2323bool VhdlDocGen::isSubClass(ClassDef* cd,ClassDef *scd, bool followInstances,int level)
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}
2356
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}
2387
2388
2389static std::vector<const MemberDef*> mdList;
2390
2391static const MemberDef* findMemFlow(const MemberDef* mdef)
2392{
2393 for (const auto &md : mdList)
2394 {
2395 if (md->name()==mdef->name() && md->getStartBodyLine()==mdef->getStartBodyLine())
2396 {
2397 return md;
2398 }
2399 }
2400 return nullptr;
2401}
2402
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}
2434
2436{
2437 std::lock_guard lock(g_vhdlMutex);
2438 g_varMap.clear();
2439 g_classList.clear();
2440 g_packages.clear();
2441}
2442
2448{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::ALIAS; }
2454{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::PORT; }
2458{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::USE; }
2464{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::TYPE; }
2484{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::UNITS; }
2490{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::VFILE; }
2492{ return mdef->getVhdlSpecifiers()==VhdlSpecifier::GROUP; }
2497
2498
2499
2500//############################## Flowcharts #################################################
2501
2502#define STARTL (FlowChart::WHILE_NO | FlowChart::IF_NO | \
2503 FlowChart::FOR_NO | FlowChart::CASE_NO | \
2504 FlowChart::LOOP_NO | WHEN_NO)
2505#define DECLN (FlowChart::WHEN_NO | \
2506 FlowChart::ELSIF_NO | FlowChart::IF_NO | \
2507 FlowChart::FOR_NO | FlowChart::WHILE_NO | \
2508 FlowChart::CASE_NO | FlowChart::LOOP_NO )
2509#define STARTFIN (FlowChart::START_NO | FlowChart::END_NO)
2510#define LOOP (FlowChart::FOR_NO | FlowChart::WHILE_NO | \
2511 FlowChart::LOOP_NO )
2512#define ENDCL (FlowChart::END_CASE | FlowChart::END_LOOP)
2513#define EEND (FlowChart::ENDIF_NO | FlowChart::ELSE_NO )
2514#define IFF (FlowChart::ELSIF_NO | FlowChart::IF_NO)
2515#define EXITNEXT (FlowChart::EXIT_NO | FlowChart::NEXT_NO )
2516#define EMPTY (EEND | FlowChart::ELSIF_NO)
2517#define EE (FlowChart::ELSE_NO | FlowChart::ELSIF_NO)
2518#define EMPTNODE (ENDCL | EEND | FlowChart::ELSIF_NO)
2519#define FLOWLEN (flowList.size()-1)
2520
2521static int ifcounter=0;
2522static int nodeCounter=0;
2523
2524static struct
2525{
2526 // link colors
2527 const char *textNodeLink;
2528 const char *yesNodeLink;
2529 const char *noNodeLink;
2530
2531 // node colors
2532 const char* comment;
2533 const char* decisionNode;
2534 const char* varNode;
2535 const char *startEndNode;
2536 const char* textNode;
2537} flowCol =
2538{ "green", // textNodeLink
2539 "red", // yesNodeLink
2540 "black", // noNodeLink
2541 "khaki", // comment
2542 "0.7 0.3 1.0", // decisionNode
2543 "lightyellow", // varNode
2544 "white", // startEndNode
2545 "lightcyan" // textNode
2547
2548std::vector<FlowChart> flowList;
2549
2550#ifdef DEBUGFLOW
2551static std::map<std::string,int> g_keyMap;
2552#endif
2553
2555{
2556 if (q.length()<=80) return;
2557
2558 if (q.length()>200)
2559 {
2560 q.resize(200);
2561 }
2562
2563 q.append(" ...");
2564
2565 QCString str(q);
2566 QCString temp;
2567
2568 while (str.length()>80)
2569 {
2570 int j=std::max(str.findRev(' ',80),str.findRev('|',80));
2571 if (j<=0)
2572 {
2573 temp+=str;
2574 q=temp;
2575 return;
2576 }
2577 else
2578 {
2579 QCString qcs=str.left(j);
2580 temp+=qcs+"\\";
2581 temp+="n";
2582 str.remove(0,j);
2583 }
2584 }//while
2585
2586 q=temp+str;
2587// #endif
2588}
2589
2591{
2592 QCString ui="-";
2593 std::string q;
2594 std::string t;
2595
2596 ui.fill('-',255);
2597
2598 if (flo.type & STARTL)
2599 {
2600 if (flo.stamp>0)
2601 {
2602 q=ui.left(2*flo.stamp).str();
2603 }
2604 else
2605 {
2606 q=" ";
2607 }
2608 QCString nn=flo.exp.stripWhiteSpace();
2609 printf("\nYES: %s%s[%d,%d]",qPrint(q),qPrint(nn),flo.stamp,flo.id);
2610 }
2611 else
2612 {
2613 if (flo.type & COMMENT_NO)
2614 {
2615 t=flo.label.str();
2616 }
2617 else
2618 {
2619 t=flo.text.str();
2620 }
2621 static const reg::Ex ep(R"(\s)");
2622 t = reg::replace(t,ep,std::string());
2623 if (t.empty())
2624 {
2625 t=" ";
2626 }
2627 if (flo.stamp>0)
2628 {
2629 q=ui.left(2*flo.stamp).str();
2630 }
2631 else
2632 {
2633 q=" ";
2634 }
2635 if (flo.type & EMPTNODE)
2636 {
2637 printf("\n NO: %s%s[%d,%d]",q.c_str(),FlowChart::getNodeType(flo.type),flo.stamp,flo.id);
2638 }
2639 else if (flo.type & COMMENT_NO)
2640 {
2641 printf("\n NO: %s%s[%d,%d]",t.c_str(),FlowChart::getNodeType(flo.type),flo.stamp,flo.id);
2642 }
2643 else
2644 {
2645 printf("\n NO: %s[%d,%d]",t.c_str(),flo.stamp,flo.id);
2646 }
2647 }
2648}
2649
2651{
2652 for (const auto &flowChart : flowList)
2653 {
2654 printNode(flowChart);
2655 }
2656}
2657
2659{
2660 FlowChart *flno = nullptr;
2661 bool found=FALSE;
2662 for (size_t j=0;j<flowList.size();j++)
2663 {
2664 FlowChart &flo = flowList[j];
2665 if (flo.type&TEXT_NO)
2666 {
2667 if (!found)
2668 {
2669 flno=&flo;
2670 }
2671 else
2672 {
2673 flno->text+=flo.text;
2674 flowList.erase(flowList.begin()+j);
2675 if (j>0) j=j-1;
2676 }
2677 found=TRUE;
2678 }
2679 else
2680 {
2681 found=FALSE;
2682 }
2683 }
2684
2685 // find if..endif without text
2686 // if..elseif without text
2687 if (!flowList.empty())
2688 {
2689 for (size_t j=0;j<flowList.size()-1;j++)
2690 {
2691 const FlowChart &flo = flowList[j];
2692 int kind = flo.type;
2693 if ( (kind & IFF) || (flo.type & ELSE_NO))
2694 {
2695 const FlowChart &ftemp = flowList[j+1];
2696 if (ftemp.type & EMPTY)
2697 {
2698 FlowChart fc(TEXT_NO,"empty ",QCString());
2699 fc.stamp = flo.stamp;
2700 flowList.insert(flowList.begin()+j+1,fc);
2701 }
2702 }
2703 }
2704 }
2705
2706}// colTextNode
2707
2709{
2710 QCString node;
2711 node.setNum(n);
2712 return node.prepend("node");
2713}
2714
2716{
2717 ifcounter=0;
2718 nodeCounter=0;
2719 flowList.clear();
2720}
2721
2723{
2724 size_t max=0;
2725 QCString s;
2726 StringVector ql=split(com.str(),"\n");
2727 for (size_t j=0;j<ql.size();j++)
2728 {
2729 s=ql[j];
2730 if (max<s.length()) max=s.length();
2731 }
2732
2733 s=ql.back();
2734 int diff=static_cast<int>(max-s.length());
2735
2736 QCString n;
2737 if (diff>0)
2738 {
2739 n.fill(' ',2*diff);
2740 n.append(".");
2741 s+=n;
2742 ql.pop_back();
2743 ql.push_back(s.str());
2744 }
2745
2746 for (size_t j=0;j<ql.size();j++)
2747 {
2748 s=ql[j];
2749 if (j<ql.size()-1)
2750 {
2751 s+="\n";
2752 }
2753 FlowChart::codify(t,s);
2754 }
2755}
2756
2757
2759{
2760 size_t size=flowList.size();
2761 bool begin=false;
2762
2763 if (size>0)
2764 {
2765 for (uint32_t j=0;j < size-1 ;j++)
2766 {
2767 FlowChart &fll = flowList[j];
2768 if (fll.type & COMMENT_NO)
2769 {
2770 FlowChart &to=flowList[j+1];
2771 if (to.type & COMMENT_NO)
2772 {
2773 to.label = fll.label+"\n"+to.label;
2774 flowList.erase(flowList.begin()+j);
2775 if (size>0) size--;
2776 if (j>0) j--;
2777 }
2778 }
2779 }// for
2780 }
2781
2782 for (size_t j=0;j <flowList.size() ;j++)
2783 {
2784 const FlowChart &fll=flowList[j];
2785
2786 if (fll.type & BEGIN_NO)
2787 {
2788 begin = true;
2789 continue;
2790 }
2791
2792 if (fll.type & COMMENT_NO)
2793 {
2794 const FlowChart *to = nullptr;
2795 if (!begin)
2796 {
2797 // comment between function/process .. begin is linked to start node
2798 to = &flowList[0];
2799 }
2800 else if (j>0 && flowList[j-1].line==fll.line)
2801 {
2802 to = &flowList[j-1];
2803 }
2804 else
2805 {
2806 to = &flowList[j+1];
2807 }
2808 t << getNodeName(fll.id);
2809 t << "[shape=none, label=<\n";
2810 t << "<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"2\" >\n ";
2811 t << "<TR><TD BGCOLOR=\"";
2812 t << flowCol.comment;
2813 t << "\" > ";
2814
2816 t << " </TD></TR></TABLE>>];";
2817 writeEdge(t,fll.id,to->id,2);
2818 }
2819 }// for
2820
2821 // delete comment nodes;
2822 size=flowList.size();
2823 for (size_t j=0; j<size; j++)
2824 {
2825 FlowChart &fll=flowList[j];
2826 if (fll.type & (COMMENT_NO | BEGIN_NO))
2827 {
2828 size_t diff=FLOWLEN-(j+1);
2829
2830 if ((fll.type & COMMENT_NO) && diff > 1)
2831 {
2832 flowList[j+1].label = fll.label;
2833 }
2834
2835 flowList.erase(flowList.begin()+j);
2836
2837 if (size>0) size--;
2838 if (j>0) j--;
2839 }
2840 }// for;
2841}
2842
2844{
2845 if (!str.isEmpty())
2846 {
2847 const char *p=str.data();
2848 while (*p)
2849 {
2850 char c=*p++;
2851 switch(c)
2852 {
2853 case '<': t << "&lt;"; break;
2854 case '>': t << "&gt;"; break;
2855 case '&': t << "&amp;"; break;
2856 case '\'': t << "&#39;"; break;
2857 case '"': t << "&quot;"; break;
2858 case '\n': t <<"<BR ALIGN=\"LEFT\"/>"; break;
2859 default: t << c; break;
2860 }
2861 }
2862 }
2863}//codify
2864
2865FlowChart::FlowChart(int typ,const QCString &t,const QCString &ex,const QCString &lab)
2866{
2868
2869 if (typ & STARTL)
2870 {
2871 ifcounter++;
2872 }
2873
2874 text=t;
2875 exp=ex;
2876 type=typ;
2877 label=lab;
2878
2879 if (typ & (ELSE_NO | ELSIF_NO))
2880 {
2881 stamp--;
2882 }
2883
2884 if (typ & (START_NO | END_NO | VARIABLE_NO))
2885 {
2886 stamp=0;
2887 }
2888
2889 id=nodeCounter++;
2890}
2891
2893{
2894 if (!VhdlDocGen::getFlowMember()) return;
2895
2896 QCString typeString(text);
2897 QCString expression(exp);
2898
2899
2900 if (!text.isEmpty())
2901 {
2902 typeString=substitute(typeString,";","\n");
2903 }
2904
2905 if (!exp.isEmpty())
2906 {
2907 expression=substitute(expression,"\"","\\\"");
2908 }
2909
2910 if (type & VARIABLE_NO)
2911 {
2912 // Ignore the empty section of the VHDL variable definition.
2913 // This is section between `process` and `begin` keywords, where any source text is missing, probably a bug in the VHDL source parser.
2914 if(text.isEmpty()) return;
2915
2916 flowList.insert(flowList.begin(),FlowChart(type,typeString,expression,label));
2917 flowList.front().line=1; // TODO: use getLine(); of the parser
2918 }
2919 else if (type & START_NO)
2920 {
2921 flowList.insert(flowList.begin(),FlowChart(type,typeString,expression,label));
2922 flowList.front().line=1; // TODO: use getLine(); of the parser
2923 }
2924 else
2925 {
2926 flowList.emplace_back(type,typeString,expression,label);
2927 flowList.back().line=1; // TODO: use getLine(); of the parser
2928 }
2929}
2930
2932{
2933 if (!VhdlDocGen::getFlowMember()) return;
2934 ifcounter--;
2935}
2936
2938{
2939 QCString t;
2940 QCString exp=flo.exp.stripWhiteSpace();
2941 QCString text=flo.text.stripWhiteSpace();
2942 switch (flo.type)
2943 {
2944 case START_NO: t=":"+text+"|"; break;
2945 case IF_NO : t="\nif ("+exp+") then (yes)"; break;
2946 case ELSIF_NO: t="\nelseif ("+exp+") then (yes)"; break;
2947 case ELSE_NO: t="\nelse"; break;
2948 case CASE_NO: t="\n:"+exp+";"; break;
2949 case WHEN_NO: t="\n";
2950 if (!ca) t+="else";
2951 t+="if ("+exp+") then (yes)";
2952 break;
2953 case EXIT_NO: break;
2954 case END_NO: if (text.contains(" function")==0) t="\n:"+text+";";
2955 break;
2956 case TEXT_NO: t="\n:"+text+"]"; break;
2957 case ENDIF_NO: t="\nendif"; break;
2958 case FOR_NO: t="\nwhile ("+exp+") is (yes)"; break;
2959 case WHILE_NO: t="\nwhile ("+exp+") is (yes)"; break;
2960 case END_LOOP: t="\nendwhile"; break;
2961 case END_CASE: t="\nendif\n:end case;"; break;
2962 case VARIABLE_NO:t="\n:"+text+";"; break;
2963 case RETURN_NO: t="\n:"+text+";";
2964 if (!endL) t+="\nstop";
2965 break;
2966 case LOOP_NO: t="\nwhile (infinite loop)"; break;
2967 case NEXT_NO: break;
2968 case EMPTY_NO: break;
2969 case COMMENT_NO: t="\n note left \n "+flo.label+"\nend note \n"; break;
2970 case BEGIN_NO: t="\n:begin;"; break;
2971 default: assert(false); break;
2972 }
2973 return t;
2974}
2975
2977{
2978 int caseCounter = 0;
2979 int whenCounter = 0;
2980
2981 QCString qcs;
2982 size_t size=flowList.size();
2983 for (size_t j=0;j<size;j++)
2984 {
2985 bool endList = j==FLOWLEN;
2986 const FlowChart &flo = flowList[j];
2987 if (flo.type==CASE_NO)
2988 {
2989 caseCounter++;
2990 whenCounter=0;
2991 }
2992
2993 if (flo.type==END_CASE)
2994 {
2995 caseCounter--;
2996 }
2997
2998 bool ca = (caseCounter>0 && whenCounter==0);
2999
3000 qcs+=printPlantUmlNode(flo,ca,endList);
3001
3002 if (flo.type==WHEN_NO)
3003 {
3004 whenCounter++;
3005 }
3006
3007 }
3008 qcs+="\n";
3009
3010 QCString htmlOutDir = Config_getString(HTML_OUTPUT);
3011
3012 QCString n=convertNameToFileName();
3013 n=PlantumlManager::instance().writePlantUMLSource(htmlOutDir,n,qcs,PlantumlManager::PUML_SVG,"uml",n,1,true);
3015}
3016
3021
3022const char* FlowChart::getNodeType(int c)
3023{
3024 switch(c)
3025 {
3026 case IF_NO: return "if ";
3027 case ELSIF_NO: return "elsif ";
3028 case ELSE_NO: return "else ";
3029 case CASE_NO: return "case ";
3030 case WHEN_NO: return "when ";
3031 case EXIT_NO: return "exit ";
3032 case END_NO: return "end ";
3033 case TEXT_NO: return "text ";
3034 case START_NO: return "start ";
3035 case ENDIF_NO: return "endif ";
3036 case FOR_NO: return "for ";
3037 case WHILE_NO: return "while ";
3038 case END_LOOP: return "end_loop ";
3039 case END_CASE: return "end_case ";
3040 case VARIABLE_NO: return "variable_decl ";
3041 case RETURN_NO: return "return ";
3042 case LOOP_NO: return "infinite loop ";
3043 case NEXT_NO: return "next ";
3044 case COMMENT_NO: return "comment ";
3045 case EMPTY_NO: return "empty ";
3046 case BEGIN_NO: return "<begin> ";
3047 default: return "--failure--";
3048 }
3049}
3050
3052{
3053 QCString qcs("/");
3054 QCString ov = Config_getString(HTML_OUTPUT);
3055
3057
3058 //const MemberDef *m=VhdlDocGen::getFlowMember();
3059 //if (m)
3060 // fprintf(stderr,"\n creating flowchart : %s %s in file %s \n",theTranslator->trVhdlType(m->getMemberSpecifiers(),TRUE),qPrint(m->name()),qPrint(m->getFileDef()->name()));
3061
3062 QCString dir=" -o \""+ov+qcs+"\"";
3063 ov+="/flow_design.dot";
3064
3065 QCString vlargs="-Tsvg \""+ov+"\" "+dir ;
3066
3068 {
3069 err("could not create dot file\n");
3070 }
3071}
3072
3074{
3075 t << " digraph G { \n";
3076 t << "rankdir=TB \n";
3077 t << "concentrate=true\n";
3078 t << "stylesheet=\"doxygen.css\"\n";
3079}
3080
3082{
3083 t << " } \n";
3084}
3085
3087{
3088 // assert(VhdlDocGen::flowMember);
3089
3090 QCString ov = Config_getString(HTML_OUTPUT);
3091 QCString fileName = ov+"/flow_design.dot";
3092 std::ofstream f = Portable::openOutputStream(fileName);
3093 if (!f.is_open())
3094 {
3095 err("Cannot open file %s for writing\n",qPrint(fileName));
3096 return;
3097 }
3098 TextStream t(&f);
3099
3100 colTextNodes();
3101 // buildCommentNodes(t);
3102
3103#ifdef DEBUGFLOW
3104 printFlowTree();
3105#endif
3106
3107 if (!Config_getString(PLANTUML_JAR_PATH).isEmpty())
3108 {
3109 printUmlTree();
3110 delFlowList();
3111 t.flush();
3112 f.close();
3113 return;
3114 }
3115
3116 startDot(t);
3118 for (const auto &fll : flowList)
3119 {
3120 writeShape(t,fll);
3121 }
3122 writeFlowLinks(t);
3123
3125 delFlowList();
3126 t.flush();
3127 f.close();
3129}// writeFlowChart
3130
3132{
3133 if (fl.type & EEND) return;
3134 QCString var;
3135 if (fl.type & LOOP)
3136 {
3137 var=" loop";
3138 }
3139 else if (fl.type & IFF)
3140 {
3141 var=" then";
3142 }
3143 else
3144 {
3145 var="";
3146 }
3147
3148 t << getNodeName(fl.id);
3149
3150#ifdef DEBUGFLOW
3151 QCString qq(getNodeName(fl.id));
3152 g_keyMap.emplace(qq.str(),fl.id);
3153#endif
3154
3155 bool dec=(fl.type & DECLN);
3156 bool exit=(fl.type & EXITNEXT);
3157 if (exit && !fl.exp.isEmpty())
3158 {
3159 dec=TRUE;
3160 }
3161 if (dec)
3162 {
3163 QCString exp=fl.exp;
3164 alignText(exp);
3165
3166 t << " [shape=diamond,style=filled,color=\"";
3167 t << flowCol.decisionNode;
3168 t << "\",label=\" ";
3169 QCString kl;
3170 if (exit) kl=fl.text+" ";
3171
3172 if (!fl.label.isEmpty())
3173 {
3174 kl+=fl.label+":"+exp+var;
3175 }
3176 else
3177 {
3178 kl+=exp+var;
3179 }
3180
3182 t << "\"]\n";
3183 }
3184 else if (fl.type & ENDCL)
3185 {
3186 QCString val=fl.text;
3187 t << " [shape=ellipse ,label=\""+val+"\"]\n";
3188 }
3189 else if (fl.type & STARTFIN)
3190 {
3191 QCString val=fl.text;
3192 t << "[shape=box , style=rounded label=<\n";
3193 t << "<TABLE BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" >\n ";
3194 t << "<TR><TD BGCOLOR=\"";
3195 t<< flowCol.startEndNode;
3196 t<< "\"> ";
3198 t << " </TD></TR></TABLE>>];";
3199 }
3200 else
3201 {
3202 if (fl.text.isEmpty()) return;
3203 bool isVar=(fl.type & FlowChart::VARIABLE_NO);
3204 QCString q=fl.text;
3205
3206 if (exit)
3207 {
3208 q+=" "+fl.label;
3209 }
3210
3211 int z=q.findRev("\n");
3212
3213 if (z==static_cast<int>(q.length())-1)
3214 {
3215 q=q.remove(z,2);
3216 }
3217 t << "[shape=none margin=0.1, label=<\n";
3218 t << "<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"2\" >\n ";
3219 if (isVar)
3220 {
3221 t << "<TR><TD BGCOLOR=\"" << flowCol.varNode << "\" > ";
3222 }
3223 else
3224 {
3225 t << "<TR><TD BGCOLOR=\"" << flowCol.textNode << "\" > ";
3226 }
3228 t << " </TD></TR></TABLE>>];";
3229 }
3230}
3231
3232
3233void FlowChart::writeEdge(TextStream &t,const FlowChart &fl_from,const FlowChart &fl_to,int i)
3234{
3235 bool b=fl_from.type & STARTL;
3236 bool c=fl_to.type & STARTL;
3237
3238#ifdef DEBUGFLOW
3239 QCString s1(getNodeName(fl_from.id));
3240 QCString s2(getNodeName(fl_to.id));
3241 auto it = g_keyMap.find(s1.str());
3242 auto it1 = g_keyMap.find(s2.str());
3243 // checks if the link is connected to a valid node
3244 assert(it!=g_keyMap.end());
3245 assert(it1!=g_keyMap.end());
3246#endif
3247
3248 writeEdge(t,fl_from.id,fl_to.id,i,b,c);
3249}
3250
3251void FlowChart::writeEdge(TextStream &t,int fl_from,int fl_to,int i,bool bFrom,bool bTo)
3252{
3253 QCString label,col;
3254
3255 if (i==0)
3256 {
3257 col=flowCol.yesNodeLink;
3258 label="yes";
3259 }
3260 else if (i==1)
3261 {
3262 col=flowCol.noNodeLink;
3263 label="no";
3264 }
3265 else
3266 {
3267 col=flowCol.textNodeLink;
3268 label="";
3269 }
3270
3271 t << "edge [color=\""+col+"\",label=\""+label+"\"]\n";
3272 t << getNodeName(fl_from);
3273 if (bFrom) t << ":s";
3274 t << "->";
3275 t << getNodeName(fl_to);
3276 if (bTo) t << ":n";
3277 t << "\n";
3278}
3279
3280void FlowChart::alignFuncProc( QCString & q,const ArgumentList &al,bool isFunc)
3281{
3282 size_t index=al.size();
3283 if (index==0) return;
3284
3285 size_t len=q.length()+VhdlDocGen::getFlowMember()->name().length();
3286 QCString prev,temp;
3287 prev.fill(' ',static_cast<int>(len)+1);
3288
3289 q+="\n";
3290 for (const Argument &arg : al)
3291 {
3292 QCString attl=arg.defval+" ";
3293 attl+=arg.name+" ";
3294
3295 if (!isFunc)
3296 {
3297 attl+=arg.attrib+" ";
3298 }
3299 else
3300 {
3301 attl+=" in ";
3302 }
3303 attl+=arg.type;
3304 if (--index) attl+=",\n"; else attl+="\n";
3305
3306 attl.prepend(prev);
3307 temp+=attl;
3308 }
3309
3310 q+=temp;
3311}
3312
3313size_t FlowChart::findNextLoop(size_t index,int stamp)
3314{
3315 for (size_t j=index+1; j<flowList.size(); j++)
3316 {
3317 const FlowChart &flo = flowList[j];
3318 if (flo.stamp==stamp)
3319 {
3320 continue;
3321 }
3322 if (flo.type&END_LOOP)
3323 {
3324 return j;
3325 }
3326 }
3327 return flowList.size()-1;
3328}
3329
3330size_t FlowChart::findPrevLoop(size_t index,int stamp,bool endif)
3331{
3332 for (size_t j=index;j>0;j--)
3333 {
3334 const FlowChart &flo = flowList[j];
3335 if (flo.type & LOOP)
3336 {
3337 if (flo.stamp==stamp && endif)
3338 {
3339 return j;
3340 }
3341 else
3342 {
3343 if (flo.stamp<stamp)
3344 {
3345 return j;
3346 }
3347 }
3348 }
3349 }
3350 return flowList.size()-1;
3351}
3352
3353size_t FlowChart::findLabel(size_t index,const QCString &label)
3354{
3355 for (size_t j=index;j>0;j--)
3356 {
3357 const FlowChart &flo = flowList[j];
3358 if ((flo.type & LOOP) && !flo.label.isEmpty() && qstricmp(flo.label,label)==0)
3359 {
3360 return j;
3361 }
3362 }
3363 err("could not find label: '%s'\n",qPrint(label));
3364 return 0;
3365}
3366
3367size_t FlowChart::findNode(size_t index,int stamp,int type)
3368{
3369 for (size_t j=index+1; j<flowList.size(); j++)
3370 {
3371 const FlowChart &flo = flowList[j];
3372 if (flo.type==type && flo.stamp==stamp)
3373 {
3374 return j;
3375 }
3376 }
3377 return 0;
3378}// findNode
3379
3380size_t FlowChart::getNextNode(size_t index,int stamp)
3381{
3382 for (size_t j=index+1; j<flowList.size(); j++)
3383 {
3384 const FlowChart &flo = flowList[j];
3385 int kind = flo.type;
3386 int s = flo.stamp;
3387 if (s>stamp)
3388 {
3389 continue;
3390 }
3391 if (kind & ENDIF_NO)
3392 {
3393 if (s<stamp && stamp>0)
3394 {
3395 stamp--;
3396 continue;
3397 }
3398 }
3399 if (kind & (ELSE_NO | ELSIF_NO))
3400 {
3401 if (s<stamp && stamp>0)
3402 {
3403 stamp--;
3404 }
3405 j=findNode(j,stamp,ENDIF_NO);
3406 continue;
3407 }
3408 if (kind & WHEN_NO)
3409 {
3410 if (s<stamp && stamp>0)
3411 {
3412 stamp--;
3413 }
3414 return findNode(j,stamp-1,END_CASE);
3415 }
3416 return j;
3417 }
3418 return FLOWLEN;
3419}
3420
3421size_t FlowChart::getNextIfLink(const FlowChart &fl,size_t index)
3422{
3423 int stamp=fl.stamp;
3424 size_t start = index+1;
3425 size_t endifNode = findNode(start,stamp,ENDIF_NO);
3426 size_t elseifNode = findNode(start,stamp,ELSIF_NO);
3427 size_t elseNode = findNode(start,stamp,ELSE_NO);
3428
3429 if (elseifNode>0 && elseifNode<endifNode)
3430 {
3431 return elseifNode;
3432 }
3433
3434 if (elseNode>0 && elseNode<endifNode)
3435 {
3436 return elseNode+1;
3437 }
3438
3439 stamp=flowList[endifNode].stamp;
3440 return getNextNode(endifNode,stamp);
3441}
3442
3444{
3445 size_t size=flowList.size();
3446 if (size<2) return;
3447
3448 // write start link
3449 writeEdge(t,flowList[0],flowList[1],2);
3450
3451 for (size_t j=0;j<size;j++)
3452 {
3453 const FlowChart &fll = flowList[j];
3454 int kind = fll.type;
3455 int stamp = fll.stamp;
3456 if (kind & EEND)
3457 {
3458 continue;
3459 }
3460
3461 if (kind & IFF)
3462 {
3463 writeEdge(t,fll,flowList[j+1],0);
3464 size_t z=getNextIfLink(fll,j);
3465 // assert(z>-1);
3466 writeEdge(t,fll,flowList[z],1);
3467 }
3468 else if (kind & LOOP_NO)
3469 {
3470 writeEdge(t,fll,flowList[j+1],2);
3471 continue;
3472 }
3473 else if (kind & (CASE_NO | FOR_NO | WHILE_NO))
3474 {
3475 if (kind & CASE_NO)
3476 {
3477 writeEdge(t,fll,flowList[j+1],2);
3478 continue;
3479 }
3480 else
3481 {
3482 writeEdge(t,fll,flowList[j+1],0);
3483 }
3484
3485 kind=END_LOOP;
3486 size_t z=findNode(j+1,fll.stamp,kind);
3487 z=getNextNode(z,flowList[z].stamp);
3488
3489 // assert(z>-1);
3490 writeEdge(t,fll,flowList[z],1);
3491 continue;
3492 }
3493 else if (kind & (TEXT_NO | VARIABLE_NO))
3494 {
3495 size_t z=getNextNode(j,stamp);
3496 writeEdge(t,fll,flowList[z],2);
3497 }
3498 else if (kind & WHEN_NO)
3499 {
3500 // default value
3501 if (qstricmp(fll.text.simplifyWhiteSpace(),"others")==0)
3502 {
3503 writeEdge(t,fll,flowList[j+1],2);
3504 continue;
3505 }
3506
3507
3508 writeEdge(t,fll,flowList[j+1],0);
3509 size_t u=findNode(j,stamp,WHEN_NO);
3510 size_t v=findNode(j,stamp-1,END_CASE);
3511
3512 if (u>0 && u<v)
3513 {
3514 writeEdge(t,fll,flowList[u],1);
3515 }
3516 else
3517 {
3518 writeEdge(t,fll,flowList[v],1);
3519 }
3520 }
3521 else if (kind & END_CASE)
3522 {
3523 size_t z=FlowChart::getNextNode(j,fll.stamp);
3524 writeEdge(t,fll,flowList[z],2);
3525 }
3526 else if (kind & END_LOOP)
3527 {
3528 size_t z=findPrevLoop(j,fll.stamp,true);
3529 writeEdge(t,fll,flowList[z],2);
3530 }
3531 else if (kind & RETURN_NO)
3532 {
3533 writeEdge(t,fll,flowList[size-1],2);
3534 }
3535 else if (kind & (EXIT_NO | NEXT_NO))
3536 {
3537 size_t z = 0;
3538 bool b = kind==NEXT_NO;
3539 if (!fll.exp.isEmpty())
3540 {
3541 writeEdge(t,fll,flowList[j+1],1);
3542 }
3543 if (!fll.label.isEmpty())
3544 {
3545 z=findLabel(j,fll.label);
3546 if (b)
3547 {
3548 writeEdge(t,fll,flowList[z],0);
3549 }
3550 else
3551 {
3553 z=getNextNode(z,flowList[z].stamp);
3554 writeEdge(t,fll,flowList[z],0);
3555 }
3556 continue;
3557 }
3558 else
3559 {
3560 if (b)
3561 {
3562 z=findPrevLoop(j,fll.stamp);
3563 writeEdge(t,fll,flowList[z],0);
3564 continue;
3565 }
3566 else
3567 {
3568 z =findNextLoop(j,fll.stamp-1);
3569 }
3570 z=getNextNode(z,flowList[z].stamp);
3571 }
3572 writeEdge(t,fll,flowList[z],0);
3573 }
3574 } //for
3575} //writeFlowLinks
This class represents an function or template argument list.
Definition arguments.h:60
bool hasParameters() const
Definition arguments.h:69
size_t size() const
Definition arguments.h:93
A abstract class representing of a compound symbol.
Definition classdef.h:104
virtual void updateBaseClasses(const BaseClassList &bcd)=0
Update the list of base classes to the one passed.
virtual QCString className() const =0
Returns the name of the class including outer classes, but not including namespaces.
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
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 Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.
virtual MemberList * getMemberList(MemberListType lt) const =0
Returns the members in the list identified by lt.
virtual const ClassDef * templateMaster() const =0
Returns the template master of which this class is an instance.
virtual FileDef * getFileDef() const =0
Returns the namespace this compound is in, or 0 if it has a global scope.
virtual const BaseClassList & subClasses() const =0
Returns the list of sub classes that directly derive from this class.
virtual void insertBaseClass(ClassDef *, const QCString &name, Protection p, Specifier s, const QCString &t=QCString())=0
virtual void insertSubClass(ClassDef *, Protection p, Specifier s, const QCString &t=QCString())=0
virtual void insertMember(MemberDef *)=0
The common base class of all entity definitions found in the sources.
Definition definition.h:76
virtual const QCString & localName() const =0
virtual int getEndBodyLine() const =0
virtual QCString getDefFileName() const =0
virtual bool isLinkable() const =0
virtual QCString anchor() const =0
virtual int briefLine() const =0
virtual QCString symbolName() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual QCString getReference() const =0
virtual QCString documentation() const =0
virtual QCString qualifiedName() const =0
virtual QCString briefFile() const =0
virtual QCString getOutputFileBase() const =0
virtual Definition * getOuterScope() const =0
virtual int getStartBodyLine() const =0
virtual const QCString & name() const =0
virtual void setName(const QCString &name)=0
virtual void writeSourceRefs(OutputList &ol, const QCString &scopeName) const =0
virtual void writeSourceDef(OutputList &ol) const =0
virtual void setLanguage(SrcLangExt lang)=0
virtual void writeSourceReffedBy(OutputList &ol, const QCString &scopeName) const =0
virtual void writeDocAnchorsToTagFile(TextStream &) const =0
virtual void setBodyDef(const FileDef *fd)=0
static ParserManager * parserManager
Definition doxygen.h:131
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:96
static MemberNameLinkedMap * functionNameLinkedMap
Definition doxygen.h:112
static QCString verifiedDotPath
Definition doxygen.h:139
static SearchIndexIntf searchIndex
Definition doxygen.h:124
Represents an unstructured piece of information, about an entity found in the sources.
Definition entry.h:116
void moveToSubEntryAndKeep(Entry *e)
Definition entry.cpp:144
A model of a file symbol.
Definition filedef.h:99
virtual QCString absFilePath() const =0
static size_t findPrevLoop(size_t j, int stamp, bool endif=FALSE)
QCString label
Definition vhdldocgen.h:311
QCString text
Definition vhdldocgen.h:312
static void writeEdge(TextStream &t, int fl_from, int fl_to, int i, bool bFrom=FALSE, bool bTo=FALSE)
static void printFlowTree()
static void alignFuncProc(QCString &q, const ArgumentList &al, bool isFunc)
static void startDot(TextStream &t)
static const char * getNodeType(int c)
static void codify(TextStream &t, const QCString &str)
static size_t findLabel(size_t j, const QCString &)
static void addFlowChart(int type, const QCString &text, const QCString &exp, const QCString &label=QCString())
static void delFlowList()
static size_t getNextNode(size_t index, int stamp)
static void writeFlowChart()
static void colTextNodes()
static void createSVG()
static size_t findNextLoop(size_t j, int stamp)
static void writeShape(TextStream &t, const FlowChart &fl)
static size_t getNextIfLink(const FlowChart &, size_t)
static void printNode(const FlowChart &n)
static void moveToPrevLevel()
static QCString getNodeName(int n)
static QCString convertNameToFileName()
static void alignCommentNode(TextStream &t, QCString com)
static size_t findNode(size_t index, int stamp, int type)
static void buildCommentNodes(TextStream &t)
static void printUmlTree()
static void writeFlowLinks(TextStream &t)
FlowChart(int typ, const QCString &t, const QCString &ex, const QCString &label=QCString())
static void endDot(TextStream &t)
static QCString printPlantUmlNode(const FlowChart &flo, bool, bool)
QCString exp
Definition vhdldocgen.h:313
A model of a group of symbols.
Definition groupdef.h:52
const T * find(const std::string &key) const
Find an object given the key.
Definition linkedmap.h:47
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
virtual QCString typeString() const =0
virtual bool hasDetailedDescription() const =0
virtual void warnIfUndocumented() const =0
virtual QCString excpString() const =0
virtual const ClassDef * getClassDef() const =0
virtual bool hasReferencesRelation() const =0
virtual GroupDef * getGroupDef()=0
virtual const FileDef * getFileDef() const =0
virtual const ArgumentList & argumentList() const =0
virtual VhdlSpecifier getVhdlSpecifiers() const =0
virtual ClassDef * getClassDefOfAnonymousType() const =0
virtual bool hasReferencedByRelation() const =0
virtual bool isBriefSectionVisible() const =0
virtual bool isVariable() const =0
virtual QCString argsString() const =0
virtual void setVhdlSpecifiers(VhdlSpecifier s)=0
virtual void setType(const QCString &t)=0
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:108
const MemberGroupRefList & getMemberGroupList() const
Definition memberlist.h:144
Wrapper class for the MemberListType type.
Definition types.h:184
void push_back(Ptr &&p)
Definition membername.h:54
void push_back(const T &value)
Definition memberlist.h:47
An abstract interface of a namespace symbol.
void startFontClass(const QCString &c)
Definition outputlist.h:269
void startCodeFragment(const QCString &style)
Definition outputlist.h:278
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:314
bool isEnabled(OutputType o)
void startMemberGroupHeader(bool b)
Definition outputlist.h:506
void writeString(const QCString &text)
Definition outputlist.h:412
void endParameterExtra(bool last, bool one, bool bracket)
Definition outputlist.h:693
void writeChar(char c)
Definition outputlist.h:530
void disable(OutputType o)
void endMemberDocName()
Definition outputlist.h:681
void insertMemberAlignLeft(OutputGenerator::MemberItemType typ=OutputGenerator::MemberItemType::Normal, bool templ=FALSE)
Definition outputlist.h:520
void startParameterExtra()
Definition outputlist.h:691
const OutputCodeList & codeGenerators() const
Definition outputlist.h:357
void startParameterList(bool openBracket)
Definition outputlist.h:699
void enable(OutputType o)
void endMemberDescription()
Definition outputlist.h:568
void endMemberGroupDocs()
Definition outputlist.h:512
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 docify(const QCString &s)
Definition outputlist.h:438
void endEmphasis()
Definition outputlist.h:528
void startMemberGroup()
Definition outputlist.h:514
void startMemberList()
Definition outputlist.h:482
void endTextLink()
Definition outputlist.h:445
void startBold()
Definition outputlist.h:562
void endMemberItem(OutputGenerator::MemberItemType type)
Definition outputlist.h:496
void endMemberList()
Definition outputlist.h:484
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 pushGeneratorState()
void insertMemberAlign(bool templ=FALSE)
Definition outputlist.h:518
void startParameterType(bool first, const QCString &key)
Definition outputlist.h:683
void disableAllBut(OutputType o)
void endParameterName()
Definition outputlist.h:689
void popGeneratorState()
void endBold()
Definition outputlist.h:564
void startDoxyAnchor(const QCString &fName, const QCString &manName, const QCString &anchor, const QCString &name, const QCString &args)
Definition outputlist.h:538
void startEmphasis()
Definition outputlist.h:526
void endMemberGroupHeader()
Definition outputlist.h:508
void endMemberGroup(bool last)
Definition outputlist.h:516
void startMemberGroupDocs()
Definition outputlist.h:510
void endParameterType()
Definition outputlist.h:685
void startParameterName(bool one)
Definition outputlist.h:687
void enableAll()
void endMemberHeader()
Definition outputlist.h:472
void endMemberSubtitle()
Definition outputlist.h:476
void startMemberItem(const QCString &anchor, OutputGenerator::MemberItemType type, const QCString &id=QCString())
Definition outputlist.h:494
void startMemberSubtitle()
Definition outputlist.h:474
void lineBreak(const QCString &style=QCString())
Definition outputlist.h:560
void parseText(const QCString &textStr)
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:443
void startMemberHeader(const QCString &anchor, int typ=2)
Definition outputlist.h:470
std::unique_ptr< OutlineParserInterface > getOutlineParser(const QCString &extension)
Gets the interface to the parser associated with a given extension.
Definition parserintf.h:209
std::unique_ptr< CodeParserInterface > getCodeParser(const QCString &extension)
Gets the interface to the parser associated with a given extension.
Definition parserintf.h:218
QCString writePlantUMLSource(const QCString &outDirArg, const QCString &fileName, const QCString &content, OutputFormat format, const QCString &engine, const QCString &srcFile, int srcLine, bool inlineCode)
Write a PlantUML compatible file.
Definition plantuml.cpp:27
static PlantumlManager & instance()
Definition plantuml.cpp:156
void generatePlantUMLOutput(const QCString &baseName, const QCString &outDir, OutputFormat format)
Convert a PlantUML file to an image.
Definition plantuml.cpp:127
This is an alternative implementation of QCString.
Definition qcstring.h:101
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
void fill(char c, int len=-1)
Fills a string with a predefined character.
Definition qcstring.h:180
QCString & prepend(const char *s)
Definition qcstring.h:407
int toInt(bool *ok=nullptr, int base=10) const
Definition qcstring.cpp:249
QCString upper() const
Definition qcstring.h:239
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153
bool startsWith(const char *s) const
Definition qcstring.h:492
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:226
QCString lower() const
Definition qcstring.h:234
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:567
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition qcstring.h:245
QCString & remove(size_t index, size_t len)
Definition qcstring.h:427
void resize(size_t newlen)
Definition qcstring.h:167
const std::string & str() const
Definition qcstring.h:526
QCString & setNum(short n)
Definition qcstring.h:444
QCString simplifyWhiteSpace() const
return a copy of this string with leading and trailing whitespace removed and multiple whitespace cha...
Definition qcstring.cpp:185
QCString & append(char c)
Definition qcstring.h:381
QCString right(size_t len) const
Definition qcstring.h:219
size_t size() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:156
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:91
QCString & replace(size_t index, size_t len, const char *s)
Definition qcstring.cpp:212
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
QCString left(size_t len) const
Definition qcstring.h:214
int contains(char c, bool cs=TRUE) const
Definition qcstring.cpp:143
bool stripPrefix(const QCString &prefix)
Definition qcstring.h:198
void clear()
Definition qcstring.h:169
void addWord(const QCString &word, bool hiPriority)
void setCurrentDoc(const Definition *ctx, const QCString &anchor, bool isSourceFile)
Text streaming class that buffers data.
Definition textstream.h:36
void flush()
Flushes the buffer.
Definition textstream.h:209
virtual QCString trVhdlType(VhdlSpecifier type, bool single)=0
static void findAllPackages(ClassDef *)
@ ARCHITECTURECLASS
Definition vhdldocgen.h:77
static bool writeVHDLTypeDocumentation(const MemberDef *mdef, const Definition *d, OutputList &ol)
static bool isArchitecture(const MemberDef *mdef)
static bool isGroup(const MemberDef *mdef)
static bool isSignal(const MemberDef *mdef)
static void correctMemberProperties(MemberDefMutable *md)
static bool writeClassType(const ClassDef *, OutputList &ol, QCString &cname)
static void writeFormatString(const QCString &, OutputList &ol, const MemberDef *)
static const MemberDef * getFlowMember()
static QCString convertArgumentListToString(const ArgumentList &al, bool f)
static void writeSource(const MemberDef *mdef, OutputList &ol, const QCString &cname)
static bool isProcess(const MemberDef *mdef)
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 isConstant(const MemberDef *mdef)
static QCString getClassName(const ClassDef *)
static bool isAttribute(const MemberDef *mdef)
static void createFlowChart(const MemberDef *)
static QCString getRecordNumber()
static void writeProcessProto(OutputList &ol, const ArgumentList &al, const MemberDef *)
static ClassDef * findVhdlClass(const QCString &className)
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 bool isLibrary(const MemberDef *mdef)
static QCString parseForBinding(QCString &entity, QCString &arch)
static QCString getProtectionName(int prot)
static QCString parseForConfig(QCString &entity, QCString &arch)
static bool isUnit(const MemberDef *mdef)
static void addBaseClass(ClassDef *cd, ClassDef *ent)
static void writeProcedureProto(OutputList &ol, const ArgumentList &al, const MemberDef *)
static bool isMisc(const MemberDef *mdef)
static bool isConfig(const MemberDef *mdef)
static void resetCodeVhdlParserState()
static bool isEntity(const MemberDef *mdef)
static QCString getProcessNumber()
static void writeInlineClassLink(const ClassDef *, OutputList &ol)
static bool isNumber(const std::string &s)
static void writeVhdlLink(const ClassDef *cdd, OutputList &ol, QCString &type, QCString &name, QCString &beh)
static bool isPort(const MemberDef *mdef)
static const MemberDef * findFunction(const QCString &name, const QCString &package)
static void writeTagFile(MemberDefMutable *mdef, TextStream &tagFile)
static void setFlowMember(const MemberDef *flowMember)
static bool isFile(const MemberDef *mdef)
static bool isSignals(const MemberDef *mdef)
static void prepareComment(QCString &)
static void writeRecUnitDocu(const MemberDef *md, OutputList &ol, QCString largs)
static bool deleteCharRev(QCString &s, char c)
static bool isVariable(const MemberDef *mdef)
static bool isVhdlFunction(const MemberDef *mdef)
static bool isVType(const MemberDef *mdef)
static void init()
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 writeFunctionProto(OutputList &ol, const ArgumentList &al, const MemberDef *)
static void findAllArchitectures(std::vector< QCString > &ql, const ClassDef *cd)
static void parseFuncProto(const QCString &text, QCString &name, QCString &ret, bool doc=false)
static ClassDef * getClass(const QCString &name)
static void writeVhdlDeclarations(const MemberList *, OutputList &, const GroupDef *, const ClassDef *, const FileDef *, const NamespaceDef *, const ModuleDef *)
static void formatString(const QCString &, OutputList &ol, const MemberDef *)
static const ClassDef * findArchitecture(const ClassDef *cd)
static VhdlClasses convert(Protection prot)
Definition vhdldocgen.h:80
static bool isSubType(const MemberDef *mdef)
static const MemberDef * findMember(const QCString &className, const QCString &memName)
static bool isPackageBody(const MemberDef *mdef)
static void computeVhdlComponentRelations()
static bool isCompInst(const MemberDef *mdef)
static void writeStringLink(const MemberDef *mdef, QCString mem, OutputList &ol)
static bool isRecord(const MemberDef *mdef)
static void parseUCF(const QCString &input, Entry *entity, const QCString &f, bool vendor)
static bool isSubClass(ClassDef *cd, ClassDef *scd, bool followInstances, int level)
static bool isPackage(const MemberDef *mdef)
static void writeRecordUnit(QCString &largs, QCString &ltype, OutputList &ol, MemberDefMutable *mdef)
static QCString convertFileNameToClassName(const QCString &name)
static bool isComponent(const MemberDef *mdef)
static QCString getClassTitle(const ClassDef *)
static ClassDef * getPackageName(const QCString &name)
static bool isConstraint(const MemberDef *mdef)
static QCString getIndexWord(const QCString &, int index)
static bool isGeneric(const MemberDef *mdef)
static void deleteAllChars(QCString &s, char c)
static bool isProcedure(const MemberDef *mdef)
static bool writeFuncProcDocu(const MemberDef *mdef, OutputList &ol, const ArgumentList &al, bool type=false)
static bool isAlias(const MemberDef *mdef)
static const char * findKeyWord(const QCString &word)
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)
ClassDefMutable * toClassDefMutable(Definition *d)
ClassDef * toClassDef(Definition *d)
std::vector< BaseClassDef > BaseClassList
Definition classdef.h:81
Class representing a regular expression.
Definition regex.h:39
Interface for the comment block scanner.
#define Config_getBool(name)
Definition config.h:33
#define Config_getString(name)
Definition config.h:32
std::set< std::string > StringSet
Definition containers.h:31
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.
DirIterator begin(DirIterator it) noexcept
Definition dir.cpp:170
DirIterator end(const DirIterator &) noexcept
Definition dir.cpp:175
Translator * theTranslator
Definition language.cpp:71
MemberDefMutable * toMemberDefMutable(Definition *d)
std::unique_ptr< MemberDef > createMemberDef(const QCString &defFileName, int defLine, int defColumn, const QCString &type, const QCString &name, const QCString &args, const QCString &excp, Protection prot, Specifier virt, bool stat, Relationship related, MemberType t, const ArgumentList &tal, const ArgumentList &al, const QCString &metaData)
Factory method to create a new instance of a MemberDef.
#define err(fmt,...)
Definition message.h:84
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:665
int system(const QCString &command, const QCString &args, bool commandHasConsole=true)
Definition portable.cpp:106
Namespace for the regular expression functions.
Definition regex.cpp:31
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
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
Portable versions of functions that are platform dependent.
int qstricmp(const char *s1, const char *s2)
Definition qcstring.cpp:442
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:477
#define qsnprintf
Definition qcstring.h:49
const char * qPrint(const char *s)
Definition qcstring.h:661
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
uint32_t qstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
Definition qcstring.h:58
#define ASSERT(x)
Definition qcstring.h:39
Web server based search engine.
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
This struct is used to capture the tag file information for an Entry.
Definition entry.h:103
QCString anchor
Definition entry.h:106
QCString fileName
Definition entry.h:105
QCString tagName
Definition entry.h:104
@ Variable
Definition types.h:393
@ Public
Definition types.h:26
@ Normal
Definition types.h:29
VhdlSpecifier
Definition types.h:548
@ INSTANTIATION
Definition types.h:569
@ MISCELLANEOUS
Definition types.h:575
@ SHAREDVARIABLE
Definition types.h:572
std::string_view word
Definition util.cpp:980
bool found
Definition util.cpp:984
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:4266
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:6981
StringVector split(const std::string &s, const std::string &delimiter)
split input string s by string delimiter delimiter.
Definition util.cpp:6945
QCString convertToId(const QCString &s)
Definition util.cpp:4226
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5243
A bunch of utility functions.
static std::vector< ClassDef * > g_classList
static void initUCF(Entry *root, const QCString &type, QCString &qcs, int line, const QCString &fileName, QCString &brief)
static const MemberDef * findMemFlow(const MemberDef *mdef)
const char * noNodeLink
static void writeUCFLink(const MemberDef *mdef, OutputList &ol)
#define FLOWLEN
#define IFF
#define EMPTY
static const std::unordered_set< std::string > g_vhdlKeyWordSet0
static std::vector< const MemberDef * > mdList
static int nodeCounter
static std::map< std::string, const MemberDef * > g_varMap
static void startFonts(const QCString &q, const char *keyword, OutputList &ol)
const char * decisionNode
static std::map< ClassDef *, std::vector< ClassDef * > > g_packages
#define ENDCL
static const MemberDef * flowMember
static int recordCounter
std::vector< FlowChart > flowList
#define theTranslator_vhdlType
static void writeLink(const MemberDef *mdef, OutputList &ol)
static struct @262143045100337216022015277174266365223104043217 flowCol
static QCString splitString(QCString &str, char c)
const char * yesNodeLink
#define EMPTNODE
#define LOOP
static bool membersHaveSpecificType(const MemberList *ml, VhdlSpecifier type)
const char * textNodeLink
static const std::unordered_set< std::string > g_vhdlKeyWordSet2
#define DECLN
static int ifcounter
static VhdlSpecifier getSpecifierTypeFromClass(const ClassDef *cd)
static void addInstance(ClassDefMutable *entity, ClassDefMutable *arch, ClassDefMutable *inst, const std::shared_ptr< Entry > &cur)
const char * varNode
void alignText(QCString &q)
#define STARTFIN
const char * textNode
static int compareString(const QCString &s1, const QCString &s2)
static const std::unordered_set< std::string > g_vhdlKeyWordSet3
#define EEND
const char * startEndNode
const char * comment
static std::recursive_mutex g_vhdlMutex
#define EXITNEXT
static const std::unordered_set< std::string > g_vhdlKeyWordSet1
#define STARTL
std::vector< FlowChart > flowList
const EntryList & getVhdlInstList()