29#include <unordered_set>
66#define theTranslator_vhdlType theTranslator->trVhdlType
71 const std::shared_ptr<Entry> &cur);
100 codeOL.endFontClass();
106 size_t i=str.
find(c);
125 "abs",
"access",
"after",
"alias",
"all",
"and",
"architecture",
"array",
"assert",
"assume",
"assume_guarantee",
"attribute",
126 "begin",
"block",
"body",
"buffer",
"bus",
127 "case",
"component",
"configuration",
"constant",
"context",
"cover",
128 "default",
"disconnect",
"downto",
129 "else",
"elsif",
"end",
"entity",
"exit",
130 "fairness",
"file",
"for",
"force",
"function",
131 "generate",
"generic",
"group",
"guarded",
132 "if",
"impure",
"in",
"inertial",
"inout",
"is",
133 "label",
"library",
"linkage",
"literal",
"loop",
135 "nand",
"new",
"next",
"nor",
"not",
"null",
136 "of",
"on",
"open",
"or",
"others",
"out",
137 "package",
"parameter",
"port",
"postponed",
"procedure",
"process",
"property",
"protected",
"pure",
138 "range",
"record",
"register",
"reject",
"release",
"restrict",
"restrict_guarantee",
"rem",
"report",
"rol",
"ror",
"return",
139 "select",
"sequence",
"severity",
"signal",
"shared",
"sla",
"sll",
"sra",
"srl",
"strong",
"subtype",
140 "then",
"to",
"transport",
"type",
141 "unaffected",
"units",
"until",
"use",
142 "variable",
"vmode",
"vprop",
"vunit",
143 "wait",
"when",
"while",
"with",
151 "natural",
"unsigned",
"signed",
"string",
"boolean",
"bit",
"bit_vector",
"character",
152 "std_ulogic",
"std_ulogic_vector",
"std_logic",
"std_logic_vector",
"integer",
153 "real",
"float",
"ufixed",
"sfixed",
"time",
"positive"
159 "abs",
"and",
"or",
"not",
"mod",
"xor",
"rem",
"xnor",
"ror",
"rol",
"sla",
"sll"
165 "base",
"left",
"right",
"high",
"low",
"ascending",
166 "image",
"value",
"pos",
"val",
"succ",
"pred",
"leftof",
"rightof",
"left",
"right",
"high",
"low",
167 "range",
"reverse_range",
"length",
"ascending",
"delayed",
"stable",
"quiet",
"transaction",
"event",
168 "active",
"last_event",
"last_active",
"last_value",
"driving",
"driving_value",
"simple_name",
"instance_name",
"path_name"
182 if (word.empty())
return nullptr;
185 return "keywordflow";
188 return "keywordtype";
194 return "vhdlkeyword";
201 if (name.
empty())
return nullptr;
211static std::map<std::string,const MemberDef*>
g_varMap;
213static std::map<ClassDef*,std::vector<ClassDef*> >
g_packages;
223 if (cd==
nullptr)
return nullptr;
226 if (mdef)
return mdef;
228 if (mdef)
return mdef;
256 if (mdef)
return mdef;
258 if (mdef)
return mdef;
299 for (
const auto &cdp : cList_it->second)
302 if (mdef)
return mdef;
304 if (mdef)
return mdef;
340 for (
const auto &md : *ml)
364 std::vector<ClassDef*> cList;
368 for (
const auto &md : *mem)
393 if (cdef==
nullptr)
return nullptr;
398 for (
const auto &mdef : *mem)
435 if (cd==
nullptr)
return "";
447 if (cd==
nullptr)
return "";
465 std::vector<DString> ql;
500 for (
const auto &s : ql)
508 if (ql.size()==1) s1.
clear();
534 DString className=citer->className();
541 qll.push_back(className);
555 if (ql[0]==cd->
name())
569 if (ccd==
nullptr)
return;
594 if (qcs.
empty())
return;
596 const char* sc=
"--!";
598 static const reg::Ex re(R
"(\n[ \t]*--!)");
599 std::string s = qcs.str();
604 size_t sl=s.length();
605 for ( ; iter!=
end ; ++iter)
607 const auto &match = *iter;
608 size_t i = match.position();
610 result+=s.substr(p,i-p);
611 p = match.position()+match.length();
636 size_t index=s1.
find(
'(');
642 temp=s1.
mid(index+1,(
end-index-1));
658 size_t i=s1.
find(
'(');
659 size_t s=s1.
find(
' ');
686 if (index <
static_cast<int>(ql.size()))
700 return "architecture";
704 return "package body";
755 static int stringCounter;
758 snprintf(buf,8,
"%d",stringCounter++);
769 static const reg::Ex reg(R
"([\[\]./<>:\s,;'+*|&=()\"-])");
780 if (j!=std::string::npos)
782 while (j!=std::string::npos)
794 else if (j != 0 && ss)
809 if (!find.
empty() && find.
at(0)==
'"')
811 size_t ii=find.
find(
'"',2);
838 static const reg::Ex regg(R
"([0-9][0-9eEfFbBcCdDaA_.#+?xXzZ-]*)");
858 size_t len = qcs.
length();
861 for (
size_t j=0;j<len;j++)
866 if (c==
'"' || c==
',' || c==
'\''|| c==
'(' || c==
')' || c==
':' || c==
'[' || c==
']' )
868 if (temp.
length()>=index && temp.
at(index-1) !=
' ')
908 size_t len=al.
size();
936 if (
dstricmp(arg.attrib,arg.type) != 0)
938 startFonts(arg.attrib.lower(),
"stringliteral",ol);
964 size_t len=al.
size();
1009 if (!arg.attrib.empty())
1073 size_t index=al.
size();
1160 if (sem) argString.
append(
", ");
1163 argString+=arg.name;
1165 argString+=arg.type;
1169 argString+=arg.defval+
" ";
1170 argString+=arg.name+
" :";
1171 argString+=arg.attrib+
" ";
1172 argString+=arg.type;
1183 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::LIBRARY,
false),
DString(),
false,
VhdlSpecifier::LIBRARY);
1184 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::USE,
false),
DString(),
false,
VhdlSpecifier::USE);
1185 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::FUNCTION,
false),
DString(),
false,
VhdlSpecifier::FUNCTION);
1186 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::COMPONENT,
false),
DString(),
false,
VhdlSpecifier::COMPONENT);
1187 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::CONSTANT,
false),
DString(),
false,
VhdlSpecifier::CONSTANT);
1188 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::TYPE,
false),
DString(),
false,
VhdlSpecifier::TYPE);
1189 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::SUBTYPE,
false),
DString(),
false,
VhdlSpecifier::SUBTYPE);
1190 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::GENERIC,
false),
DString(),
false,
VhdlSpecifier::GENERIC);
1191 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::PORT,
false),
DString(),
false,
VhdlSpecifier::PORT);
1192 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::PROCESS,
false),
DString(),
false,
VhdlSpecifier::PROCESS);
1193 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::SIGNAL,
false),
DString(),
false,
VhdlSpecifier::SIGNAL);
1194 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::ATTRIBUTE,
false),
DString(),
false,
VhdlSpecifier::ATTRIBUTE);
1195 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::PROCEDURE,
false),
DString(),
false,
VhdlSpecifier::PROCEDURE);
1196 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::RECORD,
false),
DString(),
false,
VhdlSpecifier::RECORD);
1197 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::UNITS,
false),
DString(),
false,
VhdlSpecifier::UNITS);
1198 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::SHAREDVARIABLE,
false),
DString(),
false,
VhdlSpecifier::SHAREDVARIABLE);
1199 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::VFILE,
false),
DString(),
false,
VhdlSpecifier::VFILE);
1200 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::GROUP,
false),
DString(),
false,
VhdlSpecifier::GROUP);
1201 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::INSTANTIATION,
false),
DString(),
false,
VhdlSpecifier::INSTANTIATION);
1202 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::ALIAS,
false),
DString(),
false,
VhdlSpecifier::ALIAS);
1203 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::MISCELLANEOUS,
true),
DString(),
false,
VhdlSpecifier::MISCELLANEOUS);
1206 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::CONFIG,
false),
DString(),
false,
VhdlSpecifier::CONFIG);
1207 VhdlDocGen::writeVHDLDeclarations(ml,ol,cd,nd,fd,gd,mod,
theTranslator_vhdlType(
VhdlSpecifier::UCF_CONST,
false),
DString(),
false,
VhdlSpecifier::UCF_CONST);
1262 bool hasParams =
false;
1264 if (cd==
nullptr)
return hasParams;
1318 bool c=largs==
"context";
1345 tagFile <<
" <member kind=\"";
1373 tagFile <<
" <anchorfile>" <<
convertToXML(fn) <<
"</anchorfile>\n";
1384 tagFile <<
" </member>\n";
1395 ASSERT(cd!=
nullptr || nd!=
nullptr || fd!=
nullptr || gd!=
nullptr || mod!=
nullptr ||
1402 else if (mod) d=mod;
1436 if (!detailsVisible)
1501 name+=
" <"+mdef->
name()+
">";
1510 if (largs==
"context")
1607 name+=mdef->
name()+
"> ";
1640 if (htmlOn && !ltype.
empty())
1651 if (!detailsVisible)
1667 .setIndexWords(
true)
1668 .setSingleLine(
true));
1701 for (
const auto &imd : *mlist)
1714 if (pack.find(md->
name().
str())==pack.end())
1718 pack.insert(md->
name().
str());
1728 if (ml==
nullptr)
return false;
1729 for (
const auto &mdd : *ml)
1731 if (mdd->getVhdlSpecifiers()==type)
1738 if (!mg->members().empty())
1759 if (!subtitle.
empty())
1768 .setSingleLine(
true));
1780 bool hasHeader=!mg->header().empty();
1788 if (!mg->documentation().empty())
1796 mg->documentation()+
"\n",
1866 codeFragment=codeFragment.
left(fi);
1867 codeFragment.
append(
"\n .... ");
1875 intf->parseCode(codeOL,
1888 codeOL.endCodeFragment(
"DoxyCode");
1891 if (cname.
empty())
return;
1921 while (!ucFile.
empty())
1923 size_t i=ucFile.
find(
'\n');
1941 size_t in=temp.
find(
"-name");
1944 temp=temp.
remove(0,in+5);
1953 static const reg::Ex ee(R
"([\s=])");
1955 if (in==std::string::npos) in=0;
1961 initUCF(entity,ff,temp,lineNo,fileName,brief);
1967 ucFile=ucFile.
remove(0,i+1);
1974 if (qcs.
empty())
return;
1982 if (i==std::string::npos)
return;
1997 std::shared_ptr<Entry> current = std::make_shared<Entry>();
1999 current->section=EntryType::makeVariable();
2000 current->bodyLine=line;
2001 current->fileName=fileName;
2002 current->type=
"ucf_const";
2004 current->lang= SrcLangExt::VHDL ;
2013 current->name= n+
"_";
2018 current->brief=brief;
2019 current->briefLine=line;
2020 current->briefFile=fileName;
2058 if (!entity.
contains(
":"))
return "";
2060 static const reg::Ex exp(R
"([:()\s])");
2070 entity.
remove(0,index+1);
2089 static const reg::Ex exp(R
"([()\s])");
2093 if (
findIndex(ql,
"open")!=std::string::npos)
2103 std::string label=ql[0];
2107 entity.
remove(0,index+1);
2158 if (cur->includeName==
"entity" || cur->includeName==
"component" )
2160 entity=cur->includeName+
" "+cur->type;
2163 else if (cur->includeName.empty())
2188 if (ar==
nullptr)
return;
2190 if (classEntity==
nullptr)
2197 if (classEntity==cd)
return;
2199 bName=classEntity->
name();
2201 n1=classEntity->
name();
2226 Relationship::Member,
2227 MemberType::Variable,
2239 mmd->setTagInfo(&tg);
2244 mmd->setLanguage(SrcLangExt::VHDL);
2246 mmd->setBriefDescription(cur->brief,cur->briefFile,cur->briefLine);
2247 mmd->setBodySegment(cur->startLine,cur->startLine,-1) ;
2248 mmd->setDocumentation(cur->doc,cur->docFile,cur->docLine);
2284 size_t len=ql.size();
2288 for(
size_t i=0;i<len;i++)
2319 err(
"Possible recursive class relation while inside {} and looking for {}\n",cd->
name(),scd->
name());
2350 for (
auto &bcd : bcl)
2356 size_t i = n.
find(
'(');
2359 bcd.usedName.append(
"(2)");
2365 std::string t=r.str();
2372 bcd.templSpecifiers=t;
2383 for (
const auto &md :
mdList)
2395 if (mdef==
nullptr)
return;
2420 std::shared_ptr<Entry> root = std::make_shared<Entry>();
2422 parser->parseInput(
"",codeFragment.
data(),root,
nullptr);
2492#define STARTL (FlowChart::WHILE_NO | FlowChart::IF_NO | \
2493 FlowChart::FOR_NO | FlowChart::CASE_NO | \
2494 FlowChart::LOOP_NO | WHEN_NO)
2495#define DECLN (FlowChart::WHEN_NO | \
2496 FlowChart::ELSIF_NO | FlowChart::IF_NO | \
2497 FlowChart::FOR_NO | FlowChart::WHILE_NO | \
2498 FlowChart::CASE_NO | FlowChart::LOOP_NO )
2499#define STARTFIN (FlowChart::START_NO | FlowChart::END_NO)
2500#define LOOP (FlowChart::FOR_NO | FlowChart::WHILE_NO | \
2501 FlowChart::LOOP_NO )
2502#define ENDCL (FlowChart::END_CASE | FlowChart::END_LOOP)
2503#define EEND (FlowChart::ENDIF_NO | FlowChart::ELSE_NO )
2504#define IFF (FlowChart::ELSIF_NO | FlowChart::IF_NO)
2505#define EXITNEXT (FlowChart::EXIT_NO | FlowChart::NEXT_NO )
2506#define EMPTY (EEND | FlowChart::ELSIF_NO)
2507#define EE (FlowChart::ELSE_NO | FlowChart::ELSIF_NO)
2508#define EMPTNODE (ENDCL | EEND | FlowChart::ELSIF_NO)
2509#define FLOWLEN (flowList.size()-1)
2541static std::map<std::string,int> g_keyMap;
2546 if (q.
length()<=80)
return;
2560 size_t j0 = str.
rfind(
' ',80);
2561 size_t j1 = str.
rfind(
'|',80);
2614 static const reg::Ex ep(R
"(\s)");
2645 for (
const auto &flowChart :
flowList)
2655 for (
size_t j=0;j<
flowList.size();j++)
2682 for (
size_t j=0;j<
flowList.size()-1;j++)
2685 int kind = flo.
type;
2720 for (
size_t j=0;j<ql.size();j++)
2727 int diff=
static_cast<int>(max-s.
length());
2736 ql.push_back(s.
str());
2739 for (
size_t j=0;j<ql.size();j++)
2758 for (uint32_t j=0;j < size-1 ;j++)
2775 for (
size_t j=0;j <
flowList.size() ;j++)
2802 t <<
"[shape=none, label=<\n";
2803 t <<
"<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"2\" >\n ";
2804 t <<
"<TR><TD BGCOLOR=\"";
2809 t <<
" </TD></TR></TABLE>>];";
2816 for (
size_t j=0; j<size; j++)
2840 const char *p=str.
data();
2846 case '<': t <<
"<";
break;
2847 case '>': t <<
">";
break;
2848 case '&': t <<
"&";
break;
2849 case '\'': t <<
"'";
break;
2850 case '"': t <<
""";
break;
2851 case '\n': t <<
"<BR ALIGN=\"LEFT\"/>";
break;
2852 default: t << c;
break;
2900 expression=
substitute(expression,
"\"",
"\\\"");
2938 case IF_NO : t=
"\nif ("+
exp+
") then (yes)";
break;
2939 case ELSIF_NO: t=
"\nelseif ("+
exp+
") then (yes)";
break;
2940 case ELSE_NO: t=
"\nelse";
break;
2944 t+=
"if ("+
exp+
") then (yes)";
2951 case FOR_NO: t=
"\nwhile ("+
exp+
") is (yes)";
break;
2952 case WHILE_NO: t=
"\nwhile ("+
exp+
") is (yes)";
break;
2953 case END_LOOP: t=
"\nendwhile";
break;
2954 case END_CASE: t=
"\nendif\n:end case;";
break;
2957 if (!endL) t+=
"\nstop";
2959 case LOOP_NO: t=
"\nwhile (infinite loop)";
break;
2962 case COMMENT_NO: t=
"\n note left \n "+flo.
label+
"\nend note \n";
break;
2963 case BEGIN_NO: t=
"\n:begin;";
break;
2964 default: assert(
false);
break;
2971 int caseCounter = 0;
2972 int whenCounter = 0;
2976 for (
size_t j=0;j<size;j++)
2991 bool ca = (caseCounter>0 && whenCounter==0);
3007 for (
const auto &baseName: baseNameVector)
3022 case IF_NO:
return "if ";
3028 case END_NO:
return "end ";
3032 case FOR_NO:
return "for ";
3038 case LOOP_NO:
return "infinite loop ";
3043 default:
return "--failure--";
3058 DString dir=
" -o \""+ov+qcs+
"\"";
3059 ov+=
"/flow_design.dot";
3061 DString vlargs=
"-Tsvg \""+ov+
"\" "+dir ;
3065 err(
"could not create dot file\n");
3071 t <<
" digraph G { \n";
3072 t <<
"rankdir=TB \n";
3073 t <<
"concentrate=true\n";
3074 t <<
"stylesheet=\"doxygen.css\"\n";
3087 DString fileName = ov+
"/flow_design.dot";
3091 err(
"Cannot open file {} for writing\n",fileName);
3148 g_keyMap.emplace(qq.
str(),fl.
id);
3162 t <<
" [shape=diamond,style=filled,color=\"";
3164 t <<
"\",label=\" ";
3166 if (exit) kl=fl.
text+
" ";
3183 t <<
" [shape=ellipse ,label=\""+val+
"\"]\n";
3188 t <<
"[shape=box , style=rounded label=<\n";
3189 t <<
"<TABLE BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" >\n ";
3190 t <<
"<TR><TD BGCOLOR=\"";
3194 t <<
" </TD></TR></TABLE>>];";
3207 size_t z=q.
rfind(
'\n');
3213 t <<
"[shape=none margin=0.1, label=<\n";
3214 t <<
"<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" CELLPADDING=\"2\" >\n ";
3217 t <<
"<TR><TD BGCOLOR=\"" <<
flowCol.varNode <<
"\" > ";
3221 t <<
"<TR><TD BGCOLOR=\"" <<
flowCol.textNode <<
"\" > ";
3224 t <<
" </TD></TR></TABLE>>];";
3237 auto it = g_keyMap.find(s1.
str());
3238 auto it1 = g_keyMap.find(s2.
str());
3240 assert(it!=g_keyMap.end());
3241 assert(it1!=g_keyMap.end());
3267 t <<
"edge [color=\""+col+
"\",label=\""+
label+
"\"]\n";
3269 if (bFrom) t <<
":s";
3278 size_t index=al.
size();
3279 if (index==0)
return;
3283 prev.
fill(
' ',
static_cast<int>(len)+1);
3293 attl+=arg.attrib+
" ";
3300 if (--index) attl+=
",\n";
else attl+=
"\n";
3311 for (
size_t j=index+1; j<
flowList.size(); j++)
3328 for (
size_t j=index;j>0;j--)
3351 for (
size_t j=index;j>0;j--)
3359 err(
"could not find label: '{}'\n",
label);
3365 for (
size_t j=index+1; j<
flowList.size(); j++)
3378 for (
size_t j=index+1; j<
flowList.size(); j++)
3381 int kind = flo.
type;
3389 if (s<stamp && stamp>0)
3397 if (s<stamp && stamp>0)
3406 if (s<stamp && stamp>0)
3420 size_t start = index+1;
3425 if (elseifNode>0 && elseifNode<endifNode)
3430 if (elseNode>0 && elseNode<endifNode)
3447 for (
size_t j=0;j<size;j++)
3450 int kind = fll.
type;
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 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 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)
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.
Web server based search engine.
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
This class contains the information about the argument of a function or template.
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().
This struct is used to capture the tag file information for an Entry.
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()