util.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  *
4  *
5  * Copyright (C) 1997-2015 by Dimitri van Heesch.
6  *
7  * Permission to use, copy, modify, and distribute this software and its
8  * documentation under the terms of the GNU General Public License is hereby
9  * granted. No representations are made about the suitability of this software
10  * for any purpose. It is provided "as is" without express or implied warranty.
11  * See the GNU General Public License for more details.
12  *
13  * Documents produced by Doxygen are derivative works derived from the
14  * input used in their production; they are not affected by this license.
15  *
16  */
17 
18 #ifndef UTIL_H
19 #define UTIL_H
20 
21 /*! \file
22  * \brief A bunch of utility functions.
23  */
24 
25 #include <qlist.h>
26 #include <ctype.h>
27 #include "types.h"
28 #include "sortdict.h"
29 #include "docparser.h"
30 
31 //--------------------------------------------------------------------
32 
33 class ClassDef;
34 class FileDef;
35 class MemberList;
36 class NamespaceDef;
37 class FileNameDict;
38 class ArgumentList;
39 class OutputList;
40 class OutputDocInterface;
41 class MemberDef;
42 class ExampleSDict;
43 class ClassSDict;
44 class BaseClassList;
45 class GroupDef;
46 class NamespaceSDict;
47 class ClassList;
48 class MemberGroupSDict;
49 struct TagInfo;
51 struct ListItemInfo;
52 class PageDef;
53 struct SectionInfo;
54 class QDir;
55 class Definition;
56 class BufStr;
57 class QFileInfo;
58 class QStrList;
59 class FTextStream;
60 class QFile;
61 
62 //--------------------------------------------------------------------
63 
64 /** Abstract interface for a hyperlinked text fragment. */
66 {
67  public:
68  virtual ~TextGeneratorIntf() {}
69  virtual void writeString(const char *,bool) const = 0;
70  virtual void writeBreak(int indent) const = 0;
71  virtual void writeLink(const char *extRef,const char *file,
72  const char *anchor,const char *text
73  ) const = 0;
74 };
75 
76 /** Implements TextGeneratorIntf for an OutputDocInterface stream. */
78 {
79  public:
80  virtual ~TextGeneratorOLImpl() {}
82  void writeString(const char *s,bool keepSpaces) const;
83  void writeBreak(int indent) const;
84  void writeLink(const char *extRef,const char *file,
85  const char *anchor,const char *text
86  ) const;
87  private:
89 };
90 
91 //--------------------------------------------------------------------
92 
93 /** @brief maps a unicode character code to a list of T::ElementType's
94  */
95 template<class T>
96 class LetterToIndexMap : public SIntDict<T>
97 {
98  public:
100  void append(uint letter,typename T::ElementType *elem)
101  {
102  T *l = SIntDict<T>::find((int)letter);
103  if (l==0)
104  {
105  l = new T(letter);
106  SIntDict<T>::inSort((int)letter,l);
107  }
108  l->append(elem);
109  }
110  private:
111  int compareValues(const T *l1, const T *l2) const
112  {
113  return (int)l1->letter()-(int)l2->letter();
114  }
115 };
116 
117 //--------------------------------------------------------------------
118 
121 
122 //--------------------------------------------------------------------
123 
124 void linkifyText(const TextGeneratorIntf &ol,
125  Definition *scope,
126  FileDef *fileScope,
127  Definition *self,
128  const char *text,
129  bool autoBreak=FALSE,
130  bool external=TRUE,
131  bool keepSpaces=FALSE,
132  int indentLevel=0
133  );
134 
135 void setAnchors(MemberList *ml);
136 
137 QCString fileToString(const char *name,bool filter=FALSE,bool isSourceCode=FALSE);
138 
139 QCString dateToString(bool);
140 
141 bool getDefs(const QCString &scopeName,
142  const QCString &memberName,
143  const char *,
144  MemberDef *&md,
145  ClassDef *&cd,
146  FileDef *&fd,
147  NamespaceDef *&nd,
148  GroupDef *&gd,
149  bool forceEmptyScope=FALSE,
150  FileDef *currentFile=0,
151  bool checkCV=FALSE,
152  const char *forceTagFile=0
153  );
154 
155 QCString getFileFilter(const char* name,bool isSourceCode);
156 
157 bool resolveRef(/* in */ const char *scName,
158  /* in */ const char *name,
159  /* in */ bool inSeeBlock,
160  /* out */ Definition **resContext,
161  /* out */ MemberDef **resMember,
162  /* in */ bool lookForSpecializations = TRUE,
163  /* in */ FileDef *currentFile = 0,
164  /* in */ bool checkScope = FALSE
165  );
166 
167 bool resolveLink(/* in */ const char *scName,
168  /* in */ const char *lr,
169  /* in */ bool inSeeBlock,
170  /* out */ Definition **resContext,
171  /* out */ QCString &resAnchor
172  );
173 
174 //bool generateRef(OutputDocInterface &od,const char *,
175 // const char *,bool inSeeBlock,const char * =0);
176 
177 bool generateLink(OutputDocInterface &od,const char *,
178  const char *,bool inSeeBlock,const char *);
179 
180 void generateFileRef(OutputDocInterface &od,const char *,
181  const char *linkTxt=0);
182 
183 void writePageRef(OutputDocInterface &od,const char *cn,const char *mn);
184 
186 
187 bool matchArguments2(Definition *srcScope,FileDef *srcFileScope,ArgumentList *srcAl,
188  Definition *dstScope,FileDef *dstFileScope,ArgumentList *dstAl,
189  bool checkCV
190  );
191 
192 void mergeArguments(ArgumentList *,ArgumentList *,bool forceNameOverwrite=FALSE);
193 
195 
196 QCString substitute(const QCString &s,const QCString &src,const QCString &dst);
197 
198 QCString clearBlock(const char *s,const char *begin,const char *end);
199 
200 QCString selectBlock(const QCString& s,const QCString &name,bool which);
201 
202 QCString resolveDefines(const char *n);
203 
204 ClassDef *getClass(const char *key);
205 
207  FileDef *fileScope,
208  const char *key,
209  MemberDef **pTypeDef=0,
210  QCString *pTemplSpec=0,
211  bool mayBeUnlinkable=FALSE,
212  bool mayBeHidden=FALSE,
213  QCString *pResolvedType=0);
214 
216 
217 FileDef *findFileDef(const FileNameDict *fnDict,const char *n,
218  bool &ambig);
219 
220 QCString showFileDefMatches(const FileNameDict *fnDict,const char *n);
221 
222 int guessSection(const char *name);
223 
224 inline bool isId(int c)
225 {
226  return c=='_' || c>=128 || c<0 || isalnum(c);
227 }
228 
230 
231 QCString argListToString(ArgumentList *al,bool useCanonicalType=FALSE,bool showDefVals=TRUE);
232 
234 
235 QCString generateMarker(int id);
236 
237 void writeExample(OutputList &ol,ExampleSDict *el);
238 
240 
241 QCString stripFromPath(const QCString &path);
242 
244 
245 bool rightScopeMatch(const QCString &scope, const QCString &name);
246 
247 bool leftScopeMatch(const QCString &scope, const QCString &name);
248 
249 QCString substituteKeywords(const QCString &s,const char *title,
250  const char *projName,const char *projNum,const char *projBrief);
251 
252 int getPrefixIndex(const QCString &name);
253 
255 
256 QCString replaceAnonymousScopes(const QCString &s,const char *replacement=0);
257 
259 
260 bool hasVisibleRoot(BaseClassList *bcl);
262 bool namespaceHasVisibleChild(NamespaceDef *nd,bool includeClasses);
263 bool classVisibleInIndex(ClassDef *cd);
264 
265 int minClassDistance(const ClassDef *cd,const ClassDef *bcd,int level=0);
267 
268 QCString convertNameToFile(const char *name,bool allowDots=FALSE,bool allowUnderscore=FALSE);
269 
270 void extractNamespaceName(const QCString &scopeName,
271  QCString &className,QCString &namespaceName,
272  bool allowEmptyClass=FALSE);
273 
274 QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &templ);
275 
276 QCString stripScope(const char *name);
277 
278 QCString convertToId(const char *s);
279 
280 QCString convertToHtml(const char *s,bool keepEntities=TRUE);
281 
282 QCString convertToLaTeX(const QCString &s,bool insideTabbing=FALSE,bool keepSpaces=FALSE);
283 
284 QCString convertToXML(const char *s);
285 
286 QCString convertToJSString(const char *s);
287 
289 
290 void addMembersToMemberGroup(/* in */ MemberList *ml,
291  /* in,out */ MemberGroupSDict **ppMemberGroupSDict,
292  /* in */ Definition *context);
293 
294 int extractClassNameFromType(const QCString &type,int &pos,
296 
298  const QCString &name,
299  Definition *context,
300  const ArgumentList *formalArgs);
301 
303  const QCString &name,
304  ArgumentList *formalArgs,
305  ArgumentList *actualArgs);
306 
308 
310  bool parentOnly=TRUE,
311  QCString *lastScopeStripped=0);
312 
314  Definition **typedefContext=0);
315 
316 QCString mergeScopes(const QCString &leftScope,const QCString &rightScope);
317 
318 int getScopeFragment(const QCString &s,int p,int *l);
319 
320 int filterCRLF(char *buf,int len);
321 
322 void addRefItem(const QList<ListItemInfo> *sli,const char *prefix,
323  const char *key,
324  const char *name,const char *title,const char *args,Definition *scope);
325 
326 PageDef *addRelatedPage(const char *name,const QCString &ptitle,
327  const QCString &doc,QList<SectionInfo> *anchors,
328  const char *fileName,int startLine,
329  const QList<ListItemInfo> *sli,
330  GroupDef *gd=0,
331  TagInfo *tagInfo=0,
333  );
334 
335 QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscore=FALSE);
336 
338 
339 void filterLatexString(FTextStream &t,const char *str,
340  bool insideTabbing=FALSE,
341  bool insidePre=FALSE,
342  bool insideItem=FALSE,
343  bool keepSpaces=FALSE);
344 
345 QCString latexEscapeLabelName(const char *s,bool insideTabbing);
346 QCString latexEscapeIndexChars(const char *s,bool insideTabbing);
347 QCString latexEscapePDFString(const char *s);
348 
349 QCString rtfFormatBmkStr(const char *name);
350 
351 QCString linkToText(SrcLangExt lang,const char *link,bool isFileName);
352 
353 bool checkExtension(const char *fName, const char *ext);
354 
355 QCString stripExtensionGeneral(const char *fName, const char *ext);
356 
357 QCString stripExtension(const char *fName);
358 
359 void replaceNamespaceAliases(QCString &scope,int i);
360 
361 int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item);
362 
363 int isAccessibleFromWithExpScope(Definition *scope,FileDef *fileScope,Definition *item,
364  const QCString &explicitScopePart);
365 
366 int computeQualifiedIndex(const QCString &name);
367 
369 
370 QCString relativePathToRoot(const char *name);
371 
372 void createSubDirs(QDir &d);
373 
374 QCString stripPath(const char *s);
375 
376 bool containsWord(const QCString &s,const QCString &word);
377 
378 bool findAndRemoveWord(QCString &s,const QCString &word);
379 
381 
382 //void stringToSearchIndex(const QCString &docUrlBase,const QCString &title,
383 // const QCString &str, bool priority=FALSE,
384 // const QCString &anchor="");
385 
386 bool updateLanguageMapping(const QCString &extension,const QCString &parser);
389 void addCodeOnlyMappings();
390 
391 MemberDef *getMemberFromSymbol(Definition *scope,FileDef *fileScope,
392  const char *n);
393 bool checkIfTypedef(Definition *scope,FileDef *fileScope,const char *n);
394 
396  MemberDef **pMemType=0,QCString *pTemplSpec=0,
397  QCString *pResolvedType=0,
398  ArgumentList *actTemplParams=0);
399 
400 QCString parseCommentAsText(const Definition *scope,const MemberDef *member,const QCString &doc,const QCString &fileName,int lineNr);
401 
403 
404 QCString recodeString(const QCString &str,const char *fromEncoding,const char *toEncoding);
405 
407 
408 int countAliasArguments(const QCString argList);
409 
410 //QCString replaceAliasArguments(const QCString &aliasValue,const QCString &argList);
411 
412 QCString resolveAliasCmd(const QCString aliasCmd);
413 QCString expandAlias(const QCString &aliasName,const QCString &aliasValue);
414 
416 
418 
419 void stackTrace();
420 
421 bool readInputFile(const char *fileName,BufStr &inBuf,
422  bool filter=TRUE,bool isSourceCode=FALSE);
424 
425 bool patternMatch(const QFileInfo &fi,const QStrList *patList);
426 
428 QCString externalRef(const QCString &relPath,const QCString &ref,bool href);
429 int nextUtf8CharPosition(const QCString &utf8Str,int len,int startPos);
430 const char *writeUtf8Char(FTextStream &t,const char *s);
431 
432 
433 /** Data associated with a HSV colored image. */
435 {
436  const char *name;
437  unsigned short width;
438  unsigned short height;
439  unsigned char *content;
440  unsigned char *alpha;
441 };
442 
443 void writeColoredImgData(const char *dir,ColoredImgDataItem data[]);
444 QCString replaceColorMarkers(const char *str);
445 
446 bool copyFile(const QCString &src,const QCString &dest);
447 QCString extractBlock(const QCString text,const QCString marker);
448 
449 QCString correctURL(const QCString &url,const QCString &relPath);
450 
452 
454 
456 
458 
459 bool fileVisibleInIndex(FileDef *fd,bool &genSourceFile);
460 
462 
463 uint getUtf8Code( const QCString& s, int idx );
464 uint getUtf8CodeToLower( const QCString& s, int idx );
465 uint getUtf8CodeToUpper( const QCString& s, int idx );
466 
468 
470  MemberListType inListType,
471  Protection inProt,
472  int *outListType1,
473  int *outListType2
474  );
475 
476 bool mainPageHasTitle();
477 void initFilePattern(void);
478 bool openOutputFile(const char *outFile,QFile &f);
479 
480 #endif
481 
static QCString name
Definition: declinfo.cpp:673
void filterLatexString(FTextStream &t, const char *str, bool insideTabbing=FALSE, bool insidePre=FALSE, bool insideItem=FALSE, bool keepSpaces=FALSE)
Definition: util.cpp:6533
Traverses directory structures and contents in a platform-independent way.
Definition: qdir.h:52
void writeTypeConstraints(OutputList &ol, Definition *d, ArgumentList *al)
Definition: util.cpp:7585
QCString escapeCharsInString(const char *name, bool allowDots, bool allowUnderscore=FALSE)
Definition: util.cpp:5242
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
QCString stripScope(const char *name)
Definition: util.cpp:5605
void addDocCrossReference(MemberDef *src, MemberDef *dst)
Definition: util.cpp:8189
unsigned short width
Definition: util.h:437
bool protectionLevelVisible(Protection prot)
Definition: util.cpp:8098
void addRefItem(const QList< ListItemInfo > *sli, const char *prefix, const char *key, const char *name, const char *title, const char *args, Definition *scope)
Definition: util.cpp:6456
QCString argListToString(ArgumentList *al, bool useCanonicalType=FALSE, bool showDefVals=TRUE)
Definition: util.cpp:2151
void writeColoredImgData(const char *dir, ColoredImgDataItem data[])
Definition: util.cpp:7889
This class represents an function or template argument list.
Definition: arguments.h:82
void setAnchors(MemberList *ml)
Definition: util.cpp:2254
This file contains a number of basic enums and types.
static QCString scope
Definition: declinfo.cpp:668
static QCString aliasName
Definition: scanner.cpp:10889
const char * writeUtf8Char(FTextStream &t, const char *s)
Definition: util.cpp:7165
bool leftScopeMatch(const QCString &scope, const QCString &name)
Definition: util.cpp:1904
MemberDef * getMemberFromSymbol(Definition *scope, FileDef *fileScope, const char *n)
Definition: util.cpp:7083
bool classHasVisibleChildren(ClassDef *cd)
Definition: util.cpp:5182
QCString convertToLaTeX(const QCString &s, bool insideTabbing=FALSE, bool keepSpaces=FALSE)
Definition: util.cpp:5812
void stackTrace()
Definition: util.cpp:7608
ClassDef * getClass(const char *key)
Definition: util.cpp:472
void createSubDirs(QDir &d)
Definition: util.cpp:5458
OutputDocInterface & m_od
Definition: util.h:88
unsigned char * alpha
Definition: util.h:440
virtual void writeBreak(int indent) const =0
void extractNamespaceName(const QCString &scopeName, QCString &className, QCString &namespaceName, bool allowEmptyClass=FALSE)
Definition: util.cpp:5478
QCString latexEscapeLabelName(const char *s, bool insideTabbing)
Definition: util.cpp:6647
Definition: types.h:26
FileDef * findFileDef(const FileNameDict *fnDict, const char *n, bool &ambig)
Definition: util.cpp:4963
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition: util.cpp:5088
bool checkIfTypedef(Definition *scope, FileDef *fileScope, const char *n)
Definition: util.cpp:7155
T * find(int key)
Definition: sortdict.h:555
unsigned char * content
Definition: util.h:439
QCString stripLeadingAndTrailingEmptyLines(const QCString &s, int &docLine)
Definition: util.cpp:6876
bool getDefs(const QCString &scopeName, const QCString &memberName, const char *, MemberDef *&md, ClassDef *&cd, FileDef *&fd, NamespaceDef *&nd, GroupDef *&gd, bool forceEmptyScope=FALSE, FileDef *currentFile=0, bool checkCV=FALSE, const char *forceTagFile=0)
Definition: util.cpp:3932
QCString convertToJSString(const char *s)
Definition: util.cpp:5792
void setAutoDelete(bool val)
Definition: sortdict.h:545
void addGroupListToTitle(OutputList &ol, Definition *d)
Definition: util.cpp:6528
void generateFileRef(OutputDocInterface &od, const char *, const char *linkTxt=0)
Definition: util.cpp:4908
QCString stripTemplateSpecifiersFromScope(const QCString &fullName, bool parentOnly=TRUE, QCString *lastScopeStripped=0)
Definition: util.cpp:6226
const bool FALSE
Definition: qglobal.h:370
void mergeArguments(ArgumentList *, ArgumentList *, bool forceNameOverwrite=FALSE)
Definition: util.cpp:3732
void replaceNamespaceAliases(QCString &scope, int i)
Definition: util.cpp:6804
static constexpr double fs
Definition: Units.h:100
QCString langToString(SrcLangExt lang)
Definition: util.cpp:8041
QCString transcodeCharacterStringToUTF8(const QCString &input)
Definition: util.cpp:2374
QCString stripIndentation(const QCString &s)
Definition: util.cpp:8110
QCString convertNameToFile(const char *name, bool allowDots=FALSE, bool allowUnderscore=FALSE)
Definition: util.cpp:5354
static QCString className
Definition: declinfo.cpp:669
Definition: entry.h:50
QCString normalizeNonTemplateArgumentsInString(const QCString &name, Definition *context, const ArgumentList *formalArgs)
Definition: util.cpp:6037
TFile * outFile
Definition: makeDST.cxx:36
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
string dir
QCString stripExtension(const char *fName)
Definition: util.cpp:6799
bool generateLink(OutputDocInterface &od, const char *, const char *, bool inSeeBlock, const char *)
Definition: util.cpp:4866
int isAccessibleFromWithExpScope(Definition *scope, FileDef *fileScope, Definition *item, const QCString &explicitScopePart)
Definition: util.cpp:1051
QCString removeRedundantWhiteSpace(const QCString &s)
Definition: util.cpp:1655
QCString selectBlock(const QCString &s, const QCString &name, bool which)
Definition: htmlgen.cpp:146
QCString dateToString(bool)
Definition: util.cpp:2473
static QCString args
Definition: declinfo.cpp:674
int guessSection(const char *name)
Definition: util.cpp:315
SrcLangExt
Definition: types.h:41
static QStrList * l
Definition: config.cpp:1044
int compareValues(const T *l1, const T *l2) const
Definition: util.h:111
QCString stripPath(const char *s)
Definition: util.cpp:6819
QAsciiDict< Entry > cl
void writePageRef(OutputDocInterface &od, const char *cn, const char *mn)
Definition: util.cpp:247
int filterCRLF(char *buf, int len)
Definition: util.cpp:2284
virtual void writeString(const char *, bool) const =0
QCString stripFromPath(const QCString &path)
Definition: util.cpp:298
virtual ~TextGeneratorOLImpl()
Definition: util.h:80
QCString resolveTypeDef(Definition *d, const QCString &name, Definition **typedefContext=0)
Definition: util.cpp:346
const char * name
Definition: util.h:436
bool checkExtension(const char *fName, const char *ext)
Definition: util.cpp:6784
QCString generateMarker(int id)
Definition: util.cpp:266
ClassDef * newResolveTypedef(FileDef *fileScope, MemberDef *md, MemberDef **pMemType=0, QCString *pTemplSpec=0, QCString *pResolvedType=0, ArgumentList *actTemplParams=0)
Definition: util.cpp:535
static int input(void)
Definition: code.cpp:15695
fileName
Definition: dumpTree.py:9
QCString showFileDefMatches(const FileNameDict *fnDict, const char *n)
Definition: util.cpp:5058
QCString mergeScopes(const QCString &leftScope, const QCString &rightScope)
Definition: util.cpp:6287
bool namespaceHasVisibleChild(NamespaceDef *nd, bool includeClasses)
Definition: util.cpp:8299
QCString extractAliasArgs(const QCString &args, int pos)
Definition: util.cpp:7532
QCString stripFromIncludePath(const QCString &path)
Definition: util.cpp:306
void inSort(int key, const T *d)
Definition: sortdict.h:532
def key(type, name=None)
Definition: graph.py:13
void addCodeOnlyMappings()
Definition: util.cpp:7056
QCString expandAlias(const QCString &aliasName, const QCString &aliasValue)
Definition: util.cpp:7572
bool fileVisibleInIndex(FileDef *fd, bool &genSourceFile)
Definition: util.cpp:8177
std::void_t< T > n
QCString resolveAliasCmd(const QCString aliasCmd)
Definition: util.cpp:7562
QCString stripAnonymousNamespaceScope(const QCString &s)
Definition: util.cpp:218
bool copyFile(const QCString &src, const QCString &dest)
Definition: util.cpp:7966
unsigned short height
Definition: util.h:438
bool matchArguments2(Definition *srcScope, FileDef *srcFileScope, ArgumentList *srcAl, Definition *dstScope, FileDef *dstFileScope, ArgumentList *dstAl, bool checkCV)
Definition: util.cpp:3647
QCString removeAnonymousScopes(const QCString &s)
Definition: util.cpp:164
QCString substituteKeywords(const QCString &s, const char *title, const char *projName, const char *projNum, const char *projBrief)
Definition: util.cpp:5122
QCString recodeString(const QCString &str, const char *fromEncoding, const char *toEncoding)
bool hasVisibleRoot(BaseClassList *bcl)
Definition: util.cpp:5224
p
Definition: test.py:223
SrcLangExt getLanguageFromFileName(const QCString fileName)
Definition: util.cpp:7061
QCString stripExtensionGeneral(const char *fName, const char *ext)
Definition: util.cpp:6789
int getPrefixIndex(const QCString &name)
Definition: util.cpp:5144
void addMembersToMemberGroup(MemberList *ml, MemberGroupSDict **ppMemberGroupSDict, Definition *context)
Definition: util.cpp:5867
NamespaceDef * getResolvedNamespace(const char *key)
Definition: util.cpp:489
QCString convertToId(const char *s)
Definition: util.cpp:5685
int extractClassNameFromType(const QCString &type, int &pos, QCString &name, QCString &templSpec, SrcLangExt=SrcLangExt_Unknown)
Definition: util.cpp:5963
QCString getOverloadDocs()
Definition: util.cpp:5859
QCString substituteTemplateArgumentsInString(const QCString &name, ArgumentList *formalArgs, ArgumentList *actualArgs)
Definition: util.cpp:6099
maps a unicode character code to a list of T::ElementType&#39;s
Definition: util.h:96
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
Definition: util.cpp:7856
void addDirPrefix(QCString &fileName)
QCString replaceColorMarkers(const char *str)
Definition: util.cpp:7919
bool resolveRef(const char *scName, const char *name, bool inSeeBlock, Definition **resContext, MemberDef **resMember, bool lookForSpecializations=TRUE, FileDef *currentFile=0, bool checkScope=FALSE)
Definition: util.cpp:4479
bool rightScopeMatch(const QCString &scope, const QCString &name)
Definition: util.cpp:1893
void initClassHierarchy(ClassSDict *cl)
Definition: util.cpp:5211
QCString getFileFilter(const char *name, bool isSourceCode)
Definition: util.cpp:2345
QCString extractDirection(QCString &docs)
Definition: util.cpp:8342
QCString convertToXML(const char *s)
Definition: util.cpp:5717
Buffer used to store strings.
Definition: bufstr.h:30
QCString latexEscapeIndexChars(const char *s, bool insideTabbing)
Definition: util.cpp:6683
QCString externalLinkTarget()
Definition: util.cpp:7850
void writeExample(OutputList &ol, ExampleSDict *el)
Definition: util.cpp:2106
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
bool openOutputFile(const char *outFile, QFile &f)
Definition: util.cpp:8588
bool updateLanguageMapping(const QCString &extension, const QCString &parser)
Definition: util.cpp:6964
bool patternMatch(const QFileInfo &fi, const QStrList *patList)
Definition: util.cpp:7784
QCString parseCommentAsText(const Definition *scope, const MemberDef *member, const QCString &doc, const QCString &fileName, int lineNr)
Definition: util.cpp:7242
QCString replaceAnonymousScopes(const QCString &s, const char *replacement=0)
Definition: util.cpp:191
QList< ArgumentList > * copyArgumentLists(const QList< ArgumentList > *srcLists)
Definition: util.cpp:6205
void linkifyText(const TextGeneratorIntf &ol, Definition *scope, FileDef *fileScope, Definition *self, const char *text, bool autoBreak=FALSE, bool external=TRUE, bool keepSpaces=FALSE, int indentLevel=0)
Definition: util.cpp:1916
QCString getDotImageExtension(void)
Definition: util.cpp:8562
bool mainPageHasTitle()
Definition: util.cpp:8554
QCString correctURL(const QCString &url, const QCString &relPath)
Definition: util.cpp:8084
void initDefaultExtensionMapping()
Definition: util.cpp:6999
uint getUtf8Code(const QCString &s, int idx)
Get one unicode character as an unsigned integer from utf-8 string.
Definition: util.cpp:8240
A model of a page symbol.
Definition: pagedef.h:29
QCString processMarkup(const QCString &s)
void append(uint letter, typename T::ElementType *elem)
Definition: util.h:100
uint getUtf8CodeToLower(const QCString &s, int idx)
Returns one unicode character as an unsigned integer from utf-8 string, making the character lower ca...
Definition: util.cpp:8276
virtual void writeLink(const char *extRef, const char *file, const char *anchor, const char *text) const =0
QCString resolveDefines(const char *n)
ClassDef * getResolvedClass(Definition *scope, FileDef *fileScope, const char *key, MemberDef **pTypeDef=0, QCString *pTemplSpec=0, bool mayBeUnlinkable=FALSE, bool mayBeHidden=FALSE, QCString *pResolvedType=0)
Definition: util.cpp:1563
Protection classInheritedProtectionLevel(ClassDef *cd, ClassDef *bcd, Protection prot=Public, int level=0)
Definition: util.cpp:2556
QCString doc
QCString substituteClassNames(const QCString &s)
bool classVisibleInIndex(ClassDef *cd)
Definition: util.cpp:8334
int countAliasArguments(const QCString argList)
Definition: util.cpp:7513
QCString tempArgListToString(ArgumentList *al, SrcLangExt lang)
Definition: util.cpp:2197
QCString filterTitle(const QCString &title)
Definition: util.cpp:7765
Protection
Definition: types.h:26
bool readInputFile(const char *fileName, BufStr &inBuf, bool filter=TRUE, bool isSourceCode=FALSE)
read a file name fileName and optionally filter and transcode it
Definition: util.cpp:7673
bool containsWord(const QCString &s, const QCString &word)
Definition: util.cpp:6836
bool isId(int c)
Definition: util.h:224
MemberListType
Definition: types.h:104
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
void convertProtectionLevel(MemberListType inListType, Protection inProt, int *outListType1, int *outListType2)
Definition: util.cpp:8378
QCString getCanonicalTemplateSpec(Definition *d, FileDef *fs, const QCString &spec)
Definition: util.cpp:3335
int nextUtf8CharPosition(const QCString &utf8Str, int len, int startPos)
Definition: util.cpp:7195
QCString rtfFormatBmkStr(const char *name)
Definition: util.cpp:6744
bool findAndRemoveWord(QCString &s, const QCString &word)
Definition: util.cpp:6848
uint getUtf8CodeToUpper(const QCString &s, int idx)
Returns one unicode character as ian unsigned interger from utf-8 string, making the character upper ...
Definition: util.cpp:8291
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
QCString fileToString(const char *name, bool filter=FALSE, bool isSourceCode=FALSE)
Definition: util.cpp:2418
LetterToIndexMap()
Definition: util.h:99
QCString linkToText(SrcLangExt lang, const char *link, bool isFileName)
Definition: util.cpp:4659
int minClassDistance(const ClassDef *cd, const ClassDef *bcd, int level=0)
Definition: util.cpp:2527
static bool insidePre
unsigned uint
Definition: qglobal.h:351
QCString convertCharEntitiesToUTF8(const QCString &s)
Definition: util.cpp:5822
int getScopeFragment(const QCString &s, int p, int *l)
Definition: util.cpp:6322
static QCString * s
Definition: config.cpp:1042
QCString clearBlock(const char *s, const char *begin, const char *end)
Clear a text block s from begin to end markers.
Definition: htmlgen.cpp:106
union ptb::content::word::word word
const bool TRUE
Definition: qglobal.h:371
QCString relativePathToRoot(const char *name)
Definition: util.cpp:5436
static QCString str
QCString extractBlock(const QCString text, const QCString marker)
Definition: util.cpp:7998
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope=FALSE)
Definition: util.cpp:8065
void initFilePattern(void)
Definition: util.cpp:8569
QCString latexEscapePDFString(const char *s)
Definition: util.cpp:6721
virtual ~TextGeneratorIntf()
Definition: util.h:68
int isAccessibleFrom(Definition *scope, FileDef *fileScope, Definition *item)
Definition: util.cpp:948
int computeQualifiedIndex(const QCString &name)
Definition: util.cpp:1203
QCString insertTemplateSpecifierInScope(const QCString &scope, const QCString &templ)
Definition: util.cpp:5527
PageDef * addRelatedPage(const char *name, const QCString &ptitle, const QCString &doc, QList< SectionInfo > *anchors, const char *fileName, int startLine, const QList< ListItemInfo > *sli, GroupDef *gd=0, TagInfo *tagInfo=0, SrcLangExt lang=SrcLangExt_Unknown)
Definition: util.cpp:6369
QCString convertToHtml(const char *s, bool keepEntities=TRUE)
Definition: util.cpp:5746
bool resolveLink(const char *scName, const char *lr, bool inSeeBlock, Definition **resContext, QCString &resAnchor)
Definition: util.cpp:4753