29#include <unordered_set>
60#define theTranslator_vhdlType theTranslator->trVhdlType
65 const std::shared_ptr<Entry> &cur);
94 codeOL.endFontClass();
100 size_t i=str.
find(c);
119 "abs",
"access",
"after",
"alias",
"all",
"and",
"architecture",
"array",
"assert",
"assume",
"assume_guarantee",
"attribute",
120 "begin",
"block",
"body",
"buffer",
"bus",
121 "case",
"component",
"configuration",
"constant",
"context",
"cover",
122 "default",
"disconnect",
"downto",
123 "else",
"elsif",
"end",
"entity",
"exit",
124 "fairness",
"file",
"for",
"force",
"function",
125 "generate",
"generic",
"group",
"guarded",
126 "if",
"impure",
"in",
"inertial",
"inout",
"is",
127 "label",
"library",
"linkage",
"literal",
"loop",
129 "nand",
"new",
"next",
"nor",
"not",
"null",
130 "of",
"on",
"open",
"or",
"others",
"out",
131 "package",
"parameter",
"port",
"postponed",
"procedure",
"process",
"property",
"protected",
"pure",
132 "range",
"record",
"register",
"reject",
"release",
"restrict",
"restrict_guarantee",
"rem",
"report",
"rol",
"ror",
"return",
133 "select",
"sequence",
"severity",
"signal",
"shared",
"sla",
"sll",
"sra",
"srl",
"strong",
"subtype",
134 "then",
"to",
"transport",
"type",
135 "unaffected",
"units",
"until",
"use",
136 "variable",
"vmode",
"vprop",
"vunit",
137 "wait",
"when",
"while",
"with",
145 "natural",
"unsigned",
"signed",
"string",
"boolean",
"bit",
"bit_vector",
"character",
146 "std_ulogic",
"std_ulogic_vector",
"std_logic",
"std_logic_vector",
"integer",
147 "real",
"float",
"ufixed",
"sfixed",
"time",
"positive"
153 "abs",
"and",
"or",
"not",
"mod",
"xor",
"rem",
"xnor",
"ror",
"rol",
"sla",
"sll"
159 "base",
"left",
"right",
"high",
"low",
"ascending",
160 "image",
"value",
"pos",
"val",
"succ",
"pred",
"leftof",
"rightof",
"left",
"right",
"high",
"low",
161 "range",
"reverse_range",
"length",
"ascending",
"delayed",
"stable",
"quiet",
"transaction",
"event",
162 "active",
"last_event",
"last_active",
"last_value",
"driving",
"driving_value",
"simple_name",
"instance_name",
"path_name"
176 if (word.empty())
return nullptr;
179 return "keywordflow";
182 return "keywordtype";
188 return "vhdlkeyword";
195 if (name.
empty())
return nullptr;
205static std::map<std::string,const MemberDef*>
g_varMap;
207static std::map<ClassDef*,std::vector<ClassDef*> >
g_packages;
217 if (cd==
nullptr)
return nullptr;
220 if (mdef)
return mdef;
222 if (mdef)
return mdef;
250 if (mdef)
return mdef;
252 if (mdef)
return mdef;
293 for (
const auto &cdp : cList_it->second)
296 if (mdef)
return mdef;
298 if (mdef)
return mdef;
334 for (
const auto &md : *ml)
358 std::vector<ClassDef*> cList;
362 for (
const auto &md : *mem)
387 if (cdef==
nullptr)
return nullptr;
392 for (
const auto &mdef : *mem)
429 if (cd==
nullptr)
return "";
441 if (cd==
nullptr)
return "";
459 std::vector<DString> ql;
494 for (
const auto &s : ql)
502 if (ql.size()==1) s1.
clear();
528 DString className=citer->className();
535 qll.push_back(className);
549 if (ql[0]==cd->
name())
563 if (ccd==
nullptr)
return;
588 if (qcs.
empty())
return;
590 const char* sc=
"--!";
592 static const reg::Ex re(R
"(\n[ \t]*--!)");
593 std::string s = qcs.str();
598 size_t sl=s.length();
599 for ( ; iter!=
end ; ++iter)
601 const auto &match = *iter;
602 size_t i = match.position();
604 result+=s.substr(p,i-p);
605 p = match.position()+match.length();
630 size_t index=s1.
find(
'(');
636 temp=s1.
mid(index+1,(
end-index-1));
652 size_t i=s1.
find(
'(');
653 size_t s=s1.
find(
' ');
680 if (index <
static_cast<int>(ql.size()))
694 return "architecture";
698 return "package body";
749 static int stringCounter;
752 snprintf(buf,8,
"%d",stringCounter++);
763 static const reg::Ex reg(R
"([\[\]./<>:\s,;'+*|&=()\"-])");
774 if (j!=std::string::npos)
776 while (j!=std::string::npos)
788 else if (j != 0 && ss)
803 if (!find.
empty() && find.
at(0)==
'"')
805 size_t ii=find.
find(
'"',2);
832 static const reg::Ex regg(R
"([0-9][0-9eEfFbBcCdDaA_.#+?xXzZ-]*)");
852 size_t len = qcs.
length();
855 for (
size_t j=0;j<len;j++)
860 if (c==
'"' || c==
',' || c==
'\''|| c==
'(' || c==
')' || c==
':' || c==
'[' || c==
']' )
862 if (temp.
length()>=index && temp.
at(index-1) !=
' ')
902 size_t len=al.
size();
930 if (
dstricmp(arg.attrib,arg.type) != 0)
932 startFonts(arg.attrib.lower(),
"stringliteral",ol);
958 size_t len=al.
size();
1003 if (!arg.attrib.empty())
1067 size_t index=al.
size();
1154 if (sem) argString.
append(
", ");
1157 argString+=arg.name;
1159 argString+=arg.type;
1163 argString+=arg.defval+
" ";
1164 argString+=arg.name+
" :";
1165 argString+=arg.attrib+
" ";
1166 argString+=arg.type;
1177 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::LIBRARY,
false),
DString(),
false,
VhdlSpecifier::LIBRARY);
1178 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::USE,
false),
DString(),
false,
VhdlSpecifier::USE);
1179 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::FUNCTION,
false),
DString(),
false,
VhdlSpecifier::FUNCTION);
1180 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::COMPONENT,
false),
DString(),
false,
VhdlSpecifier::COMPONENT);
1181 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::CONSTANT,
false),
DString(),
false,
VhdlSpecifier::CONSTANT);
1182 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::TYPE,
false),
DString(),
false,
VhdlSpecifier::TYPE);
1183 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::SUBTYPE,
false),
DString(),
false,
VhdlSpecifier::SUBTYPE);
1184 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::GENERIC,
false),
DString(),
false,
VhdlSpecifier::GENERIC);
1185 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::PORT,
false),
DString(),
false,
VhdlSpecifier::PORT);
1186 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::PROCESS,
false),
DString(),
false,
VhdlSpecifier::PROCESS);
1187 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::SIGNAL,
false),
DString(),
false,
VhdlSpecifier::SIGNAL);
1188 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::ATTRIBUTE,
false),
DString(),
false,
VhdlSpecifier::ATTRIBUTE);
1189 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::PROCEDURE,
false),
DString(),
false,
VhdlSpecifier::PROCEDURE);
1190 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::RECORD,
false),
DString(),
false,
VhdlSpecifier::RECORD);
1191 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::UNITS,
false),
DString(),
false,
VhdlSpecifier::UNITS);
1192 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::SHAREDVARIABLE,
false),
DString(),
false,
VhdlSpecifier::SHAREDVARIABLE);
1193 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::VFILE,
false),
DString(),
false,
VhdlSpecifier::VFILE);
1194 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::GROUP,
false),
DString(),
false,
VhdlSpecifier::GROUP);
1195 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::INSTANTIATION,
false),
DString(),
false,
VhdlSpecifier::INSTANTIATION);
1196 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::ALIAS,
false),
DString(),
false,
VhdlSpecifier::ALIAS);
1197 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::MISCELLANEOUS,
true),
DString(),
false,
VhdlSpecifier::MISCELLANEOUS);
1200 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::CONFIG,
false),
DString(),
false,
VhdlSpecifier::CONFIG);
1201 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::UCF_CONST,
false),
DString(),
false,
VhdlSpecifier::UCF_CONST);
1256 bool hasParams =
false;
1258 if (cd==
nullptr)
return hasParams;
1312 bool c=largs==
"context";
1339 tagFile <<
" <member kind=\"";
1367 tagFile <<
" <anchorfile>" <<
convertToXML(fn) <<
"</anchorfile>\n";
1378 tagFile <<
" </member>\n";
1389 ASSERT(cd!=
nullptr || nd!=
nullptr || fd!=
nullptr || gd!=
nullptr || mod!=
nullptr ||
1396 else if (mod) d=mod;
1430 if (!detailsVisible)
1495 name+=
" <"+mdef->
name()+
">";
1504 if (largs==
"context")
1601 name+=mdef->
name()+
"> ";
1634 if (htmlOn && !ltype.
empty())
1645 if (!detailsVisible)
1661 .setIndexWords(
true)
1662 .setSingleLine(
true));
1695 for (
const auto &imd : *mlist)
1708 if (pack.find(md->
name().
str())==pack.end())
1712 pack.insert(md->
name().
str());
1722 if (ml==
nullptr)
return false;
1723 for (
const auto &mdd : *ml)
1725 if (mdd->getVhdlSpecifiers()==type)
1732 if (!mg->members().empty())
1753 if (!subtitle.
empty())
1762 .setSingleLine(
true));
1774 bool hasHeader=!mg->header().empty();
1782 if (!mg->documentation().empty())
1790 mg->documentation()+
"\n",
1860 codeFragment=codeFragment.
left(fi);
1861 codeFragment.
append(
"\n .... ");
1869 intf->parseCode(codeOL,
1882 codeOL.endCodeFragment(
"DoxyCode");
1885 if (cname.
empty())
return;
1915 while (!ucFile.
empty())
1917 size_t i=ucFile.
find(
'\n');
1935 size_t in=temp.
find(
"-name");
1938 temp=temp.
remove(0,in+5);
1947 static const reg::Ex ee(R
"([\s=])");
1949 if (in==std::string::npos) in=0;
1955 initUCF(entity,ff,temp,lineNo,fileName,brief);
1961 ucFile=ucFile.
remove(0,i+1);
1968 if (qcs.
empty())
return;
1976 if (i==std::string::npos)
return;
1991 std::shared_ptr<Entry> current = std::make_shared<Entry>();
1993 current->section=EntryType::makeVariable();
1994 current->bodyLine=line;
1995 current->fileName=fileName;
1996 current->type=
"ucf_const";
1998 current->lang= SrcLangExt::VHDL ;
2007 current->name= n+
"_";
2012 current->brief=brief;
2013 current->briefLine=line;
2014 current->briefFile=fileName;
2052 if (!entity.
contains(
":"))
return "";
2054 static const reg::Ex exp(R
"([:()\s])");
2064 entity.
remove(0,index+1);
2083 static const reg::Ex exp(R
"([()\s])");
2087 if (
findIndex(ql,
"open")!=std::string::npos)
2097 std::string label=ql[0];
2101 entity.
remove(0,index+1);
2152 if (cur->includeName==
"entity" || cur->includeName==
"component" )
2154 entity=cur->includeName+
" "+cur->type;
2157 else if (cur->includeName.empty())
2182 if (ar==
nullptr)
return;
2184 if (classEntity==
nullptr)
2191 if (classEntity==cd)
return;
2193 bName=classEntity->
name();
2195 n1=classEntity->
name();
2220 Relationship::Member,
2221 MemberType::Variable,
2233 mmd->setTagInfo(&tg);
2238 mmd->setLanguage(SrcLangExt::VHDL);
2240 mmd->setBriefDescription(cur->brief,cur->briefFile,cur->briefLine);
2241 mmd->setBodySegment(cur->startLine,cur->startLine,-1) ;
2242 mmd->setDocumentation(cur->doc,cur->docFile,cur->docLine);
2278 size_t len=ql.size();
2282 for(
size_t i=0;i<len;i++)
2313 err(
"Possible recursive class relation while inside {} and looking for {}\n",cd->
name(),scd->
name());
2344 for (
auto &bcd : bcl)
2350 size_t i = n.
find(
'(');
2353 bcd.usedName.append(
"(2)");
2359 std::string t=r.str();
2366 bcd.templSpecifiers=t;
2377 for (
const auto &md :
mdList)
2389 if (mdef==
nullptr)
return;
2414 std::shared_ptr<Entry> root = std::make_shared<Entry>();
2416 parser->parseInput(
"",codeFragment.
data(),root,
nullptr);
2486#define STARTL (FlowChart::WHILE_NO | FlowChart::IF_NO | \
2487 FlowChart::FOR_NO | FlowChart::CASE_NO | \
2488 FlowChart::LOOP_NO | WHEN_NO)
2489#define DECLN (FlowChart::WHEN_NO | \
2490 FlowChart::ELSIF_NO | FlowChart::IF_NO | \
2491 FlowChart::FOR_NO | FlowChart::WHILE_NO | \
2492 FlowChart::CASE_NO | FlowChart::LOOP_NO )
2493#define STARTFIN (FlowChart::START_NO | FlowChart::END_NO)
2494#define LOOP (FlowChart::FOR_NO | FlowChart::WHILE_NO | \
2495 FlowChart::LOOP_NO )
2496#define ENDCL (FlowChart::END_CASE | FlowChart::END_LOOP)
2497#define EEND (FlowChart::ENDIF_NO | FlowChart::ELSE_NO )
2498#define IFF (FlowChart::ELSIF_NO | FlowChart::IF_NO)
2499#define EXITNEXT (FlowChart::EXIT_NO | FlowChart::NEXT_NO )
2500#define EMPTY (EEND | FlowChart::ELSIF_NO)
2501#define EE (FlowChart::ELSE_NO | FlowChart::ELSIF_NO)
2502#define EMPTNODE (ENDCL | EEND | FlowChart::ELSIF_NO)
2503#define FLOWLEN (flowList.size()-1)
2535static std::map<std::string,int> g_keyMap;
2540 if (q.
length()<=80)
return;
2554 size_t j0 = str.
rfind(
' ',80);
2555 size_t j1 = str.
rfind(
'|',80);
2608 static const reg::Ex ep(R
"(\s)");
2639 for (
const auto &flowChart :
flowList)
2649 for (
size_t j=0;j<
flowList.size();j++)
2676 for (
size_t j=0;j<
flowList.size()-1;j++)
2679 int kind = flo.
type;
2714 for (
size_t j=0;j<ql.size();j++)
2721 int diff=
static_cast<int>(max-s.
length());
2730 ql.push_back(s.
str());
2733 for (
size_t j=0;j<ql.size();j++)
2752 for (uint32_t j=0;j < size-1 ;j++)
2769 for (
size_t j=0;j <
flowList.size() ;j++)
2796 t <<
"[shape=none, label=<\n";
2797 t <<
"<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"2\" >\n ";
2798 t <<
"<TR><TD BGCOLOR=\"";
2803 t <<
" </TD></TR></TABLE>>];";
2810 for (
size_t j=0; j<size; j++)
2834 const char *p=str.
data();
2840 case '<': t <<
"<";
break;
2841 case '>': t <<
">";
break;
2842 case '&': t <<
"&";
break;
2843 case '\'': t <<
"'";
break;
2844 case '"': t <<
""";
break;
2845 case '\n': t <<
"<BR ALIGN=\"LEFT\"/>";
break;
2846 default: t << c;
break;
2894 expression=
substitute(expression,
"\"",
"\\\"");
2932 case IF_NO : t=
"\nif ("+
exp+
") then (yes)";
break;
2933 case ELSIF_NO: t=
"\nelseif ("+
exp+
") then (yes)";
break;
2934 case ELSE_NO: t=
"\nelse";
break;
2938 t+=
"if ("+
exp+
") then (yes)";
2945 case FOR_NO: t=
"\nwhile ("+
exp+
") is (yes)";
break;
2946 case WHILE_NO: t=
"\nwhile ("+
exp+
") is (yes)";
break;
2947 case END_LOOP: t=
"\nendwhile";
break;
2948 case END_CASE: t=
"\nendif\n:end case;";
break;
2951 if (!endL) t+=
"\nstop";
2953 case LOOP_NO: t=
"\nwhile (infinite loop)";
break;
2956 case COMMENT_NO: t=
"\n note left \n "+flo.
label+
"\nend note \n";
break;
2957 case BEGIN_NO: t=
"\n:begin;";
break;
2958 default:
ASSERT(
false);
break;
2965 int caseCounter = 0;
2966 int whenCounter = 0;
2970 for (
size_t j=0;j<size;j++)
2985 bool ca = (caseCounter>0 && whenCounter==0);
3001 for (
const auto &baseName: baseNameVector)
3016 case IF_NO:
return "if ";
3022 case END_NO:
return "end ";
3026 case FOR_NO:
return "for ";
3032 case LOOP_NO:
return "infinite loop ";
3037 default:
return "--failure--";
3052 DString dir=
" -o \""+ov+qcs+
"\"";
3053 ov+=
"/flow_design.dot";
3055 DString vlargs=
"-Tsvg \""+ov+
"\" "+dir ;
3059 err(
"could not create dot file\n");
3065 t <<
" digraph G { \n";
3066 t <<
"rankdir=TB \n";
3067 t <<
"concentrate=true\n";
3068 t <<
"stylesheet=\"doxygen.css\"\n";
3081 DString fileName = ov+
"/flow_design.dot";
3085 err(
"Cannot open file {} for writing\n",fileName);
3142 g_keyMap.emplace(qq.
str(),fl.
id);
3156 t <<
" [shape=diamond,style=filled,color=\"";
3158 t <<
"\",label=\" ";
3160 if (exit) kl=fl.
text+
" ";
3177 t <<
" [shape=ellipse ,label=\""+val+
"\"]\n";
3182 t <<
"[shape=box , style=rounded label=<\n";
3183 t <<
"<TABLE BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" >\n ";
3184 t <<
"<TR><TD BGCOLOR=\"";
3188 t <<
" </TD></TR></TABLE>>];";
3201 size_t z=q.
rfind(
'\n');
3207 t <<
"[shape=none margin=0.1, label=<\n";
3208 t <<
"<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"2\" >\n ";
3211 t <<
"<TR><TD BGCOLOR=\"" <<
flowCol.varNode <<
"\" > ";
3215 t <<
"<TR><TD BGCOLOR=\"" <<
flowCol.textNode <<
"\" > ";
3218 t <<
" </TD></TR></TABLE>>];";
3231 auto it = g_keyMap.find(s1.
str());
3232 auto it1 = g_keyMap.find(s2.
str());
3234 ASSERT(it!=g_keyMap.end());
3235 ASSERT(it1!=g_keyMap.end());
3261 t <<
"edge [color=\""+col+
"\",label=\""+
label+
"\"]\n";
3263 if (bFrom) t <<
":s";
3272 size_t index=al.
size();
3273 if (index==0)
return;
3277 prev.
fill(
' ',
static_cast<int>(len)+1);
3287 attl+=arg.attrib+
" ";
3294 if (--index) attl+=
",\n";
else attl+=
"\n";
3305 for (
size_t j=index+1; j<
flowList.size(); j++)
3322 for (
size_t j=index;j>0;j--)
3345 for (
size_t j=index;j>0;j--)
3353 err(
"could not find label: '{}'\n",
label);
3359 for (
size_t j=index+1; j<
flowList.size(); j++)
3372 for (
size_t j=index+1; j<
flowList.size(); j++)
3375 int kind = flo.
type;
3383 if (s<stamp && stamp>0)
3391 if (s<stamp && stamp>0)
3400 if (s<stamp && stamp>0)
3414 size_t start = index+1;
3419 if (elseifNode>0 && elseifNode<endifNode)
3424 if (elseNode>0 && elseNode<endifNode)
3441 for (
size_t j=0;j<size;j++)
3444 int kind = fll.
type;
This class contains the information about the argument of a function or template.
This class represents an function or template argument list.
bool hasParameters() const
A abstract class representing of a compound symbol.
virtual void updateBaseClasses(const BaseClassList &bcd)=0
Update the list of base classes to the one passed.
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
virtual int isBaseClass(const ClassDef *bcd, bool followInstances, const DString &templSpec=DString()) const =0
Returns true iff bcd is a direct or indirect base class of this class.
virtual DString className() const =0
Returns the name of the class including outer classes, but not including namespaces.
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 file in which this compound's definition can be found.
virtual const BaseClassList & subClasses() const =0
Returns the list of sub classes that directly derive from this class.
virtual void insertMember(MemberDef *)=0
virtual void insertSubClass(ClassDef *, Protection p, Specifier s, const DString &t=DString())=0
virtual void insertBaseClass(ClassDef *, const DString &name, Protection p, Specifier s, const DString &t=DString())=0
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
DString & setNum(short n)
void resize(size_t newlen)
size_t rfind(char c, size_t pos=npos) const
DString fill(char c, size_t len)
Fills a string with a predefined character.
DString mid(size_t index, size_t len=npos) const
DString simplifyWhiteSpace() const
return a copy of this string with leading and trailing whitespace removed and multiple internal white...
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
DString & replace(size_t index, size_t len, const char *s)
DString & remove(size_t index, size_t len)
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
char & at(size_t i)
Returns a reference to the character at index i.
size_t rfind_insensitive(char c, size_t pos=npos) const
DString & prepend(const char *s)
int contains(char c, bool cs=true) const
size_t find(char c, size_t pos=0) const
int toInt(bool *ok=nullptr, int base=10) const
DString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
DString left(size_t len) const
const std::string & str() const
bool stripPrefix(const DString &prefix)
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool startsWith(const char *s) const
size_t length() const
Returns the length of the string, not counting the 0-terminator.
The common base class of all entity definitions found in the sources.
virtual DString briefDescription(bool abbreviate=false) const =0
virtual int getEndBodyLine() const =0
virtual DString briefFile() const =0
virtual DString getDefFileName() const =0
virtual DString documentation() const =0
virtual bool isLinkable() const =0
virtual const DString & name() const =0
virtual const DString & localName() const =0
virtual int briefLine() const =0
virtual DString symbolName() const =0
virtual DString qualifiedName() const =0
virtual DString anchor() const =0
virtual DString getReference() const =0
virtual Definition * getOuterScope() const =0
virtual int getStartBodyLine() const =0
virtual DString getOutputFileBase() const =0
virtual void setName(const DString &name)=0
virtual void writeSourceReffedBy(OutputList &ol, const DString &scopeName) const =0
virtual void writeSourceDef(OutputList &ol) const =0
virtual void setLanguage(SrcLangExt lang)=0
virtual void writeDocAnchorsToTagFile(TextStream &) const =0
virtual void setBodyDef(const FileDef *fd)=0
virtual void writeSourceRefs(OutputList &ol, const DString &scopeName) const =0
static ParserManager * parserManager
static DString verifiedDotPath
static ClassLinkedMap * classLinkedMap
static MemberNameLinkedMap * functionNameLinkedMap
static SearchIndexIntf searchIndex
Represents an unstructured piece of information, about an entity found in the sources.
void moveToSubEntryAndKeep(Entry *e)
A model of a file symbol.
virtual DString absFilePath() const =0
static DString printPlantUmlNode(const FlowChart &flo, bool, bool)
static DString convertNameToFileName()
static void alignCommentNode(TextStream &t, DString com)
static void printFlowTree()
static void addFlowChart(int type, const DString &text, const DString &exp, const DString &label=DString())
static void startDot(TextStream &t)
static const char * getNodeType(int c)
static void writeEdge(TextStream &t, int fl_from, int fl_to, int i, bool bFrom=false, bool bTo=false)
static void codify(TextStream &t, const DString &str)
static void delFlowList()
static size_t getNextNode(size_t index, int stamp)
static void writeFlowChart()
static void colTextNodes()
static size_t findNextLoop(size_t j, int stamp)
static size_t findPrevLoop(size_t j, int stamp, bool endif=false)
static void alignFuncProc(DString &q, const ArgumentList &al, bool isFunc)
static void writeShape(TextStream &t, const FlowChart &fl)
static size_t getNextIfLink(const FlowChart &, size_t)
static void printNode(const FlowChart &n)
FlowChart(int typ, const DString &t, const DString &ex, const DString &label=DString())
static void moveToPrevLevel()
static size_t findLabel(size_t j, const DString &)
static size_t findNode(size_t index, int stamp, int type)
static void buildCommentNodes(TextStream &t)
static void printUmlTree()
static void writeFlowLinks(TextStream &t)
static void endDot(TextStream &t)
static DString getNodeName(int n)
A model of a group of symbols.
T * add(const char *k, Args &&... args)
const T * find(const std::string &key) const
A model of a class/file/namespace member symbol.
virtual bool hasDetailedDescription() const =0
virtual void warnIfUndocumented() const =0
virtual DString argsString() const =0
virtual const ClassDef * getClassDef() const =0
virtual bool hasReferencesRelation() const =0
virtual DString excpString() const =0
virtual GroupDef * getGroupDef()=0
virtual const FileDef * getFileDef() const =0
virtual const ArgumentList & argumentList() const =0
virtual VhdlSpecifier getVhdlSpecifiers() const =0
virtual const ClassDef * getClassDefOfAnonymousType() const =0
virtual bool hasReferencedByRelation() const =0
virtual bool isBriefSectionVisible() const =0
virtual bool isVariable() const =0
virtual DString typeString() const =0
virtual void setVhdlSpecifiers(VhdlSpecifier s)=0
virtual void setType(const DString &t)=0
A list of MemberDef objects as shown in documentation sections.
MemberListType listType() const
const MemberGroupRefList & getMemberGroupList() const
Wrapper class for the MemberListType type.
constexpr const char * toLabel() const noexcept
An abstract interface of a namespace symbol.
void startCodeFragment(const DString &style)
void startFontClass(const DString &c)
Class representing a list of output generators that are written to in parallel.
bool isEnabled(OutputType o)
void parseText(const DString &textStr)
void endParameterExtra(bool last, bool one, bool bracket)
void disable(OutputType o)
void writeObjectLink(const DString &ref, const DString &file, const DString &anchor, const DString &name)
void startParameterExtra()
const OutputCodeList & codeGenerators() const
void startParameterList(bool openBracket)
void enable(OutputType o)
void endMemberDescription()
void endMemberGroupDocs()
void docify(const DString &s)
void startMemberHeader(const DString &anchor, int typ=2)
void lineBreak(const DString &style=DString())
void endMemberGroupHeader(bool b)
void insertMemberAlign(bool templ=false)
void insertMemberAlignLeft(OutputGenerator::MemberItemType typ=OutputGenerator::MemberItemType::Normal, bool templ=false)
void writeString(const DString &text)
void endDoxyAnchor(const DString &fn, const DString &anchor)
void startMemberGroupHeader(const DString &id, bool b)
void addLabel(const DString &fName, const DString &anchor)
void endMemberItem(OutputGenerator::MemberItemType type)
void pushGeneratorState()
void disableAllBut(OutputType o)
void startTextLink(const DString &file, const DString &anchor)
void startMemberItem(const DString &anchor, OutputGenerator::MemberItemType type, const DString &id=DString())
void startMemberDescription(const DString &anchor, const DString &inheritId=DString(), bool typ=false)
void generateDoc(const DString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const DString &docStr, const DocOptions &options)
void endMemberGroup(bool last)
void startMemberGroupDocs()
void startParameterName(bool one)
void startParameterType(bool first, const DString &key)
void startMemberSubtitle()
void startDoxyAnchor(const DString &fName, const DString &manName, const DString &anchor, const DString &name, const DString &args)
std::unique_ptr< CodeParserInterface > getCodeParser(const DString &extension)
Gets the interface to the parser associated with a given extension.
std::unique_ptr< OutlineParserInterface > getOutlineParser(const DString &extension)
Gets the interface to the parser associated with a given extension.
void generatePlantUMLOutput(const DString &baseName, const DString &outDir, OutputFormat format, bool toIndex)
Convert a PlantUML file to an image.
StringVector writePlantUMLSource(const DString &outDirArg, const DString &fileName, const DString &content, OutputFormat format, const DString &engine, const DString &srcFile, int srcLine, bool inlineCode)
Write a PlantUML compatible file.
static bool isEnabled()
Returns true if doxygen has been configured to run PlantUML, i.e.
static PlantumlManager & instance()
void addWord(const DString &word, bool hiPriority)
void setCurrentDoc(const Definition *ctx, const DString &anchor, bool isSourceFile)
This struct is used to capture the tag file information for an Entry.
Text streaming class that buffers data.
void flush()
Flushes the buffer.
virtual DString trVhdlType(VhdlSpecifier type, bool single)=0
static void findAllPackages(ClassDef *)
static const char * findKeyWord(const DString &word)
static bool writeVHDLTypeDocumentation(const MemberDef *mdef, const Definition *d, OutputList &ol)
static bool isArchitecture(const MemberDef *mdef)
static DString getClassTitle(const ClassDef *)
static bool isGroup(const MemberDef *mdef)
static bool isSignal(const MemberDef *mdef)
static void correctMemberProperties(MemberDefMutable *md)
static const MemberDef * findFunction(const DString &name, const DString &package)
static const MemberDef * getFlowMember()
static void writeStringLink(const MemberDef *mdef, DString mem, OutputList &ol)
static bool isProcess(const MemberDef *mdef)
static DString getProtectionName(int prot)
static void prepareComment(DString &)
static void parseFuncProto(const DString &text, DString &name, DString &ret, bool doc=false)
static void deleteAllChars(DString &s, char c)
static bool isConstant(const MemberDef *mdef)
static bool isAttribute(const MemberDef *mdef)
static void createFlowChart(const MemberDef *)
static void writeVHDLDeclarations(const MemberList *ml, OutputList &ol, const ClassDef *cd, const NamespaceDef *nd, const FileDef *fd, const GroupDef *gd, const ModuleDef *mod, const DString &title, const DString &subtitle, bool showEnumValues, VhdlSpecifier type)
static void writeProcessProto(OutputList &ol, const ArgumentList &al, const MemberDef *)
static const MemberDef * findMember(const DString &className, const DString &memName)
static void writeRecordUnit(DString &largs, DString <ype, OutputList &ol, MemberDefMutable *mdef)
static bool isLibrary(const MemberDef *mdef)
static ClassDef * findVhdlClass(const DString &className)
static bool isUnit(const MemberDef *mdef)
static void addBaseClass(ClassDef *cd, ClassDef *ent)
static void writeProcedureProto(OutputList &ol, const ArgumentList &al, const MemberDef *)
static DString convertArgumentListToString(const ArgumentList &al, bool f)
static DString convertFileNameToClassName(const DString &name)
static bool isMisc(const MemberDef *mdef)
static bool isConfig(const MemberDef *mdef)
static void writeRecUnitDocu(const MemberDef *md, OutputList &ol, DString largs)
static void resetCodeVhdlParserState()
static void writeVhdlLink(const ClassDef *cdd, OutputList &ol, DString &type, DString &name, DString &beh)
static bool isEntity(const MemberDef *mdef)
static void writeInlineClassLink(const ClassDef *, OutputList &ol)
static bool deleteCharRev(DString &s, char c)
static bool isNumber(const std::string &s)
static DString getIndexWord(const DString &, int index)
static bool isPort(const MemberDef *mdef)
static void writeSource(const MemberDef *mdef, OutputList &ol, const DString &cname)
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 DString getClassName(const ClassDef *)
static bool isVariable(const MemberDef *mdef)
static bool isVhdlFunction(const MemberDef *mdef)
static bool isVType(const MemberDef *mdef)
static ClassDef * getPackageName(const DString &name)
static void parseUCF(const DString &input, Entry *entity, const DString &f, bool vendor)
static void formatString(const DString &, OutputList &ol, const MemberDef *)
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 DString parseForBinding(DString &entity, DString &arch)
static DString getProcessNumber()
static DString getRecordNumber()
static void writeVhdlDeclarations(const MemberList *, OutputList &, const GroupDef *, const ClassDef *, const FileDef *, const NamespaceDef *, const ModuleDef *)
static const ClassDef * findArchitecture(const ClassDef *cd)
static VhdlClasses convert(Protection prot)
static DString parseForConfig(DString &entity, DString &arch)
static bool isSubType(const MemberDef *mdef)
static bool isPackageBody(const MemberDef *mdef)
static void computeVhdlComponentRelations()
static bool isCompInst(const MemberDef *mdef)
static bool isRecord(const MemberDef *mdef)
static void writeFormatString(const DString &, OutputList &ol, const MemberDef *)
static bool isSubClass(ClassDef *cd, ClassDef *scd, bool followInstances, int level)
static bool isPackage(const MemberDef *mdef)
static const MemberDef * findMemberDef(ClassDef *cd, const DString &key, MemberListType type)
This function returns the entity|package in which the key (type) is found.
static void findAllArchitectures(std::vector< DString > &ql, const ClassDef *cd)
static bool isComponent(const MemberDef *mdef)
static bool isConstraint(const MemberDef *mdef)
static bool writeClassType(const ClassDef *, OutputList &ol, DString &cname)
static bool isGeneric(const MemberDef *mdef)
static ClassDef * getClass(const DString &name)
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 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
Class representing a regular expression.
Class to iterate through matches.
#define Config_getBool(name)
#define Config_getString(name)
std::set< std::string > StringSet
std::vector< std::string > StringVector
bool readCodeFragment(const DString &fileName, bool isMacro, int &startLine, int &endLine, DString &result)
Reads a fragment from file fileName starting with line startLine and ending with line endLine.
DirIterator begin(DirIterator it) noexcept
DirIterator end(const DirIterator &) noexcept
DString substitute(const DString &s, const DString &src, const DString &dst)
substitute all occurrences of src in s by dst
int dstricmp(const char *s1, const char *s2)
uint32_t dstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
const char * qPrint(const char *s)
Translator * theTranslator
std::unique_ptr< MemberDef > createMemberDef(const DString &defFileName, int defLine, size_t defColumn, const DString &type, const DString &name, const DString &args, const DString &excp, Protection prot, Specifier virt, bool stat, Relationship related, MemberType t, const ArgumentList &tal, const ArgumentList &al, const DString &metaData)
Factory method to create a new instance of a MemberDef.
MemberDefMutable * toMemberDefMutable(Definition *d)
int system(const DString &command, const DString &args, bool commandHasConsole=true)
std::ofstream openOutputStream(const DString &name, bool append=false)
Namespace for the regular expression functions.
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...
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
Portable versions of functions that are platform dependent.
Some helper functions for std::string.
size_t findIndex(const StringVector &sv, const std::string &s)
find the index of a string in a vector of strings, returns std::string::npos if the string could not ...
StringVector split(const std::string &s, const std::string &delimiter)
split input string s by string delimiter delimiter.
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...
const char * textNodeLink
const char * decisionNode
const char * startEndNode
Options to configure the code parser.
CodeParserOptions & setStartLine(int lineNr)
CodeParserOptions & setInlineFragment(bool enable)
CodeParserOptions & setEndLine(int lineNr)
CodeParserOptions & setMemberDef(const MemberDef *md)
Helper class to pass options when calling OutputList::generateDoc().
DString convertToId(const DString &s)
void addHtmlExtensionIfMissing(DString &fName)
DString convertToXML(const DString &s, bool keepEntities, const bool citeEntry)
A bunch of utility functions.
static DString splitString(DString &str, char c)
static std::vector< ClassDef * > g_classList
static void alignText(DString &q)
static const MemberDef * findMemFlow(const MemberDef *mdef)
static void writeUCFLink(const MemberDef *mdef, OutputList &ol)
static void startFonts(const DString &q, const char *keyword, OutputList &ol)
static const std::unordered_set< std::string > g_vhdlKeyWordSet0
static std::vector< const MemberDef * > mdList
static std::map< std::string, const MemberDef * > g_varMap
static std::map< ClassDef *, std::vector< ClassDef * > > g_packages
static const MemberDef * flowMember
std::vector< FlowChart > flowList
#define theTranslator_vhdlType
static void writeLink(const MemberDef *mdef, OutputList &ol)
static struct @262143045100337216022015277174266365223104043217 flowCol
static int compareString(const DString &s1, const DString &s2)
static bool membersHaveSpecificType(const MemberList *ml, VhdlSpecifier type)
static const std::unordered_set< std::string > g_vhdlKeyWordSet2
static VhdlSpecifier getSpecifierTypeFromClass(const ClassDef *cd)
static void addInstance(ClassDefMutable *entity, ClassDefMutable *arch, ClassDefMutable *inst, const std::shared_ptr< Entry > &cur)
static void initUCF(Entry *root, const DString &type, DString &qcs, int line, const DString &fileName, DString &brief)
static const std::unordered_set< std::string > g_vhdlKeyWordSet3
static std::recursive_mutex g_vhdlMutex
static const std::unordered_set< std::string > g_vhdlKeyWordSet1
std::vector< FlowChart > flowList
const EntryList & getVhdlInstList()