66 #define ENABLE_TRACINGSUPPORT 0 68 #if defined(_OS_MAC_) && ENABLE_TRACINGSUPPORT 69 #define TRACINGSUPPORT 89 #define MAP_ALGO ALGO_MD5 91 #define REL_PATH_TO_ROOT "../../" 137 const char *anchor,
const char *text
167 if (s.
isEmpty())
return result;
168 static QRegExp re(
"[ :]*@[0-9]+[: ]*");
171 while ((i=re.
match(s,p,&l))!=-1)
173 result+=s.
mid(p,i-p);
176 while (c<i+l && s.
at(c)!=
'@')
if (s.
at(c++)==
':') b1=
TRUE;
178 while (c>=i && s.
at(c)!=
'@')
if (s.
at(c--)==
':') b2=
TRUE;
185 result+=s.
right(sl-p);
194 if (s.
isEmpty())
return result;
198 while ((i=re.
match(s,p,&l))!=-1)
200 result+=s.
mid(p,i-p);
207 result+=
"__anonymous__";
211 result+=s.
right(sl-p);
230 if (!newScope.
isEmpty()) newScope+=
"::";
231 newScope+=s.
mid(i,
l);
236 if (!newScope.
isEmpty()) newScope+=
"::";
237 newScope+=s.
right(sl-i);
268 const int maxMarkerStrLen = 20;
269 char result[maxMarkerStrLen];
270 qsnprintf(result,maxMarkerStrLen,
"@%d",
id);
279 unsigned int length = 0;
283 if (prefix.
length() > length &&
291 if (length)
return potential;
318 if (n.
right(2)==
".c" ||
320 n.
right(4)==
".cxx" ||
321 n.
right(4)==
".cpp" ||
322 n.
right(4)==
".c++" ||
323 n.
right(5)==
".java" ||
328 n.
right(4)==
".ixx" ||
329 n.
right(4)==
".ipp" ||
330 n.
right(4)==
".i++" ||
331 n.
right(4)==
".inl" ||
334 if (n.
right(2)==
".h" ||
336 n.
right(4)==
".hxx" ||
337 n.
right(4)==
".hpp" ||
338 n.
right(4)==
".h++" ||
339 n.
right(4)==
".idl" ||
340 n.
right(4)==
".ddl" ||
359 if (typedefContext) *typedefContext=context;
362 int scopeIndex = qualifiedName.
findRev(
"::");
366 resName=qualifiedName.
right(qualifiedName.
length()-scopeIndex-2);
375 while (mContext && md==0)
392 if (!tmp.
isEmpty()) qualScopePart=tmp;
395 if (resScope==0)
break;
421 for (;(tmd=mni.
current());++mni)
429 if (dist!=-1 && (md==0 || dist<minDist))
449 if (args.
find(
")(")!=-1)
453 else if (args.
find(
'[')!=-1)
474 if (n==0 || n[0]==
'\0')
return 0;
491 if (name==0 || name[0]==
'\0')
return 0;
504 warn_uncond(
"possible recursive namespace alias detected for %s!\n",name);
562 actTemplParams && actTemplParams->
count()>0)
570 while (ip>=0 && (type.
at(ip)==
'*' || type.
at(ip)==
'&' || type.
at(ip)==
' '))
574 type=type.
left(ip+1);
580 while (sp<tl && type.
at(sp)==
' ') sp++;
583 fileScope,
type,&memTypeDef,0,pResolvedType);
585 if (memTypeDef && memTypeDef->isTypedef())
590 else if (memTypeDef && memTypeDef->isEnumerate() && pMemType)
592 *pMemType = memTypeDef;
599 int si=type.findRev(
"::");
600 int i=type.find(
'<');
603 if (pTemplSpec) *pTemplSpec = type.
mid(i);
605 type.left(i),0,0,pResolvedType);
618 if (pTemplSpec) *pTemplSpec = type.
mid(i);
635 if (sp>0) pResolvedType->
prepend(typedefValue.left(sp));
636 if (ip<tl-1) pResolvedType->
append(typedefValue.right(tl-ip-1));
640 *pResolvedType=typedefValue;
653 pTemplSpec ? *pTemplSpec :
QCString(),
654 pResolvedType ? *pResolvedType :
QCString()
670 if (name.
isEmpty())
return result;
682 int minDistance=10000;
694 if (distance!=-1 && distance<minDistance)
722 if (pTypeDef) *pTypeDef=bestMatch;
736 for (cli.toFirst();(cd=cli.current());++
cli)
786 ((
NamespaceDef *)current)->getUsedClasses(),qualScopePart);
791 ((
FileDef *)current)->getUsedClasses(),qualScopePart);
794 if (current==0)
break;
811 const QCString &explicitScopePart=
"" 819 bool explicitScopePartEmpty = explicitScopePart.isEmpty();
820 for (cli.toFirst();(ucd=cli.current());++
cli)
824 if (sc && sc==item)
return TRUE;
834 const QCString &explicitScopePart=
"")
836 static QDict<void> visitedDict;
842 for (nli.toFirst();(und=nli.current());++nli,count++)
846 Definition *sc = explicitScopePart.isEmpty() ? und :
followPath(und,fileScope,explicitScopePart);
855 visitedDict.
insert(key,(
void *)0x08);
863 visitedDict.remove(key);
884 m_elements[m_index].scope =
scope;
885 m_elements[m_index].fileScope = fileScope;
886 m_elements[m_index].item = item;
894 m_elements[m_index].scope =
scope;
895 m_elements[m_index].fileScope = fileScope;
896 m_elements[m_index].item = item;
897 m_elements[m_index].expScope = expScope;
903 if (m_index>0) m_index--;
908 for (i=0;i<m_index;i++)
921 for (i=0;i<m_index;i++)
954 if (accessStack.
find(scope,fileScope,item))
958 accessStack.
push(scope,fileScope,item);
964 bool memberAccessibleFromScope =
970 bool nestedClassInsideBaseClass =
977 if (itemScope==scope || memberAccessibleFromScope || nestedClassInsideBaseClass)
980 if (nestedClassInsideBaseClass) result++;
1027 result= (i==-1) ? -1 : i+2;
1054 if (explicitScopePart.
isEmpty())
1061 if (accessStack.
find(scope,fileScope,item,explicitScopePart))
1065 accessStack.
push(scope,fileScope,item,explicitScopePart);
1082 if (itemScope==newScope)
1086 else if (itemScope && newScope &&
1120 for (cli.toFirst();(cd=cli.current());++
cli)
1135 for (nli.toFirst();(nd=nli.current());++nli)
1154 item,explicitScopePart);
1157 result = (i==-1) ? -1 : i+2;
1190 item,explicitScopePart);
1192 result= (i==-1) ? -1 : i+2;
1205 int i = name.
find(
'<');
1248 if (distance<minDistance)
1256 else if (distance==minDistance &&
1257 fileScope && bestMatch &&
1298 if (distance<minDistance)
1310 bestTemplSpec = spec;
1311 bestResolvedType =
type;
1317 bestTypedef = enumType;
1325 bestTemplSpec = spec;
1326 bestResolvedType =
type;
1333 bestResolvedType.
resize(0);
1349 if (distance<minDistance)
1388 &strippedTemplateParams);
1390 if (!strippedTemplateParams.
isEmpty())
1397 if (qualifierIndex!=-1)
1400 explicitScopePart=name.
left(qualifierIndex);
1403 name=name.
mid(qualifierIndex+2);
1431 bool hasUsingStatements =
1445 int nameLen = name.
length()+1;
1446 int explicitPartLen = explicitScopePart.
length();
1447 int fileScopeLen = hasUsingStatements ? 1+fileScope->
absFilePath().
length() : 0;
1451 QCString key(scopeNameLen+nameLen+explicitPartLen+fileScopeLen+1);
1453 qstrcpy(p,scope->
name()); *(p+scopeNameLen-1)=
'+';
1455 qstrcpy(p,name); *(p+nameLen-1)=
'+';
1464 if (hasUsingStatements)
1481 if (pTemplSpec) *pTemplSpec=pval->
templSpec;
1482 if (pTypeDef) *pTypeDef=pval->
typeDef;
1500 int minDistance=10000;
1511 minDistance,bestMatch,bestTypedef,bestTemplSpec,
1520 minDistance,bestMatch,bestTypedef,bestTemplSpec,
1526 *pTypeDef = bestTypedef;
1530 *pTemplSpec = bestTemplSpec;
1534 *pResolvedType = bestResolvedType;
1568 bool mayBeUnlinkable,
1573 static bool optimizeOutputVhdl =
Config_getBool(
"OPTIMIZE_OUTPUT_VHDL");
1591 if (optimizeOutputVhdl)
1605 if (!mayBeUnlinkable && result && !result->
isLinkable())
1607 if (!mayBeHidden || !result->
isHidden())
1626 if (b==-1)
return FALSE;
1640 if (b==-1)
return FALSE;
1651 static const char constScope[] = {
'c',
'o',
'n',
's',
't',
':' };
1652 static const char virtualScope[] = {
'v',
'i',
'r',
't',
'u',
'a',
'l',
':' };
1660 if (s.
isEmpty() || vhdl)
return s;
1714 { i++;
goto nextChar; }
1719 else if (i<l-2 && c==
'<' &&
1727 else if (i>0 && c==
'>' &&
1728 (
isId(s.
at(i-1)) || isspace((
uchar)s.
at(i-1)) || s.
at(i-1)==
'*' || s.
at(i-1)==
'&' || s.
at(i-1)==
'.') &&
1735 else if (i>0 && c==
',' && !isspace((
uchar)s.
at(i-1))
1736 && ((i<l-1 && (
isId(s.
at(i+1)) || s.
at(i+1)==
'['))
1737 || (i<l-2 && s.
at(i+1)==
'$' &&
isId(s.
at(i+2)))
1738 || (i<l-3 && s.
at(i+1)==
'&' && s.
at(i+2)==
'$' &&
isId(s.
at(i+3)))))
1745 (s.
at(i-1)==
')' &&
isId(c))
1747 (c==
'\'' && s.
at(i-1)==
' ')
1749 (i>1 && s.
at(i-2)==
' ' && s.
at(i-1)==
' ')
1756 else if (c==
't' && csp==5 &&
1767 if (s.
at(i+1)==
' ') i++;
1770 else if (c==
':' && csp==6 )
1777 else if (c==
'l' && vsp==7 &&
1788 if (s.
at(i+1)==
' ') i++;
1791 else if (c==
':' && vsp==8 )
1798 else if (!isspace((
uchar)c) ||
1800 (
isId(s.
at(i-1)) || s.
at(i-1)==
')' || s.
at(i-1)==
',' || s.
at(i-1)==
'>' || s.
at(i-1)==
']') &&
1802 (i<l-2 && s.
at(i+1)==
'$' &&
isId(s.
at(i+2))) ||
1803 (i<l-3 && s.
at(i+1)==
'&' && s.
at(i+2)==
'$' &&
isId(s.
at(i+3)))
1809 if (c==
'*' || c==
'&' || c==
'@' || c==
'$')
1813 if ((rl>0 && (
isId(growBuf.
at(rl-1)) || growBuf.
at(rl-1)==
'>')) &&
1823 if (rl>0 && growBuf.
at(rl-1)==
')' && i<l-1 && s.
at(i+1)==
'>')
1830 (c==
'^' || c==
'%') && i>1 &&
isId(s.
at(i-1)) &&
1841 return growBuf.
get();
1851 int templateDepth=0;
1854 if (templateDepth > 0)
1856 int nextOpenPos=name.
findRev(
'>', pos);
1857 int nextClosePos=name.
findRev(
'<', pos);
1858 if (nextOpenPos!=-1 && nextOpenPos>nextClosePos)
1863 else if (nextClosePos!=-1)
1875 int lastAnglePos=name.
findRev(
'>', pos);
1876 int bracePos=name.
findRev(
'(', pos);
1877 if (lastAnglePos!=-1 && lastAnglePos>bracePos)
1884 int bp = bracePos>0 ? name.
findRev(
'(',bracePos-1) : -1;
1886 return bp==-1 || (bp>=8 && name.
mid(bp-8,10)==
"operator()") ? bracePos : bp;
1897 return (name==scope ||
1898 (scope.
right(nl)==name &&
1899 sl-nl>1 && scope.
at(sl-nl-1)==
':' && scope.
at(sl-nl-2)==
':' 1908 return (name==scope ||
1909 (scope.
left(nl)==name &&
1910 sl>nl+1 && scope.
at(nl)==
':' && scope.
at(nl+1)==
':' 1918 const char *text,
bool autoBreak,
bool external,
1919 bool keepSpaces,
int indentLevel)
1922 static QRegExp regExp(
"[a-z_A-Z\\x80-\\xFF][~!a-z_A-Z0-9$\\\\.:\\x80-\\xFF]*");
1923 static QRegExp regExpSplit(
"(?!:),");
1925 int strLen = txtStr.
length();
1934 int floatingIndex=0;
1935 if (strLen==0)
return;
1937 while ((newIndex=regExp.
match(txtStr,index,&matchLen))!=-1 &&
1938 (newIndex==0 || !(txtStr.
at(newIndex-1)>=
'0' && txtStr.
at(newIndex-1)<=
'9'))
1942 floatingIndex+=newIndex-skipIndex+matchLen;
1943 bool insideString=
FALSE;
1945 for (i=index;i<newIndex;i++)
1947 if (txtStr.
at(i)==
'"') insideString=!insideString;
1951 if (strLen>35 && floatingIndex>30 && autoBreak)
1953 QCString splitText = txtStr.
mid(skipIndex,newIndex-skipIndex);
1954 int splitLength = splitText.
length();
1956 i=splitText.
find(regExpSplit,0);
1957 if (i==-1) { i=splitText.
find(
'<');
if (i!=-1) offset=0; }
1958 if (i==-1) i=splitText.
find(
'>');
1959 if (i==-1) i=splitText.
find(
' ');
1964 out.
writeBreak(indentLevel==0 ? 0 : indentLevel+1);
1966 floatingIndex=splitLength-i-offset+matchLen;
1976 out.
writeString(txtStr.
mid(skipIndex,newIndex-skipIndex),keepSpaces);
2010 if (!found && (cd || (cd=
getClass(matchWord))))
2023 else if ((cd=
getClass(matchWord+
"-p")))
2060 scopeName=scope->
name();
2064 scopeName = matchWord.
left(m);
2065 matchWord = matchWord.
mid(m+2);
2071 getDefs(scopeName,matchWord,0,md,cd,fd,nd,gd) &&
2081 if (md!=
self && (
self==0 || md->
name()!=
self->name()))
2098 skipIndex=index=newIndex+matchLen;
2114 int index=0,newIndex,matchLen;
2116 while ((newIndex=marker.
match(exampleLine,index,&matchLen))!=-1)
2120 uint entryIndex = exampleLine.
mid(newIndex+1,matchLen-1).
toUInt(&ok);
2144 index=newIndex+matchLen;
2154 if (al==0)
return result;
2163 int i=type1.
find(
")(");
2167 type1=type1.
left(i);
2175 result+= type1+
" "+a->
name+type2+a->
array;
2179 result+= type1+type2;
2187 if (a) result+=
", ";
2200 if (al==0)
return result;
2218 result+=a->
type+
" ";
2241 result+=
" extends ";
2246 if (a) result+=
", ";
2260 for (;(md=mli.
current());++mli)
2296 if (src<len && buf[src] ==
'\n')
2299 else if ( c ==
'\0' && src<len-1)
2317 int i_equals=fs.
find(
'=');
2322 if (fpat.
match(name)!=-1)
2326 if (filterName.
find(
' ')!=-1)
2328 filterName=
"\""+filterName+
"\"";
2348 if (name==0)
return "";
2355 if (isSourceCode && !filterSrcList.
isEmpty())
2359 if (!found && filterName.
isEmpty())
2378 const char *outputEncoding =
"UTF-8";
2379 if (inputEncoding.
isEmpty() ||
qstricmp(inputEncoding,outputEncoding)==0)
return input;
2380 int inputSize=input.
length();
2381 int outputSize=inputSize*4+1;
2384 if (cd==(
void *)(-1))
2386 err(
"unsupported character conversion: '%s'->'%s'\n",
2387 inputEncoding.
data(),outputEncoding);
2392 size_t iLeft=inputSize;
2393 size_t oLeft=outputSize;
2394 char *inputPtr = input.
rawData();
2395 char *outputPtr = output.
rawData();
2398 outputSize-=(
int)oLeft;
2399 output.
resize(outputSize+1);
2400 output.
at(outputSize)=
'\0';
2405 err(
"failed to translate characters from %s to %s: check INPUT_ENCODING\ninput=[%s]\n",
2406 inputEncoding.
data(),outputEncoding,input.
data());
2411 return error ? input :
output;
2420 if (name==0 || name[0]==0)
return 0;
2423 bool fileOpened=
FALSE;
2424 if (name[0]==
'-' && name[1]==0)
2429 const int bSize=4096;
2436 contents.
resize(totalSize+bSize);
2439 contents.
resize(totalSize);
2440 contents.
at(totalSize-2)=
'\n';
2441 contents.
at(totalSize-1)=
'\0';
2450 err(
"file `%s' not found\n",name);
2458 if (s>1 && buf.at(s-2)!=
'\n')
2468 err(
"cannot open file `%s' for reading\n",name);
2477 if (!sourceDateEpoch.
isEmpty())
2483 static bool warnedOnce=
FALSE;
2486 warn_uncond(
"Environment variable SOURCE_DATE_EPOCH does not contain a valid number; value is '%s'\n",
2487 sourceDateEpoch.
data());
2491 else if (epoch>UINT_MAX)
2493 static bool warnedOnce=
FALSE;
2496 warn_uncond(
"Environment variable SOURCE_DATA_EPOCH must have a value smaller than or equal to %llu; actual value %llu\n",UINT_MAX,epoch);
2534 if (cd==bcd)
return level;
2538 "inheritance relation!\n",cd->
name().
data());
2546 for (;(bcdi=bcli.current());++bcli)
2569 err(
"Internal inconsistency: found class %s seem to have a recursive " 2570 "inheritance relation! Please send a bug report to dimitri@stack.nl\n",cd->
name().
data());
2576 for (;(bcdi=bcli.current()) && prot!=
Private;++bcli)
2612 if (cd==0)
return s;
2616 int i=className.
length()-1;
2617 if (i>=0 && className.
at(i)==
'>')
2624 char c=className.
at(i);
2625 if (c==
'>') count++,i--;
2626 else if (c==
'<') { count--;
if (count==0)
break; }
2632 while ((i=result.
find(unspecClassName,p))!=-1)
2634 if (result.
at(i+l)!=
'<')
2657 while ((i=result.
find(qualNamePart,p))!=-1)
2659 int ql=qualNamePart.
length();
2689 while (p<sl && pp<pl)
2698 if (s.
at(p)==
'<') bc++;
2699 else if (s.
at(p)==
'>')
2712 else if (s.
at(p)==pattern.
at(pp))
2736 int scopeOffset=name.
length();
2747 tmp+=result.
mid(p,i-p);
2752 scopeOffset=name.
findRev(
"::",scopeOffset-1);
2754 }
while (scopeOffset>0);
2765 for (;(bcd=bcli.
current());++bcli)
2793 int i1=p1==0 ? -1 : t1.
findRev(
"::",p1);
2794 int i2=p2==0 ? -1 : t2.
findRev(
"::",p2);
2795 if (i1==-1 && i2==-1)
2799 if (i1!=-1 && i2==-1)
2819 else if ((so=nsName.
findRev(
"::",so-1))==-1)
2826 else if (i1==-1 && i2!=-1)
2846 else if ((so=nsName.
findRev(
"::",so-1))==-1)
2861 if (target==str) { target.
resize(0);
return; }
2865 while ((i=target.
find(str,p))!=-1)
2867 bool isMatch = (i==0 || !
isId(target.
at(i-1))) &&
2871 int i1=target.
find(
'*',i+l);
2872 int i2=target.
find(
'&',i+l);
2873 if (i1==-1 && i2==-1)
2880 else if ((i1!=-1 && i<i1) || (i2!=-1 && i<i2))
2952 if ((srcAType==
"const" || srcAType==
"volatile") && !srcAName.
isEmpty())
2957 if ((dstAType==
"const" || dstAType==
"volatile") && !dstAName.
isEmpty())
2962 if (srcAName==
"const" || srcAName==
"volatile")
2967 else if (dstA->
name==
"const" || dstA->
name==
"volatile")
2969 dstAType+=dstA->
name;
2977 if (
qstrncmp(srcAType,
"typename ",9)==0)
2981 if (
qstrncmp(dstAType,
"typename ",9)==0)
3000 if (srcAType!=dstAType)
3020 cd=
getClass(namespaceName+
"::"+className);
3032 srcAType=
trimScope(namespaceName,srcAType);
3033 dstAType=
trimScope(namespaceName,dstAType);
3036 if (usingNamespaces && usingNamespaces->
count()>0)
3040 for (;(nd=nli.current());++nli)
3047 if (usingClasses && usingClasses->
count()>0)
3051 for (;(cd=cli.current());++
cli)
3062 (srcAType+
" "+srcAName)==dstAType)
3068 (dstAType+
" "+dstAName)==srcAType)
3075 uint srcPos=0,dstPos=0;
3077 while (srcPos<srcAType.
length() && dstPos<dstAType.
length() && equal)
3079 equal=srcAType.
at(srcPos)==dstAType.
at(dstPos);
3080 if (equal) srcPos++,dstPos++;
3084 if (srcPos<srcATypeLen && dstPos<dstATypeLen)
3088 if (srcPos==0 || dstPos==0)
3093 if (
isId(srcAType.
at(srcPos)) &&
isId(dstAType.
at(dstPos)))
3103 while (srcPos<srcATypeLen &&
isId(srcAType.
at(srcPos))) srcPos++;
3104 while (dstPos<dstATypeLen &&
isId(dstAType.
at(dstPos))) dstPos++;
3105 if (srcPos<srcATypeLen ||
3106 dstPos<dstATypeLen ||
3107 (srcPos==srcATypeLen && dstPos==dstATypeLen)
3117 while (srcPos<srcATypeLen &&
isId(srcAType.
at(srcPos))) srcPos++;
3118 while (dstPos<dstATypeLen &&
isId(dstAType.
at(dstPos))) dstPos++;
3125 if (srcPos!=srcATypeLen || dstPos!=dstATypeLen)
3132 else if (dstPos<dstAType.
length())
3134 if (!isspace((
uchar)dstAType.
at(dstPos)))
3141 while (dstPos<dstAType.
length() &&
isId(dstAType.
at(dstPos))) dstPos++;
3142 if (dstPos!=dstAType.
length())
3151 while (dstPos<dstAType.
length() &&
isId(dstAType.
at(dstPos))) dstPos++;
3159 else if (srcPos<srcAType.
length())
3161 if (!isspace((
uchar)srcAType.
at(srcPos)))
3168 while (srcPos<srcAType.
length() &&
isId(srcAType.
at(srcPos))) srcPos++;
3169 if (srcPos!=srcAType.
length())
3178 while (srcPos<srcAType.
length() &&
isId(srcAType.
at(srcPos))) srcPos++;
3200 const char *
cl,
const char *
ns,
bool checkCV,
3222 if (srcAl==0 || dstAl==0)
3224 bool match = srcAl==dstAl;
3238 if ( srcAl->
count()==0 && dstAl->
count()==1 &&
3247 if ( dstAl->
count()==0 && srcAl->
count()==1 &&
3281 for (;(srcA=srcAli.current()) && (dstA=dstAli.
current());++srcAli,++dstAli)
3284 usingNamespaces,usingClasses))
3315 return symbol->qualifiedName();
3321 int i=s.
find(
" class ");
3322 if (i!=-1)
return s.
left(i)+s.
mid(i+6);
3323 i=s.
find(
" typename ");
3324 if (i!=-1)
return s.
left(i)+s.
mid(i+9);
3325 i=s.
find(
" union ");
3326 if (i!=-1)
return s.
left(i)+s.
mid(i+6);
3327 i=s.
find(
" struct ");
3328 if (i!=-1)
return s.
left(i)+s.
mid(i+7);
3341 if (!templSpec.
isEmpty() && templSpec.
at(0) ==
'<')
3346 if (!resolvedType.isEmpty())
3348 templSpec = resolvedType;
3363 if (tSpec && !tSpec->
isEmpty())
3384 bool isTemplInst = cd && !templSpec.
isEmpty();
3385 if (!cd && !templSpec.
isEmpty())
3414 if (cd==d && tSpec) *tSpec=
"";
3418 result = resolvedType+ts;
3426 if (tSpec) *tSpec=
"";
3440 result=cd->
name()+templSpec;
3485 result = resolvedType;
3519 if (i>pp) canType += type.
mid(pp,i-pp);
3541 static QRegExp re(
"[a-z_A-Z\\x80-\\xFF][a-z_A-Z0-9\\x80-\\xFF]*");
3545 while ((ti=re.
match(templSpec,tp,&tl))!=-1)
3547 canType += templSpec.
mid(tp,ti-tp);
3567 if ((type==
"const" || type==
"volatile") && !name.
isEmpty())
3572 if (name==
"const" || name==
"volatile")
3574 if (!type.
isEmpty()) type+=
" ";
3611 srcA->
type+=sSrcName;
3615 else if (sDstName==srcType.
right(sDstName.
length()))
3617 dstA->
type+=sDstName;
3653 ASSERT(srcScope!=0 && dstScope!=0);
3655 if (srcAl==0 || dstAl==0)
3657 bool match = srcAl==dstAl;
3671 if ( srcAl->
count()==0 && dstAl->
count()==1 &&
3680 if ( dstAl->
count()==0 && srcAl->
count()==1 &&
3714 for (;(srcA=srcAli.current()) && (dstA=dstAli.
current());++srcAli,++dstAli)
3717 dstScope,dstFileScope,dstA)
3737 if (srcAl==0 || dstAl==0 || srcAl->
count()!=dstAl->
count())
3744 for (;(srcA=srcAli.current()) && (dstA=dstAli.
current());++srcAli,++dstAli)
3759 if (srcA->
name==
"const" || srcA->
name==
"volatile")
3764 if (dstA->
name==
"const" || dstA->
name==
"volatile")
3790 if (forceNameOverwrite)
3842 else if (i1==-1 && i2!=-1 && dstA->
type.
right(j2)==srcA->
type)
3868 const char *forceTagFile,
3885 currentFile==0 || fd==currentFile)
3899 delete argList; argList=0;
3901 if (match && (forceTagFile==0 || md->
getReference()==forceTagFile))
3940 bool forceEmptyScope,
3943 const char *forceTagFile
3946 fd=0, md=0, cd=0, nd=0, gd=0;
3952 memberName =
substitute(memberName,
"\\",
"::");
3958 while ((is=scopeName.
findRev(
"::"))!=-1 &&
3959 (im=memberName.
find(
"::",
pm))!=-1 &&
3963 scopeName=scopeName.
left(is);
3971 if (memberName.
left(9)!=
"operator " &&
3973 (im=memberName.
findRev(
"::"))!=-1 &&
3974 im<(
int)memberName.
length()-2
3977 mScope=memberName.
left(im);
3982 if (mScope==scopeName) scopeName.
resize(0);
3989 if ((!forceEmptyScope || scopeName.
isEmpty()) &&
3993 int scopeOffset=scopeName.
length();
3999 className+=
"::"+mScope;
4008 if (fcd==0 && className.
find(
'<')!=-1)
4034 bool match=args==0 ||
4046 if (m<mdist && mcd->isLinkable())
4058 delete argList; argList=0;
4073 if (m<mdist /* && mcd->isLinkable()*/ )
4109 for (;(emd=tmi.
current());++tmi)
4134 else if ((scopeOffset=scopeName.
findRev(
"::",scopeOffset-1))==-1)
4138 }
while (scopeOffset>=0);
4147 bool hasEmptyArgs = args &&
qstrcmp(args,
"()") == 0;
4167 if (!fuzzy_mmd && hasEmptyArgs)
4171 if (argList)
delete argList, argList = 0;
4173 mmd = mmd ? mmd : fuzzy_mmd;
4191 int scopeOffset=scopeName.
length();
4197 namespaceName+=
"::"+mScope;
4201 namespaceName=mScope.
copy();
4204 if (!namespaceName.
isEmpty() &&
4241 if (args &&
qstrcmp(args,
"()")!=0)
4259 delete argList; argList=0;
4263 if (!found && args && !
qstrcmp(args,
"()"))
4309 (notInNS || sameNS) &&
4327 else if ((scopeOffset=scopeName.
findRev(
"::",scopeOffset-1))==-1)
4331 }
while (scopeOffset>=0);
4338 if (members.
count()==0)
4366 if (members.
count()>0)
4428 bool explicitGlobalScope=
FALSE;
4429 if (scopeName.
at(0)==
':' && scopeName.
at(1)==
':')
4432 explicitGlobalScope=
TRUE;
4436 int scopeOffset=explicitGlobalScope ? 0 : docScopeName.
length();
4441 if (scopeOffset>0) fullName.
prepend(docScopeName.
left(scopeOffset)+
"::");
4458 else if ((scopeOffset=docScopeName.
findRev(
"::",scopeOffset-1))==-1)
4462 }
while (scopeOffset>=0);
4470 if (p==0)
return TRUE;
4472 while ((c=*p++))
if (!islower(c))
return FALSE;
4484 bool lookForSpecialization,
4493 if (fullName.
find(
"anonymous_namespace{")==-1)
4503 int endNamePos=bracePos!=-1 ? bracePos : fullName.
length();
4504 int scopePos=fullName.
findRev(
"::",endNamePos);
4505 bool explicitScope = fullName.
left(2)==
"::" &&
4507 tsName.
left(2)==
"::" ||
4522 if (!inSeeBlock && scopePos==-1 &&
isLowerCase(tsName))
4530 if (scName!=fullName &&
getScopeDefs(scName,fullName,cd,nd))
4543 else if (scName==fullName || (!inSeeBlock && scopePos==-1))
4556 if (explicitScope) nameStr=nameStr.
mid(2);
4560 if (bracePos!=-1) argsStr=fullName.
right(fullName.
length()-bracePos);
4564 int templPos=nameStr.
find(
'<');
4565 bool tryUnspecializedVersion =
FALSE;
4566 if (templPos!=-1 && nameStr.
find(
"operator")==-1)
4568 int endTemplPos=nameStr.
findRev(
'>');
4569 if (endTemplPos!=-1)
4571 if (!lookForSpecialization)
4573 nameStr=nameStr.
left(templPos)+nameStr.
right(nameStr.
length()-endTemplPos-1);
4577 tryUnspecializedVersion =
TRUE;
4593 if (
getDefs(scopeStr,nameStr,argsStr,
4616 if (md) { *resMember=
md; *resContext=
md; }
4617 else if (cd) *resContext=cd;
4618 else if (nd) *resContext=nd;
4619 else if (fd) *resContext=fd;
4620 else if (gd) *resContext=gd;
4621 else { *resContext=0; *resMember=0;
return FALSE; }
4631 else if (tsName.
find(
'.')!=-1)
4642 if (tryUnspecializedVersion)
4644 return resolveRef(scName,name,inSeeBlock,resContext,resMember,
FALSE,0,checkScope);
4668 if (!isFileName && result.
find(
'<')==-1) result=
substitute(result,
".",
"::");
4670 if (result.
at(0)==
':' && result.
at(1)==
':')
4704 const char *
name,
bool inSeeBlock,
const char *rt)
4732 linkText=((
GroupDef *)compound)->groupTitle();
4784 if (si) resAnchor = si->
label;
4795 resAnchor = si->
label;
4820 else if ((cd=
getClass(linkRefWithoutTemplates)))
4826 else if ((cd=
getClass(linkRef+
"-p")))
4853 if (md) resAnchor=md->
anchor();
4867 const char *lr,
bool inSeeBlock,
const char *lt)
4874 if (
resolveLink(clName,lr,inSeeBlock,&compound,anchor))
4878 if (lt==0 && anchor.
isEmpty() &&
4882 linkText=((
GroupDef *)compound)->groupTitle();
4897 err(
"%s:%d: Internal error: resolveLink successful but no compound found!",__FILE__,__LINE__);
4930 if (s.
isEmpty())
return result;
4931 QRegExp r(
"[a-z_A-Z][a-z_A-Z0-9]*");
4932 while ((p=r.
match(s,i,&
l))!=-1)
4935 if (p>i) result+=s.
mid(i,p-i);
4936 if ((subst=substituteDict[s.
mid(p,
l)]))
4968 const int maxAddrSize = 20;
4969 char addr[maxAddrSize];
4970 qsnprintf(addr,maxAddrSize,
"%p:",fnDict);
4979 ambig = cachedResult->
isAmbig;
4992 if (name.
isEmpty())
goto exit;
4996 path=name.
left(slashPos+1);
5000 if (name.
isEmpty())
goto exit;
5001 if ((fn=(*fnDict)[name]))
5007 #if defined(_WIN32) || defined(__MACOSX__) // Windows or MacOSX 5012 if (path.
isEmpty() || isSamePath)
5039 cachedResult->
isAmbig = ambig;
5040 cachedResult->
fileDef = lastMatch;
5066 path=name.
left(slashPos+1);
5070 if ((fn=(*fnDict)[name]))
5092 int srcLen = src.
length();
5093 int dstLen = dst.
length();
5098 for (count=0, p=s.
data(); (q=strstr(p,src))!=0; p=q+srcLen) count++;
5099 resLen = s.
length()+count*(dstLen-srcLen);
5107 for (r=result.
rawData(), p=
s; (q=strstr(p,src))!=0; p=q+srcLen)
5112 if (dst) memcpy(r,dst,dstLen);
5123 const char *projName,
const char *projNum,
const char *projBrief)
5126 if (title) result =
substitute(result,
"$title",title);
5131 result =
substitute(result,
"$projectname",projName);
5132 result =
substitute(result,
"$projectnumber",projNum);
5133 result =
substitute(result,
"$projectbrief",projBrief);
5148 char *s = sl.
first();
5152 const char *pd=name.
data();
5154 while (*ps!=0 && *pd!=0 && *ps==*pd) ps++,pd++,i++;
5155 if (*ps==0 && *pd!=0)
5170 for ( ; bcli.
current(); ++bcli)
5198 for ( ; bcli.
current() ; ++bcli)
5215 for ( ; (cd=cli.current()); ++
cli)
5229 for ( ; bcli.
current(); ++bcli)
5245 static bool allowUnicodeNames =
Config_getBool(
"ALLOW_UNICODE_NAMES");
5254 case '_':
if (allowUnderscore) growBuf.
addChar(
'_');
else growBuf.
addStr(
"__");
break;
5255 case '-': growBuf.
addChar(
'-');
break;
5256 case ':': growBuf.
addStr(
"_1");
break;
5257 case '/': growBuf.
addStr(
"_2");
break;
5258 case '<': growBuf.
addStr(
"_3");
break;
5259 case '>': growBuf.
addStr(
"_4");
break;
5260 case '*': growBuf.
addStr(
"_5");
break;
5261 case '&': growBuf.
addStr(
"_6");
break;
5262 case '|': growBuf.
addStr(
"_7");
break;
5263 case '.':
if (allowDots) growBuf.
addChar(
'.');
else growBuf.
addStr(
"_8");
break;
5264 case '!': growBuf.
addStr(
"_9");
break;
5265 case ',': growBuf.
addStr(
"_00");
break;
5266 case ' ': growBuf.
addStr(
"_01");
break;
5267 case '{': growBuf.
addStr(
"_02");
break;
5268 case '}': growBuf.
addStr(
"_03");
break;
5269 case '?': growBuf.
addStr(
"_04");
break;
5270 case '^': growBuf.
addStr(
"_05");
break;
5271 case '%': growBuf.
addStr(
"_06");
break;
5272 case '(': growBuf.
addStr(
"_07");
break;
5273 case ')': growBuf.
addStr(
"_08");
break;
5274 case '+': growBuf.
addStr(
"_09");
break;
5275 case '=': growBuf.
addStr(
"_0A");
break;
5276 case '$': growBuf.
addStr(
"_0B");
break;
5277 case '\\': growBuf.
addStr(
"_0C");
break;
5278 case '@': growBuf.
addStr(
"_0D");
break;
5283 const unsigned char uc = (
unsigned char)c;
5284 bool doEscape =
TRUE;
5285 if (allowUnicodeNames && uc <= 0xf7)
5290 if ((uc&0xE0)==0xC0)
5294 if ((uc&0xF0)==0xE0)
5298 if ((uc&0xF8)==0xF0)
5303 for (
int m=1;
m<l && !doEscape; ++
m)
5305 unsigned char ct = (
unsigned char)*pt;
5306 if (ct==0 || (ct&0xC0)!=0x80)
5324 static char map[] =
"0123456789ABCDEF";
5325 unsigned char id = (
unsigned char)c;
5334 else if (caseSenseNames || !isupper(c))
5347 return growBuf.
get();
5361 static QDict<int> usedNames(10007);
5362 usedNames.setAutoDelete(
TRUE);
5365 int *
value=usedNames.find(name);
5369 usedNames.insert(name,
new int(count));
5381 int resultLen = result.
length();
5387 MD5Buffer((
const unsigned char *)result.
data(),resultLen,md5_sig);
5389 result=result.
left(128-32)+sigStr;
5394 int l1Dir=0,l2Dir=0;
5396 #if MAP_ALGO==ALGO_COUNT 5404 static int curDirNum=0;
5409 l1Dir = (curDirNum)&0xf;
5410 l2Dir = (curDirNum>>4)&0xff;
5415 l1Dir = (*dirNum)&0xf;
5416 l2Dir = ((*dirNum)>>4)&0xff;
5418 #elif MAP_ALGO==ALGO_CRC16 5420 int dirNum = qChecksum(result,result.
length());
5422 l2Dir = (dirNum>>4)&0xff;
5423 #elif MAP_ALGO==ALGO_MD5 5427 l1Dir = md5_sig[14]&0xf;
5428 l2Dir = md5_sig[15];
5464 for (l1=0;l1<16;l1++)
5467 for (l2=0;l2<256;l2++)
5480 bool allowEmptyClass)
5492 while (p>=0 && (i=clName.
findRev(
"::",p))!=-1)
5508 className=scopeName.
copy();
5512 if (className.
isEmpty() && !namespaceName.
isEmpty() && !allowEmptyClass)
5515 className=namespaceName.
copy();
5520 if ( className.
right(2)==
"-p")
5522 className = className.
left(className.
length()-2);
5556 #if 0 // original version 5570 char c=result.
at(p);
5575 return result.
right(l-p-1);
5581 while (p>=0 && !done)
5586 case '>': count++;
break;
5587 case '<': count--;
if (count<=0) done=
TRUE;
break;
5611 bool skipBracket=
FALSE;
5617 while (p>=0 && count>=0)
5619 char c=result.
at(p);
5625 if (p>0 && result.
at(p-1)==
':')
return result.
right(l-p-1);
5635 if (p>0 && result.
at(p-1)==
'>')
5643 bool foundMatch=
false;
5644 while (p>=0 && !foundMatch)
5655 if (result.
at(p-1) ==
'<')
5662 foundMatch = count==0;
5676 done = count==0 || skipBracket;
5687 static const char hex[] =
"0123456789ABCDEF";
5690 if (s==0)
return "";
5697 if ((c>=
'0' && c<=
'9') || (c>=
'a' && c<=
'z') || (c>=
'A' && c<=
'Z') || c==
'-' || c==
':' || c==
'.')
5699 if (first && c>=
'0' && c<=
'9') growBuf.
addChar(
'a');
5705 encChar[1]=hex[((
unsigned char)c)>>4];
5706 encChar[2]=hex[((
unsigned char)c)&0xF];
5713 return growBuf.
get();
5721 if (s==0)
return "";
5728 case '<': growBuf.
addStr(
"<");
break;
5729 case '>': growBuf.
addStr(
">");
break;
5730 case '&': growBuf.
addStr(
"&");
break;
5731 case '\'': growBuf.
addStr(
"'");
break;
5732 case '"': growBuf.
addStr(
""");
break;
5733 case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
5734 case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
5735 case 19:
case 20:
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
5736 case 27:
case 28:
case 29:
case 30:
case 31:
5738 default: growBuf.
addChar(c);
break;
5742 return growBuf.
get();
5750 if (s==0)
return "";
5757 case '<': growBuf.
addStr(
"<");
break;
5758 case '>': growBuf.
addStr(
">");
break;
5759 case '&':
if (keepEntities)
5765 if (ce==
';' || (!(
isId(ce) || ce==
'#')))
break;
5771 while (p<e) growBuf.
addChar(*p++);
5783 case '\'': growBuf.
addStr(
"'");
break;
5784 case '"': growBuf.
addStr(
""");
break;
5785 default: growBuf.
addChar(c);
break;
5789 return growBuf.
get();
5796 if (s==0)
return "";
5803 case '"': growBuf.
addStr(
"\\\"");
break;
5804 case '\\': growBuf.
addStr(
"\\\\");
break;
5805 default: growBuf.
addChar(c);
break;
5817 return result.
data();
5825 static QRegExp entityPat(
"&[a-zA-Z]+[0-9]*;");
5827 if (s.
length()==0)
return result;
5831 while ((p=entityPat.
match(s,i,&
l))!=-1)
5853 return growBuf.
get();
5877 for (index=0;(md=mli.
current());)
5896 if (*ppMemberGroupSDict==0)
5912 (*ppMemberGroupSDict)->append(groupId,mg);
5929 if (*ppMemberGroupSDict==0)
5945 (*ppMemberGroupSDict)->append(groupId,mg);
5947 md = ml->
take(index);
5965 static const QRegExp re_norm(
"[a-z_A-Z\\x80-\\xFF][a-z_A-Z0-9:\\x80-\\xFF]*");
5966 static const QRegExp re_ftn(
"[a-z_A-Z\\x80-\\xFF][()=_a-z_A-Z0-9:\\x80-\\xFF]*");
5972 int typeLen=type.
length();
5977 if (type.
at(pos)==
',')
return -1;
5992 if ((i=re.
match(type,pos,&l))!=-1)
5997 while (type.
at(ts)==
' ' && ts<typeLen) ts++,tl++;
5998 if (type.
at(ts)==
'<')
6003 while (te<typeLen && brCount!=0)
6005 if (type.
at(te)==
'<')
6007 if (te<typeLen-1 && type.
at(te+1)==
'<') te++;
else brCount++;
6009 if (type.
at(te)==
'>')
6011 if (te<typeLen-1 && type.
at(te+1)==
'>') te++;
else brCount--;
6016 name = type.
mid(i,l);
6019 templSpec = type.
mid(ts,te-ts),tl+=te-ts;
6043 int p=name.
find(
'<');
6044 if (p==-1)
return name;
6048 static QRegExp re(
"[a-z_A-Z\\x80-\\xFF][a-z_A-Z0-9\\x80-\\xFF]*");
6051 while ((i=re.
match(name,p,&l))!=-1)
6053 result += name.
mid(p,i-p);
6061 (formArg=formAli.
current()) && !found;
6065 found = formArg->
name==
n;
6106 if (formalArgs==0)
return name;
6108 static QRegExp re(
"[a-z_A-Z\\x80-\\xFF][a-z_A-Z0-9\\x80-\\xFF]*");
6111 while ((i=re.
match(name,p,&
l))!=-1)
6113 result += name.
mid(p,i-p);
6124 (formArg=formAli.
current()) && !found;
6132 formArg->
type =
"class";
6137 formArg->
type =
"typename";
6139 if (formArg->
type==
"class" || formArg->
type==
"typename" || formArg->
type.
left(8)==
"template")
6158 result += actArg->
type+
" ";
6165 result += actArg->
type+
" "+actArg->
name+
" ";
6170 else if (formArg->
name==n &&
6180 else if (formArg->
name==n &&
6212 for (;(sl=sli.
current());++sli)
6233 int i=fullName.
find(
'<');
6240 while (e<l && !done)
6242 char c=fullName.
at(e++);
6253 int si= fullName.
find(
"::",e);
6255 if (parentOnly && si==-1)
break;
6258 result+=fullName.
mid(p,i-p);
6262 result+=fullName.
mid(i,e-i);
6265 else if (pLastScopeStripped)
6268 *pLastScopeStripped=fullName.
mid(i,e-i);
6271 i=fullName.
find(
'<',p);
6273 result+=fullName.
right(l-p);
6297 while ((i=leftScope.
findRev(
"::",
p))!=-1)
6301 result = leftScope.
left(i+2)+rightScope;
6306 if (found)
return result;
6309 result=leftScope.
copy();
6328 if (sp>=sl)
return -1;
6332 if (c==
':') sp++,p++;
else break;
6344 while (sp<sl && !done)
6350 case '<': count++;
break;
6351 case '>': count--;
if (count==0) done=
TRUE;
break;
6372 const char *
fileName,
int startLine,
6390 if (baseName.
right(4)==
".tex")
6396 pd=
new PageDef(fileName,startLine,baseName,doc,title);
6461 if (sli && key && key[0]!=
'@')
6534 bool insideTabbing,
bool insidePre,
bool insideItem,
bool keepSpaces)
6538 const unsigned char *
p=(
const unsigned char *)str;
6539 const unsigned char *q;
6542 unsigned char pc=
'\0';
6551 case '\\': t <<
"\\(\\backslash\\)";
break;
6552 case '{': t <<
"\\{";
break;
6553 case '}': t <<
"\\}";
break;
6554 case '_': t <<
"\\_";
break;
6555 case ' ':
if (keepSpaces) t <<
"~";
else t <<
' ';
6566 case '#': t <<
"\\#";
break;
6567 case '$': t <<
"\\$";
break;
6568 case '%': t <<
"\\%";
break;
6569 case '^': t <<
"$^\\wedge$";
break;
6573 while ((*q >=
'a' && *q <=
'z') || (*q >=
'A' && *q <= 'Z') || (*q >=
'0' && *q <=
'9'))
6599 case '*': t <<
"$\\ast$";
break;
6600 case '_':
if (!insideTabbing) t <<
"\\+";
6602 if (!insideTabbing) t <<
"\\+";
6604 case '{': t <<
"\\{";
break;
6605 case '}': t <<
"\\}";
break;
6606 case '<': t <<
"$<$";
break;
6607 case '>': t <<
"$>$";
break;
6608 case '|': t <<
"$\\vert$";
break;
6609 case '~': t <<
"$\\sim$";
break;
6615 case ']':
if (pc==
'[') t <<
"$\\,$";
6621 case '-': t <<
"-\\/";
6623 case '\\': t <<
"\\textbackslash{}";
6625 case '"': t <<
"\\char`\\\"{}";
6627 case '\'': t <<
"\\textquotesingle{}";
6629 case ' ':
if (keepSpaces) {
if (insideTabbing) t <<
"\\>";
else t <<
'~'; }
else t <<
' ';
6634 if (!insideTabbing &&
6635 ((c>=
'A' && c<=
'Z' && pc!=
' ' && pc!=
'\0' && *p) || (c==
':' && pc!=
':') || (pc==
'.' &&
isId(c)))
6659 case '|': t <<
"\\texttt{\"|}";
break;
6660 case '!': t <<
"\"!";
break;
6661 case '%': t <<
"\\%";
break;
6662 case '{': t <<
"\\lcurly{}";
break;
6663 case '}': t <<
"\\rcurly{}";
break;
6664 case '~': t <<
"````~";
break;
6670 while ((c=*p) && c!=
'|' && c!=
'!' && c!=
'%' && c!=
'{' && c!=
'}' && c!=
'~')
6680 return result.
data();
6695 case '!': t <<
"\"!";
break;
6696 case '"': t <<
"\"\"";
break;
6697 case '@': t <<
"\"@";
break;
6698 case '|': t <<
"\\texttt{\"|}";
break;
6699 case '[': t <<
"[";
break;
6700 case ']': t <<
"]";
break;
6701 case '{': t <<
"\\lcurly{}";
break;
6702 case '}': t <<
"\\rcurly{}";
break;
6708 while ((c=*p) && c!=
'"' && c!=
'@' && c!=
'[' && c!=
']' && c!=
'!' && c!=
'{' && c!=
'}' && c!=
'|')
6718 return result.
data();
6732 case '\\': t <<
"\\textbackslash{}";
break;
6733 case '{': t <<
"\\{";
break;
6734 case '}': t <<
"\\}";
break;
6740 return result.
data();
6746 static QCString g_nextTag(
"AAAAAAAAAA" );
6747 static QDict<QCString> g_tagDict( 5003 );
6749 g_tagDict.setAutoDelete(
TRUE);
6763 g_tagDict.
insert( key, tag );
6766 char* nxtTag = g_nextTag.
rawData() + g_nextTag.
length() - 1;
6767 for (
unsigned int i = 0; i < g_nextTag.
length(); ++i, --nxtTag )
6769 if ( ( ++(*nxtTag) ) >
'Z' )
6815 if (i>0 && ns==scope.
left(i))
break;
6825 result=result.
mid(i+1);
6830 result=result.
mid(i+1);
6838 static QRegExp wordExp(
"[a-z_A-Z\\x80-\\xFF]+");
6840 while ((i=wordExp.
match(s,p,&l))!=-1)
6850 static QRegExp wordExp(
"[a-z_A-Z\\x80-\\xFF]+");
6852 while ((i=wordExp.
match(s,p,&l))!=-1)
6856 if (i>0 && isspace((
uchar)s.
at(i-1)))
6858 else if (i+l<(
int)s.
length() && isspace(s.
at(i+l)))
6878 const char *
p = s.
data();
6886 if (c==
' ' || c==
'\t' || c==
'\r') i++;
6887 else if (c==
'\n') i++,li=i,docLine++;
6897 if (c==
' ' || c==
'\t' || c==
'\r') b--;
6898 else if (c==
'\n') bi=
b,b--;
6903 if (li==-1 && bi==-1)
return s;
6908 if (bi<=li)
return 0;
6909 return s.
mid(li,bi-li);
6920 static QRegExp wordPattern(
"[a-z_A-Z\\x80-\\xFF][a-z_A-Z0-9\\x80-\\xFF]*");
6922 while ((i=wordPattern.
match(str,p,&
l))!=-1)
6979 if (extName.
at(0)!=
'.') extName.
prepend(
".");
6988 err(
"Failed to assign extension %s to parser %s for language %s\n",
7063 int i = fileName.
findRev(
'.');
7106 if (qualifierIndex!=-1)
7108 explicitScopePart = name.
left(qualifierIndex);
7110 name = name.
mid(qualifierIndex+2);
7114 int minDistance = 10000;
7129 if (distance!=-1 && distance<minDistance)
7144 if (distance!=-1 && distance<minDistance)
7159 if (bestMatch && bestMatch->
isTypedef())
7171 if (((
uchar)c&0xE0)==0xC0)
7175 if (((
uchar)c&0xF0)==0xE0)
7179 if (((
uchar)c&0xF8)==0xF0)
7183 if (((
uchar)c&0xFC)==0xF8)
7187 if (((
uchar)c&0xFE)==0xFC)
7198 if (startPos>=len)
return len;
7199 char c = utf8Str[startPos];
7202 if (((
uchar)c&0xE0)==0xC0)
7206 if (((
uchar)c&0xF0)==0xE0)
7210 if (((
uchar)c&0xF8)==0xF0)
7214 if (((
uchar)c&0xFC)==0xF8)
7218 if (((
uchar)c&0xFE)==0xFC)
7225 static QRegExp re1(
"&#[0-9]+;");
7226 static QRegExp re2(
"&[A-Z_a-z]+;");
7228 int i1 = re1.
match(utf8Str,startPos,&l1);
7229 int i2 = re2.
match(utf8Str,startPos,&l2);
7239 return startPos+
bytes;
7258 bool addEllipsis=
FALSE;
7262 if (charCnt>=80)
break;
7269 if (result.
at(i)>=0 && isspace(result.
at(i)))
7273 else if (result.
at(i)==
',' ||
7274 result.
at(i)==
'.' ||
7281 if (addEllipsis || charCnt==100) result=result.
left(i)+
"...";
7282 return result.
data();
7316 while ((c=*p) &&
isId(c)) p++;
7342 char c = argList.
at(i);
7343 if (c==
',' && (i==0 || argList.
at(i-1)!=
'\\'))
7348 else if (c==
'@' || c==
'\\')
7365 if (markerStart==0 && aliasValue.
at(i)==
'\\')
7369 else if (markerStart>0 && aliasValue.
at(i)>=
'0' && aliasValue.
at(i)<=
'9')
7376 if (markerStart>0 && markerEnd>markerStart)
7378 int markerLen = markerEnd-markerStart;
7380 atoi(aliasValue.
mid(markerStart,markerLen)),markerLen+1));
7392 if (markerStart>0 && markerEnd>markerStart)
7394 int markerLen = markerEnd-markerStart;
7396 atoi(aliasValue.
mid(markerStart,markerLen)),markerLen+1));
7404 for (i=0;i<(
int)markerList.
count();i++)
7407 result+=aliasValue.
mid(p,m->
pos-p);
7417 result+=aliasValue.
right(l-p);
7431 const char *
p = s.
data();
7435 if (c==
',' && pc!=
'\\')
7447 return result.
data();
7453 static QRegExp cmdPat(
"[\\\\@][a-z_A-Z][a-z_A-Z0-9]*");
7456 while ((i=cmdPat.
match(value,p,&
l))!=-1)
7458 result+=value.
mid(p,i-p);
7460 bool hasArgs = !args.
isEmpty();
7461 int argsLen = args.
length();
7471 if (numArgs>1 && aliasText==0)
7477 cmd = cmdNoArgs+
"{1}";
7497 if (hasArgs) p+=argsLen+2;
7502 result+=value.
mid(i,
l);
7520 char c = argList.
at(i);
7521 if (c==
',' && (i==0 || argList.
at(i-1)!=
'\\')) count++;
7522 else if (c==
'@' || c==
'\\')
7537 if (args.
at(pos)==
'{')
7543 if (args.
at(i)==
'{') bc++;
7544 if (args.
at(i)==
'}') bc--;
7545 prevChar=args.
at(i);
7555 return args.
mid(pos+1,i-pos-1);
7591 for (;(a=ali.
current());++ali)
7610 #ifdef TRACINGSUPPORT 7611 void *backtraceFrames[128];
7612 int frameCount = backtrace(backtraceFrames, 128);
7613 static char cmd[40960];
7615 p += sprintf(p,
"/usr/bin/atos -p %d ", (
int)getpid());
7616 for (
int x = 0;
x < frameCount;
x++)
7618 p += sprintf(p,
"%p ", backtraceFrames[
x]);
7620 fprintf(
stderr,
"========== STACKTRACE START ==============\n");
7621 if (FILE *
fp = popen(cmd,
"r"))
7624 while (
size_t len = fread(resBuf, 1,
sizeof(resBuf),
fp))
7626 fwrite(resBuf, 1, len,
stderr);
7630 fprintf(
stderr,
"============ STACKTRACE END ==============\n");
7636 const char *inputEncoding,
const char *outputEncoding)
7638 if (inputEncoding==0 || outputEncoding==0)
return size;
7639 if (
qstricmp(inputEncoding,outputEncoding)==0)
return size;
7641 if (cd==(
void *)(-1))
7643 err(
"unsupported character conversion: '%s'->'%s': %s\n" 7644 "Check the INPUT_ENCODING setting in the config file!\n",
7645 inputEncoding,outputEncoding,strerror(
errno));
7648 int tmpBufSize=size*4+1;
7649 BufStr tmpBuf(tmpBufSize);
7651 size_t oLeft=tmpBufSize;
7652 char *srcPtr = srcBuf.
data();
7653 char *dstPtr = tmpBuf.
data();
7657 newSize = tmpBufSize-(
int)oLeft;
7659 strncpy(srcBuf.
data(),tmpBuf.
data(),newSize);
7664 err(
"%s: failed to translate characters from %s to %s: check INPUT_ENCODING\n",
7665 fileName,inputEncoding,outputEncoding);
7688 err(
"could not open file %s\n",fileName);
7696 err(
"problems while reading file %s\n",fileName);
7707 err(
"could not execute filter %s\n",filterName.
data());
7710 const int bufSize=1024;
7713 while ((numRead=(
int)fread(buf,1,bufSize,f))>0)
7716 inBuf.
addArray(buf,numRead),size+=numRead;
7726 ((inBuf.
at(0)==-1 && inBuf.
at(1)==-2) ||
7727 (inBuf.
at(0)==-2 && inBuf.
at(1)==-1)
7752 size=inBuf.
curPos()-start;
7768 static QRegExp re(
"%[A-Z_a-z]");
7770 while ((i=re.
match(title,p,&l))!=-1)
7772 tf+=title.
mid(p,i-p);
7773 tf+=title.
mid(i+1,l-1);
7800 int i=pattern.
find(
'=');
7801 if (i!=-1) pattern=pattern.
left(i);
7803 #if defined(_WIN32) || defined(__MACOSX__) // Windows or MacOSX 7808 found = re.
match(fn)!=-1 ||
7820 #if 0 // move to HtmlGenerator::writeSummaryLink 7821 void writeSummaryLink(
OutputList &ol,
const char *
label,
const char *title,
7822 bool &first,
const char *
file)
7852 static bool extLinksInWindow =
Config_getBool(
"EXT_LINKS_IN_WINDOW");
7853 if (extLinksInWindow)
return "target=\"_blank\" ";
else return "";
7866 if (!relPath.
isEmpty() && l>0 && result.
at(0)==
'.')
7872 result.
prepend(
"doxygen=\""+ref+
":");
7875 if (l>0 && result.
at(l-1)!=
'/') result+=
'/';
7876 if (!href) result.
append(
"\" ");
7907 fprintf(
stderr,
"Warning: Cannot open file %s for writing\n",data->
name);
7923 if (s.
isEmpty())
return result;
7924 static QRegExp re(
"##[0-9A-Fa-f][0-9A-Fa-f]");
7925 static const char hex[] =
"0123456789ABCDEF";
7930 while ((i=re.
match(s,
p,&l))!=-1)
7932 result+=s.
mid(
p,i-
p);
7934 #define HEXTONUM(x) (((x)>='0' && (x)<='9') ? ((x)-'0') : \ 7935 ((x)>='a' && (x)<='f') ? ((x)-'a'+10) : \ 7936 ((x)>='A' && (x)<='F') ? ((x)-'A'+10) : 0) 7942 pow(level/255.0,gamma/100.0),&r,&g,&b);
7943 red = (
int)(r*255.0);
7944 green = (
int)(g*255.0);
7945 blue = (
int)(b*255.0);
7948 colStr[1]=hex[red>>4];
7949 colStr[2]=hex[red&0xf];
7950 colStr[3]=hex[green>>4];
7951 colStr[4]=hex[green&0xf];
7952 colStr[5]=hex[blue>>4];
7953 colStr[6]=hex[blue&0xf];
7975 char *buffer =
new char[fi.
size()];
7983 err(
"could not write to file %s\n",dest.
data());
7989 err(
"could not open user specified file %s\n",src.
data());
8005 int m1 = text.
find(marker);
8006 if (m1==-1)
return result;
8008 if (m2==-1)
return result;
8012 while (!found && (i=text.
find(
'\n',p))!=-1)
8014 found = (p<=m1 && m1<i);
8021 while ((i=text.
find(
'\n',p))!=-1)
8088 url.
left(5)!=
"http:" && url.
left(6)!=
"https:" &&
8089 url.
left(4)!=
"ftp:" && url.
left(5)!=
"file:")
8104 (prot==
Private && extractPrivate) ||
8105 (prot==
Package && extractPackage);
8116 const char *
p=s.
data();
8119 int minIndent=1000000;
8120 bool searchIndent=
TRUE;
8124 if (c==
'\t') indent+=tabSize - (indent%tabSize);
8125 else if (c==
'\n') indent=0,searchIndent=
TRUE;
8126 else if (c==
' ') indent++;
8127 else if (searchIndent)
8130 if (indent<minIndent) minIndent=
indent;
8135 if (minIndent==0)
return s;
8148 else if (indent<minIndent)
8152 int newIndent = indent+tabSize-(indent%tabSize);
8173 return result.
data();
8182 return ( ((allExternals && fd->
isLinkable()) ||
8191 static bool referencedByRelation =
Config_getBool(
"REFERENCED_BY_RELATION");
8192 static bool referencesRelation =
Config_getBool(
"REFERENCES_RELATION");
8242 const int length = s.
length();
8243 if (idx >= length) {
return 0; }
8245 if ( c0 < 0xC2 || c0 >= 0xF8 )
8249 if (idx+1 >= length) {
return 0; }
8253 return ((c0 & 0x1f) << 6) | c1;
8255 if (idx+2 >= length) {
return 0; }
8259 return ((c0 & 0x0f) << 12) | (c1 << 6) | c2;
8261 if (idx+3 >= length) {
return 0; }
8264 return ((c0 & 0x07) << 18) | (c1 << 12) | (c2 << 6) | c3;
8279 return v < 0x7f ? tolower( v ) : v;
8294 return v < 0x7f ? toupper( v ) : v;
8305 for (cnli.toFirst();(cnd=cnli.current());++cnli)
8307 if (cnd->isLinkableInProject() && cnd->localName().find(
'@')==-1)
8321 for (;(cd=
cli.current());++
cli)
8323 if (cd->isLinkableInProject() && cd->templateMaster()==0)
8346 if (re.
match(docs,0,&l)==0)
8350 bool input = inPos!=-1 && inPos<
l;
8351 bool output = outPos!=-1 && outPos<
l;
8352 if (input || output)
8355 if (input && output)
return "[in,out]";
8356 else if (input)
return "[in]";
8357 else if (output)
return "[out]";
8387 *outListType1=inListType;
8573 if (filePatternList.
isEmpty())
8578 for (;it.current();++it)
8581 pattern += it.currentKey();
8590 bool fileOpened=
FALSE;
8591 bool writeToStdout=(outFile[0]==
'-' && outFile[1]==
'\0');
8603 if (backup.exists())
8604 dir.
remove(backup.fileName());
int findParameterList(const QCString &name)
static QDict< RefList > * xrefLists
Traverses directory structures and contents in a platform-independent way.
QCString convertToXML(const char *s)
static QString cleanDirPath(const QString &dirPath)
static int transcodeCharacterBuffer(const char *fileName, BufStr &srcBuf, int size, const char *inputEncoding, const char *outputEncoding)
static GroupSDict * groupSDict
Q_EXPORT int qstrncmp(const char *str1, const char *str2, uint len)
static MemberNameSDict * functionNameSDict
static void getResolvedSymbol(Definition *scope, FileDef *fileScope, Definition *d, const QCString &explicitScopePart, ArgumentList *actTemplParams, int &minDistance, ClassDef *&bestMatch, MemberDef *&bestTypedef, QCString &bestTemplSpec, QCString &bestResolvedType)
QCString prefix
type prefix for the name
void generateFileRef(OutputDocInterface &od, const char *name, const char *text)
static QCString substTypedef(Definition *scope, FileDef *fileScope, const QCString &name, MemberDef **pTypeDef=0)
QCString getCanonicalTemplateSpec(Definition *d, FileDef *fs, const QCString &spec)
void setAnchors(MemberList *ml)
FileDef * getFileDef() const
QCString title
display name of the entity
QCString fileToString(const char *name, bool filter, bool isSourceCode)
QCString substituteKeywords(const QCString &s, const char *title, const char *projName, const char *projNum, const char *projBrief)
virtual void disable(OutputGenerator::OutputType o)=0
virtual bool isLinkable() const =0
This class represents an function or template argument list.
Concrete visitor implementation for TEXT output.
bool isTypedefValCached() const
QList< ArgumentList > * copyArgumentLists(const QList< ArgumentList > *srcLists)
QCString stripWhiteSpace() const
bool isLinkableInProject() const
static Definition * followPath(Definition *start, FileDef *fileScope, const QCString &path)
static QCString aliasName
static int findScopePattern(const QCString &pattern, const QCString &s, int p, int *len)
int isAccessibleFrom(Definition *scope, FileDef *fileScope, Definition *item)
virtual void writeNonBreakableSpace(int)=0
bool matchArguments2(Definition *srcScope, FileDef *srcFileScope, ArgumentList *srcAl, Definition *dstScope, FileDef *dstFileScope, ArgumentList *dstAl, bool checkCV)
BaseClassList * subClasses() const
virtual QCString getReference() const
static bool findOperator(const QCString &s, int i)
bool readInputFile(const char *fileName, BufStr &inBuf, bool filter, bool isSourceCode)
read a file name fileName and optionally filter and transcode it
bool openOutputFile(const char *outFile, QFile &f)
static void stripIrrelevantString(QCString &target, const QCString &str)
static QDict< Definition > g_visitedNamespaces
void addStr(const char *s)
QCString generateMarker(int id)
static constexpr double g
bool resolveLink(const char *scName, const char *lr, bool, Definition **resContext, QCString &resAnchor)
virtual QCString trOverloadText()=0
static PageSDict * exampleSDict
virtual bool remove(const QString &fileName, bool acceptAbsPath=TRUE)
QCString getReference() const
QCString escapeCharsInString(const char *name, bool allowDots, bool allowUnderscore)
The QRegExp class provides pattern matching using regular expressions or wildcards.
bool fileVisibleInIndex(FileDef *fd, bool &genSourceFile)
virtual void pushGeneratorState()=0
void startConstraintDocs()
QCString convertCharEntitiesToUTF8(const QCString &s)
OutputDocInterface & m_od
void append(const type *d)
FILE * portable_popen(const char *name, const char *type)
virtual void writeBreak(int indent) const =0
void mergeArguments(ArgumentList *srcAl, ArgumentList *dstAl, bool forceNameOverwrite)
const char * portable_getenv(const char *variable)
bool generateSourceFile() const
int guessSection(const char *name)
void setMemberGroup(MemberGroup *grp)
static QCString htmlFileExtension
void writeString(const char *text)
bool generateDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const char *exampleName=0, bool singleLine=FALSE, bool linkFromIndex=FALSE)
virtual QCString trPageAbbreviation()=0
void setLanguage(SrcLangExt lang)
ArgumentList * templateArguments() const
void disableAllBut(OutputGenerator::OutputType o)
void writeLink(const char *extRef, const char *file, const char *anchor, const char *text) const
bool save(const char *fileName)
QCString argListToString(ArgumentList *al, bool useCanonicalType, bool showDefVals)
static QDict< void > aliasesProcessed
void writePageRef(OutputDocInterface &od, const char *cn, const char *mn)
DocSymbol::SymType name2sym(const QCString &symName) const
Give code of the requested HTML entity name.
void setRefItems(const QList< ListItemInfo > *sli)
void setAutoDelete(bool val)
QCString stripAnonymousNamespaceScope(const QCString &s)
size_t portable_iconv(void *cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
NamespaceSDict * getUsedNamespaces() const
void writeTypeConstraints(OutputList &ol, Definition *d, ArgumentList *al)
static constexpr double fs
QList< ListItemInfo > * m_sli
The QDate class provides date functions.
bool leftScopeMatch(const QCString &scope, const QCString &name)
static void hsl2rgb(double h, double s, double l, double *pRed, double *pGreen, double *pBlue)
MemberList * enumFieldList() const
bool isLinkableInProject() const
QCString latexEscapeIndexChars(const char *s, bool insideTabbing)
virtual void popGeneratorState()=0
RefItem * getRefItem(int todoItemId)
bool copyFile(const QCString &src, const QCString &dest)
static QCString className
static QDict< MemberDef > g_resolvedTypedefs
int readBlock(char *data, uint len)
static int findEndOfCommand(const char *s)
#define Config_getList(val)
static FileNameDict * inputNameDict
QCString resolveAliasCmd(const QCString aliasCmd)
QCString left(uint len) const
static QCString stripDeclKeywords(const QCString &s)
uint getUtf8CodeToLower(const QCString &s, int idx)
Returns one unicode character as an unsigned integer from utf-8 string, making the character lower ca...
bool stripPrefix(const char *prefix)
DocRoot * validatingParseDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const char *input, bool indexWords, bool isExample, const char *exampleName, bool singleLine, bool linkFromIndex)
void writeColoredImgData(const char *dir, ColoredImgDataItem data[])
static HtmlEntityMapper * instance()
QCString getOverloadDocs()
virtual bool isReference() const
bool insert(const char *k, const type *d, int c=1, int p=0)
bool protectionLevelVisible(Protection prot)
QCString convertToLaTeX(const QCString &s, bool insideTabbing, bool keepSpaces)
void endConstraintParam()
QTextStream & hex(QTextStream &s)
QCString relativePathToRoot(const char *name)
Simplified and optimized version of QTextStream.
int errno
Contains the last error code.
QDir dir(bool absPath=FALSE) const
int find(char c, int index=0, bool cs=TRUE) const
NamespaceSDict * getUsedNamespaces() const
static QCString getCanonicalTypeForIdentifier(Definition *d, FileDef *fs, const QCString &word, QCString *tSpec, int count=0)
MemberDef * getMemberFromSymbol(Definition *scope, FileDef *fileScope, const char *n)
const char * latex(DocSymbol::SymType symb) const
Access routine to the LaTeX code of the HTML entity.
void setName(const QString &name)
virtual QCString getOutputFileBase() const =0
const char * groupTitle() const
bool namespaceHasVisibleChild(NamespaceDef *nd, bool includeClasses)
bool hasCallerGraph() const
GroupList * partOfGroups() const
void append(const char *key, const T *d)
static constexpr double mg
QCString correctURL(const QCString &url, const QCString &relPath)
QCString getReference() const
int findRev(char c, int index=-1, bool cs=TRUE) const
QCString getFileFilter(const char *name, bool isSourceCode)
MemberDef * memberDefinition() const
virtual void writeString(const char *, bool) const =0
QCString removeAnonymousScopes(const QCString &s)
bool parseText(const QCString &textStr)
void initDefaultExtensionMapping()
void setFileName(const char *name)
static StringDict aliasDict
QCString getDefFileName() const
ClassDef * getClass(const char *n)
void writeBreak(int indent) const
static QCString replaceAliasArguments(const QCString &aliasValue, const QCString &argList)
QCString extractBlock(const QCString text, const QCString marker)
QCString transcodeCharacterStringToUTF8(const QCString &input)
bool isTemplateArgument() const
QCString extractDirection(QCString &docs)
#define Config_getEnum(val)
static QCString stripFromPath(const QCString &path, QStrList &l)
QString absFilePath() const
QCString convertToId(const char *s)
bool hasCallGraph() const
int portable_iconv_close(void *cd)
#define Config_getInt(val)
FileDef * getFileDef() const
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
static NamespaceSDict * namespaceSDict
QCString substituteTemplateArgumentsInString(const QCString &name, ArgumentList *formalArgs, ArgumentList *actualArgs)
static NamespaceDef * globalScope
bool rightScopeMatch(const QCString &scope, const QCString &name)
static ParserManager * parserManager
QCString stripTemplateSpecifiersFromScope(const QCString &fullName, bool parentOnly, QCString *pLastScopeStripped)
virtual DefType definitionType() const =0
QCString showFileDefMatches(const FileNameDict *fnDict, const char *n)
This class contains the information about the argument of a function or template. ...
const char * typeString() const
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
void push(Definition *scope, FileDef *fileScope, Definition *item, const QCString &expScope)
uint getUtf8CodeToUpper(const QCString &s, int idx)
Returns one unicode character as ian unsigned interger from utf-8 string, making the character upper ...
static SrcLangExt language
static StringDict tagDestinationDict
static QCString extractCanonicalArgType(Definition *d, FileDef *fs, const Argument *arg)
int writeBlock(const char *data, uint len)
bool findAndRemoveWord(QCString &s, const QCString &word)
const char * data() const
static QCString escapeCommas(const QCString &s)
virtual bool mkdir(const QString &dirName, bool acceptAbsPath=TRUE) const
MemberDef * getEnumScope() const
void setTime_t(uint secsSince1Jan1970UTC)
static QCString getFilterFromList(const char *name, const QStrList &filterList, bool &found)
static SearchIndexIntf * searchIndex
Q_EXPORT uint qstrlen(const char *str)
const QCString & name() const
bool recursivelyAddGroupListToTitle(OutputList &ol, Definition *d, bool root)
static QDate currentDate()
static Protection baseProt
int qstricmp(const char *str1, const char *str2)
static ClassDef * getResolvedClassRec(Definition *scope, FileDef *fileScope, const char *n, MemberDef **pTypeDef, QCString *pTemplSpec, QCString *pResolvedType)
int countAliasArguments(const QCString argList)
FindFileCacheElem(FileDef *fd, bool ambig)
QCString getCachedTypedefTemplSpec() const
QCString parseCommentAsText(const Definition *scope, const MemberDef *md, const QCString &doc, const QCString &fileName, int lineNr)
static QCString expandAliasRec(const QCString s, bool allowRecursion=FALSE)
bool containsWord(const QCString &s, const QCString &word)
void writeString(const char *s, bool keepSpaces) const
void pushGeneratorState()
QCString stripExtensionGeneral(const char *fName, const char *ext)
static const char constScope[]
bool getDefs(const QCString &scName, const QCString &mbName, const char *args, MemberDef *&md, ClassDef *&cd, FileDef *&fd, NamespaceDef *&nd, GroupDef *&gd, bool forceEmptyScope, FileDef *currentFile, bool checkCV, const char *forceTagFile)
bool isLinkableInProject() const
void addArray(const char *a, int len)
QCString linkToText(SrcLangExt lang, const char *link, bool isFileName)
static constexpr double m2
static bool matchArgument(const Argument *srcA, const Argument *dstA, const QCString &className, const QCString &namespaceName, NamespaceSDict *usingNamespaces, SDict< Definition > *usingClasses)
virtual bool rename(const QString &name, const QString &newName, bool acceptAbsPaths=TRUE)
void MD5Buffer(const unsigned char *buf, unsigned int len, unsigned char sig[16])
virtual QCString trDateTime(int year, int month, int day, int dayOfWeek, int hour, int minutes, int seconds, bool includeTime)=0
QCString convertToHtml(const char *s, bool keepEntities)
QCString right(uint len) const
SrcLangExt getLanguage() const
QCString convertToJSString(const char *s)
virtual void endPageRef(const char *, const char *)=0
const char * writeUtf8Char(FTextStream &t, const char *s)
static DirSDict * directories
virtual void addWord(const char *word, bool hiPriority)=0
void stripIrrelevantConstVolatile(QCString &s)
bool find(Definition *scope, FileDef *fileScope, Definition *item)
virtual void docify(const char *s)=0
FileDef * findFileDef(const FileNameDict *fnDict, const char *n, bool &ambig)
void startConstraintParam()
uint64 toUInt64(bool *ok=0) const
virtual void lineBreak(const char *style)=0
bool accessibleViaUsingNamespace(const NamespaceSDict *nl, FileDef *fileScope, Definition *item, const QCString &explicitScopePart="")
bool classHasVisibleChildren(ClassDef *cd)
QCString stripIndentation(const QCString &s)
static void print(DebugMask mask, int prio, const char *fmt,...)
static QDict< DefinitionIntf > * symbolMap
void stringToArgumentList(const char *argsString, ArgumentList *al, QCString *extraTypeChars)
QCString & prepend(const char *s)
static bool findOperator2(const QCString &s, int i)
static const char virtualScope[]
void disable(OutputGenerator::OutputType o)
uint getUtf8Code(const QCString &s, int idx)
Get one unicode character as an unsigned integer from utf-8 string.
QCString latexEscapeLabelName(const char *s, bool insideTabbing)
void append(const type *d)
static SectionDict * sectionDict
Marker(int p, int n, int s)
bool updateLanguageMapping(const QCString &extension, const QCString &language)
A bunch of utility functions.
static PageSDict * pageSDict
void initFilePattern(void)
static void findMembersWithSpecificName(MemberName *mn, const char *args, bool checkStatics, FileDef *currentFile, bool checkCV, const char *forceTagFile, QList< MemberDef > &members)
const char * data() const
void addGroupListToTitle(OutputList &ol, Definition *d)
void addImageFile(const char *name)
CodeOutputInterface * code
QCString dateToString(bool includeTime)
#define Config_getString(val)
void * portable_iconv_open(const char *tocode, const char *fromcode)
static QIntDict< MemberGroupInfo > memGrpInfoDict
double distance(double x1, double y1, double z1, double x2, double y2, double z2)
bool isStrongEnumValue() const
void startConstraintType()
#define Config_getBool(val)
void setReference(const char *r)
QCString latexEscapePDFString(const char *s)
ClassDef * getClassDef() const
static bool matchArgument2(Definition *srcScope, FileDef *srcFileScope, Argument *srcA, Definition *dstScope, FileDef *dstFileScope, Argument *dstA)
static constexpr double ps
QCString getDotImageExtension(void)
int getPrefixIndex(const QCString &name)
double gamma(double KE, const simb::MCParticle *part)
virtual QCString qualifiedName() const
void addPage(PageDef *def)
QCString & insert(uint index, const char *s)
void warn(const char *file, int line, const char *fmt,...)
ClassDef * getCachedTypedefVal() const
void initClassHierarchy(ClassSDict *cl)
QCString name
name of the entity containing the reference
void err(const char *fmt,...)
void filterLatexString(FTextStream &t, const char *str, bool insideTabbing, bool insidePre, bool insideItem, bool keepSpaces)
static QCache< FindFileCacheElem > g_findFileDefCache(5000)
virtual void writeObjectLink(const char *ref, const char *file, const char *anchor, const char *name)=0
SDict< Definition > * getUsedClasses() const
QCString absFilePath() const
void extractNamespaceName(const QCString &scopeName, QCString &className, QCString &namespaceName, bool allowEmptyClass)
QCString qualifiedNameWithTemplateParameters(QList< ArgumentList > *actualParams=0, int *actualParamIndex=0) const
QCString removeRedundantWhiteSpace(const QCString &s)
int extractClassNameFromType(const QCString &type, int &pos, QCString &name, QCString &templSpec, SrcLangExt lang)
Buffer used to store strings.
QCString mid(uint index, uint len=0xffffffff) const
QCString getOutputFileBase() const
bool portable_fileSystemIsCaseSensitive()
The QDateTime class provides date and time functions.
void writeExample(OutputList &ol, ExampleSDict *ed)
int match(const QCString &str, int index=0, int *len=0, bool indexIsStart=TRUE) const
The QFile class is an I/O device that operates on files.
int nextUtf8CharPosition(const QCString &utf8Str, int len, int startPos)
NamespaceSDict * getNamespaceSDict() const
ClassDef * categoryOf() const
QCString & sprintf(const char *format,...)
bool checkIfTypedef(Definition *scope, FileDef *fileScope, const char *n)
SDict< Definition > * getUsedClasses() const
QCString getOutputFileBase() const
static struct Lang2ExtMap g_lang2extMap[]
void setRefItems(const QList< ListItemInfo > *sli)
virtual Definition * getOuterScope() const
GroupDef * getGroupDef() const
void addDocCrossReference(MemberDef *src, MemberDef *dst)
ArgumentList * argumentList() const
virtual void startPageRef()=0
virtual Definition * findInnerCompound(const char *name)
NamespaceDef * getResolvedNamespace(const char *name)
bool showInCallGraph() const
void addCodeOnlyMappings()
MemberDef * memberDeclaration() const
SrcLangExt getLanguageFromFileName(const QCString fileName)
QCString qualifiedName() const
bool isVisibleInHierarchy()
type * find(const char *k, bool ref=TRUE) const
static Definition * endOfPathIsUsedClass(SDict< Definition > *cl, const QCString &localName)
void MD5SigToString(unsigned char signature[16], char *str, int len)
int computeQualifiedIndex(const QCString &name)
static MemberNameSDict * memberNameSDict
QCString tempArgListToString(ArgumentList *al, SrcLangExt lang)
void addSourceReferences(MemberDef *d)
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
QCString stripScope(const char *name)
QCString resolveTypeDef(Definition *context, const QCString &qualifiedName, Definition **typedefContext)
bool accessibleViaUsingClass(const SDict< Definition > *cl, FileDef *fileScope, Definition *item, const QCString &explicitScopePart="")
int getMemberGroupId() const
QCString getCachedResolvedTypedef() const
QCString expandAlias(const QCString &aliasName, const QCString &aliasValue)
void addSourceReferencedBy(MemberDef *d)
A model of a page symbol.
static QDateTime currentDateTime()
uint toUInt(bool *ok=0) const
int portable_pclose(FILE *stream)
void push(Definition *scope, FileDef *fileScope, Definition *item)
virtual void writeLink(const char *extRef, const char *file, const char *anchor, const char *text) const =0
static QCString trimScope(const QCString &name, const QCString &s)
void replaceNamespaceAliases(QCString &scope, int i)
static StringDict namespaceAliasDict
QCString convertNameToFile(const char *name, bool allowDots, bool allowUnderscore)
QCString extractAliasArgs(const QCString &args, int pos)
Q_EXPORT char * qstrcpy(char *dst, const char *src)
virtual void setCurrentDoc(Definition *ctx, const char *anchor, bool isSourceFile)=0
const int maxInheritanceDepth
QCString getOutputFileBase() const
QCString substituteClassNames(const QCString &s)
QCString insertTemplateSpecifierInScope(const QCString &scope, const QCString &templ)
Definition * scope
scope to use for references.
static bool isLowerCase(QCString &s)
void cacheTypedefVal(ClassDef *val, const QCString &templSpec, const QCString &resolvedType)
Protection classInheritedProtectionLevel(ClassDef *cd, ClassDef *bcd, Protection prot, int level)
QCString trailingReturnType
bool hasVisibleRoot(BaseClassList *bcl)
void addMembersToMemberGroup(MemberList *ml, MemberGroupSDict **ppMemberGroupSDict, Definition *context)
NamespaceDef * getNamespaceDef() const
void addRefItem(const QList< ListItemInfo > *sli, const char *key, const char *prefix, const char *name, const char *title, const char *args, Definition *scope)
Translator * theTranslator
ArgumentList * deepCopy() const
bool isDocumentationFile() const
static QCString trimTemplateSpecifiers(const QCString &namespaceName, const QCString &className, const QCString &s)
virtual void setDocumentation(const char *d, const char *docFile, int docLine, bool stripWhiteSpace=TRUE)
bool checkExtension(const char *fName, const char *ext)
bool find(Definition *scope, FileDef *fileScope, Definition *item, const QCString &expScope)
void startConstraintList(const char *header)
QCString normalizeNonTemplateArgumentsInString(const QCString &name, Definition *context, const ArgumentList *formalArgs)
void convertProtectionLevel(MemberListType inListType, Protection inProt, int *outListType1, int *outListType2)
void trimBaseClassScope(BaseClassList *bcl, QCString &s, int level=0)
void createSubDirs(QDir &d)
static unsigned filter(unsigned char *out, const unsigned char *in, unsigned w, unsigned h, const LodePNG_InfoColor *info)
virtual QCString trTypeConstraints()=0
QCString replaceColorMarkers(const char *str)
PageDef * addRelatedPage(const char *name, const QCString &ptitle, const QCString &doc, QList< SectionInfo > *, const char *fileName, int startLine, const QList< ListItemInfo > *sli, GroupDef *gd, TagInfo *tagInfo, SrcLangExt lang)
int getScopeFragment(const QCString &s, int p, int *l)
static QCache< LookupInfo > * lookupCache
QCString stripLeadingAndTrailingEmptyLines(const QCString &s, int &docLine)
ClassDef * newResolveTypedef(FileDef *fileScope, MemberDef *md, MemberDef **pMemType, QCString *pTemplSpec, QCString *pResolvedType, ArgumentList *actTemplParams)
ClassSDict * getClassSDict() const
const char * argsString() const
static QDict< int > * htmlDirMap
The QFileInfo class provides system-independent file information.
QCString getOutputFileBase() const
unsigned long long uint64
Q_EXPORT int qstrcmp(const char *str1, const char *str2)
virtual QCString trWriteList(int numEntries)=0
T * find(const char *key)
void linkifyText(const TextGeneratorIntf &out, Definition *scope, FileDef *fileScope, Definition *self, const char *text, bool autoBreak, bool external, bool keepSpaces, int indentLevel)
bool classVisibleInIndex(ClassDef *cd)
bool patternMatch(const QFileInfo &fi, const QStrList *patList)
ClassDef * getResolvedClass(Definition *scope, FileDef *fileScope, const char *n, MemberDef **pTypeDef, QCString *pTemplSpec, bool mayBeUnlinkable, bool mayBeHidden, QCString *pResolvedType)
void writeObjectLink(const char *ref, const char *file, const char *anchor, const char *name)
TextGeneratorOLImpl(OutputDocInterface &od)
void setAutoDelete(bool enable)
static ClassSDict * classSDict
QCString getOutputFileBase() const
QCString mergeScopes(const QCString &leftScope, const QCString &rightScope)
QCString externalLinkTarget()
QCString args
optional arguments for the entity (if function)
void insertIntoList(const char *key, RefItem *item)
byte bytes
Alias for common language habits.
QCString stripFromIncludePath(const QCString &path)
bool matchArguments(ArgumentList *srcAl, ArgumentList *dstAl, const char *cl, const char *ns, bool checkCV, NamespaceSDict *usingNamespaces, SDict< Definition > *usingClasses)
static PageDef * mainPage
std::string nl(std::size_t i=1)
bool generateLink(OutputDocInterface &od, const char *clName, const char *lr, bool inSeeBlock, const char *lt)
constexpr std::enable_if_t< are_cv_compatible< TO, FROM >::value, std::add_pointer_t< std::remove_pointer_t< TO > > > addr(FROM &from)
virtual void accept(DocVisitor *v)=0
QCString stripExtension(const char *fName)
QCString & replace(uint index, uint len, const char *s)
static bool getScopeDefs(const char *docScope, const char *scope, ClassDef *&cd, NamespaceDef *&nd)
QCString localName() const
const char * qPrint(const char *s)
union ptb::content::word::word word
static IndexList * indexList
void dropFromStart(uint bytes)
Portable versions of functions that are platform dependent.
QCString rtfFormatBmkStr(const char *name)
static void initBaseClassHierarchy(BaseClassList *bcl)
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
bool resolveRef(const char *scName, const char *name, bool inSeeBlock, Definition **resContext, MemberDef **resMember, bool lookForSpecialization, FileDef *currentFile, bool checkScope)
static QDict< int > g_extLookup
QCString replaceAnonymousScopes(const QCString &s, const char *replacement)
QCString & append(const char *s)
BaseClassList * baseClasses() const
GroupDef * getGroupDef() const
int minClassDistance(const ClassDef *cd, const ClassDef *bcd, int level)
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
QCString langToString(SrcLangExt lang)
void warn_uncond(const char *fmt,...)
QCString filterTitle(const QCString &title)
QCString stripPath(const char *s)
int isAccessibleFromWithExpScope(Definition *scope, FileDef *fileScope, Definition *item, const QCString &explicitScopePart)
int filterCRLF(char *buf, int len)
static QCString extractCanonicalType(Definition *d, FileDef *fs, QCString type)
void insertMember(MemberDef *md)