25#include <unordered_set>
81#define ENABLE_TRACINGSUPPORT 0
83#if defined(__APPLE__) && ENABLE_TRACINGSUPPORT
95#define REL_PATH_TO_ROOT "../../"
97static const char *
hex =
"0123456789ABCDEF";
109 if (s.empty())
return;
115 for (
size_t i=0;i<s.length();i++)
120 m_ol.writeNonBreakableSpace(1);
137 m_ol.lineBreak(
"typebreak");
138 for (
int i=0;i<indent;i++)
140 m_ol.writeNonBreakableSpace(3);
145 const QCString &anchor,std::string_view text
149 m_ol.writeObjectLink(extRef,file,anchor,
QCString(text));
178 auto startsWithColon = [](
const std::string &del)
180 for (
size_t i=0;i<del.size();i++)
182 if (del[i]==
'@')
return false;
183 else if (del[i]==
':')
return true;
189 auto endsWithColon = [](
const std::string &del)
191 for (
int i=
static_cast<int>(del.size())-1;i>=0;i--)
193 if (del[i]==
'@')
return false;
194 else if (del[i]==
':')
return true;
199 static const reg::Ex re(R
"([\s:]*@\d+[\s:]*)");
200 std::string s = str.str();
204 size_t sl=s.length();
205 bool needsSeparator=
false;
206 for ( ; iter!=
end ; ++iter)
208 const auto &match = *iter;
209 size_t i = match.position();
212 if (needsSeparator) result+=
"::";
213 needsSeparator=
false;
214 result+=s.substr(p,i-p);
216 std::string delim = match.str();
217 needsSeparator = needsSeparator || (startsWithColon(delim) && endsWithColon(delim));
218 p = match.position()+match.length();
222 if (needsSeparator) result+=
"::";
232 static const reg::Ex marker(R
"(@\d+)");
234 !replacement.isEmpty() ? replacement.data() : "__anonymous__");
245 int sl =
static_cast<int>(s.
length());
253 if (!newScope.
isEmpty()) newScope+=
"::";
254 newScope+=s.
mid(i,l);
259 if (!newScope.
isEmpty()) newScope+=
"::";
260 newScope+=s.
right(sl-i);
292 const int maxMarkerStrLen = 20;
293 char result[maxMarkerStrLen];
294 qsnprintf(result,maxMarkerStrLen,
"@%d",
id);
315 for (
const auto &s : l)
318 if (
prefix.length() > length &&
325 if (length>0)
return potential;
352 static const std::unordered_set<std::string> sourceExt = {
353 "c",
"cc",
"cxx",
"cpp",
"c++",
"cppm",
"ccm",
"cxxm",
"c++m",
357 "ii",
"ixx",
"ipp",
"i++",
"inl",
360 static const std::unordered_set<std::string> headerExt = {
361 "h",
"hh",
"hxx",
"hpp",
"h++",
"ixx",
362 "idl",
"ddl",
"pidl",
"ice"
368 if (sourceExt.find(extension.
str())!=sourceExt.end())
370 return EntryType::makeSource();
372 if (headerExt.find(extension.
str())!=headerExt.end())
374 return EntryType::makeHeader();
381 return EntryType::makeEmpty();
387 AUTO_TRACE(
"context='{}' qualifiedName='{}'",context?context->
name():
"",qualifiedName);
396 if (typedefContext) *typedefContext=context;
399 if (qualifiedName.
find(
'<')!=-1)
404 int scopeIndex = qualifiedName.
findRev(
"::");
408 resName=qualifiedName.
right(qualifiedName.
length()-scopeIndex-2);
416 while (mContext && md==
nullptr)
432 if (!tmp.
isEmpty()) qualScopePart=tmp;
435 if (resScope==
nullptr)
break;
447 bool searchRelated=
false;
448 bool mustBeRelated=
false;
459 if (mn==0 && searchRelated)
467 for (
const auto &tmd_p : *mn)
470 AUTO_TRACE_ADD(
"found candidate member '{}' isTypeDef={}' isRelated={} mustBeRelated={}",
485 if (dist!=-1 && (md==
nullptr || dist<minDist))
507 if (args.
find(
")(")!=-1)
511 else if (args.
find(
'[')!=-1)
531static const char constScope[] = {
'c',
'o',
'n',
's',
't',
':' };
532static const char volatileScope[] = {
'v',
'o',
'l',
'a',
't',
'i',
'l',
'e',
':' };
533static const char virtualScope[] = {
'v',
'i',
'r',
't',
'u',
'a',
'l',
':' };
534static const char operatorScope[] = {
'o',
'p',
'e',
'r',
'a',
't',
'o',
'r',
'?',
'?',
'?' };
590 if (s.
length()*3>growBufLen)
592 growBufLen = s.
length()*3;
593 growBuf =
static_cast<char *
>(realloc(growBuf,growBufLen+1));
595 if (growBuf==
nullptr)
return s;
597 const char *src=s.
data();
608 while (i<l && isspace(
static_cast<uint8_t
>(src[i])))
615 char nc=i+1<l ? src[i+1] :
' ';
617 auto searchForKeyword = [&](
const char *kw,
size_t &matchLen,
size_t totalLen)
619 if (matchLen<=totalLen && c==kw[matchLen] &&
654 if (c==
'\\' && i+1<l)
678 if (i>0 && !isspace(
static_cast<uint8_t
>(pc)) &&
679 (
isId(pc) || pc==
'*' || pc==
'&' || pc==
'.' || pc==
'>') &&
680 (osp<8 || (osp==8 && pc!=
'-'))
686 if (i+1<l && (nc==
'-' || nc==
'&'))
693 if (i>0 && !isspace(
static_cast<uint8_t
>(pc)) &&
694 ((i+1<l && (
isId(nc) || nc==
'[')) ||
695 (i+2<l && nc==
'$' &&
isId(src[i+2])) ||
696 (i+3<l && nc==
'&' && src[i+2]==
'$' &&
isId(src[i+3]))
706 if (cliSupport && i+1<l && (
isId(nc) || nc==
'-'))
713 if (i+1<l && (
isId(nc) || nc==
'-'))
719 if (i>0 && pc!=
' ' && pc!=
'\t' && pc!=
':' &&
720 pc!=
'*' && pc!=
'&' && pc!=
'(' && pc!=
'/' &&
730 if (i>0 &&
isId(pc) && osp<9)
750 if (i>0 && i+1<l && pc!=
'=' && pc!=
':' && !isspace(
static_cast<uint8_t
>(pc)) &&
781 !(pc==
',' && nc==
'.') &&
782 (osp<8 || (osp>=8 &&
isId(pc) &&
isId(nc)))
790 else if ((pc==
'*' || pc==
'&' || pc==
'.') && nc==
'>')
798 auto correctKeywordAllowedInsideScope = [&](
char cc,
size_t &matchLen,
size_t totalLen) {
799 if (c==cc && matchLen==totalLen)
801 if ((i+2<l && src[i+1] ==
':' && src[i+2] ==
':') ||
802 ((i>matchLen && src[i-matchLen] ==
':' && src[i-matchLen-1] ==
':'))
806 correctKeywordAllowedInsideScope(
't',csp, 5);
807 correctKeywordAllowedInsideScope(
'e',vosp,8);
808 correctKeywordAllowedInsideScope(
'l',vsp, 7);
810 auto correctKeywordNotPartOfScope = [&](
char cc,
size_t &matchLen,
size_t totalLen)
812 if (c==cc && matchLen==totalLen && i+1<l &&
820 correctKeywordNotPartOfScope(
't',csp, 5);
821 correctKeywordNotPartOfScope(
'e',vosp,8);
822 correctKeywordNotPartOfScope(
'l',vsp, 7);
842 if (templateDepth > 0)
844 int nextOpenPos=name.
findRev(
'>', pos);
845 int nextClosePos=name.
findRev(
'<', pos);
846 if (nextOpenPos!=-1 && nextOpenPos>nextClosePos)
851 else if (nextClosePos!=-1)
863 int lastAnglePos=name.
findRev(
'>', pos);
864 int bracePos=name.
findRev(
'(', pos);
865 if (lastAnglePos!=-1 && lastAnglePos>bracePos)
872 int bp = bracePos>0 ? name.
findRev(
'(',bracePos-1) : -1;
874 return bp==-1 || (bp>=8 && name.
mid(bp-8,10)==
"operator()") ? bracePos : bp;
885 return (name==scope ||
886 (scope.
right(nl)==name &&
887 sl>1+nl && scope.
at(sl-nl-1)==
':' && scope.
at(sl-nl-2)==
':'
896 return (name==scope ||
897 (name.
left(sl)==scope &&
898 nl>sl+1 && name.
at(sl)==
':' && name.
at(sl+1)==
':'
906 const QCString &text,
bool autoBreak,
bool external,
907 bool keepSpaces,
int indentLevel)
911 std::string_view txtStr=text.
view();
912 size_t strLen = txtStr.length();
913 if (strLen==0)
return;
915 static const reg::Ex regExp(R
"((::)?\a[\w~!\\.:$"]*)");
925 size_t floatingIndex=0;
926 for (; it!=
end ; ++it)
928 const auto &match = *it;
929 size_t newIndex = match.position();
930 size_t matchLen = match.length();
931 floatingIndex+=newIndex-
skipIndex+matchLen;
932 if (newIndex>0 && txtStr.at(newIndex-1)==
'0')
941 bool insideString=
FALSE;
942 for (
size_t i=index;i<newIndex;i++)
944 if (txtStr.at(i)==
'"') insideString=!insideString;
945 if (txtStr.at(i)==
'\\') i++;
949 if (strLen>35 && floatingIndex>30 && autoBreak)
952 size_t splitLength = splitText.length();
954 size_t i = splitText.find(
',');
955 if (i==std::string::npos) { i=splitText.find(
'<');
if (i!=std::string::npos) offset=0; }
956 if (i==std::string::npos) i=splitText.find(
'>');
957 if (i==std::string::npos) i=splitText.find(
' ');
959 if (i!=std::string::npos)
961 std::string_view part1 = splitText.substr(0,i+offset);
963 out.
writeBreak(indentLevel==0 ? 0 : indentLevel+1);
964 std::string_view part2 = splitText.substr(i+offset);
966 floatingIndex=splitLength-i-offset+matchLen;
980 std::string_view
word=txtStr.substr(newIndex,matchLen);
1009 auto writeCompoundName = [&](
const auto *cd_) {
1010 if (external ? cd_->isLinkable() : cd_->isLinkableInProject())
1015 out.
writeLink(cd_->getReference(),cd_->getOutputFileBase(),cd_->anchor(),
word);
1022 writeCompoundName(cd);
1026 writeCompoundName(cd);
1030 writeCompoundName(cnd);
1045 scopeName=scope->
name();
1066 if (result.
md!=self && (self==
nullptr || result.
md->
name()!=self->
name()))
1104 std::function<
void(
size_t)> replaceFunc)
1106 static const reg::Ex marker(R
"(@(\d+))");
1111 for ( ; it!=
end ; ++it)
1113 const auto &match = *it;
1114 size_t newIndex = match.position();
1115 size_t matchLen = match.length();
1116 ol.
parseText(markerText.substr(index,newIndex-index));
1117 unsigned long entryIndex = std::stoul(match[1].str());
1118 if (entryIndex<
static_cast<unsigned long>(numMarkers))
1120 replaceFunc(entryIndex);
1122 index=newIndex+matchLen;
1129 auto replaceFunc = [&list,&ol](
size_t entryIndex)
1131 const auto &e = list[entryIndex];
1163 if (a.hasDocumentation())
1167 paramDocs+=
" \\ilinebr @param"+direction+
" "+a.name+
" "+docsWithoutDir;
1179 for (
auto it = al.
begin() ; it!=al.
end() ;)
1184 int i=type1.
find(
")(");
1188 type1=type1.
left(i);
1196 result+= type1+
" "+a.
name+type2+a.
array;
1200 result+= type1+type2;
1207 if (it!=al.
end()) result+=
", ";
1222 if (al.
empty())
return result;
1225 for (
const auto &a : al)
1227 if (a.defval.isEmpty() || includeDefault)
1229 if (!first) result+=
", ";
1230 if (!a.name.isEmpty())
1240 int i =
static_cast<int>(a.type.length())-1;
1241 while (i>=0 &&
isId(a.type.at(i))) i--;
1244 result+=a.type.
right(a.type.length()-i-1);
1245 if (a.type.find(
"...")!=-1)
1257 result+=
" extends ";
1258 result+=a.typeConstraint;
1279 size_t len = contents.length();
1283 char c = contents[src++];
1287 if (src<len && contents[src] ==
'\n')
1292 else if ( c ==
'\0' && src<len-1)
1296 contents[dest++] = c;
1298 contents.resize(dest);
1305 for (
const auto &filterStr : filterList)
1308 int i_equals=fs.
find(
'=');
1315 filterPattern = filterPattern.
lower();
1316 input = input.
lower();
1323 if (filterName.
find(
' ')!=-1)
1325 filterName=
"\""+filterName+
"\"";
1345 if (name.
isEmpty())
return "";
1352 if (isSourceCode && !filterSrcList.empty())
1367 if (filterName.
length()>=2 && filterName[0]==
'"' && filterName[
static_cast<int>(filterName.
length())-1]==
'"')
1369 filterName = filterName.
mid(1,filterName.
length()-2);
1378 const char *outputEncoding =
"UTF-8";
1379 if (inputEncoding==
nullptr ||
qstricmp(inputEncoding,outputEncoding)==0)
return true;
1380 size_t inputSize=input.length();
1381 size_t outputSize=inputSize*4;
1384 if (cd==
reinterpret_cast<void *
>(-1))
1389 size_t iLeft=inputSize;
1390 size_t oLeft=outputSize;
1391 const char *inputPtr = input.data();
1392 char *outputPtr = output.
rawData();
1395 outputSize-=
static_cast<int>(oLeft);
1396 output.
resize(outputSize);
1397 output.
at(outputSize)=
'\0';
1417 bool fileOpened=
false;
1418 if (name[0]==
'-' && name[1]==0)
1420 std::string contents;
1422 while (getline(std::cin,line))
1424 contents+=line+
'\n';
1433 err(
"file '%s' not found\n",
qPrint(name));
1446 err(
"cannot open file '%s' for reading\n",
qPrint(name));
1454 for (
const auto &bcd : bcl)
1475 if (target==str) { target.
clear();
return; }
1477 int l=
static_cast<int>(str.
length());
1479 while ((i=target.
find(str,p))!=-1)
1481 bool isMatch = (i==0 || !
isId(target.
at(i-1))) &&
1482 (i+l==
static_cast<int>(target.
length()) || !
isId(target.
at(i+l)));
1485 int i1=target.
find(
'*',i+l);
1486 int i2=target.
find(
'&',i+l);
1487 if (i1==-1 && i2==-1)
1494 else if ((i1!=-1 && i<i1) || (i2!=-1 && i<i2))
1536 int i=s.
find(
" class ");
1537 if (i!=-1)
return s.
left(i)+s.
mid(i+6);
1538 i=s.
find(
" typename ");
1539 if (i!=-1)
return s.
left(i)+s.
mid(i+9);
1540 i=s.
find(
" union ");
1541 if (i!=-1)
return s.
left(i)+s.
mid(i+6);
1542 i=s.
find(
" struct ");
1543 if (i!=-1)
return s.
left(i)+s.
mid(i+7);
1556 if (!templSpec.
isEmpty() && templSpec.
at(0) ==
'<')
1563 templSpec = resolvedType;
1574 if (count>10)
return word;
1576 QCString symName,result,templSpec,tmpName;
1577 if (tSpec && !tSpec->
isEmpty())
1598 bool isTemplInst = cd && !templSpec.
isEmpty();
1599 if (!cd && !templSpec.
isEmpty())
1610 cd?cd->
name():
"",mType?mType->
name():
"",ts,resolvedType);
1633 if (cd==d && tSpec) *tSpec=
"";
1637 result = resolvedType+ts;
1645 if (tSpec) *tSpec=
"";
1659 result=cd->
name()+templSpec;
1717 result = resolvedType;
1750 if (i>pp) canType += type.
mid(pp,i-pp);
1771 std::string ts = templSpec.
str();
1772 static const reg::Ex re(R
"(\a\w*)");
1779 for (; it!=
end ; ++it)
1781 const auto &match = *it;
1782 size_t ti = match.position();
1783 size_t tl = match.length();
1784 std::string matchStr = match.str();
1785 canType += ts.substr(tp,ti-tp);
1789 canType+=ts.substr(tp);
1805 if ((type==
"const" || type==
"volatile") && !name.
isEmpty())
1810 if (name==
"const" || name==
"volatile")
1812 if (!type.
isEmpty()) type+=
" ";
1838 AUTO_TRACE(
"srcType='{}' dstType='{}'",srcType,dstType);
1839 if (srcType==dstType)
return true;
1842 int i1=srcType.
find(
")(");
1843 if (i1==-1)
return false;
1844 int i2=dstType.
find(
")(");
1845 if (i1!=i2)
return false;
1848 int j1=srcType.
find(
"(");
1849 if (j1==-1 || j1>i1)
return false;
1850 int j2=dstType.
find(
"(");
1851 if (j2!=j1)
return false;
1852 if (srcType.
left(j1)!=dstType.
left(j2))
return false;
1861 dstScope,dstFileScope,dstAl.get(),
1871 AUTO_TRACE(
"src: scope={} type={} name={} canType={}, dst: scope={} type={} name={} canType={}",
1890 srcA.
type+=sSrcName;
1894 else if (sDstName==srcType.
right(sDstName.
length()))
1896 dstA.
type+=sDstName;
1912 dstScope,dstFileScope,dstA.
canType,
1935 ASSERT(srcScope!=
nullptr && dstScope!=
nullptr);
1937 AUTO_TRACE(
"srcScope='{}' dstScope='{}' srcArgs='{}' dstArgs='{}' checkCV={} lang={}",
1940 if (srcAl==
nullptr || dstAl==
nullptr)
1942 bool match = srcAl==dstAl;
1973 if (srcAl->
size() != dstAl->
size())
2001 auto srcIt = srcAl->
begin();
2002 auto dstIt = dstAl->
begin();
2003 for (;srcIt!=srcAl->
end() && dstIt!=dstAl->
end();++srcIt,++dstIt)
2008 dstScope,dstFileScope,dstA,
2027 AUTO_TRACE(
"srcAl='{}',dstAl='{}',forceNameOverwrite={}",
2035 auto srcIt=srcAl.
begin();
2036 auto dstIt=dstAl.
begin();
2037 while (srcIt!=srcAl.
end() && dstIt!=dstAl.
end())
2042 AUTO_TRACE_ADD(
"before merge: src=[type='{}',name='{}',def='{}'] dst=[type='{}',name='{}',def='{}']",
2058 if (srcA.
name==
"const" || srcA.
name==
"volatile")
2063 if (dstA.
name==
"const" || dstA.
name==
"volatile")
2089 if (forceNameOverwrite)
2132 j1=
static_cast<int>(srcA.
type.
length())-i1-2,
2133 j2=
static_cast<int>(dstA.
type.
length())-i2-2;
2141 else if (i1==-1 && i2!=-1 && dstA.
type.
right(j2)==srcA.
type)
2161 AUTO_TRACE_ADD(
"after merge: src=[type='{}',name='{}',def='{}'] dst=[type='{}',name='{}',def='{}']",
2174 std::vector<const MemberDef *> &members)
2178 for (
const auto &md_p : *mn)
2189 currentFile==
nullptr || fd==currentFile)
2205 members.push_back(md);
2241 result.
found =
true;
2283 memberName =
substitute(memberName,
"\\",
"::");
2288 while ((is=scopeName.
findRev(
"::"))!=-1 &&
2289 (im=memberName.
find(
"::",pm))!=-1 &&
2290 (scopeName.
right(scopeName.
length()-is-2)==memberName.
mid(pm,im-pm))
2293 scopeName=scopeName.
left(is);
2302 (im=memberName.
findRev(
"::"))!=-1 &&
2303 im<
static_cast<int>(memberName.
length())-2
2306 mScope=memberName.
left(im);
2311 if (mScope==scopeName) scopeName.
clear();
2322 int scopeOffset =
static_cast<int>(scopeName.
length());
2328 className+=
"::"+mScope;
2339 if (fcd==
nullptr && className.
find(
'<')!=-1)
2353 std::unique_ptr<ArgumentList> argList;
2358 for (
const auto &mmd_p : *mn)
2375 if (m<mdist && mcd->isLinkable())
2389 for (
const auto &mmd_p : *mn)
2399 if (m<mdist /* && mcd->isLinkable()*/ )
2415 result.
md =
nullptr;
2416 result.
cd =
nullptr;
2417 result.
found =
false;
2423 if (result.
gd) result.
cd=
nullptr;
2434 if (emd->localName()==mName)
2436 if (emd->isLinkable())
2440 result.
found =
true;
2445 result.
cd =
nullptr;
2446 result.
md =
nullptr;
2447 result.
found =
false;
2458 else if ((scopeOffset=scopeName.
findRev(
"::",scopeOffset-1))==-1)
2462 }
while (scopeOffset>=0);
2469 std::unique_ptr<ArgumentList> argList;
2470 bool hasEmptyArgs = input.
args==
"()";
2477 for (
const auto &mmd_p : *mn)
2502 if (!fuzzy_mmd && hasEmptyArgs)
2510 result.
md = fuzzy_mmd;
2512 result.
found =
true;
2525 int scopeOffset =
static_cast<int>(scopeName.
length());
2531 namespaceName+=
"::"+mScope;
2535 namespaceName=mScope;
2538 if (!namespaceName.
isEmpty() &&
2546 for (
const auto &mmd_p : *mn)
2597 for (
const auto &mmd_p : *mn)
2622 result.
found =
true;
2630 for (
const auto &mmd_p : *mn)
2635 int ni=namespaceName.
findRev(
"::");
2641 (notInNS || sameNS) &&
2651 result.
found =
true;
2660 else if ((scopeOffset=scopeName.
findRev(
"::",scopeOffset-1))==-1)
2664 }
while (scopeOffset>=0);
2668 std::vector<const MemberDef *> members;
2671 if (members.empty())
2677 if (members.size()!=1 && input.
args==
"()")
2683 for (
auto it = mn->
rbegin(); it!=mn->
rend(); ++it)
2685 const auto &mmd_p = *it;
2697 members.push_back(mmd);
2702 if (!members.empty())
2707 for (
const auto &rmd : members)
2709 if (rmd->getFileDef() && rmd->getFileDef()->name() == input.
currentFile->
name())
2717 result.
md = members.back();
2722 result.
md = members.back();
2732 result.
found =
true;
2746 printf(
"@@ ------ getDefsOld start\n");
2748 printf(
"@@ ------ getDefsOld end\n");
2749 printf(
"@@ ------ getDefsNew start\n");
2751 printf(
"@@ ------ getDefsNew end\n");
2753 result.
md!=newResult.
md ||
2754 result.
cd!=newResult.
cd ||
2755 result.
fd!=newResult.
fd ||
2756 result.
nd!=newResult.
nd ||
2757 result.
gd!=newResult.
gd
2760 printf(
"@@ getDefsOld(scName=%s, mbName=%s, args=%s, forceEmptyScope=%d "
2761 "currentFile=%s checkCV=%d)=%d md=%s (%p) cd=%s fd=%s nd=%s gd=%s\n",
2773 printf(
"@@ ------ getDefsOld start\n");
2774 printf(
"@@ getDefsNew(scName=%s, mbName=%s, args=%s, forceEmptyScope=%d "
2775 "currentFile=%s checkCV=%d)=%d md=%s (%p) cd=%s fd=%s nd=%s gd=%s\n",
2781 (
void*)newResult.
md,
2813 cd=
nullptr;nd=
nullptr;
2819 bool explicitGlobalScope=
FALSE;
2820 if (scopeName.
at(0)==
':' && scopeName.
at(1)==
':')
2823 explicitGlobalScope=
TRUE;
2831 int scopeOffset=explicitGlobalScope ? 0 :
static_cast<int>(docScopeName.
length());
2836 if (scopeOffset>0) fullName.
prepend(docScopeName.
left(scopeOffset)+
"::");
2856 else if ((scopeOffset=docScopeName.
findRev(
"::",scopeOffset-1))==-1)
2860 }
while (scopeOffset>=0);
2868 const char *p=s.
data();
2870 while ((c=
static_cast<uint8_t
>(*p++)))
if (!islower(c))
return false;
2882 bool lookForSpecialization,
2887 AUTO_TRACE(
"scope={} name={} inSeeBlock={}",scName,name,inSeeBlock);
2892 if (fullName.
find(
"anonymous_namespace{")==-1)
2902 int endNamePos=bracePos!=-1 ? bracePos :
static_cast<int>(fullName.
length());
2903 int scopePos=fullName.
findRev(
"::",endNamePos);
2904 bool explicitScope = fullName.
startsWith(
"::") &&
2909 bool allowTypeOnly=
false;
2912 *resContext=
nullptr;
2919 if (!inSeeBlock && scopePos==-1 &&
isLowerCase(tsName))
2932 if (scName!=fullName &&
getScopeDefs(scName,fullName,cd,cnd,nd))
2951 else if (scName==fullName || (!inSeeBlock && scopePos==-1))
2970 if (explicitScope) nameStr=nameStr.
mid(2);
2975 if (bracePos!=-1) argsStr=fullName.
right(fullName.
length()-bracePos);
2979 int templPos=nameStr.
find(
'<');
2980 bool tryUnspecializedVersion =
FALSE;
2981 if (templPos!=-1 && nameStr.
find(
"operator")==-1)
2983 int endTemplPos=nameStr.
findRev(
'>');
2984 if (endTemplPos!=-1)
2986 if (!lookForSpecialization)
2988 nameStr=nameStr.
left(templPos)+nameStr.
right(nameStr.
length()-endTemplPos-1);
2992 tryUnspecializedVersion =
TRUE;
3000 nameStr=nameStr.
mid(scopeStr.
length()+2);
3025 *resContext=
nullptr;
3034 *resMember=result.
md;
3035 *resContext=result.
md;
3039 *resContext=
nullptr;
3045 else if (result.
cd) *resContext=result.
cd;
3046 else if (result.
nd) *resContext=result.
nd;
3047 else if (result.
fd) *resContext=result.
fd;
3048 else if (result.
gd) *resContext=result.
gd;
3049 else { *resContext=
nullptr; *resMember=
nullptr;
return FALSE; }
3067 else if (tsName.
find(
'.')!=-1)
3079 if (tryUnspecializedVersion)
3081 bool b =
resolveRef(scName,name,inSeeBlock,resContext,resMember,
FALSE,
nullptr,checkScope);
3109 if (!isFileName && result.
find(
'<')==-1) result=
substitute(result,
".",
"::",3);
3111 if (result.
at(0)==
':' && result.
at(1)==
':')
3134 *resContext=
nullptr;
3143 const DirDef *dir =
nullptr;
3159 if (si) resAnchor = si->
label();
3170 resAnchor = si->
label();
3195 else if ((cd=
getClass(linkRefWithoutTemplates)))
3201 else if ((cd=
getClass(linkRef+
"-p")))
3228 if (md) resAnchor=md->
anchor();
3265 if (n.
isEmpty())
return nullptr;
3268 const int maxAddrSize = 20;
3269 char addr[maxAddrSize];
3270 qsnprintf(addr,maxAddrSize,
"%p:",
reinterpret_cast<const void*
>(fnMap));
3279 ambig = cachedResult->
isAmbig;
3290 if (name.
isEmpty())
return nullptr;
3297 if (name.
isEmpty())
return nullptr;
3304 const std::unique_ptr<FileDef> &fd = fn->front();
3306 fd->getPath().right(path.
length())==path :
3308 if (path.
isEmpty() || isSamePath)
3310 cachedResult->
fileDef = fd.get();
3319 for (
const auto &fd_p : *fn)
3331 cachedResult->
isAmbig = ambig;
3332 cachedResult->
fileDef = lastMatch;
3362 for (
const auto &s : examplePathList)
3396 path=name.
left(slashPos+1);
3403 for (
const auto &fd : *fn)
3405 if (path.
isEmpty() || fd->getPath().right(path.
length())==path)
3407 if (!first) result +=
"\n";
3409 result+=
" "+fd->absFilePath();
3420 std::string substRes;
3421 const char *p = s.
data();
3425 substRes.reserve(s.
length()+1024);
3432 for (
const auto &kw : keywords)
3434 size_t keyLen =
qstrlen(kw.keyword);
3435 if (
qstrncmp(p,kw.keyword,keyLen)==0)
3437 const char *startArg = p+keyLen;
3438 bool expectParam = std::holds_alternative<KeywordSubstitution::GetValueWithParam>(kw.getValueVariant);
3440 if (expectParam && *startArg==
'(')
3443 const char *endArg =
nullptr;
3444 while ((c=*(startArg+j)) && c!=
')' && c!=
'\n' && c!=0) j++;
3445 if (c==
')') endArg=startArg+j;
3449 auto &&getValue = std::get<KeywordSubstitution::GetValueWithParam>(kw.getValueVariant);
3450 substRes+=getValue(value).str();
3460 else if (!expectParam)
3462 auto &&getValue = std::get<KeywordSubstitution::GetValue>(kw.getValueVariant);
3463 substRes+=getValue().str();
3501 int wi = projectLogo.
find(
" width=");
3504 projectLogo = projectLogo.
left(wi);
3506 int hi = projectLogo.
find(
" height=");
3509 projectLogo = projectLogo.
left(hi);
3522 auto extractDimension = [&projectLogo](
const char *startMarker,
size_t startPos,
size_t endPos) ->
QCString
3525 if (result.
length()>=2 && result.
at(0)!=
'"' && result.
at(result.
length()-1)!=
'"')
3527 result=
"\""+result+
"\"";
3533 int wi = projectLogo.
find(
" width=");
3534 int hi = projectLogo.
find(
" height=");
3535 if (wi!=-1 && hi!=-1)
3539 sizeVal = extractDimension(
" width=", wi+7, hi) +
" "
3540 + extractDimension(
" height=", hi+8, projectLogo.
length());
3544 sizeVal = extractDimension(
" height=", hi+8, wi) +
" "
3545 + extractDimension(
" width=", wi+7, projectLogo.
length());
3550 sizeVal = extractDimension(
" width=", wi+7, projectLogo.
length());
3554 sizeVal = extractDimension(
" height=", hi+8, projectLogo.
length());
3567 {
"$title", [&]() {
return !title.
isEmpty() ? title : projName; } },
3572 {
"$doxygenversion", [&]() {
return getDoxygenVersion(); } },
3573 {
"$projectname", [&]() {
return projName; } },
3574 {
"$projectnumber", [&]() {
return projNum; } },
3575 {
"$projectbrief", [&]() {
return projBrief; } },
3579 {
"$langISO", [&]() {
return theTranslator->trISOLang(); } },
3594 for (
const auto &s : sl)
3596 const char *ps=s.c_str();
3597 const char *pd=name.
data();
3599 while (*ps!=0 && *pd!=0 && *ps==*pd) ps++,pd++,i++;
3600 if (*ps==0 && *pd!=0)
3616int getUtf8Char(
const char *input,
char ids[MAX_UTF8_CHAR_SIZE],CaseModifier modifier)
3619 const unsigned char uc = (
unsigned char)*input;
3620 bool validUTF8Char =
false;
3623 const char* pt = input+1;
3625 if ((uc&0x80)==0x00)
3629 case CaseModifier::None: ids[0]=*input;
break;
3630 case CaseModifier::ToUpper: ids[0]=(char)toupper(*input);
break;
3631 case CaseModifier::ToLower: ids[0]=(char)tolower(*input);
break;
3638 if ((uc&0xE0)==0xC0)
3642 if ((uc&0xF0)==0xE0)
3646 if ((uc&0xF8)==0xF0)
3651 validUTF8Char = l>0;
3652 for (
int m=1; m<l && validUTF8Char; ++m)
3654 unsigned char ct = (
unsigned char)*pt;
3655 if (ct==0 || (ct&0xC0)!=0x80)
3657 validUTF8Char=
false;
3678 if (caseSenseNames == CASE_SENSE_NAMES_t::YES)
return true;
3679 else if (caseSenseNames == CASE_SENSE_NAMES_t::NO)
return false;
3686 if (name.
isEmpty())
return name;
3691 const char *p=name.
data();
3696 case '_':
if (allowUnderscore) growBuf.
addChar(
'_');
else growBuf.
addStr(
"__");
break;
3697 case '-': growBuf.
addChar(
'-');
break;
3698 case ':': growBuf.
addStr(
"_1");
break;
3699 case '/': growBuf.
addStr(
"_2");
break;
3700 case '<': growBuf.
addStr(
"_3");
break;
3701 case '>': growBuf.
addStr(
"_4");
break;
3702 case '*': growBuf.
addStr(
"_5");
break;
3703 case '&': growBuf.
addStr(
"_6");
break;
3704 case '|': growBuf.
addStr(
"_7");
break;
3705 case '.':
if (allowDots) growBuf.
addChar(
'.');
else growBuf.
addStr(
"_8");
break;
3706 case '!': growBuf.
addStr(
"_9");
break;
3707 case ',': growBuf.
addStr(
"_00");
break;
3708 case ' ': growBuf.
addStr(
"_01");
break;
3709 case '{': growBuf.
addStr(
"_02");
break;
3710 case '}': growBuf.
addStr(
"_03");
break;
3711 case '?': growBuf.
addStr(
"_04");
break;
3712 case '^': growBuf.
addStr(
"_05");
break;
3713 case '%': growBuf.
addStr(
"_06");
break;
3714 case '(': growBuf.
addStr(
"_07");
break;
3715 case ')': growBuf.
addStr(
"_08");
break;
3716 case '+': growBuf.
addStr(
"_09");
break;
3717 case '=': growBuf.
addStr(
"_0a");
break;
3718 case '$': growBuf.
addStr(
"_0b");
break;
3719 case '\\': growBuf.
addStr(
"_0c");
break;
3720 case '@': growBuf.
addStr(
"_0d");
break;
3721 case ']': growBuf.
addStr(
"_0e");
break;
3722 case '[': growBuf.
addStr(
"_0f");
break;
3723 case '#': growBuf.
addStr(
"_0g");
break;
3724 case '"': growBuf.
addStr(
"_0h");
break;
3725 case '~': growBuf.
addStr(
"_0i");
break;
3726 case '\'': growBuf.
addStr(
"_0j");
break;
3727 case ';': growBuf.
addStr(
"_0k");
break;
3728 case '`': growBuf.
addStr(
"_0l");
break;
3732 bool doEscape =
true;
3733 if (allowUnicodeNames)
3738 growBuf.
addStr(p-1,charLen);
3746 unsigned char id =
static_cast<unsigned char>(c);
3755 else if (caseSenseNames || !isupper(c))
3762 growBuf.
addChar(
static_cast<char>(tolower(c)));
3768 return growBuf.
get();
3776 const char *p = s.
data();
3786 case '_': result+=c; p++;
break;
3787 case '1': result+=
':'; p++;
break;
3788 case '2': result+=
'/'; p++;
break;
3789 case '3': result+=
'<'; p++;
break;
3790 case '4': result+=
'>'; p++;
break;
3791 case '5': result+=
'*'; p++;
break;
3792 case '6': result+=
'&'; p++;
break;
3793 case '7': result+=
'|'; p++;
break;
3794 case '8': result+=
'.'; p++;
break;
3795 case '9': result+=
'!'; p++;
break;
3799 case '0': result+=
','; p+=2;
break;
3800 case '1': result+=
' '; p+=2;
break;
3801 case '2': result+=
'{'; p+=2;
break;
3802 case '3': result+=
'}'; p+=2;
break;
3803 case '4': result+=
'?'; p+=2;
break;
3804 case '5': result+=
'^'; p+=2;
break;
3805 case '6': result+=
'%'; p+=2;
break;
3806 case '7': result+=
'('; p+=2;
break;
3807 case '8': result+=
')'; p+=2;
break;
3808 case '9': result+=
'+'; p+=2;
break;
3809 case 'a': result+=
'='; p+=2;
break;
3810 case 'b': result+=
'$'; p+=2;
break;
3811 case 'c': result+=
'\\'; p+=2;
break;
3812 case 'd': result+=
'@'; p+=2;
break;
3813 case 'e': result+=
']'; p+=2;
break;
3814 case 'f': result+=
'['; p+=2;
break;
3815 case 'g': result+=
'#'; p+=2;
break;
3816 case 'h': result+=
'"'; p+=2;
break;
3817 case 'i': result+=
'~'; p+=2;
break;
3818 case 'j': result+=
'\''; p+=2;
break;
3819 case 'k': result+=
';'; p+=2;
break;
3820 case 'l': result+=
'`'; p+=2;
break;
3827 if (!caseSenseNames && c>=
'a' && c<=
'z')
3829 result+=
static_cast<char>(toupper(*p));
3860 if (name.
isEmpty())
return name;
3883 size_t resultLen = result.
length();
3887 uint8_t md5_sig[16];
3889 MD5Buffer(result.
data(),
static_cast<unsigned int>(resultLen),md5_sig);
3890 MD5SigToString(md5_sig,sigStr);
3891 result=result.
left(128-32)+sigStr;
3896 int l1Dir=0,l2Dir=0;
3897 int createSubdirsLevel =
Config_getInt(CREATE_SUBDIRS_LEVEL);
3898 int createSubdirsBitmaskL2 = (1<<createSubdirsLevel)-1;
3901 uint8_t md5_sig[16];
3902 MD5Buffer(result.
data(),
static_cast<unsigned int>(result.
length()),md5_sig);
3903 l1Dir = md5_sig[14] & 0xf;
3904 l2Dir = md5_sig[15] & createSubdirsBitmaskL2;
3915 const int sig_size=16;
3916 uint8_t md5_sig[sig_size];
3917 MD5Buffer(fn.
data(),
static_cast<unsigned int>(fn.
length()),md5_sig);
3918 char result[sig_size*3+2];
3921 for (
int i=0;i<sig_size;i++)
3923 static const char oct[]=
"01234567";
3924 uint8_t
byte = md5_sig[i];
3925 *p++=oct[(
byte>>6)&7];
3926 *p++=oct[(
byte>>3)&7];
3927 *p++=oct[(
byte>>0)&7];
3957 QCString absIncFileName = incFileName;
3967 else if (searchIncludes)
3970 for (
const auto &incPath : includePath)
3989 return absIncFileName;
3999 int createSubdirsLevelPow2 = 1 <<
Config_getInt(CREATE_SUBDIRS_LEVEL);
4000 for (
int l1=0; l1<16; l1++)
4006 term(
"Failed to create output directory '%s'\n",
qPrint(subdir));
4008 for (
int l2=0; l2<createSubdirsLevelPow2; l2++)
4011 subsubdir.
sprintf(
"d%x/d%02x",l1,l2);
4014 term(
"Failed to create output directory '%s'\n",
qPrint(subsubdir));
4026 int createSubdirsLevelPow2 = 1 <<
Config_getInt(CREATE_SUBDIRS_LEVEL);
4027 for (
int l1=0;l1<16;l1++)
4031 for (
int l2=0; l2 < createSubdirsLevelPow2; l2++)
4034 subsubdir.
sprintf(
"d%x/d%02x",l1,l2);
4053 bool allowEmptyClass)
4060 namespaceName=nd->
name();
4064 p=
static_cast<int>(clName.
length())-2;
4065 while (p>=0 && (i=clName.
findRev(
"::",p))!=-1)
4072 namespaceName=nd->
name();
4081 className=scopeName;
4082 namespaceName.
clear();
4085 if (className.
isEmpty() && !namespaceName.
isEmpty() && !allowEmptyClass)
4088 className=namespaceName;
4089 namespaceName.
clear();
4095 className = className.
left(className.
length()-2);
4136 int l =
static_cast<int>(result.
length());
4139 bool skipBracket=
FALSE;
4146 while (p>=0 && count>=0)
4148 char c=result.
at(p);
4154 if (p>0 && result.
at(p-1)==
':' && (count==0 || skipBracket))
4156 return result.
right(l-p-1);
4167 if (p>0 && result.
at(p-1)==
'>')
4175 bool foundMatch=
false;
4176 while (p>=0 && !foundMatch)
4188 if (round==0) count++;
4195 if (result.
at(p-1) ==
'<')
4202 foundMatch = count==0;
4217 done = count==0 || skipBracket;
4230 const char *p = s.
data();
4236 if ((c>=
'0' && c<=
'9') || (c>=
'a' && c<=
'z') || (c>=
'A' && c<=
'Z') || c==
'-' || c==
':' || c==
'.')
4238 if (first && c>=
'0' && c<=
'9') growBuf.
addChar(
'a');
4244 encChar[1]=
hex[
static_cast<unsigned char>(c)>>4];
4245 encChar[2]=
hex[
static_cast<unsigned char>(c)&0xF];
4252 return growBuf.
get();
4270 const char *p = s.
data();
4276 case '<': growBuf.
addStr(
"<");
break;
4277 case '>': growBuf.
addStr(
">");
break;
4278 case '&':
if (keepEntities)
4284 if (ce==
';' || (!(
isId(ce) || ce==
'#')))
break;
4290 while (p<e) growBuf.
addChar(*p++);
4302 case '\'': growBuf.
addStr(
"'");
break;
4303 case '"': growBuf.
addStr(
""");
break;
4304 case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
4305 case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
4306 case 19:
case 20:
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
4307 case 27:
case 28:
case 29:
case 30:
case 31:
4309 default: growBuf.
addChar(c);
break;
4313 return growBuf.
get();
4321 const char *p=s.
data();
4327 case '<': growBuf.
addStr(
"<");
break;
4328 case '>': growBuf.
addStr(
">");
break;
4329 case '&':
if (keepEntities)
4335 if (ce==
';' || (!(
isId(ce) || ce==
'#')))
break;
4341 while (p<e) growBuf.
addChar(*p++);
4353 case '\'': growBuf.
addStr(
"'");
break;
4354 case '"': growBuf.
addStr(
""");
break;
4357 uint8_t uc =
static_cast<uint8_t
>(c);
4358 if (uc<32 && !isspace(c))
4374 return growBuf.
get();
4381 const char *p=s.
data();
4387 case '"': growBuf.
addStr(
"\\\"");
break;
4388 case '\\':
if (*p==
'u' && *(p+1)==
'{') growBuf.
addStr(
"\\");
4389 else growBuf.
addStr(
"\\\\");
4391 default: growBuf.
addChar(c);
break;
4402 std::string s = str.
data();
4403 static const reg::Ex re(R
"(&\a\w*;)");
4408 size_t p=0, i=0, l=0;
4409 for (; it!=
end ; ++it)
4411 const auto &match = *it;
4412 p = match.position();
4416 growBuf.
addStr(s.substr(i,p-i));
4420 const char *code=
nullptr;
4431 growBuf.
addStr(s.substr(i));
4434 return growBuf.
get();
4452 ASSERT(context!=
nullptr);
4454 if (ml==
nullptr)
return;
4456 struct MoveMemberInfo
4459 : memberDef(md), memberGroup(mg), sli(rv) {}
4464 std::vector<MoveMemberInfo> movedMembers;
4466 for (
const auto &md : *ml)
4468 if (md->isEnumerate())
4470 for (
const auto &fmd : md->enumFieldList())
4472 int groupId=fmd->getMemberGroupId();
4478 const auto &info = it->second;
4479 auto mg_it = std::find_if(pMemberGroups->begin(),
4480 pMemberGroups->end(),
4481 [&groupId](
const auto &g)
4482 { return g->groupId()==groupId; }
4485 if (mg_it==pMemberGroups->end())
4487 auto mg = std::make_unique<MemberGroup>(
4496 pMemberGroups->push_back(std::move(mg));
4500 mg_ptr = (*mg_it).get();
4512 int groupId=md->getMemberGroupId();
4518 const auto &info = it->second;
4519 auto mg_it = std::find_if(pMemberGroups->begin(),
4520 pMemberGroups->end(),
4521 [&groupId](
const auto &g)
4522 { return g->groupId()==groupId; }
4525 if (mg_it==pMemberGroups->end())
4527 auto mg = std::make_unique<MemberGroup>(
4536 pMemberGroups->push_back(std::move(mg));
4540 mg_ptr = (*mg_it).get();
4542 movedMembers.emplace_back(md,mg_ptr,info->m_sli);
4548 for (
const auto &mmi : movedMembers)
4550 ml->
remove(mmi.memberDef);
4551 mmi.memberGroup->insertMember(mmi.memberDef->resolveAlias());
4552 mmi.memberGroup->setRefItems(mmi.sli);
4568 static const reg::Ex re_norm(R
"(\a[\w:]*)");
4569 static const reg::Ex re_fortran(R
"(\a[\w:()=]*)");
4574 if (type.
isEmpty())
return -1;
4575 size_t typeLen=type.
length();
4580 if (type[pos]==
',')
return -1;
4586 std::string s = type.
str();
4592 const auto &match = *it;
4593 size_t i = match.position();
4594 size_t l = match.length();
4599 while (ts<typeLen && type[
static_cast<uint32_t
>(ts)]==
' ') ts++,tl++;
4600 if (ts<typeLen && type[
static_cast<uint32_t
>(ts)]==
'<')
4605 while (te<typeLen && brCount!=0)
4607 if (type[
static_cast<uint32_t
>(te)]==
'<')
4609 if (te<typeLen-1 && type[
static_cast<uint32_t
>(te)+1]==
'<') te++;
else brCount++;
4611 if (type[
static_cast<uint32_t
>(te)]==
'>')
4613 if (te<typeLen-1 && type[
static_cast<uint32_t
>(te)+1]==
'>') te++;
else brCount--;
4623 pos=
static_cast<int>(i+l+tl);
4627 pos=
static_cast<int>(i+l);
4631 return static_cast<int>(i);
4634 pos =
static_cast<int>(typeLen);
4646 int p=name.
find(
'<');
4647 if (p==-1)
return name;
4651 std::string s = name.
mid(p).
str();
4652 static const reg::Ex re(R
"([\a:][\w:]*)");
4657 for (; it!=
end ; ++it)
4659 const auto &match = *it;
4660 size_t i = match.position();
4661 size_t l = match.length();
4662 result += s.substr(pi,i-pi);
4665 for (
const Argument &formArg : formalArgs)
4667 if (formArg.name == n)
4693 result+=s.substr(pi);
4711 if (formalArgs.
empty())
return nm;
4714 static const reg::Ex re(R
"(\a\w*)");
4715 std::string name = nm.str();
4720 for (; it!=
end ; ++it)
4722 const auto &match = *it;
4723 size_t i = match.position();
4724 size_t l = match.length();
4725 if (i>p) result += name.substr(p,i-p);
4730 actIt = actualArgs->
begin();
4737 for (
auto formIt = formalArgs.
begin();
4738 formIt!=formalArgs.
end() && !
found;
4744 if (actualArgs && actIt!=actualArgs->
end())
4751 formArg.
type =
"class";
4756 formArg.
type =
"typename";
4760 formArg.
name +=
"...";
4765 formArg.
name +=
"...";
4772 if (formArg.
name==n && actualArgs && actIt!=actualArgs->
end() && !actArg.
type.
isEmpty())
4779 ii = subst.find(
'<');
4781 if (ii!=-1 &&
static_cast<int>(
prefix.length())>=ii+2 &&
prefix.mid(
prefix.length()-ii-2,ii+1)==subst.left(ii+1))
4786 while ((ii=subst.find(nameArg,pp))!=-1)
4788 bool beforeNonWord = ii==0 || !
isId(subst.at(ii-1));
4789 bool afterNonWord = subst.length()==ii+nameArg.length() || !
isId(subst.at(ii+nameArg.length()));
4790 if (beforeNonWord && afterNonWord)
4794 pp=ii+
static_cast<int>(nameArg.length());
4799 AUTO_TRACE_ADD(
"result={} n={} type={} hasRecursion={}",result,n,actArg.
type,hasRecursion(result,n,actArg.
type));
4800 if (!hasRecursion(result,n,actArg.
type))
4812 result += actArg.
type;
4818 result += actArg.
type+
" "+actArg.
name;
4823 else if (formArg.
name==n &&
4824 (actualArgs==
nullptr || actIt==actualArgs->
end()) &&
4833 else if (formArg.
name==n &&
4834 (actualArgs==
nullptr || actIt==actualArgs->
end()) &&
4842 if (actualArgs && actIt!=actualArgs->
end())
4853 result+=name.substr(p);
4871 bool allowArtificial)
4874 int i=fullName.
find(
'<');
4875 if (i==-1)
return fullName;
4878 int l=
static_cast<int>(fullName.
length());
4885 while (e<l && count>0)
4887 char c=fullName.
at(e++);
4890 case '(': round++;
break;
4891 case ')':
if (round>0) round--;
break;
4892 case '<':
if (round==0) count++;
break;
4893 case '>':
if (round==0) count--;
break;
4898 int si= fullName.
find(
"::",e);
4900 if (parentOnly && si==-1)
break;
4903 result+=fullName.
mid(p,i-p);
4906 if (cd!=
nullptr && (allowArtificial || !cd->
isArtificial()))
4908 result+=fullName.
mid(i,e-i);
4911 else if (pLastScopeStripped)
4914 *pLastScopeStripped=fullName.
mid(i,e-i);
4917 i=fullName.
find(
'<',p);
4919 result+=fullName.
right(l-p);
4939 int i=0,p=
static_cast<int>(leftScope.
length());
4944 while ((i=leftScope.
findRev(
"::",p))>0)
4948 result = leftScope.
left(i+2)+rightScope;
4953 if (
found)
return result;
4971 int sl=
static_cast<int>(s.
length());
4975 if (sp>=sl)
return -1;
4979 if (c==
':') sp++,p++;
else break;
4991 while (sp<sl && !done)
4997 case '<': count++;
break;
4998 case '>': count--;
if (count==0) done=
true;
break;
5031 bool newPage =
true;
5036 warn(fileName,startLine,
"multiple use of page label '%s' with different titles, (other occurrence: %s, line: %d)",
5120 else if (si->
lineNr() != -1)
5151 if (!key.
isEmpty() && key[0]!=
'@')
5156 item->setScope(scope);
5157 item->setName(name);
5158 item->setTitle(title);
5159 item->setArgs(args);
5160 item->setGroup(key);
5208 if (!first) { ol.
writeString(
" | "); }
else first=
false;
5220 if (!first) { ol.
writeString(
" | "); }
else first=
false;
5246 int i_fs = fName.
findRev(
'/');
5247 int i_bs = fName.
findRev(
'\\');
5248 int i = fName.
find(
'.',std::max({ i_fs, i_bs ,0}));
5273 printf(
"replaceNamespaceAliases(%s,%zu)\n",
qPrint(scope),i);
5286 if (i>0 && ns==scope.
left(i))
break;
5288 printf(
"result=%s\n",
qPrint(scope));
5298 result=result.
mid(i+1);
5303 result=result.
mid(i+1);
5312 static const reg::Ex re(R
"(\a+)");
5313 std::string s = str.str();
5316 if (it->
str()==
word)
return true;
5327 static reg::Ex re(R
"(\s*(<\a+>)\s*)");
5328 std::string s = sentence.str();
5334 for ( ; it!=
end ; ++it)
5336 const auto match = *it;
5337 std::string part = match[1].str();
5340 size_t i = match.position();
5341 size_t l = match.length();
5342 result+=s.substr(p,i-p);
5343 result+=match.str();
5349 size_t i = match[1].position();
5350 size_t l = match[1].length();
5351 result+=s.substr(p,i-p);
5355 result+=s.substr(p);
5371 const char *p = s.
data();
5374 int i=0,li=-1,l=
static_cast<int>(s.
length());
5378 if (c==
' ' || c==
'\t' || c==
'\r') i++,p++;
5379 else if (c==
'\\' &&
qstrncmp(p,
"\\ilinebr",8)==0) i+=8,li=i,p+=8;
5380 else if (c==
'\n') i++,li=i,docLine++,p++;
5390 if (c==
' ' || c==
'\t' || c==
'\r') b--,p--;
5391 else if (c==
'r' && b>=7 &&
qstrncmp(p-7,
"\\ilinebr",8)==0) bi=b-7,b-=8,p-=8;
5392 else if (c==
'>' && b>=11 &&
qstrncmp(p-11,
"\\ilinebr<br>",12)==0) bi=b-11,b-=12,p-=12;
5393 else if (c==
'\n') bi=b,b--,p--;
5398 if (li==-1 && bi==-1)
return s;
5405 return s.
mid(li,bi-li);
5448 [&langName](
const auto &info) { return info.langName==langName; });
5455 if (extName.
at(0)!=
'.') extName.
prepend(
".");
5465 err(
"Failed to assign extension %s to parser %s for language %s\n",
5466 extName.
data(),it1->parserName,
qPrint(language));
5554 if (extName.
isEmpty()) extName=
".no_extension";
5555 if (extName.
at(0)!=
'.') extName.
prepend(
".");
5575 if (langName.
at(0)==
'.') langName = langName.
mid(1);
5577 [&langName](
const auto &info) { return info.langName==langName; });
5580 lang = it->parserId;
5581 fileName = it->defExt;
5594 int lastDot = fn.
findRev(
'.');
5595 if (lastDot!=-1)
return fn.
mid(lastDot);
5604 if (scope==
nullptr ||
5624 if (qualifierIndex!=-1)
5626 explicitScopePart = name.
left(qualifierIndex);
5628 name = name.
mid(qualifierIndex+2);
5632 int minDistance = 10000;
5641 if (distance!=-1 && distance<minDistance)
5643 minDistance = distance;
5657 if (bestMatch && bestMatch->
isTypedef())
5665 if (startPos>=len)
return len;
5666 uint8_t c =
static_cast<uint8_t
>(utf8Str[startPos]);
5671 int (*matcher)(int) =
nullptr;
5672 c =
static_cast<uint8_t
>(utf8Str[startPos+bytes]);
5676 c =
static_cast<uint8_t
>(utf8Str[startPos+bytes]);
5680 matcher = std::isxdigit;
5684 matcher = std::isdigit;
5687 else if (std::isalnum(c))
5690 matcher = std::isalnum;
5694 while ((c =
static_cast<uint8_t
>(utf8Str[startPos+bytes]))!=0 && matcher(c))
5704 return startPos+bytes;
5718 auto astImpl =
dynamic_cast<const DocNodeAST*
>(ast.get());
5722 std::visit(visitor,astImpl->root);
5727 int l=
static_cast<int>(result.
length());
5731 if (charCnt>=80)
break;
5738 if (result.
at(i)==
',' ||
5739 result.
at(i)==
'.' ||
5740 result.
at(i)==
'!' ||
5741 result.
at(i)==
'?' ||
5749 if ( i < l) result=result.
left(i)+
"...";
5750 return result.
data();
5757 if (al.
empty())
return;
5779#ifdef TRACINGSUPPORT
5780 void *backtraceFrames[128];
5781 int frameCount = backtrace(backtraceFrames, 128);
5782 const size_t cmdLen = 40960;
5783 static char cmd[cmdLen];
5785 p +=
qsnprintf(p,cmdLen,
"/usr/bin/atos -p %d ", (
int)getpid());
5786 for (
int x = 0; x < frameCount; x++)
5788 p +=
qsnprintf(p,cmdLen,
"%p ", backtraceFrames[x]);
5790 fprintf(stderr,
"========== STACKTRACE START ==============\n");
5794 while (
size_t len = fread(resBuf, 1,
sizeof(resBuf), fp))
5796 fwrite(resBuf, 1, len, stderr);
5800 fprintf(stderr,
"============ STACKTRACE END ==============\n");
5809 if (
qstricmp(inputEncoding,outputEncoding)==0)
return;
5811 if (cd==
reinterpret_cast<void *
>(-1))
5813 term(
"unsupported character conversion: '%s'->'%s': %s\n"
5814 "Check the INPUT_ENCODING setting in the config file!\n",
5815 qPrint(inputEncoding),
qPrint(outputEncoding),strerror(errno));
5817 size_t iLeft = contents.size();
5818 const char *srcPtr = contents.data();
5819 size_t tmpBufSize = contents.size()*4+1;
5820 size_t oLeft = tmpBufSize;
5822 tmpBuf.resize(tmpBufSize);
5823 char *dstPtr = tmpBuf.data();
5827 newSize = tmpBufSize-oLeft;
5828 tmpBuf.resize(newSize);
5829 std::swap(contents,tmpBuf);
5834 term(
"%s: failed to translate characters from %s to %s: check INPUT_ENCODING\n",
5847 if (filterName.
isEmpty() || !filter)
5852 err(
"could not open file %s\n",
qPrint(fileName));
5856 auto fileSize = fi.
size();
5857 contents.resize(fileSize);
5858 f.read(contents.data(),fileSize);
5861 err(
"problems while reading file %s\n",
qPrint(fileName));
5867 QCString cmd=filterName+
" \""+fileName+
"\"";
5872 err(
"could not execute filter %s\n",
qPrint(filterName));
5875 const int bufSize=4096;
5878 while ((numRead=
static_cast<int>(fread(buf,1,bufSize,f)))>0)
5881 contents.append(buf,numRead);
5888 if (contents.size()>=2 &&
5889 static_cast<uint8_t
>(contents[0])==0xFF &&
5890 static_cast<uint8_t
>(contents[1])==0xFE
5895 else if (contents.size()>=2 &&
5896 static_cast<uint8_t
>(contents[0])==0xFE &&
5897 static_cast<uint8_t
>(contents[1])==0xFF
5902 else if (contents.size()>=3 &&
5903 static_cast<uint8_t
>(contents[0])==0xEF &&
5904 static_cast<uint8_t
>(contents[1])==0xBB &&
5905 static_cast<uint8_t
>(contents[2])==0xBF
5908 contents.erase(0,3);
5924 std::string t = title.
str();
5925 static const reg::Ex re(R
"(%[a-z_A-Z]+)");
5929 for (; it!=
end ; ++it)
5931 const auto &match = *it;
5932 size_t i = match.position();
5933 size_t l = match.length();
5934 if (i>p) tf+=t.substr(p,i-p);
5935 tf+=match.str().substr(1);
5944template<
class PatternList,
class PatternElem,
typename PatternGet = QCString(*)(const PatternElem &)>
5946 const PatternList &patList,
5956 caseSenseNames =
FALSE;
5959 if (!patList.empty())
5965 for (
const auto &li : patList)
5967 std::string pattern = getter(li).str();
5968 if (!pattern.empty())
5970 size_t i=pattern.find(
'=');
5971 if (i!=std::string::npos) pattern=pattern.substr(0,i);
5973 if (!caseSenseNames)
6004 auto getter = [](std::string s) {
return QCString(s); };
6025 if (extLinksInWindow)
6026 return "target=\"_blank\" ";
6028 return "target=\"_parent\" ";
6045 if (!targetFileName.
isEmpty())
6050 if (!anchor.
isEmpty() && isLocalFile)
6061 if (!anchor.
isEmpty()) url+=
"#"+anchor;
6074 result = it->second;
6075 size_t l = result.
length();
6076 if (!relPath.
isEmpty() && l>0 && result.
at(0)==
'.')
6081 if (l>0 && result.
at(l-1)!=
'/') result+=
'/';
6082 if (!href) result.
append(
"\" ");
6105 if (!img.
save(fileName))
6107 fprintf(stderr,
"Warning: Cannot open file %s for writing\n",data->
name);
6123 std::string s=str.
str();
6124 static const reg::Ex re(R
"(##[0-9A-Fa-f][0-9A-Fa-f])");
6130 size_t sl=s.length();
6132 for (; it!=
end ; ++it)
6134 const auto &match = *it;
6135 size_t i = match.position();
6136 size_t l = match.length();
6137 if (i>p) result+=s.substr(p,i-p);
6138 std::string lumStr = match.str().substr(2);
6139#define HEXTONUM(x) (((x)>='0' && (x)<='9') ? ((x)-'0') : \
6140 ((x)>='a' && (x)<='f') ? ((x)-'a'+10) : \
6141 ((x)>='A' && (x)<='F') ? ((x)-'A'+10) : 0)
6143 double r = 0,g = 0,b = 0;
6146 pow(level/255.0,gamma/100.0),&r,&g,&b);
6147 int red =
static_cast<int>(r*255.0);
6148 int green =
static_cast<int>(g*255.0);
6149 int blue =
static_cast<int>(b*255.0);
6152 colStr[1]=
hex[red>>4];
6153 colStr[2]=
hex[red&0xf];
6154 colStr[3]=
hex[green>>4];
6155 colStr[4]=
hex[green&0xf];
6156 colStr[5]=
hex[blue>>4];
6157 colStr[6]=
hex[blue&0xf];
6163 if (p<sl) result+=s.substr(p);
6188 int m1 = text.
find(marker);
6189 if (m1==-1)
return result;
6194 while (!
found && (i=text.
find(
'\n',p))!=-1)
6196 found = (p<=m1 && m1<i);
6248 static const std::unordered_set<std::string> schemes = {
6249 "http",
"https",
"ftp",
"ftps",
"sftp",
"file",
"news",
"irc",
"ircs"
6252 int colonPos = loc_url.
find(
':');
6253 return colonPos!=-1 && schemes.find(loc_url.
left(colonPos).
str())!=schemes.end();
6288 const char *p=s.
data();
6291 int minIndent=1000000;
6292 bool searchIndent=
TRUE;
6296 if (c==
'\t') indent+=tabSize - (indent%tabSize);
6297 else if (c==
'\n') indent=0,searchIndent=
TRUE;
6298 else if (c==
' ') indent++;
6299 else if (searchIndent)
6302 if (indent<minIndent) minIndent=indent;
6307 if (minIndent==0)
return substitute(s,
"@ilinebr",
"\\ilinebr");
6320 else if (indent<minIndent)
6324 int newIndent = indent+tabSize-(indent%tabSize);
6338 else if (c==
'\\' &&
qstrncmp(p,
"ilinebr ",8)==0)
6341 result <<
"\\ilinebr ";
6344 for (
int j=0;j<minIndent;j++)
if (*(p+j)==
' ') skipAmount++;
6345 if (skipAmount==minIndent)
6350 else if (c==
'@' &&
qstrncmp(p,
"ilinebr",7)==0)
6352 result <<
"\\ilinebr";
6363 return result.
str();
6370 if (indentationLevel <= 0 || doc.
isEmpty())
return;
6375 const char *src = doc.
data();
6377 bool insideIndent =
false;
6386 insideIndent =
true;
6387 cnt = indentationLevel;
6398 insideIndent =
false;
6408 insideIndent =
false;
6413 doc.
resize(
static_cast<uint32_t
>(dst-doc.
data()));
6422 return ( ((allExternals && fd->
isLinkable()) ||
6440uint32_t getUtf8Code(
const QCString& s,
int idx )
6442 const int length = s.
length();
6443 if (idx >= length) {
return 0; }
6444 const uint32_t c0 = (uint8_t)s.
at(idx);
6445 if ( c0 < 0xC2 || c0 >= 0xF8 )
6449 if (idx+1 >= length) {
return 0; }
6450 const uint32_t c1 = ((uint8_t)s.
at(idx+1)) & 0x3f;
6453 return ((c0 & 0x1f) << 6) | c1;
6455 if (idx+2 >= length) {
return 0; }
6456 const uint32_t c2 = ((uint8_t)s.
at(idx+2)) & 0x3f;
6459 return ((c0 & 0x0f) << 12) | (c1 << 6) | c2;
6461 if (idx+3 >= length) {
return 0; }
6463 const uint32_t c3 = ((uint8_t)s.
at(idx+3)) & 0x3f;
6464 return ((c0 & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
6476uint32_t getUtf8CodeToLower(
const QCString& s,
int idx )
6478 const uint32_t v = getUtf8Code( s, idx );
6479 return v < 0x7f ? tolower( v ) : v;
6491uint32_t getUtf8CodeToUpper(
const QCString& s,
int idx )
6493 const uint32_t v = getUtf8Code( s, idx );
6494 return v < 0x7f ? toupper( v ) : v;
6508 std::string s = docs.
str();
6509 static const reg::Ex re(R
"(\[([ inout,]+)\])");
6514 const auto &match = *it;
6515 size_t p = match.position();
6516 size_t l = match.length();
6520 std::string dir = match[1].str();
6522 dir.erase(std::remove_if(dir.begin(),dir.end(),
6523 [](
const char c) { return c==
' ' || c==
','; }
6525 unsigned char ioMask=0;
6526 size_t inIndex = dir.find(
"in");
6527 size_t outIndex = dir.find(
"out");
6528 if ( inIndex!=std::string::npos) dir.erase( inIndex,2),ioMask|=(1<<0);
6529 if (outIndex!=std::string::npos) dir.erase(outIndex,3),ioMask|=(1<<1);
6530 if (dir.empty() && ioMask!=0)
6533 if (ioMask==((1<<0)|(1<<1)))
return "[in,out]";
6534 else if (ioMask==(1<<0))
return "[in]";
6535 else if (ioMask==(1<<1))
return "[out]";
6567 *outListType1=inListType;
6585 *outListType2=inListType.
toPublic();
6598 *outListType1=inListType.
toPublic();
6620 int i= imgExt.
find(
':');
6621 return i==-1 ? imgExt : imgExt.
left(i);
6626 assert(!f.is_open());
6627 bool fileOpened=
FALSE;
6628 bool writeToStdout=outFile==
"-";
6631 f.basic_ios<char>::rdbuf(std::cout.rdbuf());
6646 fileOpened = f.is_open();
6653 static const std::unordered_set<std::string> fortran_C_keywords = {
6654 "character",
"call",
"close",
"common",
"continue",
6655 "case",
"contains",
"cycle",
"class",
"codimension",
6656 "concurrent",
"contiguous",
"critical"
6659 if (*contents !=
'c' && *contents !=
'C')
return false;
6661 const char *c = contents;
6663 while (*c && *c !=
' ') {keyword += *c; c++;}
6664 keyword = keyword.
lower();
6666 return (fortran_C_keywords.find(keyword.
str()) != fortran_C_keywords.end());
6674 bool skipLine=
FALSE;
6680 size_t sizCont = contents.
length();
6681 for (
size_t i=0;i<sizCont;i++)
6685 switch(contents.
at(i))
6692 column += tabSize-1;
6709 if (column==1)
return TRUE;
6710 if (skipLine)
break;
6713 if (column!=6) skipLine=
TRUE;
6716 if (skipLine)
break;
6717 if (column>=7)
return TRUE;
6742 auto skipBlock = [&markerInfo](
const char *p,
const SelectionBlock &blk)
6749 size_t len = markerInfo.
endLen;
6750 bool negate = *(p+markerInfo.
endLen)==
'!';
6752 size_t blkNameLen =
qstrlen(blk.name);
6753 if (
qstrncmp(p+len,blk.name,blkNameLen)==0 &&
6757 return p+len+blkNameLen+markerInfo.
closeLen;
6774 const char *p = s.
data();
6784 bool negate = *(p+len)==
'!';
6786 for (
const auto &blk : blockList)
6788 size_t blkNameLen =
qstrlen(blk.name);
6789 if (
qstrncmp(p+len,blk.name,blkNameLen)==0 &&
6792 bool blockEnabled = blk.enabled!=negate;
6794 p+=len+blkNameLen+markerInfo.
closeLen;
6813 size_t len = markerInfo.
endLen;
6814 bool negate = *(p+len)==
'!';
6816 for (
const auto &blk : blockList)
6818 size_t blkNameLen =
qstrlen(blk.name);
6819 if (
qstrncmp(p+len,blk.name,blkNameLen)==0 &&
6823 p+=len+blkNameLen+markerInfo.
closeLen;
6854 const char *p = s.
data();
6863 bool negate = *(p+len)==
'!';
6869 if (markerInfo.
closeLen==0 && *p==
'\n')
6871 warn(fileName,-1,
"Remaining begin replacement with marker '%s'",
qPrint(marker));
6877 warn(fileName,-1,
"Remaining begin replacement with marker '%s'",
qPrint(marker));
6886 size_t len = markerInfo.
endLen;
6887 bool negate = *(p+len)==
'!';
6893 if (markerInfo.
closeLen==0 && *p==
'\n')
6895 warn(fileName,-1,
"Remaining end replacement with marker '%s'",
qPrint(marker));
6901 warn(fileName,-1,
"Remaining end replacement with marker '%s'",
qPrint(marker));
6918 const char *p=s.
data();
6927 while (*e==
' ' || *e==
'\t') e++;
6949 size_t prev = 0, pos = 0, len = s.length();
6952 pos = s.find(delimiter, prev);
6953 if (pos == std::string::npos) pos = len;
6954 if (pos>prev) result.push_back(s.substr(prev,pos-prev));
6955 prev = pos + delimiter.length();
6957 while (pos<len && prev<len);
6969 for ( ; iter !=
end; ++iter)
6971 const auto &match = *iter;
6972 size_t i=match.position();
6973 size_t l=match.length();
6974 if (i>p) result.push_back(s.substr(p,i-p));
6977 if (p<s.length()) result.push_back(s.substr(p));
6984 auto it = std::find(sv.begin(),sv.end(),s);
6985 return it!=sv.end() ?
static_cast<int>(it-sv.begin()) : -1;
6993 return reg::search(s,match,re) ?
static_cast<int>(match.position()) : -1;
7001 for (
const auto &s : sv)
7003 if (!first) result+=delimiter;
7017 while (residual > 0)
7019 modVal[0] = (upper ?
'A':
'a') + (residual-1)%26;
7020 result = modVal + result;
7021 residual = (residual-1) / 26;
7028 static const char *str_romans_upper[] = {
"M",
"CM",
"D",
"CD",
"C",
"XC",
"L",
"XL",
"X",
"IX",
"V",
"IV",
"I" };
7029 static const char *str_romans_lower[] = {
"m",
"cm",
"d",
"cd",
"c",
"xc",
"l",
"xl",
"x",
"ix",
"v",
"iv",
"i" };
7030 static const int values[] = { 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 };
7031 static const char **str_romans = upper ? str_romans_upper : str_romans_lower;
7036 for (
int i = 0; i < 13; ++i)
7038 while (residual - values[i] >= 0)
7040 result += str_romans[i];
7041 residual -= values[i];
7051 size_t size = s.
length();
7053 const char *data = s.
data();
7056 constexpr auto doxy_nbsp =
"&_doxy_nbsp;";
7057 const int maxIndent=1000000;
7058 int minIndent=maxIndent;
7067 int stop = tabSize - (col%tabSize);
7070 while (stop--) out.
addChar(
' ');
7074 if (data[i] ==
'\\')
7080 else if (i+5<size &&
qstrncmp(&data[i],
"iskip",5)==0)
7085 else if (i+8<size &&
qstrncmp(&data[i],
"endiskip",8)==0)
7117 for (
int j=0;j<bytes-1 && c;j++)
7129 if (!skip && col<minIndent) minIndent=col;
7133 if (minIndent!=maxIndent) refIndent=minIndent;
else refIndent=0;
7143 uint8_t md5_sig[16];
7145 MD5Buffer(projectCookie.
data(),
static_cast<unsigned int>(projectCookie.
length()),md5_sig);
7146 MD5SigToString(md5_sig,sigStr);
7147 sigStr[32]=
'_'; sigStr[33]=0;
7154 int l =
static_cast<int>(name.
length());
7155 int lastSepPos = -1;
7156 const char *p = name.
data();
7165 if (sharpCount==0 && p[i+1]==
':' && p[i+2]==
':')
7179 if (ts==-1) ts=0;
else p+=++ts;
7180 for (i=ts;i<l-1;i++)
7183 if (c==
':' && *p==
':') lastSepPos=i;
7218 case '\t': col+=tabSize - (col%tabSize);
7227 for (
int i=0;i<numBytes-1 && (c=*s++);i++) {}
7228 if (c==0)
return col;
This class represents an function or template argument list.
RefQualifierType refQualifier() const
bool pureSpecifier() const
bool hasParameters() const
bool hasDocumentation() const
QCString trailingReturnType() const
typename Vec::const_iterator const_iterator
bool constSpecifier() const
bool volatileSpecifier() const
A abstract class representing of a compound symbol.
virtual const ArgumentList & templateArguments() const =0
Returns the template arguments of this class.
virtual bool isTemplate() const =0
Returns TRUE if this class is a template.
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
virtual QCString qualifiedNameWithTemplateParameters(const ArgumentLists *actualParams=nullptr, uint32_t *actualParamIndex=nullptr) const =0
virtual FileDef * getFileDef() const =0
Returns the namespace this compound is in, or 0 if it has a global scope.
virtual bool isUsedOnly() const =0
Class representing a bitmap image colored based on hue/sat/gamma settings.
static void hsl2rgb(double h, double s, double l, double *pRed, double *pGreen, double *pBlue)
bool save(const QCString &fileName)
virtual const FileDef * getFileDef() const =0
static void print(DebugMask mask, int prio, const char *fmt,...)
The common base class of all entity definitions found in the sources.
virtual QCString docFile() const =0
virtual const QCString & localName() const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual int docLine() const =0
virtual bool isLinkable() const =0
virtual DefType definitionType() const =0
virtual QCString anchor() const =0
virtual bool isLinkableInProject() const =0
virtual const Definition * findInnerCompound(const QCString &name) const =0
virtual QCString getReference() const =0
virtual const GroupList & partOfGroups() const =0
virtual QCString qualifiedName() const =0
virtual QCString displayName(bool includeScope=TRUE) const =0
virtual bool isArtificial() const =0
virtual QCString getOutputFileBase() const =0
virtual Definition * getOuterScope() const =0
virtual int getStartBodyLine() const =0
virtual bool isReference() const =0
virtual const QCString & name() const =0
virtual void setBodySegment(int defLine, int bls, int ble)=0
virtual void setDocumentation(const QCString &d, const QCString &docFile, int docLine, bool stripWhiteSpace=TRUE)=0
virtual void setLanguage(SrcLangExt lang)=0
virtual void setReference(const QCString &r)=0
virtual void setRefItems(const RefItemVector &sli)=0
A model of a directory symbol.
Class representing a directory in the file system.
bool isEmpty(const std::string subdir) const
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
bool remove(const std::string &path, bool acceptsAbsPath=true) const
bool rmdir(const std::string &path, bool acceptsAbsPath=true) const
bool rename(const std::string &orgName, const std::string &newName, bool acceptsAbsPath=true) const
static std::string cleanDirPath(const std::string &path)
Class representing the abstract syntax tree of a documentation block.
static NamespaceLinkedMap * namespaceLinkedMap
static ConceptLinkedMap * conceptLinkedMap
static std::unique_ptr< PageDef > mainPage
static FileNameLinkedMap * inputNameLinkedMap
static ParserManager * parserManager
static InputFileEncodingList inputFileEncodingList
static MemberNameLinkedMap * functionNameLinkedMap
static PageLinkedMap * exampleLinkedMap
static NamespaceDefMutable * globalScope
static MemberGroupInfoMap memberGroupInfoMap
static IndexList * indexList
static StringMap tagDestinationMap
static QCString htmlFileExtension
static PageLinkedMap * pageLinkedMap
static DirLinkedMap * dirLinkedMap
static NamespaceAliasInfoMap namespaceAliasMap
static MemberNameLinkedMap * memberNameLinkedMap
static SymbolMap< Definition > * symbolMap
static FileNameLinkedMap * exampleNameLinkedMap
static GroupLinkedMap * groupLinkedMap
Wrapper class for the Entry type.
A model of a file symbol.
virtual ModuleDef * getModuleDef() const =0
virtual QCString getPath() const =0
virtual bool generateSourceFile() const =0
virtual QCString absFilePath() const =0
virtual bool isDocumentationFile() const =0
Minimal replacement for QFileInfo.
std::string extension(bool complete) const
std::string fileName() const
std::string dirPath(bool absPath=true) const
std::string filePath() const
std::string absFilePath() const
Class representing all files with a certain base name.
Ordered dictionary of FileName objects.
A model of a group of symbols.
virtual void addPage(PageDef *def)=0
Class representing a string buffer optimized for growing.
void addStr(const QCString &s)
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
SymType name2sym(const QCString &symName) const
Give code of the requested HTML entity name.
const T * find(const std::string &key) const
Find an object given the key.
A model of a class/file/namespace member symbol.
virtual QCString typeString() const =0
virtual bool isForeign() const =0
virtual bool isRelated() const =0
virtual const ClassDef * getClassDef() const =0
virtual bool hasReferencesRelation() const =0
virtual GroupDef * getGroupDef()=0
virtual bool isTypedef() const =0
virtual const MemberVector & enumFieldList() const =0
virtual bool hasCallGraph() const =0
virtual const FileDef * getFileDef() const =0
virtual const ArgumentList & argumentList() const =0
virtual bool isStrongEnumValue() const =0
virtual bool isStatic() const =0
virtual bool hasInlineSource() const =0
virtual MemberDef * resolveAlias()=0
virtual bool hasEnumValues() const =0
virtual bool isDefine() const =0
virtual const NamespaceDef * getNamespaceDef() const =0
virtual bool hasCallerGraph() const =0
virtual void setMemberGroup(MemberGroup *grp)=0
virtual bool isEnumerate() const =0
virtual bool hasReferencedByRelation() const =0
virtual bool isVariable() const =0
virtual bool isStrong() const =0
virtual QCString argsString() const =0
virtual const MemberDef * getEnumScope() const =0
virtual void overrideReferencesRelation(bool e)=0
virtual void overrideReferencedByRelation(bool e)=0
virtual void overrideCallGraph(bool e)=0
virtual void overrideInlineSource(bool e)=0
virtual void overrideEnumValues(bool e)=0
virtual void overrideCallerGraph(bool e)=0
A class representing a group of members.
void insertMember(MemberDef *md)
A list of MemberDef objects as shown in documentation sections.
MemberListContainer container() const
Wrapper class for the MemberListType type.
constexpr bool isProtected() const
MemberListType toProtected() const
MemberListType toPublic() const
static MemberListType Invalid()
constexpr bool isPrivate() const
ML_TYPES constexpr bool isPublic() const
reverse_iterator rbegin()
Ordered dictionary of MemberName objects.
void remove(const MemberDef *md)
An abstract interface of a namespace symbol.
Class representing a list of output generators that are written to in parallel.
void endPageRef(const QCString &c, const QCString &a)
void writeString(const QCString &text)
void disable(OutputType o)
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
void startConstraintParam()
void docify(const QCString &s)
void startConstraintDocs()
void startConstraintType()
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 pushGeneratorState()
void disableAllBut(OutputType o)
void endConstraintParam()
void startConstraintList(const QCString &header)
void parseText(const QCString &textStr)
A model of a page symbol.
virtual void setTitle(const QCString &title)=0
virtual void setNestingLevel(int)=0
virtual bool hasTitle() const =0
virtual void setFileName(const QCString &name)=0
virtual void setShowLineNo(bool)=0
virtual QCString title() const =0
virtual void setPageScope(Definition *)=0
virtual const GroupDef * getGroupDef() const =0
This is an alternative implementation of QCString.
int find(char c, int index=0, bool cs=TRUE) const
QCString & prepend(const char *s)
size_t length() const
Returns the length of the string, not counting the 0-terminator.
bool startsWith(const char *s) const
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
bool endsWith(const char *s) const
char & at(size_t i)
Returns a reference to the character at index i.
char * rawData()
Returns a writable pointer to the data.
bool isEmpty() const
Returns TRUE iff the string is empty.
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
void resize(size_t newlen)
const std::string & str() const
QCString & setNum(short n)
QCString simplifyWhiteSpace() const
return a copy of this string with leading and trailing whitespace removed and multiple whitespace cha...
QCString & append(char c)
QCString right(size_t len) const
void reserve(size_t size)
Reserve space for size bytes without changing the string contents.
QCString & sprintf(const char *format,...)
int findRev(char c, int index=-1, bool cs=TRUE) const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
std::string_view view() const
QCString left(size_t len) const
bool stripPrefix(const QCString &prefix)
This struct represents an item in the list of references.
class that provide information about a section.
Definition * definition() const
QCString fileName() const
void setTitle(const QCString &t)
SectionInfo * replace(const QCString &label, const QCString &fileName, int lineNr, const QCString &title, SectionType type, int level, const QCString &ref=QCString())
Replace an existing section with a new one Return a non-owning pointer to the newly added section.
SectionInfo * add(const SectionInfo &si)
Add a new section given the data of an existing section.
static SectionManager & instance()
returns a reference to the singleton
static constexpr int Page
Helper class to find a class definition or check if A symbol is accessible in a given scope.
const Definition * resolveSymbol(const Definition *scope, const QCString &name, const QCString &args=QCString(), bool checkCV=false, bool insideCode=false)
Find the symbool definition matching name within the scope set.
int isAccessibleFrom(const Definition *scope, const Definition *item)
Checks if symbol item is accessible from within scope.
int isAccessibleFromWithExpScope(const Definition *scope, const Definition *item, const QCString &explicitScopePart)
Check if symbol item is accessible from within scope, where it has to match the explicitScopePart.
QCString getResolvedType() const
In case a call to resolveClass() points to a typedef or using declaration.
const ClassDef * resolveClass(const Definition *scope, const QCString &name, bool maybeUnlinkable=false, bool mayBeHidden=false)
Find the class definition matching name within the scope set.
QCString getTemplateSpec() const
In case a call to resolveClass() points to a template specialization, the template part is return via...
void setFileScope(const FileDef *fd)
Sets or updates the file scope using when resolving symbols.
const MemberDef * getTypedef() const
In case a call to resolveClass() resolves to a type member (e.g.
Concrete visitor implementation for TEXT output.
Abstract interface for a hyperlinked text fragment.
virtual void writeString(std::string_view, bool) const =0
virtual void writeBreak(int indent) const =0
virtual void writeLink(const QCString &extRef, const QCString &file, const QCString &anchor, std::string_view text) const =0
Implements TextGeneratorIntf for an OutputDocInterface stream.
TextGeneratorOLImpl(OutputList &ol)
void writeBreak(int indent) const override
void writeLink(const QCString &extRef, const QCString &file, const QCString &anchor, std::string_view text) const override
void writeString(std::string_view s, bool keepSpaces) const override
Text streaming class that buffers data.
std::string str() const
Return the contents of the buffer as a std::string object.
int minClassDistance(const ClassDef *cd, const ClassDef *bcd, int level)
ClassDef * getClass(const QCString &n)
ClassDef * toClassDef(Definition *d)
std::vector< BaseClassDef > BaseClassList
Class representing a regular expression.
@ Wildcard
simple globbing pattern.
Iterator class to iterator through matches.
Object representing the matching results.
std::string str() const
Return a string representing the matching part.
size_t length() const
Returns the position of the match or std::string::npos if no length is set.
ConceptDef * toConceptDef(Definition *d)
ConceptDef * getConcept(const QCString &n)
#define Config_getInt(name)
#define Config_getList(name)
#define Config_getEnumAsString(name)
#define Config_getBool(name)
#define Config_getString(name)
#define Config_getEnum(name)
std::vector< std::string > StringVector
QCString dateToString(DateTimeType includeTime)
Returns the current date, when includeTime is set also the time is provided.
QCString yearToString()
Returns the current year as a string.
QCString formatDateTime(const QCString &format, const std::tm &dt, int &formatUsed)
Return a string representation for a given std::tm value that is formatted according to the pattern g...
QCString dateTimeFromString(const QCString &spec, std::tm &dt, int &format)
Returns the filled in std::tm for a given string representing a date and/or time.
std::unique_ptr< ArgumentList > stringToArgumentList(SrcLangExt lang, const QCString &argsString, QCString *extraTypeChars=nullptr)
DirIterator end(const DirIterator &) noexcept
static constexpr auto hex
#define AUTO_TRACE_ADD(...)
#define AUTO_TRACE_EXIT(...)
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
IDocParserPtr createDocParser()
factory function to create a parser
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
static void addMembersToMemberGroup()
FileDef * toFileDef(Definition *d)
Translator * theTranslator
MemberDefMutable * toMemberDefMutable(Definition *d)
MemberDef * toMemberDef(Definition *d)
#define warn(file, line, fmt,...)
std::ifstream openInputStream(const QCString &name, bool binary=false, bool openAtEnd=false)
FILE * popen(const QCString &name, const QCString &type)
std::ofstream openOutputStream(const QCString &name, bool append=false)
bool fileSystemIsCaseSensitive()
void replaceNamespaceAliases(QCString &name)
NamespaceDef * getResolvedNamespace(const QCString &name)
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
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.
Token literal values and constants.
std::unique_ptr< PageDef > createPageDef(const QCString &f, int l, const QCString &n, const QCString &d, const QCString &t)
Portable versions of functions that are platform dependent.
int portable_iconv_close(void *cd)
size_t portable_iconv(void *cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
void * portable_iconv_open(const char *tocode, const char *fromcode)
int qstricmp(const char *s1, const char *s2)
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
int qstrncmp(const char *str1, const char *str2, size_t len)
const char * qPrint(const char *s)
uint32_t qstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
std::vector< RefItem * > RefItemVector
Web server based search engine.
Some helper functions for std::string.
void addTerminalCharIfMissing(std::string &s, char c)
This class contains the information about the argument of a function or template.
Data associated with a HSV colored image.
const unsigned char * content
const unsigned char * alpha
Cache element for the file name to FileDef mapping cache.
FindFileCacheElem(FileDef *fd, bool ambig)
This struct is used to capture the tag file information for an Entry.
Protection
Protection level of members.
SrcLangExt
Language as given by extension.
int isUTF8NonBreakableSpace(const char *input)
Check if the first character pointed at by input is a non-breakable whitespace character.
uint8_t getUTF8CharNumBytes(char c)
Returns the number of bytes making up a single UTF8 character given the first byte in the sequence.
Various UTF8 related helper functions.
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
QCString removeRedundantWhiteSpace(const QCString &s)
QCString extractDirection(QCString &docs)
Strip the direction part from docs and return it as a string in canonical form The input docs string ...
QCString mergeScopes(const QCString &leftScope, const QCString &rightScope)
QCString findFilePath(const QCString &file, bool &ambig)
QCString normalizeNonTemplateArgumentsInString(const QCString &name, const Definition *context, const ArgumentList &formalArgs)
QCString linkToText(SrcLangExt lang, const QCString &link, bool isFileName)
size_t updateColumnCount(const char *s, size_t col)
void trimBaseClassScope(const BaseClassList &bcl, QCString &s, int level=0)
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang)
QCString insertTemplateSpecifierInScope(const QCString &scope, const QCString &templ)
bool protectionLevelVisible(Protection prot)
QCString generateAnonymousAnchor(const QCString &fileName, int count)
const int maxInheritanceDepth
std::string join(const StringVector &sv, const std::string &delimiter)
create a string where the string in the vector are joined by the given delimiter
static void stripIrrelevantString(QCString &target, const QCString &str)
int lineBlock(const QCString &text, const QCString &marker)
Returns the line number of the line following the line with the marker.
void addCodeOnlyMappings()
QCString convertToHtml(const QCString &s, bool keepEntities)
QCString substituteTemplateArgumentsInString(const QCString &nm, const ArgumentList &formalArgs, const ArgumentList *actualArgs)
static int g_usedNamesCount
static void filterCRLF(std::string &contents)
GetDefResult getDefsOld(const GetDefInput &input)
QCString parseCommentAsText(const Definition *scope, const MemberDef *md, const QCString &doc, const QCString &fileName, int lineNr)
int extractClassNameFromType(const QCString &type, int &pos, QCString &name, QCString &templSpec, SrcLangExt lang)
QCString integerToRoman(int n, bool upper)
void checkBlocks(const QCString &s, const QCString fileName, const SelectionMarkerInfo &markerInfo)
bool resolveLink(const QCString &scName, const QCString &lr, bool, const Definition **resContext, QCString &resAnchor, const QCString &prefix)
void writeTypeConstraints(OutputList &ol, const Definition *d, const ArgumentList &al)
bool leftScopeMatch(const QCString &scope, const QCString &name)
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
QCString stripAnonymousNamespaceScope(const QCString &s)
QCString stripPath(const QCString &s)
QCString stripFromIncludePath(const QCString &path)
static Cache< std::string, FindFileCacheElem > g_findFileDefCache(5000)
QCString removeEmptyLines(const QCString &s)
static const char constScope[]
static bool recursivelyAddGroupListToTitle(OutputList &ol, const Definition *d, bool root)
bool containsWord(const QCString &str, const char *word)
returns TRUE iff string s contains word w
bool checkIfTypedef(const Definition *scope, const FileDef *fileScope, const QCString &n)
bool readInputFile(const QCString &fileName, std::string &contents, bool filter, bool isSourceCode)
read a file name fileName and optionally filter and transcode it
bool transcodeCharacterStringToUTF8(std::string &input, const char *inputEncoding)
static bool matchCanonicalTypes(const Definition *srcScope, const FileDef *srcFileScope, const QCString &srcType, const Definition *dstScope, const FileDef *dstFileScope, const QCString &dstType, SrcLangExt lang)
bool patternMatch(const FileInfo &fi, const StringVector &patList)
void generateFileRef(OutputList &ol, const QCString &name, const QCString &text)
QCString generateMarker(int id)
QCString selectBlocks(const QCString &s, const SelectionBlockList &blockList, const SelectionMarkerInfo &markerInfo)
remove disabled blocks and all block markers from s and return the result as a string
static std::mutex g_findFileDefMutex
QCString escapeCharsInString(const QCString &name, bool allowDots, bool allowUnderscore)
static std::unordered_map< std::string, SrcLangExt > g_extLookup
static QCString stripDeclKeywords(const QCString &s)
bool recognizeFixedForm(const QCString &contents, FortranFormat format)
bool openOutputFile(const QCString &outFile, std::ofstream &f)
static MemberDef * getMemberFromSymbol(const Definition *scope, const FileDef *fileScope, const QCString &n)
QCString tempArgListToString(const ArgumentList &al, SrcLangExt lang, bool includeDefault)
static QCString extractCanonicalType(const Definition *d, const FileDef *fs, QCString type, SrcLangExt lang)
static ModuleDef * findModuleDef(const Definition *d)
bool resolveRef(const QCString &scName, const QCString &name, bool inSeeBlock, const Definition **resContext, const MemberDef **resMember, bool lookForSpecialization, const FileDef *currentFile, bool checkScope)
void addRefItem(const RefItemVector &sli, const QCString &key, const QCString &prefix, const QCString &name, const QCString &title, const QCString &args, const Definition *scope)
void addGroupListToTitle(OutputList &ol, const Definition *d)
QCString relativePathToRoot(const QCString &name)
SrcLangExt getLanguageFromCodeLang(QCString &fileName)
Routine to handle the language attribute of the \code command.
QCString integerToAlpha(int n, bool upper)
void writePageRef(OutputList &ol, const QCString &cn, const QCString &mn)
void clearSubDirs(const Dir &d)
static void transcodeCharacterBuffer(const QCString &fileName, std::string &contents, const QCString &inputEncoding, const QCString &outputEncoding)
QCString showFileDefMatches(const FileNameLinkedMap *fnMap, const QCString &n)
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
QCString stripExtensionGeneral(const QCString &fName, const QCString &ext)
QCString filterTitle(const QCString &title)
QCString unescapeCharsInString(const QCString &s)
QCString removeAnonymousScopes(const QCString &str)
void createSubDirs(const Dir &d)
bool matchArguments2(const Definition *srcScope, const FileDef *srcFileScope, const ArgumentList *srcAl, const Definition *dstScope, const FileDef *dstFileScope, const ArgumentList *dstAl, bool checkCV, SrcLangExt lang)
bool fileVisibleInIndex(const FileDef *fd, bool &genSourceFile)
QCString stripScope(const QCString &name)
QCString resolveTypeDef(const Definition *context, const QCString &qualifiedName, const Definition **typedefContext)
bool checkExtension(const QCString &fName, const QCString &ext)
bool isURL(const QCString &url)
Checks whether the given url starts with a supported protocol.
QCString substituteKeywords(const QCString &s, const KeywordSubstitutionList &keywords)
void stripIndentationVerbatim(QCString &doc, const int indentationLevel)
void stripIrrelevantConstVolatile(QCString &s)
int computeQualifiedIndex(const QCString &name)
Return the index of the last :: in the string name that is still before the first <.
QCString stripExtension(const QCString &fName)
void initDefaultExtensionMapping()
bool findAndRemoveWord(QCString &sentence, const char *word)
removes occurrences of whole word from sentence, while keeps internal spaces and reducing multiple se...
static QCString stripFromPath(const QCString &p, const StringVector &l)
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
static bool isLowerCase(QCString &s)
QCString convertToJSString(const QCString &s)
static const char virtualScope[]
GetDefResult getDefsNew(const GetDefInput &input)
QCString convertToXML(const QCString &s, bool keepEntities)
std::string_view lastPart
QCString langToString(SrcLangExt lang)
Returns a string representation of lang.
QCString determineAbsoluteIncludeName(const QCString &curFile, const QCString &incFileName)
QCString detab(const QCString &s, size_t &refIndent)
EntryType guessSection(const QCString &name)
void extractNamespaceName(const QCString &scopeName, QCString &className, QCString &namespaceName, bool allowEmptyClass)
void convertProtectionLevel(MemberListType inListType, Protection inProt, MemberListType *outListType1, MemberListType *outListType2)
Computes for a given list type inListType, which are the the corresponding list type(s) in the base c...
static const char volatileScope[]
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
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
static void findMembersWithSpecificName(const MemberName *mn, const QCString &args, bool checkStatics, const FileDef *currentFile, bool checkCV, std::vector< const MemberDef * > &members)
QCString removeLongPathMarker(QCString path)
QCString correctId(const QCString &s)
static QCString extractCanonicalArgType(const Definition *d, const FileDef *fs, const Argument &arg, SrcLangExt lang)
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
void mergeMemberOverrideOptions(MemberDefMutable *md1, MemberDefMutable *md2)
static int nextUTF8CharPosition(const QCString &utf8Str, uint32_t len, uint32_t startPos)
QCString getDotImageExtension()
static QCString getCanonicalTypeForIdentifier(const Definition *d, const FileDef *fs, const QCString &word, SrcLangExt lang, QCString *tSpec, int count=0)
GetDefResult getDefs(const GetDefInput &input)
QCString projectLogoFile()
static std::mutex g_usedNamesMutex
PageDef * addRelatedPage(const QCString &name, const QCString &ptitle, const QCString &doc, const QCString &fileName, int docLine, int startLine, const RefItemVector &sli, GroupDef *gd, const TagInfo *tagInfo, bool xref, SrcLangExt lang)
static bool matchArgument2(const Definition *srcScope, const FileDef *srcFileScope, Argument &srcA, const Definition *dstScope, const FileDef *dstFileScope, Argument &dstA, SrcLangExt lang)
void mergeArguments(ArgumentList &srcAl, ArgumentList &dstAl, bool forceNameOverwrite)
StringVector split(const std::string &s, const std::string &delimiter)
split input string s by string delimiter delimiter.
QCString getEncoding(const FileInfo &fi)
static bool keyWordsFortranC(const char *contents)
FortranFormat convertFileNameFortranParserCode(QCString fn)
static QCString getCanonicalTemplateSpec(const Definition *d, const FileDef *fs, const QCString &spec, SrcLangExt lang)
bool genericPatternMatch(const FileInfo &fi, const PatternList &patList, PatternElem &elem, PatternGet getter)
QCString stripLeadingAndTrailingEmptyLines(const QCString &s, int &docLine)
Special version of QCString::stripWhiteSpace() that only strips completely blank lines.
int findParameterList(const QCString &name)
Returns the position in the string where a function parameter list begins, or -1 if one is not found.
bool copyFile(const QCString &src, const QCString &dest)
Copies the contents of file with name src to the newly created file with name dest.
QCString externalLinkTarget(const bool parent)
QCString getFileFilter(const QCString &name, bool isSourceCode)
QCString stripTemplateSpecifiersFromScope(const QCString &fullName, bool parentOnly, QCString *pLastScopeStripped, QCString scopeName, bool allowArtificial)
QCString getOverloadDocs()
static QCString getFilterFromList(const QCString &name, const StringVector &filterList, bool &found)
static QCString projectLogoSize()
QCString stripIndentation(const QCString &s)
static QCString showDate(const QCString &fmt)
int getPrefixIndex(const QCString &name)
bool rightScopeMatch(const QCString &scope, const QCString &name)
void writeMarkerList(OutputList &ol, const std::string &markerText, size_t numMarkers, std::function< void(size_t)> replaceFunc)
bool updateLanguageMapping(const QCString &extension, const QCString &language)
QCString inlineArgListToDoc(const ArgumentList &al)
void linkifyText(const TextGeneratorIntf &out, const Definition *scope, const FileDef *fileScope, const Definition *self, const QCString &text, bool autoBreak, bool external, bool keepSpaces, int indentLevel)
static std::unordered_map< std::string, int > g_usedNames
static CharAroundSpace g_charAroundSpace
QCString replaceColorMarkers(const QCString &str)
Replaces any markers of the form ##AA in input string str by new markers of the form #AABBCC,...
QCString getFileNameExtension(const QCString &fn)
QCString convertToId(const QCString &s)
void writeExamples(OutputList &ol, const ExampleList &list)
static std::mutex g_matchArgsMutex
QCString replaceAnonymousScopes(const QCString &s, const QCString &replacement)
void writeColoredImgData(const QCString &dir, ColoredImgDataItem data[])
Writes the intensity only bitmap represented by data as an image to directory dir using the colors de...
static bool getScopeDefs(const QCString &docScope, const QCString &scope, ClassDef *&cd, ConceptDef *&cnd, NamespaceDef *&nd)
static const char operatorScope[]
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig)
QCString convertCharEntitiesToUTF8(const QCString &str)
static std::vector< Lang2ExtMap > g_lang2extMap
int getScopeFragment(const QCString &s, int p, int *l)
void addHtmlExtensionIfMissing(QCString &fName)
QCString createHtmlUrl(const QCString &relPath, const QCString &ref, bool href, bool isLocalFile, const QCString &targetFileName, const QCString &anchor)
A bunch of utility functions.
std::vector< KeywordSubstitution > KeywordSubstitutionList
std::vector< SelectionBlock > SelectionBlockList