Doxygen
Loading...
Searching...
No Matches
util.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2021 by Dimitri van Heesch.
4 *
5 * Permission to use, copy, modify, and distribute this software and its
6 * documentation under the terms of the GNU General Public License is hereby
7 * granted. No representations are made about the suitability of this software
8 * for any purpose. It is provided "as is" without express or implied warranty.
9 * See the GNU General Public License for more details.
10 *
11 * Documents produced by Doxygen are derivative works derived from the
12 * input used in their production; they are not affected by this license.
13 *
14 */
15
16#ifndef UTIL_H
17#define UTIL_H
18
19/*! \file
20 * \brief A bunch of utility functions.
21 */
22
23#include <memory>
24#include <unordered_map>
25#include <algorithm>
26#include <functional>
27#include <fstream>
28#include <variant>
29#include <string_view>
30
31#include <ctype.h>
32#include "types.h"
33#include "docparser.h"
34#include "containers.h"
35#include "outputgen.h"
36#include "regex.h"
37#include "conceptdef.h"
38#include "construct.h"
39
40//--------------------------------------------------------------------
41
42class ClassDef;
43class FileDef;
44class MemberList;
45class NamespaceDef;
47class ArgumentList;
48class OutputList;
49class OutputDocInterface;
50class MemberDef;
51class GroupDef;
52struct TagInfo;
53class PageDef;
54class SectionInfo;
55class Definition;
56class BufStr;
57class FileInfo;
58class Dir;
59
60//--------------------------------------------------------------------
61
62/** Abstract interface for a hyperlinked text fragment. */
64{
65 public:
67
68 virtual void writeString(std::string_view,bool) const = 0;
69 virtual void writeBreak(int indent) const = 0;
70 virtual void writeLink(const QCString &extRef,const QCString &file,
71 const QCString &anchor,std::string_view text
72 ) const = 0;
73};
74
75/** Implements TextGeneratorIntf for an OutputDocInterface stream. */
77{
78 public:
80 void writeString(std::string_view s,bool keepSpaces) const override;
81 void writeBreak(int indent) const override;
82 void writeLink(const QCString &extRef,const QCString &file,
83 const QCString &anchor,std::string_view text
84 ) const override;
85 private:
87};
88
89//--------------------------------------------------------------------
90
93
94//--------------------------------------------------------------------
95
96void linkifyText(const TextGeneratorIntf &ol,
97 const Definition *scope,
98 const FileDef *fileScope,
99 const Definition *self,
100 const QCString &text,
101 bool autoBreak=FALSE,
102 bool external=TRUE,
103 bool keepSpaces=FALSE,
104 int indentLevel=0
105 );
106
107QCString fileToString(const QCString &name,bool filter=FALSE,bool isSourceCode=FALSE);
108
110{
111 GetDefInput(const QCString &scName,const QCString &memName,const QCString &a) :
112 scopeName(scName),memberName(memName),args(a) {}
116 bool forceEmptyScope = false;
117 const FileDef *currentFile = nullptr;
118 bool checkCV = false;
119 bool insideCode = false;
120};
121
123{
124 bool found = false;
125 const MemberDef *md=nullptr;
126 const ClassDef *cd=nullptr;
127 const FileDef *fd=nullptr;
128 const NamespaceDef *nd=nullptr;
129 const GroupDef *gd=nullptr;
130 const ConceptDef *cnd=nullptr;
131 const ModuleDef *modd=nullptr;
132};
133
134GetDefResult getDefs(const GetDefInput &input);
135
136QCString getFileFilter(const QCString &name,bool isSourceCode);
137
138bool resolveRef(/* in */ const QCString &scName,
139 /* in */ const QCString &name,
140 /* in */ bool inSeeBlock,
141 /* out */ const Definition **resContext,
142 /* out */ const MemberDef **resMember,
143 /* in */ SrcLangExt lang,
144 /* in */ bool lookForSpecializations = TRUE,
145 /* in */ const FileDef *currentFile = nullptr,
146 /* in */ bool checkScope = FALSE
147 );
148
149bool resolveLink(/* in */ const QCString &scName,
150 /* in */ const QCString &lr,
151 /* in */ bool inSeeBlock,
152 /* out */ const Definition **resContext,
153 /* out */ QCString &resAnchor,
154 /* in */ SrcLangExt lang,
155 /* in */ const QCString &prefix=QCString()
156 );
157
158void generateFileRef(OutputList &ol,const QCString &,
159 const QCString &linkTxt=QCString());
160
161void writePageRef(OutputList &ol,const QCString &cn,const QCString &mn);
162
163//QCString getCanonicalTemplateSpec(const Definition *d,const FileDef *fs,const QCString& spec);
164
165bool matchArguments2(const Definition *srcScope,const FileDef *srcFileScope,const ArgumentList *srcAl,
166 const Definition *dstScope,const FileDef *dstFileScope,const ArgumentList *dstAl,
167 bool checkCV,SrcLangExt lang
168 );
169
170void mergeArguments(ArgumentList &,ArgumentList &,bool forceNameOverwrite=FALSE);
171
173
175{
176 const char *name;
178};
179
180using SelectionBlockList = std::vector<SelectionBlock>;
181
183{
185 const char *beginStr;
186 size_t beginLen;
187 const char *endStr;
188 size_t endLen;
189 const char *closeStr;
190 size_t closeLen;
191};
192
193QCString selectBlocks(const QCString& s,const SelectionBlockList &blockList, const SelectionMarkerInfo &markerInfo);
194void checkBlocks(const QCString& s,const QCString fileName, const SelectionMarkerInfo &markerInfo);
195
197
198
199FileDef *findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig);
200QCString findFilePath(const QCString &file, bool &ambig);
201
203
204EntryType guessSection(const QCString &name);
205
206inline bool isId(int c)
207{
208 return c=='_' || c>=128 || c<0 || isalnum(c) || c=='$';
209}
210inline bool isIdJS(int c)
211{
212 return c>=128 || c<0 || isalnum(c);
213}
214
215QCString removeRedundantWhiteSpace(const QCString &s);
216
217QCString inlineArgListToDoc(const ArgumentList &al);
218
219QCString argListToString(const ArgumentList &al,bool useCanonicalType=FALSE,bool showDefVals=TRUE);
220
221QCString tempArgListToString(const ArgumentList &al,SrcLangExt lang,bool includeDefaults=true);
222
223QCString generateMarker(int id);
224
225void writeExamples(OutputList &ol,const ExampleList &el);
226
227QCString stripAnonymousNamespaceScope(const QCString &s);
228
229QCString stripFromPath(const QCString &path);
230
231QCString stripFromIncludePath(const QCString &path);
232
233bool rightScopeMatch(const QCString &scope, const QCString &name);
234
235bool leftScopeMatch(const QCString &scope, const QCString &name);
236
238{
239 const char *keyword;
240 using GetValue = std::function<QCString()>;
241 using GetValueWithParam = std::function<QCString(const QCString &)>;
242 std::variant<GetValue,GetValueWithParam> getValueVariant;
243};
244
245using KeywordSubstitutionList = std::vector<KeywordSubstitution>;
246
248
249QCString substituteKeywords(const QCString &s,const QCString &title,
250 const QCString &projName,const QCString &projNum,const QCString &projBrief);
251
252int getPrefixIndex(const QCString &name);
253
255
256QCString replaceAnonymousScopes(const QCString &s,const QCString &replacement=QCString());
257
258QCString convertNameToFile(const QCString &name,bool allowDots=FALSE,bool allowUnderscore=FALSE);
259
260QCString generateAnonymousAnchor(const QCString &fileName,int count);
261
262void extractNamespaceName(const QCString &scopeName,
263 QCString &className,QCString &namespaceName,
264 bool allowEmptyClass=FALSE);
265
267
268QCString stripScope(const QCString &name);
269
271QCString correctId(const QCString &s);
272
273QCString convertToHtml(const QCString &s,bool keepEntities=TRUE);
274
275QCString convertToXML(const QCString &s, bool keepEntities=FALSE);
276
278
280
281void addMembersToMemberGroup(/* in,out */ MemberList *ml,
282 /* in,out */ MemberGroupList *pMemberGroups,
283 /* in */ const Definition *context);
284
285int extractClassNameFromType(const QCString &type,int &pos,
287
289 const QCString &name,
290 const Definition *context,
291 const ArgumentList &formalArgs);
292
294 const QCString &name,
295 const ArgumentList &formalArgs,
296 const ArgumentList *actualArgs);
297
299 bool parentOnly=TRUE,
300 QCString *lastScopeStripped=nullptr,
301 QCString scopeName=QCString(),
302 bool allowArtificial=true);
303
304QCString resolveTypeDef(const Definition *d,const QCString &name,
305 const Definition **typedefContext=nullptr);
306
307QCString mergeScopes(const QCString &leftScope,const QCString &rightScope);
308
309int getScopeFragment(const QCString &s,int p,int *l);
310
311void addRefItem(const RefItemVector &sli,
312 const QCString &key,
313 const QCString &prefix,
314 const QCString &name,
315 const QCString &title,
316 const QCString &args,
317 const Definition *scope);
318
319PageDef *addRelatedPage(const QCString &name,
320 const QCString &ptitle,
321 const QCString &doc,
322 const QCString &fileName,
323 int docLine,
324 int startLine,
325 const RefItemVector &sli = RefItemVector(),
326 GroupDef *gd=nullptr,
327 const TagInfo *tagInfo=nullptr,
328 bool xref=FALSE,
330 );
331
332bool getCaseSenseNames();
333
334QCString escapeCharsInString(const QCString &name,bool allowDots,bool allowUnderscore=FALSE);
336
337void addGroupListToTitle(OutputList &ol,const Definition *d);
338
339QCString linkToText(SrcLangExt lang,const QCString &link,bool isFileName);
340
341bool checkExtension(const QCString &fName, const QCString &ext);
342
344
345QCString stripExtensionGeneral(const QCString &fName, const QCString &ext);
346
347QCString stripExtension(const QCString &fName);
348
349//void replaceNamespaceAliases(QCString &scope,size_t i);
350
351int computeQualifiedIndex(const QCString &name);
352
353void addDirPrefix(QCString &fileName);
354
356QCString determineAbsoluteIncludeName(const QCString &curFile,const QCString &incFileName);
357
358void createSubDirs(const Dir &d);
359void clearSubDirs(const Dir &d);
360
362QCString stripPath(const QCString &s);
363
364bool containsWord(const QCString &s,const char *word);
365
366bool findAndRemoveWord(QCString &s,const char *word);
367
369
370bool updateLanguageMapping(const QCString &extension,const QCString &parser);
376
377bool checkIfTypedef(const Definition *scope,const FileDef *fileScope,const QCString &n);
378
379QCString parseCommentAsText(const Definition *scope,const MemberDef *member,const QCString &doc,const QCString &fileName,int lineNr);
380
381bool transcodeCharacterStringToUTF8(std::string &input,const char *inputEncoding);
382
383QCString recodeString(const QCString &str,const char *fromEncoding,const char *toEncoding);
384
385void writeTypeConstraints(OutputList &ol,const Definition *d,const ArgumentList &al);
386
388
389void stackTrace();
390
391bool readInputFile(const QCString &fileName,std::string &contents,
392 bool filter=TRUE,bool isSourceCode=FALSE);
393QCString filterTitle(const QCString &title);
394
395bool patternMatch(const FileInfo &fi,const StringVector &patList);
396
397QCString externalLinkTarget(const bool parent = false);
398QCString createHtmlUrl(const QCString &relPath,
399 const QCString &ref,
400 bool href,
401 bool islocalFile,
402 const QCString &targetFileName,
403 const QCString &anchor);
404QCString externalRef(const QCString &relPath,const QCString &ref,bool href);
405int nextUtf8CharPosition(const QCString &utf8Str,uint32_t len,uint32_t startPos);
406
407void writeMarkerList(OutputList &ol,const std::string &markerText,size_t numMarkers,
408 std::function<void(size_t)> replaceFunc);
409
410/** Data associated with a HSV colored image. */
412{
413 const char *name;
414 unsigned short width;
415 unsigned short height;
416 const unsigned char *content;
417 const unsigned char *alpha;
418};
419
420void writeColoredImgData(const QCString &dir,ColoredImgDataItem data[]);
422
423bool copyFile(const QCString &src,const QCString &dest);
424
425int lineBlock(const QCString &text,const QCString &marker);
426
427bool isURL(const QCString &url);
428
429QCString correctURL(const QCString &url,const QCString &relPath);
430
432
434
436void stripIndentationVerbatim(QCString &doc,const int indentationLevel);
437
439
440bool fileVisibleInIndex(const FileDef *fd,bool &genSourceFile);
441
443
445 MemberListType inListType,
446 Protection inProt,
447 MemberListType *outListType1,
448 MemberListType *outListType2
449 );
450
451bool mainPageHasTitle();
452bool openOutputFile(const QCString &outFile,std::ofstream &f);
453
454StringVector split(const std::string &s,const std::string &delimiter);
455StringVector split(const std::string &s,const reg::Ex &delimiter);
456int findIndex(const StringVector &sv,const std::string &s);
457int findIndex(const std::string &s,const reg::Ex &re);
458std::string join(const StringVector &s,const std::string &delimiter);
459
460bool recognizeFixedForm(const QCString &contents, FortranFormat format);
462
463QCString integerToAlpha(int n, bool upper=true);
464QCString integerToRoman(int n, bool upper=true);
465
466QCString getEncoding(const FileInfo &fi);
467
468inline QCString fixSpaces(const QCString &s) { return substitute(s," ","&#160;"); }
469
470QCString detab(const QCString &s,size_t &refIndent);
471
472QCString getProjectId();
473QCString projectLogoFile();
474
475void mergeMemberOverrideOptions(MemberDefMutable *md1,MemberDefMutable *md2);
476
477size_t updateColumnCount(const char *s,size_t col);
478
479QCString mangleCSharpGenericName(const QCString &name);
480QCString demangleCSharpGenericName(const QCString &name,const QCString &templArgs);
481
482#endif
constexpr auto prefix
Definition anchor.cpp:44
This class represents an function or template argument list.
Definition arguments.h:60
A abstract class representing of a compound symbol.
Definition classdef.h:104
The common base class of all entity definitions found in the sources.
Definition definition.h:76
Class representing a directory in the file system.
Definition dir.h:75
Wrapper class for the Entry type.
Definition types.h:631
A model of a file symbol.
Definition filedef.h:99
Minimal replacement for QFileInfo.
Definition fileinfo.h:23
Ordered dictionary of FileName objects.
Definition filename.h:73
A model of a group of symbols.
Definition groupdef.h:52
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:109
Wrapper class for the MemberListType type.
Definition types.h:184
An abstract interface of a namespace symbol.
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:314
A model of a page symbol.
Definition pagedef.h:26
This is an alternative implementation of QCString.
Definition qcstring.h:101
class that provide information about a section.
Definition section.h:57
Abstract interface for a hyperlinked text fragment.
Definition util.h:64
virtual void writeString(std::string_view, bool) const =0
virtual void writeBreak(int indent) const =0
virtual void writeLink(const QCString &extRef, const QCString &file, const QCString &anchor, std::string_view text) const =0
TextGeneratorOLImpl(OutputList &ol)
Definition util.cpp:103
OutputList & m_ol
Definition util.h:86
Class representing a regular expression.
Definition regex.h:39
#define ABSTRACT_BASE_CLASS(cls)
Macro to implement rule of 5 for an abstract base class.
Definition construct.h:20
std::vector< std::string > StringVector
Definition containers.h:33
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
Definition docnode.h:1324
static void addMembersToMemberGroup()
Definition doxygen.cpp:9201
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:477
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
std::vector< RefItem * > RefItemVector
Definition reflist.h:133
Data associated with a HSV colored image.
Definition util.h:412
const unsigned char * content
Definition util.h:416
unsigned short height
Definition util.h:415
const unsigned char * alpha
Definition util.h:417
unsigned short width
Definition util.h:414
const char * name
Definition util.h:413
bool forceEmptyScope
Definition util.h:116
const FileDef * currentFile
Definition util.h:117
QCString scopeName
Definition util.h:113
bool insideCode
Definition util.h:119
GetDefInput(const QCString &scName, const QCString &memName, const QCString &a)
Definition util.h:111
bool checkCV
Definition util.h:118
QCString args
Definition util.h:115
QCString memberName
Definition util.h:114
const MemberDef * md
Definition util.h:125
const ConceptDef * cnd
Definition util.h:130
const FileDef * fd
Definition util.h:127
const ModuleDef * modd
Definition util.h:131
const GroupDef * gd
Definition util.h:129
bool found
Definition util.h:124
const ClassDef * cd
Definition util.h:126
const NamespaceDef * nd
Definition util.h:128
std::function< QCString()> GetValue
Definition util.h:240
std::variant< GetValue, GetValueWithParam > getValueVariant
Definition util.h:242
std::function< QCString(const QCString &)> GetValueWithParam
Definition util.h:241
const char * keyword
Definition util.h:239
const char * name
Definition util.h:176
bool enabled
Definition util.h:177
size_t beginLen
Definition util.h:186
const char * closeStr
Definition util.h:189
const char * beginStr
Definition util.h:185
size_t closeLen
Definition util.h:190
const char * endStr
Definition util.h:187
This struct is used to capture the tag file information for an Entry.
Definition entry.h:103
This file contains a number of basic enums and types.
Protection
Protection level of members.
Definition types.h:26
SrcLangExt
Language as given by extension.
Definition types.h:42
@ Unknown
Definition types.h:43
FortranFormat
Definition types.h:410
std::string_view word
Definition util.cpp:980
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
Definition util.cpp:6162
QCString removeRedundantWhiteSpace(const QCString &s)
Definition util.cpp:578
QCString convertNameToFile(const QCString &name, bool allowDots=FALSE, bool allowUnderscore=FALSE)
Definition util.cpp:3944
QCString extractDirection(QCString &docs)
Strip the direction part from docs and return it as a string in canonical form The input docs string ...
Definition util.cpp:6602
QCString mergeScopes(const QCString &leftScope, const QCString &rightScope)
Definition util.cpp:5020
QCString findFilePath(const QCString &file, bool &ambig)
Definition util.cpp:3431
QCString normalizeNonTemplateArgumentsInString(const QCString &name, const Definition *context, const ArgumentList &formalArgs)
Definition util.cpp:4726
QCString linkToText(SrcLangExt lang, const QCString &link, bool isFileName)
Definition util.cpp:3159
QCString recodeString(const QCString &str, const char *fromEncoding, const char *toEncoding)
size_t updateColumnCount(const char *s, size_t col)
Definition util.cpp:7304
QCString substituteClassNames(const QCString &s)
QCString convertToHtml(const QCString &s, bool keepEntities=TRUE)
Definition util.cpp:4403
void extractNamespaceName(const QCString &scopeName, QCString &className, QCString &namespaceName, bool allowEmptyClass=FALSE)
Definition util.cpp:4137
bool findAndRemoveWord(QCString &s, const char *word)
removes occurrences of whole word from sentence, while keeps internal spaces and reducing multiple se...
Definition util.cpp:5421
bool mainPageHasTitle()
Definition util.cpp:6708
QCString insertTemplateSpecifierInScope(const QCString &scope, const QCString &templ)
Definition util.cpp:4186
bool protectionLevelVisible(Protection prot)
Definition util.cpp:6366
QCString convertCharEntitiesToUTF8(const QCString &s)
Definition util.cpp:4484
QCString generateAnonymousAnchor(const QCString &fileName, int count)
Definition util.cpp:3998
std::vector< KeywordSubstitution > KeywordSubstitutionList
Definition util.h:245
bool readInputFile(const QCString &fileName, std::string &contents, bool filter=TRUE, bool isSourceCode=FALSE)
read a file name fileName and optionally filter and transcode it
Definition util.cpp:5937
int lineBlock(const QCString &text, const QCString &marker)
Returns the line number of the line following the line with the marker.
Definition util.cpp:6279
void addCodeOnlyMappings()
Definition util.cpp:5639
std::string join(const StringVector &s, const std::string &delimiter)
create a string where the string in the vector are joined by the given delimiter
Definition util.cpp:7093
void checkBlocks(const QCString &s, const QCString fileName, const SelectionMarkerInfo &markerInfo)
Definition util.cpp:6946
void writeTypeConstraints(OutputList &ol, const Definition *d, const ArgumentList &al)
Definition util.cpp:5851
bool leftScopeMatch(const QCString &scope, const QCString &name)
Definition util.cpp:892
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
Definition util.cpp:6354
QCString stripAnonymousNamespaceScope(const QCString &s)
Definition util.cpp:241
QCString stripPath(const QCString &s)
Definition util.cpp:5388
QCString stripFromIncludePath(const QCString &path)
Definition util.cpp:340
QCString fixSpaces(const QCString &s)
Definition util.h:468
QCString removeEmptyLines(const QCString &s)
Definition util.cpp:7010
bool checkIfTypedef(const Definition *scope, const FileDef *fileScope, const QCString &n)
Definition util.cpp:5749
bool transcodeCharacterStringToUTF8(std::string &input, const char *inputEncoding)
Definition util.cpp:1376
int nextUtf8CharPosition(const QCString &utf8Str, uint32_t len, uint32_t startPos)
bool patternMatch(const FileInfo &fi, const StringVector &patList)
Definition util.cpp:6097
QCString generateMarker(int id)
Definition util.cpp:290
QCString selectBlocks(const QCString &s, const SelectionBlockList &blockList, const SelectionMarkerInfo &markerInfo)
remove disabled blocks and all block markers from s and return the result as a string
Definition util.cpp:6833
bool recognizeFixedForm(const QCString &contents, FortranFormat format)
Definition util.cpp:6767
bool openOutputFile(const QCString &outFile, std::ofstream &f)
Definition util.cpp:6720
int extractClassNameFromType(const QCString &type, int &pos, QCString &name, QCString &templSpec, SrcLangExt=SrcLangExt::Unknown)
Definition util.cpp:4652
std::vector< SelectionBlock > SelectionBlockList
Definition util.h:180
void addRefItem(const RefItemVector &sli, const QCString &key, const QCString &prefix, const QCString &name, const QCString &title, const QCString &args, const Definition *scope)
Definition util.cpp:5242
void addGroupListToTitle(OutputList &ol, const Definition *d)
Definition util.cpp:5329
QCString relativePathToRoot(const QCString &name)
Definition util.cpp:4019
QCString substituteTemplateArgumentsInString(const QCString &name, const ArgumentList &formalArgs, const ArgumentList *actualArgs)
Definition util.cpp:4791
void generateFileRef(OutputList &ol, const QCString &, const QCString &linkTxt=QCString())
Definition util.cpp:3320
SrcLangExt getLanguageFromCodeLang(QCString &fileName)
Routine to handle the language attribute of the \code command.
Definition util.cpp:5663
QCString tempArgListToString(const ArgumentList &al, SrcLangExt lang, bool includeDefaults=true)
Definition util.cpp:1219
void writePageRef(OutputList &ol, const QCString &cn, const QCString &mn)
Definition util.cpp:270
void linkifyText(const TextGeneratorIntf &ol, const Definition *scope, const FileDef *fileScope, const Definition *self, const QCString &text, bool autoBreak=FALSE, bool external=TRUE, bool keepSpaces=FALSE, int indentLevel=0)
Definition util.cpp:904
void clearSubDirs(const Dir &d)
Definition util.cpp:4107
QCString showFileDefMatches(const FileNameLinkedMap *fnMap, const QCString &n)
Definition util.cpp:3474
QCString demangleCSharpGenericName(const QCString &name, const QCString &templArgs)
Definition util.cpp:7347
QCString stripExtensionGeneral(const QCString &fName, const QCString &ext)
Definition util.cpp:5351
QCString filterTitle(const QCString &title)
Definition util.cpp:6017
QCString unescapeCharsInString(const QCString &s)
Definition util.cpp:3857
void createSubDirs(const Dir &d)
Definition util.cpp:4080
bool matchArguments2(const Definition *srcScope, const FileDef *srcFileScope, const ArgumentList *srcAl, const Definition *dstScope, const FileDef *dstFileScope, const ArgumentList *dstAl, bool checkCV, SrcLangExt lang)
Definition util.cpp:1931
bool fileVisibleInIndex(const FileDef *fd, bool &genSourceFile)
Definition util.cpp:6513
QCString stripScope(const QCString &name)
Definition util.cpp:4219
QCString replaceAnonymousScopes(const QCString &s, const QCString &replacement=QCString())
Definition util.cpp:229
QCString externalLinkTarget(const bool parent=false)
Definition util.cpp:6118
bool checkExtension(const QCString &fName, const QCString &ext)
Definition util.cpp:5334
bool isURL(const QCString &url)
Checks whether the given url starts with a supported protocol.
Definition util.cpp:6342
QCString substituteKeywords(const QCString &s, const KeywordSubstitutionList &keywords)
Definition util.cpp:3504
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang=SrcLangExt::Cpp)
Definition util.cpp:5645
void stripIndentationVerbatim(QCString &doc, const int indentationLevel)
Definition util.cpp:6463
bool updateLanguageMapping(const QCString &extension, const QCString &parser)
Definition util.cpp:5540
void addDirPrefix(QCString &fileName)
int computeQualifiedIndex(const QCString &name)
Return the index of the last :: in the string name that is still before the first <.
Definition util.cpp:7248
QCString stripExtension(const QCString &fName)
Definition util.cpp:5361
void initDefaultExtensionMapping()
Definition util.cpp:5572
QCString parseCommentAsText(const Definition *scope, const MemberDef *member, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5803
QCString integerToAlpha(int n, bool upper=true)
Definition util.cpp:7106
PageDef * addRelatedPage(const QCString &name, const QCString &ptitle, const QCString &doc, const QCString &fileName, int docLine, int startLine, const RefItemVector &sli=RefItemVector(), GroupDef *gd=nullptr, const TagInfo *tagInfo=nullptr, bool xref=FALSE, SrcLangExt lang=SrcLangExt::Unknown)
Definition util.cpp:5112
QCString convertToJSString(const QCString &s)
Definition util.cpp:4463
QCString integerToRoman(int n, bool upper=true)
Definition util.cpp:7122
QCString langToString(SrcLangExt lang)
Returns a string representation of lang.
Definition util.cpp:6300
QCString determineAbsoluteIncludeName(const QCString &curFile, const QCString &incFileName)
Definition util.cpp:4040
QCString detab(const QCString &s, size_t &refIndent)
Definition util.cpp:7144
EntryType guessSection(const QCString &name)
Definition util.cpp:349
void convertProtectionLevel(MemberListType inListType, Protection inProt, MemberListType *outListType1, MemberListType *outListType2)
Computes for a given list type inListType, which are the the corresponding list type(s) in the base c...
Definition util.cpp:6653
bool resolveLink(const QCString &scName, const QCString &lr, bool inSeeBlock, const Definition **resContext, QCString &resAnchor, SrcLangExt lang, const QCString &prefix=QCString())
Definition util.cpp:3185
QCString fileToString(const QCString &name, bool filter=FALSE, bool isSourceCode=FALSE)
Definition util.cpp:1414
int findIndex(const StringVector &sv, const std::string &s)
find the index of a string in a vector of strings, returns -1 if the string could not be found
Definition util.cpp:7078
QCString removeAnonymousScopes(const QCString &s)
Definition util.cpp:172
QCString removeLongPathMarker(QCString path)
Definition util.cpp:298
void writeExamples(OutputList &ol, const ExampleList &el)
Definition util.cpp:1127
QCString correctId(const QCString &s)
Definition util.cpp:4345
void stackTrace()
Definition util.cpp:5873
void mergeMemberOverrideOptions(MemberDefMutable *md1, MemberDefMutable *md2)
Definition util.cpp:7285
bool getCaseSenseNames()
Definition util.cpp:3760
QCString getDotImageExtension()
Definition util.cpp:6713
QCString createHtmlUrl(const QCString &relPath, const QCString &ref, bool href, bool islocalFile, const QCString &targetFileName, const QCString &anchor)
Definition util.cpp:6129
QCString mangleCSharpGenericName(const QCString &name)
Definition util.cpp:7337
GetDefResult getDefs(const GetDefInput &input)
Definition util.cpp:2762
QCString getProjectId()
Definition util.cpp:7235
QCString projectLogoFile()
Definition util.cpp:3581
QCString escapeCharsInString(const QCString &name, bool allowDots, bool allowUnderscore=FALSE)
Definition util.cpp:3770
StringVector split(const std::string &s, const std::string &delimiter)
split input string s by string delimiter delimiter.
Definition util.cpp:7042
QCString getEncoding(const FileInfo &fi)
Definition util.cpp:6104
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope=FALSE)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:6326
QCString stripFromPath(const QCString &path)
Definition util.cpp:332
FortranFormat convertFileNameFortranParserCode(QCString fn)
Definition util.cpp:6820
QCString stripLeadingAndTrailingEmptyLines(const QCString &s, int &docLine)
Special version of QCString::stripWhiteSpace() that only strips completely blank lines.
Definition util.cpp:5464
bool copyFile(const QCString &src, const QCString &dest)
Copies the contents of file with name src to the newly created file with name dest.
Definition util.cpp:6266
QCString stripTemplateSpecifiersFromScope(const QCString &fullName, bool parentOnly=TRUE, QCString *lastScopeStripped=nullptr, QCString scopeName=QCString(), bool allowArtificial=true)
Definition util.cpp:4953
QCString getFileFilter(const QCString &name, bool isSourceCode)
Definition util.cpp:1342
QCString argListToString(const ArgumentList &al, bool useCanonicalType=FALSE, bool showDefVals=TRUE)
Definition util.cpp:1174
bool isIdJS(int c)
Definition util.h:210
QCString getOverloadDocs()
Definition util.cpp:4526
QCString convertToXML(const QCString &s, bool keepEntities=FALSE)
Definition util.cpp:4352
QCString stripIndentation(const QCString &s)
Definition util.cpp:6378
bool containsWord(const QCString &s, const char *word)
returns TRUE iff string s contains word w
Definition util.cpp:5405
bool resolveRef(const QCString &scName, const QCString &name, bool inSeeBlock, const Definition **resContext, const MemberDef **resMember, SrcLangExt lang, bool lookForSpecializations=TRUE, const FileDef *currentFile=nullptr, bool checkScope=FALSE)
Definition util.cpp:2904
int getPrefixIndex(const QCString &name)
Definition util.cpp:3676
bool rightScopeMatch(const QCString &scope, const QCString &name)
Definition util.cpp:881
void writeMarkerList(OutputList &ol, const std::string &markerText, size_t numMarkers, std::function< void(size_t)> replaceFunc)
Definition util.cpp:1103
bool isId(int c)
Definition util.h:206
QCString inlineArgListToDoc(const ArgumentList &al)
Definition util.cpp:1156
QCString resolveTypeDef(const Definition *d, const QCString &name, const Definition **typedefContext=nullptr)
Definition util.cpp:384
QCString replaceColorMarkers(const QCString &str)
Replaces any markers of the form ##AA in input string str by new markers of the form #AABBCC,...
Definition util.cpp:6215
QCString getFileNameExtension(const QCString &fn)
Definition util.cpp:5687
void mergeArguments(ArgumentList &, ArgumentList &, bool forceNameOverwrite=FALSE)
Definition util.cpp:2025
QCString convertToId(const QCString &s)
Definition util.cpp:4312
void writeColoredImgData(const QCString &dir, ColoredImgDataItem data[])
Writes the intensity only bitmap represented by data as an image to directory dir using the colors de...
Definition util.cpp:6191
QCString processMarkup(const QCString &s)
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig)
Definition util.cpp:3348
int getScopeFragment(const QCString &s, int p, int *l)
Definition util.cpp:5065
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5339