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};
131
132GetDefResult getDefs(const GetDefInput &input);
133
134QCString getFileFilter(const QCString &name,bool isSourceCode);
135
136bool resolveRef(/* in */ const QCString &scName,
137 /* in */ const QCString &name,
138 /* in */ bool inSeeBlock,
139 /* out */ const Definition **resContext,
140 /* out */ const MemberDef **resMember,
141 /* in */ bool lookForSpecializations = TRUE,
142 /* in */ const FileDef *currentFile = nullptr,
143 /* in */ bool checkScope = FALSE
144 );
145
146bool resolveLink(/* in */ const QCString &scName,
147 /* in */ const QCString &lr,
148 /* in */ bool inSeeBlock,
149 /* out */ const Definition **resContext,
150 /* out */ QCString &resAnchor,
151 /* in */ const QCString &prefix=QCString()
152 );
153
154void generateFileRef(OutputList &ol,const QCString &,
155 const QCString &linkTxt=QCString());
156
157void writePageRef(OutputList &ol,const QCString &cn,const QCString &mn);
158
159//QCString getCanonicalTemplateSpec(const Definition *d,const FileDef *fs,const QCString& spec);
160
161bool matchArguments2(const Definition *srcScope,const FileDef *srcFileScope,const ArgumentList *srcAl,
162 const Definition *dstScope,const FileDef *dstFileScope,const ArgumentList *dstAl,
163 bool checkCV,SrcLangExt lang
164 );
165
166void mergeArguments(ArgumentList &,ArgumentList &,bool forceNameOverwrite=FALSE);
167
169
171{
172 const char *name;
174};
175
176using SelectionBlockList = std::vector<SelectionBlock>;
177
179{
181 const char *beginStr;
182 size_t beginLen;
183 const char *endStr;
184 size_t endLen;
185 const char *closeStr;
186 size_t closeLen;
187};
188
189QCString selectBlocks(const QCString& s,const SelectionBlockList &blockList, const SelectionMarkerInfo &markerInfo);
190void checkBlocks(const QCString& s,const QCString fileName, const SelectionMarkerInfo &markerInfo);
191
193
194
195FileDef *findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig);
196QCString findFilePath(const QCString &file, bool &ambig);
197
199
200EntryType guessSection(const QCString &name);
201
202inline bool isId(int c)
203{
204 return c=='_' || c>=128 || c<0 || isalnum(c) || c=='$';
205}
206inline bool isIdJS(int c)
207{
208 return c>=128 || c<0 || isalnum(c);
209}
210
211QCString removeRedundantWhiteSpace(const QCString &s);
212
213QCString inlineArgListToDoc(const ArgumentList &al);
214
215QCString argListToString(const ArgumentList &al,bool useCanonicalType=FALSE,bool showDefVals=TRUE);
216
217QCString tempArgListToString(const ArgumentList &al,SrcLangExt lang,bool includeDefaults=true);
218
219QCString generateMarker(int id);
220
221void writeExamples(OutputList &ol,const ExampleList &el);
222
223QCString stripAnonymousNamespaceScope(const QCString &s);
224
225QCString stripFromPath(const QCString &path);
226
227QCString stripFromIncludePath(const QCString &path);
228
229bool rightScopeMatch(const QCString &scope, const QCString &name);
230
231bool leftScopeMatch(const QCString &scope, const QCString &name);
232
234{
235 const char *keyword;
236 using GetValue = std::function<QCString()>;
237 using GetValueWithParam = std::function<QCString(const QCString &)>;
238 std::variant<GetValue,GetValueWithParam> getValueVariant;
239};
240
241using KeywordSubstitutionList = std::vector<KeywordSubstitution>;
242
244
245QCString substituteKeywords(const QCString &s,const QCString &title,
246 const QCString &projName,const QCString &projNum,const QCString &projBrief);
247
248int getPrefixIndex(const QCString &name);
249
251
252QCString replaceAnonymousScopes(const QCString &s,const QCString &replacement=QCString());
253
254QCString convertNameToFile(const QCString &name,bool allowDots=FALSE,bool allowUnderscore=FALSE);
255
256QCString generateAnonymousAnchor(const QCString &fileName,int count);
257
258void extractNamespaceName(const QCString &scopeName,
259 QCString &className,QCString &namespaceName,
260 bool allowEmptyClass=FALSE);
261
263
264QCString stripScope(const QCString &name);
265
267QCString correctId(const QCString &s);
268
269QCString convertToHtml(const QCString &s,bool keepEntities=TRUE);
270
271QCString convertToXML(const QCString &s, bool keepEntities=FALSE);
272
274
276
277void addMembersToMemberGroup(/* in,out */ MemberList *ml,
278 /* in,out */ MemberGroupList *pMemberGroups,
279 /* in */ const Definition *context);
280
281int extractClassNameFromType(const QCString &type,int &pos,
283
285 const QCString &name,
286 const Definition *context,
287 const ArgumentList &formalArgs);
288
290 const QCString &name,
291 const ArgumentList &formalArgs,
292 const ArgumentList *actualArgs);
293
295 bool parentOnly=TRUE,
296 QCString *lastScopeStripped=nullptr,
297 QCString scopeName=QCString(),
298 bool allowArtificial=true);
299
300QCString resolveTypeDef(const Definition *d,const QCString &name,
301 const Definition **typedefContext=nullptr);
302
303QCString mergeScopes(const QCString &leftScope,const QCString &rightScope);
304
305int getScopeFragment(const QCString &s,int p,int *l);
306
307void addRefItem(const RefItemVector &sli,
308 const QCString &key,
309 const QCString &prefix,
310 const QCString &name,
311 const QCString &title,
312 const QCString &args,
313 const Definition *scope);
314
315PageDef *addRelatedPage(const QCString &name,
316 const QCString &ptitle,
317 const QCString &doc,
318 const QCString &fileName,
319 int docLine,
320 int startLine,
321 const RefItemVector &sli = RefItemVector(),
322 GroupDef *gd=nullptr,
323 const TagInfo *tagInfo=nullptr,
324 bool xref=FALSE,
326 );
327
328bool getCaseSenseNames();
329
330QCString escapeCharsInString(const QCString &name,bool allowDots,bool allowUnderscore=FALSE);
332
333void addGroupListToTitle(OutputList &ol,const Definition *d);
334
335QCString linkToText(SrcLangExt lang,const QCString &link,bool isFileName);
336
337bool checkExtension(const QCString &fName, const QCString &ext);
338
340
341QCString stripExtensionGeneral(const QCString &fName, const QCString &ext);
342
343QCString stripExtension(const QCString &fName);
344
345//void replaceNamespaceAliases(QCString &scope,size_t i);
346
347int computeQualifiedIndex(const QCString &name);
348
349void addDirPrefix(QCString &fileName);
350
352QCString determineAbsoluteIncludeName(const QCString &curFile,const QCString &incFileName);
353
354void createSubDirs(const Dir &d);
355void clearSubDirs(const Dir &d);
356
358QCString stripPath(const QCString &s);
359
360bool containsWord(const QCString &s,const char *word);
361
362bool findAndRemoveWord(QCString &s,const char *word);
363
365
366bool updateLanguageMapping(const QCString &extension,const QCString &parser);
372
373bool checkIfTypedef(const Definition *scope,const FileDef *fileScope,const QCString &n);
374
375QCString parseCommentAsText(const Definition *scope,const MemberDef *member,const QCString &doc,const QCString &fileName,int lineNr);
376
377bool transcodeCharacterStringToUTF8(std::string &input,const char *inputEncoding);
378
379QCString recodeString(const QCString &str,const char *fromEncoding,const char *toEncoding);
380
381void writeTypeConstraints(OutputList &ol,const Definition *d,const ArgumentList &al);
382
384
385void stackTrace();
386
387bool readInputFile(const QCString &fileName,std::string &contents,
388 bool filter=TRUE,bool isSourceCode=FALSE);
389QCString filterTitle(const QCString &title);
390
391bool patternMatch(const FileInfo &fi,const StringVector &patList);
392
393QCString externalLinkTarget(const bool parent = false);
394QCString createHtmlUrl(const QCString &relPath,
395 const QCString &ref,
396 bool href,
397 bool islocalFile,
398 const QCString &targetFileName,
399 const QCString &anchor);
400QCString externalRef(const QCString &relPath,const QCString &ref,bool href);
401int nextUtf8CharPosition(const QCString &utf8Str,uint32_t len,uint32_t startPos);
402
403void writeMarkerList(OutputList &ol,const std::string &markerText,size_t numMarkers,
404 std::function<void(size_t)> replaceFunc);
405
406/** Data associated with a HSV colored image. */
408{
409 const char *name;
410 unsigned short width;
411 unsigned short height;
412 const unsigned char *content;
413 const unsigned char *alpha;
414};
415
416void writeColoredImgData(const QCString &dir,ColoredImgDataItem data[]);
418
419bool copyFile(const QCString &src,const QCString &dest);
420
421int lineBlock(const QCString &text,const QCString &marker);
422
423bool isURL(const QCString &url);
424
425QCString correctURL(const QCString &url,const QCString &relPath);
426
428
430
432void stripIndentationVerbatim(QCString &doc,const int indentationLevel);
433
435
436bool fileVisibleInIndex(const FileDef *fd,bool &genSourceFile);
437
439
441 MemberListType inListType,
442 Protection inProt,
443 MemberListType *outListType1,
444 MemberListType *outListType2
445 );
446
447bool mainPageHasTitle();
448bool openOutputFile(const QCString &outFile,std::ofstream &f);
449
450StringVector split(const std::string &s,const std::string &delimiter);
451StringVector split(const std::string &s,const reg::Ex &delimiter);
452int findIndex(const StringVector &sv,const std::string &s);
453int findIndex(const std::string &s,const reg::Ex &re);
454std::string join(const StringVector &s,const std::string &delimiter);
455
456bool recognizeFixedForm(const QCString &contents, FortranFormat format);
458
459QCString integerToAlpha(int n, bool upper=true);
460QCString integerToRoman(int n, bool upper=true);
461
462QCString getEncoding(const FileInfo &fi);
463
464inline QCString fixSpaces(const QCString &s) { return substitute(s," ","&#160;"); }
465
466QCString detab(const QCString &s,size_t &refIndent);
467
468QCString getProjectId();
469QCString projectLogoFile();
470
471void mergeMemberOverrideOptions(MemberDefMutable *md1,MemberDefMutable *md2);
472
473size_t updateColumnCount(const char *s,size_t col);
474
475#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:108
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:9142
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:408
const unsigned char * content
Definition util.h:412
unsigned short height
Definition util.h:411
const unsigned char * alpha
Definition util.h:413
unsigned short width
Definition util.h:410
const char * name
Definition util.h:409
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 FileDef * fd
Definition util.h:127
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:236
std::variant< GetValue, GetValueWithParam > getValueVariant
Definition util.h:238
std::function< QCString(const QCString &)> GetValueWithParam
Definition util.h:237
const char * keyword
Definition util.h:235
const char * name
Definition util.h:172
bool enabled
Definition util.h:173
size_t beginLen
Definition util.h:182
const char * closeStr
Definition util.h:185
const char * beginStr
Definition util.h:181
size_t closeLen
Definition util.h:186
const char * endStr
Definition util.h:183
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:6066
QCString removeRedundantWhiteSpace(const QCString &s)
Definition util.cpp:578
QCString convertNameToFile(const QCString &name, bool allowDots=FALSE, bool allowUnderscore=FALSE)
Definition util.cpp:3858
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:6506
QCString mergeScopes(const QCString &leftScope, const QCString &rightScope)
Definition util.cpp:4934
QCString findFilePath(const QCString &file, bool &ambig)
Definition util.cpp:3345
QCString normalizeNonTemplateArgumentsInString(const QCString &name, const Definition *context, const ArgumentList &formalArgs)
Definition util.cpp:4640
QCString linkToText(SrcLangExt lang, const QCString &link, bool isFileName)
Definition util.cpp:3100
QCString recodeString(const QCString &str, const char *fromEncoding, const char *toEncoding)
size_t updateColumnCount(const char *s, size_t col)
Definition util.cpp:7208
QCString substituteClassNames(const QCString &s)
QCString convertToHtml(const QCString &s, bool keepEntities=TRUE)
Definition util.cpp:4317
void extractNamespaceName(const QCString &scopeName, QCString &className, QCString &namespaceName, bool allowEmptyClass=FALSE)
Definition util.cpp:4051
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:5325
bool mainPageHasTitle()
Definition util.cpp:6612
QCString insertTemplateSpecifierInScope(const QCString &scope, const QCString &templ)
Definition util.cpp:4100
bool protectionLevelVisible(Protection prot)
Definition util.cpp:6270
QCString convertCharEntitiesToUTF8(const QCString &s)
Definition util.cpp:4398
QCString generateAnonymousAnchor(const QCString &fileName, int count)
Definition util.cpp:3912
std::vector< KeywordSubstitution > KeywordSubstitutionList
Definition util.h:241
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:5841
int lineBlock(const QCString &text, const QCString &marker)
Returns the line number of the line following the line with the marker.
Definition util.cpp:6183
void addCodeOnlyMappings()
Definition util.cpp:5543
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:6997
void checkBlocks(const QCString &s, const QCString fileName, const SelectionMarkerInfo &markerInfo)
Definition util.cpp:6850
void writeTypeConstraints(OutputList &ol, const Definition *d, const ArgumentList &al)
Definition util.cpp:5755
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:6258
QCString stripAnonymousNamespaceScope(const QCString &s)
Definition util.cpp:241
QCString stripPath(const QCString &s)
Definition util.cpp:5292
QCString stripFromIncludePath(const QCString &path)
Definition util.cpp:340
QCString fixSpaces(const QCString &s)
Definition util.h:464
QCString removeEmptyLines(const QCString &s)
Definition util.cpp:6914
bool checkIfTypedef(const Definition *scope, const FileDef *fileScope, const QCString &n)
Definition util.cpp:5653
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:6001
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:6737
bool recognizeFixedForm(const QCString &contents, FortranFormat format)
Definition util.cpp:6671
bool openOutputFile(const QCString &outFile, std::ofstream &f)
Definition util.cpp:6624
int extractClassNameFromType(const QCString &type, int &pos, QCString &name, QCString &templSpec, SrcLangExt=SrcLangExt::Unknown)
Definition util.cpp:4566
std::vector< SelectionBlock > SelectionBlockList
Definition util.h:176
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:5146
void addGroupListToTitle(OutputList &ol, const Definition *d)
Definition util.cpp:5233
QCString relativePathToRoot(const QCString &name)
Definition util.cpp:3933
QCString substituteTemplateArgumentsInString(const QCString &name, const ArgumentList &formalArgs, const ArgumentList *actualArgs)
Definition util.cpp:4705
void generateFileRef(OutputList &ol, const QCString &, const QCString &linkTxt=QCString())
Definition util.cpp:3234
SrcLangExt getLanguageFromCodeLang(QCString &fileName)
Routine to handle the language attribute of the \code command.
Definition util.cpp:5567
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:4021
bool resolveRef(const QCString &scName, const QCString &name, bool inSeeBlock, const Definition **resContext, const MemberDef **resMember, bool lookForSpecializations=TRUE, const FileDef *currentFile=nullptr, bool checkScope=FALSE)
Definition util.cpp:2877
QCString showFileDefMatches(const FileNameLinkedMap *fnMap, const QCString &n)
Definition util.cpp:3388
QCString stripExtensionGeneral(const QCString &fName, const QCString &ext)
Definition util.cpp:5255
QCString filterTitle(const QCString &title)
Definition util.cpp:5921
QCString unescapeCharsInString(const QCString &s)
Definition util.cpp:3771
void createSubDirs(const Dir &d)
Definition util.cpp:3994
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:6417
QCString stripScope(const QCString &name)
Definition util.cpp:4133
QCString replaceAnonymousScopes(const QCString &s, const QCString &replacement=QCString())
Definition util.cpp:229
QCString externalLinkTarget(const bool parent=false)
Definition util.cpp:6022
bool checkExtension(const QCString &fName, const QCString &ext)
Definition util.cpp:5238
bool isURL(const QCString &url)
Checks whether the given url starts with a supported protocol.
Definition util.cpp:6246
QCString substituteKeywords(const QCString &s, const KeywordSubstitutionList &keywords)
Definition util.cpp:3418
SrcLangExt getLanguageFromFileName(const QCString &fileName, SrcLangExt defLang=SrcLangExt::Cpp)
Definition util.cpp:5549
void stripIndentationVerbatim(QCString &doc, const int indentationLevel)
Definition util.cpp:6367
bool updateLanguageMapping(const QCString &extension, const QCString &parser)
Definition util.cpp:5444
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:7152
QCString stripExtension(const QCString &fName)
Definition util.cpp:5265
void initDefaultExtensionMapping()
Definition util.cpp:5476
QCString parseCommentAsText(const Definition *scope, const MemberDef *member, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5707
QCString integerToAlpha(int n, bool upper=true)
Definition util.cpp:7010
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:5016
QCString convertToJSString(const QCString &s)
Definition util.cpp:4377
QCString integerToRoman(int n, bool upper=true)
Definition util.cpp:7026
bool resolveLink(const QCString &scName, const QCString &lr, bool inSeeBlock, const Definition **resContext, QCString &resAnchor, const QCString &prefix=QCString())
Definition util.cpp:3126
QCString langToString(SrcLangExt lang)
Returns a string representation of lang.
Definition util.cpp:6204
QCString determineAbsoluteIncludeName(const QCString &curFile, const QCString &incFileName)
Definition util.cpp:3954
QCString detab(const QCString &s, size_t &refIndent)
Definition util.cpp:7048
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:6557
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:6982
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:4259
void stackTrace()
Definition util.cpp:5777
void mergeMemberOverrideOptions(MemberDefMutable *md1, MemberDefMutable *md2)
Definition util.cpp:7189
bool getCaseSenseNames()
Definition util.cpp:3674
QCString getDotImageExtension()
Definition util.cpp:6617
QCString createHtmlUrl(const QCString &relPath, const QCString &ref, bool href, bool islocalFile, const QCString &targetFileName, const QCString &anchor)
Definition util.cpp:6033
GetDefResult getDefs(const GetDefInput &input)
Definition util.cpp:2742
QCString getProjectId()
Definition util.cpp:7139
QCString projectLogoFile()
Definition util.cpp:3495
QCString escapeCharsInString(const QCString &name, bool allowDots, bool allowUnderscore=FALSE)
Definition util.cpp:3684
StringVector split(const std::string &s, const std::string &delimiter)
split input string s by string delimiter delimiter.
Definition util.cpp:6946
QCString getEncoding(const FileInfo &fi)
Definition util.cpp:6008
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope=FALSE)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:6230
QCString stripFromPath(const QCString &path)
Definition util.cpp:332
FortranFormat convertFileNameFortranParserCode(QCString fn)
Definition util.cpp:6724
QCString stripLeadingAndTrailingEmptyLines(const QCString &s, int &docLine)
Special version of QCString::stripWhiteSpace() that only strips completely blank lines.
Definition util.cpp:5368
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:6170
QCString stripTemplateSpecifiersFromScope(const QCString &fullName, bool parentOnly=TRUE, QCString *lastScopeStripped=nullptr, QCString scopeName=QCString(), bool allowArtificial=true)
Definition util.cpp:4867
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:206
QCString getOverloadDocs()
Definition util.cpp:4440
QCString convertToXML(const QCString &s, bool keepEntities=FALSE)
Definition util.cpp:4266
QCString stripIndentation(const QCString &s)
Definition util.cpp:6282
bool containsWord(const QCString &s, const char *word)
returns TRUE iff string s contains word w
Definition util.cpp:5309
int getPrefixIndex(const QCString &name)
Definition util.cpp:3590
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:202
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:6119
QCString getFileNameExtension(const QCString &fn)
Definition util.cpp:5591
void mergeArguments(ArgumentList &, ArgumentList &, bool forceNameOverwrite=FALSE)
Definition util.cpp:2025
QCString convertToId(const QCString &s)
Definition util.cpp:4226
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:6095
QCString processMarkup(const QCString &s)
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig)
Definition util.cpp:3262
int getScopeFragment(const QCString &s, int p, int *l)
Definition util.cpp:4969
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:5243