Doxygen
|
#include <stdlib.h>
#include <errno.h>
#include <math.h>
#include <limits.h>
#include <string.h>
#include <assert.h>
#include <mutex>
#include <unordered_set>
#include <codecvt>
#include <algorithm>
#include <ctime>
#include <cctype>
#include <cinttypes>
#include <sstream>
#include "md5.h"
#include "regex.h"
#include "util.h"
#include "message.h"
#include "classdef.h"
#include "filedef.h"
#include "doxygen.h"
#include "outputlist.h"
#include "defargs.h"
#include "language.h"
#include "config.h"
#include "htmlhelp.h"
#include "example.h"
#include "version.h"
#include "groupdef.h"
#include "reflist.h"
#include "pagedef.h"
#include "debug.h"
#include "searchindex.h"
#include "textdocvisitor.h"
#include "latexdocvisitor.h"
#include "portable.h"
#include "parserintf.h"
#include "image.h"
#include "growbuf.h"
#include "entry.h"
#include "arguments.h"
#include "memberlist.h"
#include "classlist.h"
#include "namespacedef.h"
#include "membername.h"
#include "filename.h"
#include "membergroup.h"
#include "dirdef.h"
#include "htmlentity.h"
#include "symbolresolver.h"
#include "fileinfo.h"
#include "dir.h"
#include "utf8.h"
#include "textstream.h"
#include "indexlist.h"
#include "datetime.h"
#include "moduledef.h"
#include "trace.h"
#include "stringutil.h"
Go to the source code of this file.
Classes | |
struct | CharAroundSpace |
struct | CharAroundSpace::CharElem |
struct | FindFileCacheElem |
Cache element for the file name to FileDef mapping cache. More... | |
struct | Lang2ExtMap |
Macros | |
#define | ENABLE_TRACINGSUPPORT 0 |
#define | REL_PATH_TO_ROOT "../../" |
#define | MATCH |
#define | NOMATCH |
#define | HEXTONUM(x) |
Functions | |
QCString | removeAnonymousScopes (const QCString &str) |
QCString | replaceAnonymousScopes (const QCString &s, const QCString &replacement) |
QCString | stripAnonymousNamespaceScope (const QCString &s) |
void | writePageRef (OutputList &ol, const QCString &cn, const QCString &mn) |
QCString | generateMarker (int id) |
QCString | removeLongPathMarker (QCString path) |
static QCString | stripFromPath (const QCString &p, const StringVector &l) |
QCString | stripFromPath (const QCString &path) |
QCString | stripFromIncludePath (const QCString &path) |
EntryType | guessSection (const QCString &name) |
QCString | resolveTypeDef (const Definition *context, const QCString &qualifiedName, const Definition **typedefContext) |
QCString | removeRedundantWhiteSpace (const QCString &s) |
int | findParameterList (const QCString &name) |
Returns the position in the string where a function parameter list begins, or -1 if one is not found. | |
bool | rightScopeMatch (const QCString &scope, const QCString &name) |
bool | leftScopeMatch (const QCString &scope, const QCString &name) |
void | linkifyText (const TextGeneratorIntf &out, const Definition *scope, const FileDef *fileScope, const Definition *self, const QCString &text, bool autoBreak, bool external, bool keepSpaces, int indentLevel) |
if (strLen >35 &&floatingIndex >30 &&autoBreak) | |
out | writeString (part, keepSpaces) |
if (!insideString) | |
out | writeString (lastPart, keepSpaces) |
void | writeMarkerList (OutputList &ol, const std::string &markerText, size_t numMarkers, std::function< void(size_t)> replaceFunc) |
void | writeExamples (OutputList &ol, const ExampleList &list) |
QCString | inlineArgListToDoc (const ArgumentList &al) |
QCString | inlineTemplateArgListToDoc (const ArgumentList &al) |
QCString | argListToString (const ArgumentList &al, bool useCanonicalType, bool showDefVals) |
QCString | tempArgListToString (const ArgumentList &al, SrcLangExt lang, bool includeDefault) |
static void | filterCRLF (std::string &contents) |
static QCString | getFilterFromList (const QCString &name, const StringVector &filterList, bool &found) |
QCString | getFileFilter (const QCString &name, bool isSourceCode) |
bool | transcodeCharacterStringToUTF8 (std::string &input, const char *inputEncoding) |
QCString | fileToString (const QCString &name, bool filter, bool isSourceCode) |
void | trimBaseClassScope (const BaseClassList &bcl, QCString &s, int level=0) |
static void | stripIrrelevantString (QCString &target, const QCString &str) |
void | stripIrrelevantConstVolatile (QCString &s) |
static QCString | stripDeclKeywords (const QCString &s) |
static QCString | extractCanonicalType (const Definition *d, const FileDef *fs, QCString type, SrcLangExt lang) |
static QCString | getCanonicalTemplateSpec (const Definition *d, const FileDef *fs, const QCString &spec, SrcLangExt lang) |
static QCString | getCanonicalTypeForIdentifier (const Definition *d, const FileDef *fs, const QCString &word, SrcLangExt lang, QCString *tSpec, int count=0) |
static QCString | extractCanonicalArgType (const Definition *d, const FileDef *fs, const Argument &arg, SrcLangExt lang) |
static bool | matchCanonicalTypes (const Definition *srcScope, const FileDef *srcFileScope, const QCString &srcType, const Definition *dstScope, const FileDef *dstFileScope, const QCString &dstType, SrcLangExt lang) |
static bool | matchArgument2 (const Definition *srcScope, const FileDef *srcFileScope, Argument &srcA, const Definition *dstScope, const FileDef *dstFileScope, Argument &dstA, SrcLangExt lang) |
bool | matchArguments2 (const Definition *srcScope, const FileDef *srcFileScope, const ArgumentList *srcAl, const Definition *dstScope, const FileDef *dstFileScope, const ArgumentList *dstAl, bool checkCV, SrcLangExt lang) |
void | mergeArguments (ArgumentList &srcAl, ArgumentList &dstAl, bool forceNameOverwrite) |
bool | matchTemplateArguments (const ArgumentList &srcAl, const ArgumentList &dstAl) |
static void | findMembersWithSpecificName (const MemberName *mn, const QCString &args, bool checkStatics, const FileDef *currentFile, bool checkCV, std::vector< const MemberDef * > &members) |
GetDefResult | getDefsNew (const GetDefInput &input) |
GetDefResult | getDefsOld (const GetDefInput &input) |
GetDefResult | getDefs (const GetDefInput &input) |
static bool | getScopeDefs (const QCString &docScope, const QCString &scope, ClassDef *&cd, ConceptDef *&cnd, NamespaceDef *&nd, ModuleDef *&modd) |
static bool | isLowerCase (QCString &s) |
bool | resolveRef (const QCString &scName, const QCString &name, bool inSeeBlock, const Definition **resContext, const MemberDef **resMember, SrcLangExt lang, bool lookForSpecialization, const FileDef *currentFile, bool checkScope) |
QCString | linkToText (SrcLangExt lang, const QCString &link, bool isFileName) |
bool | resolveLink (const QCString &scName, const QCString &lr, bool, const Definition **resContext, QCString &resAnchor, SrcLangExt lang, const QCString &prefix) |
void | generateFileRef (OutputList &ol, const QCString &name, const QCString &text) |
FileDef * | findFileDef (const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig) |
QCString | findFilePath (const QCString &file, bool &ambig) |
QCString | showFileDefMatches (const FileNameLinkedMap *fnMap, const QCString &n) |
QCString | substituteKeywords (const QCString &s, const KeywordSubstitutionList &keywords) |
static QCString | showDate (const QCString &fmt) |
QCString | projectLogoFile () |
static QCString | projectLogoSize () |
QCString | substituteKeywords (const QCString &s, const QCString &title, const QCString &projName, const QCString &projNum, const QCString &projBrief) |
int | getPrefixIndex (const QCString &name) |
bool | getCaseSenseNames () |
QCString | escapeCharsInString (const QCString &name, bool allowDots, bool allowUnderscore) |
QCString | unescapeCharsInString (const QCString &s) |
QCString | convertNameToFile (const QCString &name, bool allowDots, bool allowUnderscore) |
QCString | generateAnonymousAnchor (const QCString &fileName, int count) |
QCString | relativePathToRoot (const QCString &name) |
QCString | determineAbsoluteIncludeName (const QCString &curFile, const QCString &incFileName) |
void | createSubDirs (const Dir &d) |
void | clearSubDirs (const Dir &d) |
void | extractNamespaceName (const QCString &scopeName, QCString &className, QCString &namespaceName, bool allowEmptyClass) |
QCString | insertTemplateSpecifierInScope (const QCString &scope, const QCString &templ) |
QCString | stripScope (const QCString &name) |
QCString | convertToId (const QCString &s) |
QCString | correctId (const QCString &s) |
QCString | convertToXML (const QCString &s, bool keepEntities) |
QCString | convertToHtml (const QCString &s, bool keepEntities) |
QCString | convertToJSString (const QCString &s) |
QCString | convertCharEntitiesToUTF8 (const QCString &str) |
QCString | getOverloadDocs () |
void | addMembersToMemberGroup (MemberList *ml, MemberGroupList *pMemberGroups, const Definition *context) |
int | extractClassNameFromType (const QCString &type, int &pos, QCString &name, QCString &templSpec, SrcLangExt lang) |
QCString | normalizeNonTemplateArgumentsInString (const QCString &name, const Definition *context, const ArgumentList &formalArgs) |
QCString | substituteTemplateArgumentsInString (const QCString &nm, const ArgumentList &formalArgs, const ArgumentList *actualArgs) |
QCString | stripTemplateSpecifiersFromScope (const QCString &fullName, bool parentOnly, QCString *pLastScopeStripped, QCString scopeName, bool allowArtificial) |
QCString | mergeScopes (const QCString &leftScope, const QCString &rightScope) |
int | getScopeFragment (const QCString &s, int p, int *l) |
PageDef * | addRelatedPage (const QCString &name, const QCString &ptitle, const QCString &doc, const QCString &fileName, int docLine, int startLine, const RefItemVector &sli, GroupDef *gd, const TagInfo *tagInfo, bool xref, SrcLangExt lang) |
void | addRefItem (const RefItemVector &sli, const QCString &key, const QCString &prefix, const QCString &name, const QCString &title, const QCString &args, const Definition *scope) |
static ModuleDef * | findModuleDef (const Definition *d) |
static bool | recursivelyAddGroupListToTitle (OutputList &ol, const Definition *d, bool root) |
void | addGroupListToTitle (OutputList &ol, const Definition *d) |
bool | checkExtension (const QCString &fName, const QCString &ext) |
void | addHtmlExtensionIfMissing (QCString &fName) |
QCString | stripExtensionGeneral (const QCString &fName, const QCString &ext) |
QCString | stripExtension (const QCString &fName) |
QCString | stripPath (const QCString &s) |
bool | containsWord (const QCString &str, const char *word) |
returns TRUE iff string s contains word w | |
bool | findAndRemoveWord (QCString &sentence, const char *word) |
removes occurrences of whole word from sentence, while keeps internal spaces and reducing multiple sequences of spaces. | |
QCString | stripLeadingAndTrailingEmptyLines (const QCString &s, int &docLine) |
Special version of QCString::stripWhiteSpace() that only strips completely blank lines. | |
bool | updateLanguageMapping (const QCString &extension, const QCString &language) |
void | initDefaultExtensionMapping () |
void | addCodeOnlyMappings () |
SrcLangExt | getLanguageFromFileName (const QCString &fileName, SrcLangExt defLang) |
SrcLangExt | getLanguageFromCodeLang (QCString &fileName) |
Routine to handle the language attribute of the \code command. | |
QCString | getFileNameExtension (const QCString &fn) |
static MemberDef * | getMemberFromSymbol (const Definition *scope, const FileDef *fileScope, const QCString &n) |
bool | checkIfTypedef (const Definition *scope, const FileDef *fileScope, const QCString &n) |
static int | nextUTF8CharPosition (const QCString &utf8Str, uint32_t len, uint32_t startPos) |
QCString | parseCommentAsText (const Definition *scope, const MemberDef *md, const QCString &doc, const QCString &fileName, int lineNr) |
void | writeTypeConstraints (OutputList &ol, const Definition *d, const ArgumentList &al) |
void | stackTrace () |
static void | transcodeCharacterBuffer (const QCString &fileName, std::string &contents, const QCString &inputEncoding, const QCString &outputEncoding) |
bool | readInputFile (const QCString &fileName, std::string &contents, bool filter, bool isSourceCode) |
read a file name fileName and optionally filter and transcode it | |
QCString | filterTitle (const QCString &title) |
template<class PatternList, class PatternElem, typename PatternGet = QCString(*)(const PatternElem &)> | |
bool | genericPatternMatch (const FileInfo &fi, const PatternList &patList, PatternElem &elem, PatternGet getter) |
bool | patternMatch (const FileInfo &fi, const StringVector &patList) |
QCString | getEncoding (const FileInfo &fi) |
QCString | externalLinkTarget (const bool parent) |
QCString | createHtmlUrl (const QCString &relPath, const QCString &ref, bool href, bool isLocalFile, const QCString &targetFileName, const QCString &anchor) |
QCString | externalRef (const QCString &relPath, const QCString &ref, bool href) |
void | writeColoredImgData (const QCString &dir, ColoredImgDataItem data[]) |
Writes the intensity only bitmap represented by data as an image to directory dir using the colors defined by HTML_COLORSTYLE_*. | |
QCString | replaceColorMarkers (const QCString &str) |
Replaces any markers of the form ##AA in input string str by new markers of the form #AABBCC, where #AABBCC represents a valid color, based on the intensity represented by hex number AA and the current HTML_COLORSTYLE_* settings. | |
bool | copyFile (const QCString &src, const QCString &dest) |
Copies the contents of file with name src to the newly created file with name dest. | |
int | lineBlock (const QCString &text, const QCString &marker) |
Returns the line number of the line following the line with the marker. | |
QCString | langToString (SrcLangExt lang) |
Returns a string representation of lang. | |
QCString | getLanguageSpecificSeparator (SrcLangExt lang, bool classScope) |
Returns the scope separator to use given the programming language lang. | |
bool | isURL (const QCString &url) |
Checks whether the given url starts with a supported protocol. | |
QCString | correctURL (const QCString &url, const QCString &relPath) |
Corrects URL url according to the relative path relPath. | |
bool | protectionLevelVisible (Protection prot) |
QCString | stripIndentation (const QCString &s, bool skipFirstLine) |
void | stripIndentationVerbatim (QCString &doc, const int indentationLevel) |
bool | fileVisibleInIndex (const FileDef *fd, bool &genSourceFile) |
QCString | extractDirection (QCString &docs) |
Strip the direction part from docs and return it as a string in canonical form The input docs string can start with e.g. | |
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 class that are to be added to this list. | |
bool | mainPageHasTitle () |
QCString | getDotImageExtension () |
bool | openOutputFile (const QCString &outFile, std::ofstream &f) |
static bool | keyWordsFortranC (const char *contents) |
bool | recognizeFixedForm (const QCString &contents, FortranFormat format) |
FortranFormat | convertFileNameFortranParserCode (QCString fn) |
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 | |
void | checkBlocks (const QCString &s, const QCString fileName, const SelectionMarkerInfo &markerInfo) |
QCString | removeEmptyLines (const QCString &s) |
StringVector | split (const std::string &s, const std::string &delimiter) |
split input string s by string delimiter delimiter. | |
StringVector | split (const std::string &s, const reg::Ex &delimiter) |
split input string s by regular expression delimiter delimiter. | |
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 | |
int | findIndex (const std::string &s, const reg::Ex &re) |
find the index of the first occurrence of pattern re in a string s returns -1 if the pattern could not be found | |
std::string | join (const StringVector &sv, const std::string &delimiter) |
create a string where the string in the vector are joined by the given delimiter | |
QCString | integerToAlpha (int n, bool upper) |
QCString | integerToRoman (int n, bool upper) |
QCString | detab (const QCString &s, size_t &refIndent) |
QCString | getProjectId () |
int | computeQualifiedIndex (const QCString &name) |
Return the index of the last :: in the string name that is still before the first <. | |
void | mergeMemberOverrideOptions (MemberDefMutable *md1, MemberDefMutable *md2) |
size_t | updateColumnCount (const char *s, size_t col) |
QCString | mangleCSharpGenericName (const QCString &name) |
QCString | demangleCSharpGenericName (const QCString &name, const QCString &templArgs) |
Variables | |
static const char * | hex = "0123456789ABCDEF" |
const int | maxInheritanceDepth = 100000 |
static const char | constScope [] = { 'c', 'o', 'n', 's', 't', ':' } |
static const char | volatileScope [] = { 'v', 'o', 'l', 'a', 't', 'i', 'l', 'e', ':' } |
static const char | virtualScope [] = { 'v', 'i', 'r', 't', 'u', 'a', 'l', ':' } |
static const char | operatorScope [] = { 'o', 'p', 'e', 'r', 'a', 't', 'o', 'r', '?', '?', '?' } |
static CharAroundSpace | g_charAroundSpace |
else | |
std::string_view | word =txtStr.substr(newIndex,matchLen) |
QCString | matchWord = substitute(substitute(QCString(word),"\\","::"),".","::") |
bool | found =FALSE |
skipIndex =index=newIndex+matchLen | |
std::string_view | lastPart = txtStr.substr(skipIndex) |
static std::mutex | g_matchArgsMutex |
static Cache< std::string, FindFileCacheElem > | g_findFileDefCache (5000) |
static std::mutex | g_findFileDefMutex |
static std::unordered_map< std::string, int > | g_usedNames |
static std::mutex | g_usedNamesMutex |
static int | g_usedNamesCount =1 |
static std::unordered_map< std::string, SrcLangExt > | g_extLookup |
static std::vector< Lang2ExtMap > | g_lang2extMap |
#define HEXTONUM | ( | x | ) |
Referenced by replaceColorMarkers().
#define MATCH |
Definition at line 1853 of file util.cpp.
Referenced by matchArgument2(), and matchArguments2().
#define NOMATCH |
Definition at line 1854 of file util.cpp.
Referenced by matchArgument2(), and matchArguments2().
#define REL_PATH_TO_ROOT "../../" |
Definition at line 95 of file util.cpp.
Referenced by relativePathToRoot().
void addCodeOnlyMappings | ( | ) |
Definition at line 5699 of file util.cpp.
References updateLanguageMapping().
Referenced by generateOutput().
void addGroupListToTitle | ( | OutputList & | ol, |
const Definition * | d ) |
Definition at line 5389 of file util.cpp.
References recursivelyAddGroupListToTitle(), and TRUE.
Referenced by ClassDefImpl::writeDocumentation(), ConceptDefImpl::writeDocumentation(), FileDefImpl::writeDocumentation(), GroupDefImpl::writeDocumentation(), ModuleDefImpl::writeDocumentation(), and NamespaceDefImpl::writeDocumentation().
void addHtmlExtensionIfMissing | ( | QCString & | fName | ) |
Definition at line 5399 of file util.cpp.
References QCString::find(), QCString::findRev(), Doxygen::htmlFileExtension, and QCString::isEmpty().
Referenced by HtmlCodeGenerator::_writeCodeLink(), Crawlmap::addContentsItem(), DocSets::addContentsItem(), EclipseHelp::addContentsItem(), HtmlHelp::addContentsItem(), Qhp::addContentsItem(), Crawlmap::addIndexFile(), Sitemap::addIndexFile(), common_attributes(), convertMapFile(), dumpSymbol(), field2URL(), FTVHelp::Private::generateTree(), Crawlmap::initialize(), makeFileName(), makeFileName(), makeURL(), DefinitionImpl::navigationPathAsString(), node2URL(), HtmlDocVisitor::operator()(), replaceRef(), SearchIndexExternal::setCurrentDoc(), HtmlGenerator::startFile(), HtmlGenerator::startIndexItem(), HtmlDocVisitor::startLink(), HtmlGenerator::startTextLink(), LayoutNavEntry::url(), DefinitionImpl::writeDocAnchorsToTagFile(), writeIndex(), HtmlGenerator::writeInheritedSectionTitle(), writeJavasScriptSearchDataPage(), writeMapArea(), HtmlGenerator::writeObjectLink(), ClassDefImpl::writeQuickMemberLinks(), FileDefImpl::writeQuickMemberLinks(), GroupDefImpl::writeQuickMemberLinks(), NamespaceDefImpl::writeQuickMemberLinks(), HtmlGenerator::writeSplitBarAsString(), HtmlGenerator::writeStartAnnoItem(), HtmlGenerator::writeSummaryLink(), ClassDefImpl::writeTagFile(), ConceptDefImpl::writeTagFile(), DirDefImpl::writeTagFile(), FileDefImpl::writeTagFile(), GroupDefImpl::writeTagFile(), MemberDefImpl::writeTagFile(), ModuleDefImpl::writeTagFile(), NamespaceDefImpl::writeTagFile(), PageDefImpl::writeTagFile(), VhdlDocGen::writeTagFile(), DocSets::writeToken(), HtmlCodeGenerator::writeTooltip(), and DotNode::writeUrl().
void addMembersToMemberGroup | ( | MemberList * | ml, |
MemberGroupList * | pMemberGroups, | ||
const Definition * | context ) |
Definition at line 4594 of file util.cpp.
References ASSERT, MemberList::container(), Definition::docFile(), end(), MemberGroup::insertMember(), Doxygen::memberGroupInfoMap, MemberVector::remove(), MemberDef::setMemberGroup(), and toMemberDefMutable().
void addRefItem | ( | const RefItemVector & | sli, |
const QCString & | key, | ||
const QCString & | prefix, | ||
const QCString & | name, | ||
const QCString & | title, | ||
const QCString & | args, | ||
const Definition * | scope ) |
Definition at line 5302 of file util.cpp.
References QCString::isEmpty(), and prefix.
Referenced by MemberDefImpl::addListReference(), addListReferences(), ClassDefImpl::addListReferences(), FileDefImpl::addListReferences(), GroupDefImpl::addListReferences(), ModuleDefImpl::addListReferences(), NamespaceDefImpl::addListReferences(), and buildPageList().
PageDef * addRelatedPage | ( | const QCString & | name, |
const QCString & | ptitle, | ||
const QCString & | doc, | ||
const QCString & | fileName, | ||
int | docLine, | ||
int | startLine, | ||
const RefItemVector & | sli, | ||
GroupDef * | gd, | ||
const TagInfo * | tagInfo, | ||
bool | xref, | ||
SrcLangExt | lang ) |
Definition at line 5172 of file util.cpp.
References SectionManager::add(), GroupDef::addPage(), convertNameToFile(), createPageDef(), Definition::docFile(), QCString::endsWith(), FALSE, SectionInfo::fileName(), TagInfo::fileName, LinkedMap< T, Hash, KeyEqual, Map >::find(), Definition::getOutputFileBase(), Definition::getReference(), Definition::getStartBodyLine(), PageDef::hasTitle(), Doxygen::htmlFileExtension, SectionManager::instance(), QCString::isEmpty(), Definition::isReference(), QCString::left(), QCString::length(), SectionInfo::lineNr(), Definition::name(), SectionType::Page, Doxygen::pageLinkedMap, SectionInfo::ref(), SectionManager::replace(), QCString::right(), DefinitionMutable::setBodySegment(), DefinitionMutable::setDocumentation(), PageDef::setFileName(), DefinitionMutable::setLanguage(), PageDef::setNestingLevel(), PageDef::setPageScope(), DefinitionMutable::setReference(), DefinitionMutable::setRefItems(), PageDef::setShowLineNo(), PageDef::setTitle(), SectionInfo::setTitle(), QCString::stripWhiteSpace(), TagInfo::tagName, PageDef::title(), TRUE, and warn.
QCString argListToString | ( | const ArgumentList & | al, |
bool | useCanonicalType, | ||
bool | showDefVals ) |
Definition at line 1201 of file util.cpp.
References Argument::array, Argument::attrib, ArgumentList::begin(), Argument::canType, ArgumentList::constSpecifier(), Argument::defval, ArgumentList::end(), QCString::find(), ArgumentList::hasParameters(), QCString::isEmpty(), QCString::left(), LValue, QCString::mid(), Argument::name, ArgumentList::pureSpecifier(), ArgumentList::refQualifier(), removeRedundantWhiteSpace(), RValue, ArgumentList::trailingReturnType(), Argument::type, and ArgumentList::volatileSpecifier().
Referenced by addMemberFunction(), DocParser::checkArgumentName(), DocParser::checkUnOrMultipleDocumentedParams(), findFriends(), findGlobalMember(), findMember(), SymbolResolver::Private::getResolvedSymbol(), matchArguments2(), matchTemplateArguments(), mergeArguments(), and substituteTemplateArgumentsInString().
void checkBlocks | ( | const QCString & | s, |
const QCString | fileName, | ||
const SelectionMarkerInfo & | markerInfo ) |
Definition at line 7009 of file util.cpp.
References SelectionMarkerInfo::beginLen, SelectionMarkerInfo::beginStr, SelectionMarkerInfo::closeLen, SelectionMarkerInfo::closeStr, QCString::data(), SelectionMarkerInfo::endLen, SelectionMarkerInfo::endStr, QCString::isEmpty(), SelectionMarkerInfo::markerChar, qstrncmp(), and warn.
Referenced by HtmlGenerator::init(), and LatexGenerator::init().
Definition at line 5394 of file util.cpp.
References QCString::length(), and QCString::right().
Referenced by copyLatexStyleSheet(), and extraLatexStyleSheet().
bool checkIfTypedef | ( | const Definition * | scope, |
const FileDef * | fileScope, | ||
const QCString & | n ) |
Returns true iff the given name string appears to be a typedef in scope.
Definition at line 5809 of file util.cpp.
References FALSE, getMemberFromSymbol(), MemberDef::isTypedef(), and TRUE.
Referenced by isVarWithConstructor().
void clearSubDirs | ( | const Dir & | d | ) |
Definition at line 4167 of file util.cpp.
References Config_getBool, Config_getInt, Dir::exists(), Dir::isEmpty(), Dir::rmdir(), QCString::sprintf(), and QCString::str().
Referenced by DocbookGenerator::cleanup(), HtmlGenerator::cleanup(), LatexGenerator::cleanup(), ManGenerator::cleanup(), RTFGenerator::cleanup(), and generateXML().
int computeQualifiedIndex | ( | const QCString & | name | ) |
Return the index of the last :: in the string name that is still before the first <.
Definition at line 7311 of file util.cpp.
References QCString::data(), and QCString::length().
Referenced by addToMap(), addVariable(), buildFunctionList(), buildTypedefList(), getMemberFromSymbol(), SymbolResolver::Private::getResolvedSymbolRec(), and SymbolResolver::Private::getResolvedTypeRec().
bool containsWord | ( | const QCString & | str, |
const char * | word ) |
returns TRUE
iff string s contains word w
Definition at line 5465 of file util.cpp.
References QCString::isEmpty(), QCString::str(), reg::Match::str(), and word.
Definition at line 4544 of file util.cpp.
References GrowBuf::addChar(), GrowBuf::addStr(), QCString::data(), end(), GrowBuf::get(), HtmlEntityMapper::instance(), QCString::isEmpty(), HtmlEntityMapper::name2sym(), and HtmlEntityMapper::Sym_Unknown.
Referenced by convertToJSString(), generateSqlite3ForPage(), generateXMLForPage(), getSQLDocBlock(), and parseCommentAsText().
FortranFormat convertFileNameFortranParserCode | ( | QCString | fn | ) |
Definition at line 6883 of file util.cpp.
References Fixed, Free, getFileNameExtension(), Doxygen::parserManager, and Unknown.
Referenced by convertCppComments().
This function determines the file name on disk of an item given its name, which could be a class name with template arguments, so special characters need to be escaped.
Definition at line 4004 of file util.cpp.
References Config_getBool, Config_getInt, QCString::data(), escapeCharsInString(), g_usedNames, g_usedNamesCount, g_usedNamesMutex, QCString::isEmpty(), QCString::left(), QCString::length(), QCString::prepend(), QCString::sprintf(), and QCString::str().
Referenced by addRelatedPage(), buildExampleList(), ClassDefImpl::ClassDefImpl(), ClassDefImpl::deepCopy(), DocAnchor::DocAnchor(), DocCite::DocCite(), ModuleDefImpl::getOutputFileBase(), DocParser::handleAHref(), PageDefImpl::PageDefImpl(), CCodeParser::parseCode(), FortranCodeParser::parseCode(), VHDLCodeParser::parseCode(), RefList::RefList(), FileDefImpl::setDiskNameLocal(), and NamespaceDefImpl::setFileNameLocal().
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 class that are to be added to this list.
So for public inheritance, the mapping is 1-1, so outListType1=inListType Private members are to be hidden completely.
For protected inheritance, both protected and public members of the base class should be joined in the protected member section.
For private inheritance, both protected and public members of the base class should be joined in the private member section.
Definition at line 6716 of file util.cpp.
References Config_getBool, MemberListType::Invalid(), MemberListType::isPrivate(), MemberListType::isProtected(), MemberListType::isPublic(), Private, Protected, Public, MemberListType::toProtected(), and MemberListType::toPublic().
Referenced by ClassDefImpl::countInheritedDecMembers(), and ClassDefImpl::writeInheritedMemberDeclarations().
Converts a string to a HTML-encoded string
Definition at line 4463 of file util.cpp.
References GrowBuf::addChar(), GrowBuf::addStr(), QCString::data(), GrowBuf::get(), hex, QCString::isEmpty(), and isId().
Referenced by HtmlCodeGenerator::_writeCodeLink(), HtmlHelp::addContentsItem(), convertToHtmlAndTruncate(), FTVHelp::Private::generateLink(), DefinitionImpl::navigationPathAsString(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlGenerator::startFile(), HtmlDocVisitor::startLink(), substituteHtmlKeywords(), HtmlHelpIndex::writeFields(), HtmlGenerator::writeInheritedSectionTitle(), HtmlGenerator::writeLocalToc(), writeMapArea(), HtmlGenerator::writePageFooter(), ClassDefImpl::writeQuickMemberLinks(), FileDefImpl::writeQuickMemberLinks(), GroupDefImpl::writeQuickMemberLinks(), NamespaceDefImpl::writeQuickMemberLinks(), and HtmlGenerator::writeSearchPage().
Converts a string to a HTML id string
Definition at line 4372 of file util.cpp.
References GrowBuf::addChar(), GrowBuf::addStr(), QCString::data(), FALSE, GrowBuf::get(), hex, and QCString::isEmpty().
Referenced by HtmlGenerator::endClassDiagram(), renderMemberIndicesAsJs(), writeMemberList(), writeQuickMemberIndex(), ClassDefImpl::writeSummaryLinks(), and VhdlDocGen::writeVHDLDeclarations().
Definition at line 4523 of file util.cpp.
References GrowBuf::addChar(), GrowBuf::addStr(), convertCharEntitiesToUTF8(), QCString::data(), GrowBuf::get(), and QCString::isEmpty().
Referenced by generateJSLink(), generateJSNavTree(), renderMemberIndicesAsJs(), and renderQuickLinksAsJs().
Converts a string to an XML-encoded string
Definition at line 4412 of file util.cpp.
References GrowBuf::addChar(), GrowBuf::addStr(), QCString::data(), GrowBuf::get(), QCString::isEmpty(), and isId().
Referenced by DocSets::addContentsItem(), EclipseHelp::addContentsItem(), Qhp::addFile(), Sitemap::addIndexFile(), Qhp::addIndexItem(), XmlDocVisitor::filter(), generateXMLForClass(), generateXMLForConcept(), generateXMLForDir(), generateXMLForFile(), generateXMLForGroup(), generateXMLForMember(), generateXMLForModule(), generateXMLForNamespace(), generateXMLForPage(), generateXMLSection(), DotDirDeps::getImgAltText(), EclipseHelp::initialize(), Qhp::initialize(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), HtmlAttribList::toString(), QhpSectionTree::traverse(), visitPreStart(), SearchIndexExternal::write(), FileDefImpl::writeClassesToTagFile(), NamespaceDefImpl::writeClassesToTagFile(), NamespaceDefImpl::writeConceptsToTagFile(), DefinitionImpl::writeDocAnchorsToTagFile(), DotNode::writeDocbook(), DotGraph::writeGraphHeader(), writeInnerClasses(), writeInnerConcepts(), writeInnerDirs(), writeInnerFiles(), writeInnerGroups(), writeInnerModules(), writeInnerNamespaces(), writeInnerPages(), writeJavascriptSearchData(), writeJavasScriptSearchDataPage(), DotNode::writeLabel(), writeListOfAllMembers(), writeMapArea(), writeMemberReference(), ClassDefImpl::writeTagFile(), ConceptDefImpl::writeTagFile(), DirDefImpl::writeTagFile(), FileDefImpl::writeTagFile(), GroupDefImpl::writeTagFile(), MemberDefImpl::writeTagFile(), ModuleDefImpl::writeTagFile(), NamespaceDefImpl::writeTagFile(), PageDefImpl::writeTagFile(), VhdlDocGen::writeTagFile(), writeTemplateArgumentList(), DocSets::writeToken(), DotNode::writeXML(), writeXMLLink(), and writeXMLString().
Copies the contents of file with name src to the newly created file with name dest.
Returns TRUE if successful.
Definition at line 6326 of file util.cpp.
References err, and QCString::str().
Referenced by copyExtraFiles(), copyIcon(), copyLatexStyleSheet(), copyLogo(), copyStyleSheet(), DocParser::findAndCopyImage(), FormulaManager::generateImages(), CitationManager::generatePage(), RTFGenerator::init(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), and substituteLatexKeywords().
Some strings have been corrected but the requirement regarding the fact that an id cannot have a digit at the first position. To overcome problems with double labels we always place an "a" in front
Definition at line 4405 of file util.cpp.
References QCString::isEmpty().
Referenced by DotGraph::generateCode(), and DotFilePatcher::run().
Corrects URL url according to the relative path relPath.
Returns the corrected URL. For absolute URLs no correction will be done.
Definition at line 6414 of file util.cpp.
References QCString::isEmpty(), isURL(), and QCString::prepend().
Referenced by HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), XmlDocVisitor::operator()(), startQuickIndexItem(), and writeIndexHierarchyEntries().
QCString createHtmlUrl | ( | const QCString & | relPath, |
const QCString & | ref, | ||
bool | href, | ||
bool | isLocalFile, | ||
const QCString & | targetFileName, | ||
const QCString & | anchor ) |
Definition at line 6189 of file util.cpp.
References externalRef(), and QCString::isEmpty().
Referenced by HtmlCodeGenerator::_writeCodeLink(), HtmlDocVisitor::startLink(), HtmlGenerator::startTextLink(), HtmlGenerator::writeObjectLink(), and HtmlCodeGenerator::writeTooltip().
void createSubDirs | ( | const Dir & | d | ) |
Definition at line 4140 of file util.cpp.
References Config_getBool, Config_getInt, Dir::exists(), Dir::mkdir(), QCString::sprintf(), QCString::str(), and term.
Referenced by generateXML(), DocbookGenerator::init(), HtmlGenerator::init(), LatexGenerator::init(), ManGenerator::init(), RTFGenerator::init(), ClassDefImpl::writeQuickMemberLinks(), FileDefImpl::writeQuickMemberLinks(), GroupDefImpl::writeQuickMemberLinks(), and NamespaceDefImpl::writeQuickMemberLinks().
Definition at line 7410 of file util.cpp.
References QCString::endsWith(), QCString::find(), and QCString::left().
Referenced by ClassDefImpl::className().
Definition at line 7207 of file util.cpp.
References GrowBuf::addChar(), GrowBuf::addStr(), Config_getInt, QCString::data(), GrowBuf::get(), getUTF8CharNumBytes(), isUTF8NonBreakableSpace(), QCString::length(), and literal_at().
Referenced by Markdown::process().
Definition at line 4100 of file util.cpp.
References FileInfo::absFilePath(), Config_getBool, Config_getList, FileInfo::dirPath(), FileInfo::exists(), FileInfo::isDir(), QCString::str(), and TRUE.
Referenced by readIncludeFile(), and ModuleManager::resolveImports().
Definition at line 3830 of file util.cpp.
References GrowBuf::addChar(), GrowBuf::addStr(), Config_getBool, QCString::data(), GrowBuf::get(), getCaseSenseNames(), getUTF8CharNumBytes(), hex, and QCString::isEmpty().
Referenced by convertNameToFile(), DotClassGraph::getMapLabel(), DotDirDeps::getMapLabel(), DotGfxHierarchyTable::getMapLabel(), DotGroupCollaboration::getMapLabel(), DotInclDepGraph::getMapLabel(), markdownFileNameToId(), and PageDefImpl::writeDocumentation().
QCString externalLinkTarget | ( | const bool | parent | ) |
Definition at line 6178 of file util.cpp.
References Config_getBool, and parent().
Referenced by HtmlCodeGenerator::_writeCodeLink(), FTVHelp::Private::generateLink(), Markdown::Private::processLink(), replaceRef(), HtmlGenerator::startIndexItem(), HtmlDocVisitor::startLink(), HtmlGenerator::writeInheritedSectionTitle(), writeMapArea(), and HtmlGenerator::writeObjectLink().
Definition at line 6222 of file util.cpp.
References QCString::append(), QCString::at(), end(), QCString::isEmpty(), QCString::length(), QCString::prepend(), QCString::str(), and Doxygen::tagDestinationMap.
Referenced by HtmlHelp::addContentsItem(), convertMapFile(), createHtmlUrl(), generateJSLink(), FTVHelp::Private::generateLink(), replaceRef(), HtmlGenerator::startIndexItem(), LayoutNavEntry::url(), HtmlGenerator::writeInheritedSectionTitle(), writeJavasScriptSearchDataPage(), and writeMapArea().
|
static |
Definition at line 1827 of file util.cpp.
References Argument::array, extractCanonicalType(), QCString::isEmpty(), Argument::name, QCString::stripWhiteSpace(), and Argument::type.
Referenced by matchArgument2().
|
static |
Definition at line 1751 of file util.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, end(), extractClassNameFromType(), getCanonicalTypeForIdentifier(), QCString::isEmpty(), QCString::length(), QCString::mid(), Definition::name(), removeRedundantWhiteSpace(), QCString::right(), QCString::str(), stripIrrelevantConstVolatile(), QCString::stripPrefix(), QCString::stripWhiteSpace(), and word.
Referenced by extractCanonicalArgType(), and getCanonicalTemplateSpec().
int extractClassNameFromType | ( | const QCString & | type, |
int & | pos, | ||
QCString & | name, | ||
QCString & | templSpec, | ||
SrcLangExt | lang ) |
Extracts a (sub-)string from type starting at pos that could form a class. The index of the match is returned and the found class name and a template argument list templSpec. If -1 is returned there are no more matches.
Definition at line 4712 of file util.cpp.
References QCString::clear(), end(), Fortran, QCString::isEmpty(), QCString::length(), QCString::lower(), QCString::mid(), QCString::startsWith(), and QCString::str().
Referenced by extractCanonicalType(), findUsedClassesForClass(), stripClassName(), and stripClassName().
Strip the direction part from docs and return it as a string in canonical form The input docs string can start with e.g.
"[in]", "[in, out]", "[inout]", "[out,in]"...
Definition at line 6665 of file util.cpp.
References end(), and QCString::str().
Referenced by inlineArgListToDoc().
void extractNamespaceName | ( | const QCString & | scopeName, |
QCString & | className, | ||
QCString & | namespaceName, | ||
bool | allowEmptyClass ) |
Input is a scopeName, output is the scopename split into a namespace part (as large as possible) and a classname part.
Definition at line 4197 of file util.cpp.
References QCString::clear(), QCString::endsWith(), QCString::findRev(), getClass(), getResolvedNamespace(), QCString::isEmpty(), QCString::left(), QCString::length(), Definition::name(), and QCString::right().
Referenced by addClassToContext(), addConceptToContext(), findMember(), and writeAlphabeticalClassList().
reads a file with name name and returns it as a string. If filter is TRUE the file will be filtered by any user specified input filter. If name is "-" the string will be read from standard input.
Definition at line 1441 of file util.cpp.
References addTerminalCharIfMissing(), err, FileInfo::exists(), QCString::isEmpty(), FileInfo::isFile(), readInputFile(), and QCString::str().
Referenced by createDVIFile(), extractBoundingBox(), getConvertLatexMacro(), HtmlGenerator::init(), LatexGenerator::init(), LayoutDocManager::parse(), parseInput(), FileDefImpl::parseSource(), parseTagFile(), DocParser::readTextFileByName(), readTextFileByName(), runPlantumlContent(), FileDefImpl::writeSourceBody(), HtmlGenerator::writeStyleInfo(), and writeXMLCodeBlock().
bool fileVisibleInIndex | ( | const FileDef * | fd, |
bool & | genSourceFile ) |
Definition at line 6576 of file util.cpp.
References Config_getBool, FileDef::generateSourceFile(), FileDef::isDocumentationFile(), Definition::isLinkable(), and Definition::isLinkableInProject().
Referenced by countFiles(), dirHasVisibleChildren(), generateJSTree(), writeDirHierarchy(), writeDirTreeNode(), and DirDefImpl::writeFileList().
|
static |
takes the buf of the given length len and converts CR LF (DOS) or CR (MAC) line ending to LF (Unix). Returns the length of the converted content (i.e. the same as len (Unix, MAC) or smaller (DOS).
Definition at line 1302 of file util.cpp.
Referenced by readInputFile().
Definition at line 6077 of file util.cpp.
References end(), and QCString::str().
Referenced by addToIndices(), createJavaScriptSearchIndex(), PerlModGenerator::generatePerlModForPage(), generateSqlite3ForPage(), generateXMLForPage(), mainPageHasOwnTitle(), SearchTerm::makeTitle(), SearchIndexExternal::setCurrentDoc(), HtmlGenerator::startFile(), writeExampleIndex(), writeIndex(), writeJavasScriptSearchDataPage(), HtmlGenerator::writeLocalToc(), and writePages().
bool findAndRemoveWord | ( | QCString & | sentence, |
const char * | word ) |
removes occurrences of whole word from sentence, while keeps internal spaces and reducing multiple sequences of spaces.
Example: sentence=cat+ catfish cat cat concat cat
, word=cat
returns: + catfish concat
Definition at line 5481 of file util.cpp.
References end(), found, QCString::simplifyWhiteSpace(), QCString::str(), and word.
Referenced by isVarWithConstructor().
FileDef * findFileDef | ( | const FileNameLinkedMap * | fnMap, |
const QCString & | n, | ||
bool & | ambig ) |
Definition at line 3408 of file util.cpp.
References Dir::cleanDirPath(), FALSE, FindFileCacheElem::fileDef, Portable::fileSystemIsCaseSensitive(), LinkedMap< T, Hash, KeyEqual, Map >::find(), QCString::findRev(), g_findFileDefCache, g_findFileDefMutex, FileDef::getPath(), FindFileCacheElem::isAmbig, QCString::isEmpty(), QCString::left(), QCString::length(), QCString::lower(), qsnprintf, removeLongPathMarker(), QCString::right(), QCString::str(), and stripFromIncludePath().
Referenced by addIncludeFile(), buildFileList(), checkMarkdownMainfile(), DocParser::findAndCopyImage(), DocParser::findDocsForMemberOrCompound(), findFile(), findFilePath(), generateFileRef(), generateFileSources(), DocParser::handleLinkedWord(), DocbookDocVisitor::operator()(), XmlDocVisitor::operator()(), DocDiaFile::parse(), DocDotFile::parse(), DocMscFile::parse(), DocPlantUmlFile::parse(), parseFilesMultiThreading(), parseFilesSingleThreading(), Markdown::Private::processLink(), readIncludeFile(), readTextFileByName(), ModuleManager::resolveImports(), resolveLink(), ModuleManager::resolvePartitions(), resolveRef(), and setFileName().
Definition at line 3491 of file util.cpp.
References FileDef::absFilePath(), FileInfo::absFilePath(), Config_getList, Doxygen::exampleNameLinkedMap, FileInfo::exists(), findFileDef(), found, Portable::pathSeparator(), and QCString::str().
Referenced by readIncludeFile(), and DocParser::readTextFileByName().
int findIndex | ( | const std::string & | s, |
const reg::Ex & | re ) |
find the index of the first occurrence of pattern re in a string s returns -1 if the pattern could not be found
Definition at line 7149 of file util.cpp.
References reg::search().
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 at line 7141 of file util.cpp.
Referenced by initUCF(), VhdlDocGen::parseForBinding(), VhdlDocGen::parseUCF(), DotFilePatcher::run(), and VhdlDocGen::writeFormatString().
|
static |
Definition at line 2229 of file util.cpp.
References MemberDef::argumentList(), MemberDef::getFileDef(), MemberDef::getGroupDef(), Definition::getLanguage(), MemberDef::getNamespaceDef(), Definition::getOuterScope(), Doxygen::globalScope, MemberDef::isDefine(), QCString::isEmpty(), Definition::isLinkable(), Definition::isReference(), MemberDef::isStatic(), matchArguments2(), stringToArgumentList(), and TRUE.
Referenced by getDefsOld().
|
static |
Definition at line 5321 of file util.cpp.
References Definition::definitionType(), ClassDef::getFileDef(), ConceptDef::getFileDef(), FileDef::getModuleDef(), toClassDef(), toConceptDef(), toFileDef(), Definition::TypeClass, Definition::TypeConcept, and Definition::TypeFile.
Referenced by recursivelyAddGroupListToTitle().
int findParameterList | ( | const QCString & | name | ) |
Returns the position in the string where a function parameter list begins, or -1 if one is not found.
Definition at line 836 of file util.cpp.
References QCString::findRev(), and QCString::mid().
Referenced by resolveRef().
Definition at line 4058 of file util.cpp.
References QCString::data(), QCString::length(), QCString::setNum(), and stripFromPath().
void generateFileRef | ( | OutputList & | ol, |
const QCString & | name, | ||
const QCString & | text ) |
Definition at line 3380 of file util.cpp.
References OutputList::docify(), findFileDef(), Definition::getOutputFileBase(), Definition::getReference(), Doxygen::inputNameLinkedMap, QCString::isEmpty(), Definition::isLinkable(), and OutputList::writeObjectLink().
QCString generateMarker | ( | int | id | ) |
Generate a place holder for a position in a list. Used for translators to be able to specify different elements orders depending on whether text flows from left to right or visa versa.
Definition at line 290 of file util.cpp.
References qsnprintf.
Referenced by TranslatorAfrikaans::trWriteList(), TranslatorArabic::trWriteList(), TranslatorArmenian::trWriteList(), TranslatorBrazilian::trWriteList(), TranslatorBulgarian::trWriteList(), TranslatorCatalan::trWriteList(), TranslatorChinese::trWriteList(), TranslatorChinesetraditional::trWriteList(), TranslatorCroatian::trWriteList(), TranslatorCzech::trWriteList(), TranslatorDanish::trWriteList(), TranslatorDutch::trWriteList(), TranslatorEnglish::trWriteList(), TranslatorEsperanto::trWriteList(), TranslatorFinnish::trWriteList(), TranslatorFrench::trWriteList(), TranslatorGerman::trWriteList(), TranslatorGreek::trWriteList(), TranslatorHindi::trWriteList(), TranslatorHungarian::trWriteList(), TranslatorIndonesian::trWriteList(), TranslatorItalian::trWriteList(), TranslatorJapanese::trWriteList(), TranslatorKorean::trWriteList(), TranslatorLatvian::trWriteList(), TranslatorLithuanian::trWriteList(), TranslatorMacedonian::trWriteList(), TranslatorNorwegian::trWriteList(), TranslatorPersian::trWriteList(), TranslatorPolish::trWriteList(), TranslatorPortuguese::trWriteList(), TranslatorRomanian::trWriteList(), TranslatorRussian::trWriteList(), TranslatorSerbian::trWriteList(), TranslatorSerbianCyrillic::trWriteList(), TranslatorSlovak::trWriteList(), TranslatorSlovene::trWriteList(), TranslatorSpanish::trWriteList(), TranslatorSwedish::trWriteList(), TranslatorTurkish::trWriteList(), TranslatorUkrainian::trWriteList(), and TranslatorVietnamese::trWriteList().
bool genericPatternMatch | ( | const FileInfo & | fi, |
const PatternList & | patList, | ||
PatternElem & | elem, | ||
PatternGet | getter ) |
Definition at line 6101 of file util.cpp.
References FileInfo::absFilePath(), FALSE, FileInfo::fileName(), FileInfo::filePath(), Portable::fileSystemIsCaseSensitive(), found, getCaseSenseNames(), reg::Ex::isValid(), QCString::lower(), reg::match(), QCString::str(), and reg::Ex::Wildcard.
Referenced by getEncoding(), and patternMatch().
|
static |
Definition at line 1577 of file util.cpp.
References QCString::at(), extractCanonicalType(), QCString::isEmpty(), Java, QCString::length(), resolveTypeDef(), QCString::right(), and QCString::stripWhiteSpace().
Referenced by getCanonicalTypeForIdentifier().
|
static |
Definition at line 1597 of file util.cpp.
References AUTO_TRACE, AUTO_TRACE_ADD, AUTO_TRACE_EXIT, FALSE, getCanonicalTemplateSpec(), getCanonicalTypeForIdentifier(), Definition::getLanguage(), SymbolResolver::getResolvedType(), SymbolResolver::getTemplateSpec(), SymbolResolver::getTypedef(), QCString::isEmpty(), MemberDef::isEnumerate(), ClassDef::isTemplate(), MemberDef::isTypedef(), ClassDef::isUsedOnly(), Java, Definition::name(), Definition::qualifiedName(), ClassDef::qualifiedNameWithTemplateParameters(), removeRedundantWhiteSpace(), SymbolResolver::resolveClass(), resolveTypeDef(), QCString::startsWith(), stripDeclKeywords(), QCString::stripPrefix(), stripScope(), stripTemplateSpecifiersFromScope(), MemberDef::typeString(), and word.
Referenced by extractCanonicalType(), and getCanonicalTypeForIdentifier().
bool getCaseSenseNames | ( | ) |
Definition at line 3820 of file util.cpp.
References Config_getEnum, and Portable::fileSystemIsCaseSensitive().
Referenced by escapeCharsInString(), genericPatternMatch(), FileNameFn::searchKey(), and unescapeCharsInString().
GetDefResult getDefs | ( | const GetDefInput & | input | ) |
Definition at line 2822 of file util.cpp.
References GetDefInput::args, GetDefResult::cd, GetDefInput::checkCV, GetDefInput::currentFile, GetDefResult::fd, GetDefInput::forceEmptyScope, GetDefResult::found, GetDefResult::gd, getDefsNew(), getDefsOld(), GetDefResult::md, GetDefInput::memberName, Definition::name(), GetDefResult::nd, qPrint(), and GetDefInput::scopeName.
Referenced by DocParser::findDocsForMemberOrCompound(), getLinkInScope(), getLinkInScope(), if(), and resolveRef().
GetDefResult getDefsNew | ( | const GetDefInput & | input | ) |
Definition at line 2273 of file util.cpp.
References GetDefInput::args, GetDefResult::cd, GetDefInput::checkCV, GetDefResult::cnd, GetDefInput::currentFile, Definition::definitionType(), GetDefResult::fd, GetDefResult::found, GetDefResult::gd, MemberDef::getClassDef(), MemberDef::getFileDef(), MemberDef::getGroupDef(), MemberDef::getNamespaceDef(), Doxygen::globalScope, GetDefInput::insideCode, QCString::isEmpty(), GetDefResult::md, GetDefInput::memberName, GetDefResult::modd, GetDefResult::nd, SymbolResolver::resolveSymbol(), GetDefInput::scopeName, SymbolResolver::setFileScope(), toClassDef(), toConceptDef(), toMemberDef(), toModuleDef(), toNamespaceDef(), Definition::TypeClass, Definition::TypeConcept, Definition::TypeMember, Definition::TypeModule, and Definition::TypeNamespace.
Referenced by getDefs().
GetDefResult getDefsOld | ( | const GetDefInput & | input | ) |
Searches for a member definition given its name 'memberName' as a string. memberName may also include a (partial) scope to indicate the scope in which the member is located.
The parameter 'scName' is a string representing the name of the scope in which the link was found.
In case of a function args contains a string representation of the argument list. Passing 0 means the member has no arguments. Passing "()" means any argument list will do, but "()" is preferred.
The function returns TRUE if the member is known and documented or FALSE if it is not. If TRUE is returned parameter 'md' contains a pointer to the member definition. Furthermore exactly one of the parameter 'cd', 'nd', or 'fd' will be non-zero:
Definition at line 2348 of file util.cpp.
References GetDefInput::args, MemberDef::argumentList(), GetDefResult::cd, GetDefInput::checkCV, QCString::clear(), Cpp, GetDefInput::currentFile, MemberDef::enumFieldList(), FALSE, GetDefResult::fd, QCString::find(), findMembersWithSpecificName(), QCString::findRev(), GetDefInput::forceEmptyScope, found, GetDefResult::found, Doxygen::functionNameLinkedMap, GetDefResult::gd, MemberDef::getClassDef(), MemberDef::getEnumScope(), ClassDef::getFileDef(), MemberDef::getFileDef(), MemberDef::getGroupDef(), Definition::getLanguage(), MemberDef::getNamespaceDef(), Definition::getOuterScope(), SymbolResolver::getTypedef(), Doxygen::globalScope, QCString::isEmpty(), MemberDef::isEnumerate(), MemberDef::isForeign(), Definition::isLinkable(), MemberDef::isRelated(), MemberDef::isStrong(), MemberDef::isStrongEnumValue(), QCString::left(), QCString::length(), Definition::localName(), matchArguments2(), maxInheritanceDepth, GetDefResult::md, GetDefInput::memberName, Doxygen::memberNameLinkedMap, QCString::mid(), minClassDistance(), Definition::name(), Doxygen::namespaceLinkedMap, GetDefResult::nd, MemberName::rbegin(), MemberName::rend(), MemberDef::resolveAlias(), SymbolResolver::resolveClass(), QCString::right(), rightScopeMatch(), GetDefInput::scopeName, QCString::startsWith(), stringToArgumentList(), stripTemplateSpecifiersFromScope(), substitute(), and TRUE.
Referenced by getDefs().
QCString getDotImageExtension | ( | ) |
Definition at line 6776 of file util.cpp.
References Config_getEnumAsString, QCString::find(), and QCString::left().
Referenced by RTFGenerator::endCallGraph(), RTFGenerator::endDirDepGraph(), RTFGenerator::endDotGraph(), RTFGenerator::endInclDepGraph(), DotGraph::generateCode(), DotGraph::imgName(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), DocbookDocVisitor::startDotFile(), TranslatorAfrikaans::trLegendDocs(), TranslatorArabic::trLegendDocs(), TranslatorArmenian::trLegendDocs(), TranslatorBrazilian::trLegendDocs(), TranslatorBulgarian::trLegendDocs(), TranslatorCatalan::trLegendDocs(), TranslatorChinese::trLegendDocs(), TranslatorChinesetraditional::trLegendDocs(), TranslatorCroatian::trLegendDocs(), TranslatorCzech::trLegendDocs(), TranslatorDanish::trLegendDocs(), TranslatorDutch::trLegendDocs(), TranslatorEnglish::trLegendDocs(), TranslatorEsperanto::trLegendDocs(), TranslatorFinnish::trLegendDocs(), TranslatorFrench::trLegendDocs(), TranslatorGerman::trLegendDocs(), TranslatorGreek::trLegendDocs(), TranslatorHindi::trLegendDocs(), TranslatorHungarian::trLegendDocs(), TranslatorIndonesian::trLegendDocs(), TranslatorItalian::trLegendDocs(), TranslatorJapanese::trLegendDocs(), TranslatorKorean::trLegendDocs(), TranslatorLatvian::trLegendDocs(), TranslatorLithuanian::trLegendDocs(), TranslatorMacedonian::trLegendDocs(), TranslatorNorwegian::trLegendDocs(), TranslatorPersian::trLegendDocs(), TranslatorPolish::trLegendDocs(), TranslatorPortuguese::trLegendDocs(), TranslatorRomanian::trLegendDocs(), TranslatorRussian::trLegendDocs(), TranslatorSerbian::trLegendDocs(), TranslatorSerbianCyrillic::trLegendDocs(), TranslatorSlovak::trLegendDocs(), TranslatorSlovene::trLegendDocs(), TranslatorSpanish::trLegendDocs(), TranslatorSwedish::trLegendDocs(), TranslatorTurkish::trLegendDocs(), TranslatorUkrainian::trLegendDocs(), TranslatorVietnamese::trLegendDocs(), DocbookDocVisitor::writeDotFile(), RTFDocVisitor::writeDotFile(), writeDotGraphFromFile(), writeDotImageMapFromFile(), DotLegendGraph::writeGraph(), writeGraphInfo(), HtmlDocVisitor::writeMscFile(), and HtmlDocVisitor::writePlantUMLFile().
Definition at line 6164 of file util.cpp.
References Config_getString, InputFileEncoding::encoding, genericPatternMatch(), and Doxygen::inputFileEncodingList.
Referenced by readCodeFragment(), and readInputFile().
looks for a filter for the file name. Returns the name of the filter if there is a match for the file name, otherwise an empty string. In case inSourceCode is TRUE then first the source filter list is considered.
Definition at line 1369 of file util.cpp.
References Config_getList, Config_getString, FALSE, found, getFilterFromList(), QCString::isEmpty(), QCString::length(), and QCString::mid().
Referenced by FilterCache::getFileContents(), CodeFragmentManager::parseCodeFragment(), readCodeFragment(), readInputFile(), and FileDefImpl::writeSourceBody().
Definition at line 5747 of file util.cpp.
References QCString::findRev(), QCString::isEmpty(), and QCString::mid().
Referenced by TooltipManager::addTooltip(), anonymous_namespace{tagreader.cpp}::TagFileParser::buildLists(), convertFileNameFortranParserCode(), generateExampleDocs(), FileDefImpl::isDocumentationFile(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), ManDocVisitor::operator()(), RTFDocVisitor::operator()(), XmlDocVisitor::operator()(), CodeFragmentManager::parseCodeFragment(), and MarkdownOutlineParser::parseInput().
|
static |
Definition at line 1328 of file util.cpp.
References FALSE, Portable::fileSystemIsCaseSensitive(), QCString::find(), found, reg::Ex::isValid(), QCString::left(), QCString::lower(), reg::match(), QCString::mid(), QCString::str(), TRUE, and reg::Ex::Wildcard.
Referenced by getFileFilter().
SrcLangExt getLanguageFromCodeLang | ( | QCString & | fileName | ) |
Routine to handle the language attribute of the \code
command.
Definition at line 5723 of file util.cpp.
References QCString::at(), Cpp, g_lang2extMap, getLanguageFromFileName(), QCString::lower(), QCString::mid(), and Unknown.
Referenced by DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), ManDocVisitor::operator()(), RTFDocVisitor::operator()(), and XmlDocVisitor::operator()().
SrcLangExt getLanguageFromFileName | ( | const QCString & | fileName, |
SrcLangExt | defLang ) |
Definition at line 5705 of file util.cpp.
References QCString::at(), FileInfo::extension(), FALSE, g_extLookup, QCString::isEmpty(), QCString::lower(), QCString::prepend(), and QCString::str().
Referenced by MemberDefImpl::_writeMultiLineInitializer(), ClassDefImpl::ClassDefImpl(), convertCppComments(), DocRef::DocRef(), FileDefImpl::FileDefImpl(), generateExampleDocs(), getLanguageFromCodeLang(), guessSection(), FileDefImpl::isDocumentationFile(), COutlineParser::needsPreprocessing(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), ManDocVisitor::operator()(), ManDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), CodeFragmentManager::parseCodeFragment(), parseFilesMultiThreading(), parseFilesSingleThreading(), parseMain(), Markdown::Private::processLink(), readCodeFragment(), setContext(), setFileName(), validatingParseDoc(), and writeXMLCodeBlock().
QCString getLanguageSpecificSeparator | ( | SrcLangExt | lang, |
bool | classScope ) |
Returns the scope separator to use given the programming language lang.
Definition at line 6386 of file util.cpp.
References CSharp, Java, PHP, Python, and VHDL.
Referenced by DefinitionImpl::_writeSourceRefList(), addGlobalFunction(), MemberDefImpl::addListReference(), addMethodToClass(), addVariableToFile(), MemberDefImpl::displayDefinition(), DefinitionAliasImpl::init(), linkToText(), makeDisplayName(), makeDisplayName(), makeQualifiedNameWithTemplateParameters(), ClassDefImpl::mergeMembersFromBaseClasses(), DefinitionImpl::qualifiedName(), MemberDefImpl::qualifiedName(), SearchIndex::setCurrentDoc(), validatingParseDoc(), MemberDefImpl::warnIfUndocumented(), writeAlphabeticalClassList(), MemberDefImpl::writeDeclaration(), writeDefArgumentList(), MemberDefImpl::writeDocumentation(), writeJavasScriptSearchDataPage(), MemberDefImpl::writeLink(), and writeMemberReference().
|
static |
Definition at line 5757 of file util.cpp.
References computeQualifiedIndex(), Definition::definitionType(), Doxygen::globalScope, SymbolResolver::isAccessibleFromWithExpScope(), QCString::isEmpty(), QCString::left(), QCString::mid(), replaceNamespaceAliases(), Doxygen::symbolMap, toMemberDef(), Definition::TypeClass, Definition::TypeMember, and Definition::TypeNamespace.
Referenced by checkIfTypedef().
QCString getOverloadDocs | ( | ) |
Returns the standard string that is generated when the \overload command is used.
Definition at line 4586 of file util.cpp.
References theTranslator.
Referenced by addMemberDocs(), addOverloaded(), and CommentScanner::parseCommentBlock().
int getPrefixIndex | ( | const QCString & | name | ) |
Returns the character index within name of the first prefix in Config_getList(IGNORE_PREFIX) that matches name at the left hand side, or zero if no match was found
Definition at line 3736 of file util.cpp.
References Config_getList, QCString::data(), and QCString::isEmpty().
Referenced by Index::addClassMemberNameToIndex(), Index::addFileMemberNameToIndex(), Index::addModuleMemberNameToIndex(), Index::addNamespaceMemberNameToIndex(), SearchIndex::addWordRec(), parseInput(), writeAlphabeticalClassList(), and writeMemberList().
QCString getProjectId | ( | ) |
Definition at line 7298 of file util.cpp.
References Config_getString, QCString::data(), QCString::isEmpty(), and QCString::length().
Referenced by generateJSNavTree(), HtmlGenerator::init(), and writeJavaScriptSearchIndex().
|
static |
Searches for a scope definition given its name as a string via parameter scope
.
The parameter docScope
is a string representing the name of the scope in which the scope
string was found.
The function returns TRUE if the scope is known and documented or FALSE if it is not. If TRUE is returned exactly one of the parameter cd
, nd
will be non-zero:
cd
is non zero, the scope was a class pointed to by cd.nd
is non zero, the scope was a namespace pointed to by nd. Definition at line 2890 of file util.cpp.
References QCString::at(), Doxygen::conceptLinkedMap, FALSE, QCString::findRev(), getClass(), ModuleManager::instance(), QCString::isEmpty(), Definition::isLinkable(), QCString::left(), QCString::length(), Doxygen::namespaceLinkedMap, QCString::prepend(), QCString::right(), and TRUE.
Referenced by resolveRef().
int getScopeFragment | ( | const QCString & | s, |
int | p, | ||
int * | l ) |
Returns a fragment from scope s, starting at position p.
s | the scope name as a string. |
p | the start position (0 is the first). |
l | the resulting length of the fragment. |
Definition at line 5125 of file util.cpp.
References QCString::at(), found, and QCString::length().
Referenced by buildScopeFromQualifiedName(), findScopeFromQualifiedName(), SymbolResolver::Private::followPath(), resolveTypeDef(), and stripAnonymousNamespaceScope().
try to determine if name is a source or a header file name by looking at the extension. A number of variations is allowed in both upper and lower case) If anyone knows or uses another extension please let me know :-)
Definition at line 349 of file util.cpp.
References Cpp, QCString::findRev(), getLanguageFromFileName(), QCString::lower(), QCString::mid(), QCString::str(), and Unknown.
Referenced by addIncludeFile(), anonymous_namespace{tagreader.cpp}::TagFileParser::buildLists(), ClassDefImpl::ClassDefImpl(), computeClassRelations(), FileDefImpl::FileDefImpl(), FileDefImpl::generateSourceFile(), parseMain(), parseMain(), Preprocessor::processFile(), setFileName(), and warnUndocumentedNamespaces().
if | ( | ! | insideString | ) |
Definition at line 985 of file util.cpp.
References Definition::anchor(), Definition::definitionType(), Fortran, found, GetDefResult::found, getClass(), getConcept(), getDefs(), Definition::getLanguage(), Definition::getOuterScope(), Definition::getOutputFileBase(), Definition::getReference(), SymbolResolver::getTypedef(), Definition::isLinkable(), Definition::isLinkableInProject(), MemberDef::isVariable(), matchWord, GetDefResult::md, Definition::name(), Definition::qualifiedName(), SymbolResolver::resolveClass(), TRUE, Definition::TypeClass, Definition::TypeNamespace, word, and TextGeneratorIntf::writeLink().
if | ( | strLen | , |
35 && | floatingIndex, | ||
30 && | autoBreak ) |
Definition at line 949 of file util.cpp.
References skipIndex, TextGeneratorIntf::writeBreak(), and TextGeneratorIntf::writeString().
Referenced by DocLink::DocLink().
void initDefaultExtensionMapping | ( | ) |
Definition at line 5632 of file util.cpp.
References updateLanguageMapping().
Referenced by initDoxygen().
QCString inlineArgListToDoc | ( | const ArgumentList & | al | ) |
Definition at line 1156 of file util.cpp.
References extractDirection(), and ArgumentList::hasDocumentation().
Referenced by DocParser::processCopyDoc(), and MemberDefImpl::writeDocumentation().
QCString inlineTemplateArgListToDoc | ( | const ArgumentList & | al | ) |
Definition at line 1174 of file util.cpp.
References ArgumentList::hasTemplateDocumentation(), QCString::stripPrefix(), and QCString::stripWhiteSpace().
Referenced by ClassDefImpl::writeDetailedDocumentationBody(), and MemberDefImpl::writeDocumentation().
Definition at line 4246 of file util.cpp.
References ArgumentList::empty(), QCString::find(), getClass(), QCString::isEmpty(), QCString::left(), QCString::length(), QCString::right(), and ClassDef::templateArguments().
Referenced by DotClassGraph::addClass(), generateXMLForClass(), DiagramItem::label(), ClassDefImpl::writeInheritanceGraph(), and ClassDefImpl::writeTagFile().
QCString integerToAlpha | ( | int | n, |
bool | upper ) |
Definition at line 7169 of file util.cpp.
Referenced by ManDocVisitor::operator()(), and RTFDocVisitor::operator()().
QCString integerToRoman | ( | int | n, |
bool | upper ) |
Definition at line 7185 of file util.cpp.
Referenced by LatexDocVisitor::operator()(), ManDocVisitor::operator()(), and RTFDocVisitor::operator()().
|
static |
Definition at line 2952 of file util.cpp.
References QCString::data(), and QCString::isEmpty().
Referenced by resolveRef().
bool isURL | ( | const QCString & | url | ) |
Checks whether the given url starts with a supported protocol.
Definition at line 6402 of file util.cpp.
References QCString::find(), QCString::left(), QCString::str(), and QCString::stripWhiteSpace().
Referenced by correctURL(), Markdown::Private::processLink(), and renderQuickLinksAsJs().
std::string join | ( | const StringVector & | sv, |
const std::string & | delimiter ) |
create a string where the string in the vector are joined by the given delimiter
Definition at line 7156 of file util.cpp.
Referenced by handleAnchor(), handleFormatBlock(), and handleImage().
|
static |
Definition at line 6810 of file util.cpp.
References QCString::lower(), and QCString::str().
Referenced by recognizeFixedForm().
QCString langToString | ( | SrcLangExt | lang | ) |
Returns a string representation of lang.
Definition at line 6360 of file util.cpp.
References Cpp, CSharp, D, Fortran, IDL, Java, JS, Lex, Markdown, ObjC, PHP, Python, Slice, SQL, Unknown, VHDL, and XML.
Referenced by buildNamespaceList(), findUsingDirectives(), generateXMLForClass(), generateXMLForFile(), and generateXMLForNamespace().
Definition at line 892 of file util.cpp.
References QCString::at(), QCString::left(), and QCString::length().
Referenced by addClassToContext(), addConceptToContext(), buildFunctionList(), mergeScopes(), pushScope(), and resolveRef().
Returns the line number of the line following the line with the marker.
Definition at line 6339 of file util.cpp.
References QCString::find(), and found.
Referenced by readIncludeFile().
void linkifyText | ( | const TextGeneratorIntf & | out, |
const Definition * | scope, | ||
const FileDef * | fileScope, | ||
const Definition * | self, | ||
const QCString & | text, | ||
bool | autoBreak, | ||
bool | external, | ||
bool | keepSpaces, | ||
int | indentLevel ) |
Definition at line 904 of file util.cpp.
References end(), FALSE, QCString::isEmpty(), skipIndex, QCString::view(), and TextGeneratorIntf::writeString().
Referenced by MemberDefImpl::_writeTemplatePrefix(), generateSqlite3ForMember(), generateXMLForClass(), generateXMLForConcept(), generateXMLForMember(), insertMemberFunctionParams(), MemberDefImpl::writeDeclaration(), writeDefArgumentList(), MemberDefImpl::writeDocumentation(), writeExceptionListImpl(), MemberDefImpl::writeMemberDocSimple(), writeTemplateArgumentList(), ClassDefImpl::writeTemplateSpec(), and writeTypeConstraints().
QCString linkToText | ( | SrcLangExt | lang, |
const QCString & | link, | ||
bool | isFileName ) |
Definition at line 3219 of file util.cpp.
References QCString::at(), QCString::find(), getLanguageSpecificSeparator(), QCString::isEmpty(), QCString::length(), QCString::right(), and substitute().
Referenced by DotCallGraph::buildGraph(), DocRef::DocRef(), DotCallGraph::DotCallGraph(), and DocParser::handleLinkedWord().
bool mainPageHasTitle | ( | ) |
Definition at line 6771 of file util.cpp.
References Doxygen::mainPage.
Referenced by generateJSNavTree(), generateSqlite3ForPage(), generateXMLForPage(), mainPageHasOwnTitle(), and writeIndex().
Definition at line 7400 of file util.cpp.
References QCString::contains(), QCString::find(), QCString::left(), and QCString::setNum().
Referenced by addClassToContext(), addEnumValuesToEnums(), addVariable(), buildFunctionList(), extractClassName(), findClassRelation(), findEnums(), SymbolResolver::resolveClass(), resolveLink(), and resolveRef().
|
static |
Definition at line 1892 of file util.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, Argument::canType, extractCanonicalArgType(), FALSE, g_matchArgsMutex, QCString::isEmpty(), QCString::length(), MATCH, matchCanonicalTypes(), Argument::name, Definition::name(), NOMATCH, QCString::right(), stripIrrelevantConstVolatile(), TRUE, and Argument::type.
Referenced by matchArguments2().
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 at line 1958 of file util.cpp.
References argListToString(), ASSERT, AUTO_TRACE, ArgumentList::begin(), ArgumentList::constSpecifier(), ArgumentList::empty(), ArgumentList::end(), FALSE, ArgumentList::front(), MATCH, matchArgument2(), Definition::name(), NOMATCH, ArgumentList::refQualifier(), ArgumentList::size(), TRUE, Argument::type, and ArgumentList::volatileSpecifier().
Referenced by addMemberDocs(), addMemberFunction(), buildFunctionList(), combineDeclarationAndDefinition(), computeMemberRelationsForBaseClass(), ClassDefImpl::containsOverload(), findFriends(), findGlobalMember(), findMember(), findMembersWithSpecificName(), getDefsOld(), SymbolResolver::Private::getResolvedSymbol(), GroupDefImpl::insertMember(), matchCanonicalTypes(), ClassDefImpl::mergeMembersFromBaseClasses(), transferFunctionReferences(), and transferRelatedFunctionDocumentation().
|
static |
Definition at line 1860 of file util.cpp.
References AUTO_TRACE, QCString::find(), QCString::left(), matchArguments2(), QCString::mid(), and stringToArgumentList().
Referenced by matchArgument2().
bool matchTemplateArguments | ( | const ArgumentList & | srcAl, |
const ArgumentList & | dstAl ) |
Definition at line 2196 of file util.cpp.
References argListToString(), AUTO_TRACE, AUTO_TRACE_EXIT, ArgumentList::begin(), ArgumentList::end(), ArgumentList::size(), and Argument::type.
Referenced by buildFunctionList().
void mergeArguments | ( | ArgumentList & | srcAl, |
ArgumentList & | dstAl, | ||
bool | forceNameOverwrite ) |
Definition at line 2052 of file util.cpp.
References argListToString(), AUTO_TRACE, AUTO_TRACE_ADD, ArgumentList::begin(), QCString::clear(), Argument::defval, Argument::docs, ArgumentList::end(), QCString::find(), QCString::isEmpty(), QCString::left(), QCString::length(), Argument::name, qPrint(), QCString::right(), ArgumentList::size(), QCString::stripWhiteSpace(), and Argument::type.
Referenced by addMemberDocs(), buildFunctionList(), and findFriends().
void mergeMemberOverrideOptions | ( | MemberDefMutable * | md1, |
MemberDefMutable * | md2 ) |
Definition at line 7348 of file util.cpp.
References Config_getBool, MemberDef::hasCallerGraph(), MemberDef::hasCallGraph(), MemberDef::hasEnumValues(), MemberDef::hasInlineSource(), MemberDef::hasReferencedByRelation(), MemberDef::hasReferencesRelation(), MemberDefMutable::overrideCallerGraph(), MemberDefMutable::overrideCallGraph(), MemberDefMutable::overrideEnumValues(), MemberDefMutable::overrideInlineSource(), MemberDefMutable::overrideReferencedByRelation(), and MemberDefMutable::overrideReferencesRelation().
Referenced by combineDeclarationAndDefinition(), and findFriends().
Merges two scope parts together. The parts may (partially) overlap. Example1: A::B
and B::C
will result in A::B::C
Example2: A
and B
will be A::B
Example3: A::B
and B will be A::B
leftScope | the left hand part of the scope. |
rightScope | the right hand part of the scope. |
Definition at line 5080 of file util.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, FALSE, QCString::findRev(), found, QCString::isEmpty(), QCString::left(), leftScopeMatch(), QCString::length(), QCString::right(), and TRUE.
Referenced by addEnumValuesToEnums(), addVariable(), findEnums(), findMember(), and stripTemplateSpecifiersFromScope().
|
static |
Definition at line 5819 of file util.cpp.
References getUTF8CharNumBytes().
Referenced by parseCommentAsText().
QCString normalizeNonTemplateArgumentsInString | ( | const QCString & | name, |
const Definition * | context, | ||
const ArgumentList & | formalArgs ) |
Definition at line 4786 of file util.cpp.
References end(), FALSE, QCString::find(), found, QCString::left(), QCString::mid(), Definition::name(), removeRedundantWhiteSpace(), SymbolResolver::resolveClass(), QCString::str(), and TRUE.
Referenced by findUsedClassesForClass().
bool openOutputFile | ( | const QCString & | outFile, |
std::ofstream & | f ) |
Definition at line 6783 of file util.cpp.
References FileInfo::exists(), FALSE, FileInfo::filePath(), Portable::openOutputStream(), Dir::remove(), Dir::rename(), and QCString::str().
Referenced by compareDoxyfile(), generateConfigFile(), readConfiguration(), and writeDefaultLayoutFile().
QCString parseCommentAsText | ( | const Definition * | scope, |
const MemberDef * | md, | ||
const QCString & | doc, | ||
const QCString & | fileName, | ||
int | lineNr ) |
Definition at line 5863 of file util.cpp.
References QCString::at(), Config_getBool, convertCharEntitiesToUTF8(), createDocParser(), QCString::data(), FALSE, QCString::isEmpty(), QCString::left(), QCString::length(), nextUTF8CharPosition(), TextStream::str(), QCString::stripWhiteSpace(), and validatingParseDoc().
Referenced by PageDefImpl::addSectionsToIndex(), and DefinitionImpl::computeTooltip().
bool patternMatch | ( | const FileInfo & | fi, |
const StringVector & | patList ) |
Definition at line 6157 of file util.cpp.
References genericPatternMatch().
Referenced by checkAndOpenFile(), and readDir().
QCString projectLogoFile | ( | ) |
Definition at line 3641 of file util.cpp.
References Config_getString, QCString::find(), QCString::isEmpty(), and QCString::left().
Referenced by copyLogo(), and substituteKeywords().
|
static |
Definition at line 3662 of file util.cpp.
References QCString::at(), Config_getString, QCString::find(), QCString::isEmpty(), QCString::length(), QCString::mid(), QCString::prepend(), QCString::quoted(), and QCString::stripWhiteSpace().
Referenced by substituteKeywords().
bool protectionLevelVisible | ( | Protection | prot | ) |
Definition at line 6426 of file util.cpp.
References Config_getBool, Package, and Private.
Referenced by MemberDefImpl::_computeLinkableInProject(), addClassAndNestedClasses(), computeClassRelations(), MemberDefImpl::hasDetailedDescription(), ClassDefImpl::internalInsertMember(), MemberDefImpl::isBriefSectionVisible(), ClassDefImpl::isLinkableInProject(), ClassDefImpl::isVisibleInHierarchy(), MemberDefImpl::warnIfUndocumented(), MemberDefImpl::writeDeclaration(), ClassDefImpl::writeDocumentationForInnerClasses(), ClassDefImpl::writeMemberList(), and ClassDefImpl::writeTagFile().
bool readInputFile | ( | const QCString & | fileName, |
std::string & | contents, | ||
bool | filter, | ||
bool | isSourceCode ) |
read a file name fileName and optionally filter and transcode it
Definition at line 5997 of file util.cpp.
References err, FileInfo::exists(), Debug::ExtCmd, FALSE, filterCRLF(), Debug::FilterOutput, getEncoding(), getFileFilter(), QCString::isEmpty(), Portable::openInputStream(), Portable::pclose(), Portable::popen(), Debug::print(), FileInfo::size(), QCString::str(), and transcodeCharacterBuffer().
Referenced by checkAndOpenFile(), fileToString(), HtmlDocVisitor::operator()(), RTFDocVisitor::operator()(), parseFile(), parseInput(), readIncludeFile(), DocbookDocVisitor::startPlantUmlFile(), and LatexDocVisitor::startPlantUmlFile().
bool recognizeFixedForm | ( | const QCString & | contents, |
FortranFormat | format ) |
Definition at line 6830 of file util.cpp.
References QCString::at(), Config_getInt, QCString::data(), FALSE, Fixed, Free, keyWordsFortranC(), QCString::length(), and TRUE.
Referenced by convertCppComments(), FortranCodeParser::parseCode(), and parseMain().
|
static |
Definition at line 5350 of file util.cpp.
References OutputList::disableAllBut(), Definition::displayName(), FALSE, findModuleDef(), Definition::getOutputFileBase(), Definition::getReference(), Html, Definition::partOfGroups(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), recursivelyAddGroupListToTitle(), theTranslator, OutputList::writeObjectLink(), and OutputList::writeString().
Referenced by addGroupListToTitle(), and recursivelyAddGroupListToTitle().
Definition at line 4079 of file util.cpp.
References Config_getBool, QCString::findRev(), QCString::isEmpty(), and REL_PATH_TO_ROOT.
Referenced by generateBriefDoc(), DocbookGenerator::startFile(), HtmlGenerator::startFile(), LatexGenerator::startFile(), RTFGenerator::startFile(), and validatingParseDoc().
Removes all anonymous scopes from string s Possible examples:
"bla::@10::blep" => "bla::blep" "bla::@10::@11::blep" => "bla::blep" "@10::blep" => "blep" " @10::blep" => "blep" "@9::@10::blep" => "blep" "bla::@1" => "bla" "bla::@1::@2" => "bla" "bla @1" => "bla"
Definition at line 172 of file util.cpp.
References end(), QCString::isEmpty(), and QCString::str().
Referenced by createTagLessInstance(), MemberDefImpl::displayDefinition(), generateClassMemberLink(), makeDisplayName(), makeDisplayName(), simplifyTypeForTable(), MemberDefImpl::writeDeclaration(), and MemberDefImpl::writeDocumentation().
Definition at line 7073 of file util.cpp.
References QCString::data(), and QCString::length().
Referenced by substituteHtmlKeywords(), and substituteLatexKeywords().
Definition at line 298 of file util.cpp.
References QCString::mid(), and QCString::startsWith().
Referenced by computeCommonDirPrefix(), FileDefImpl::FileDefImpl(), findFileDef(), DirDefImpl::mergeDirectoryInTree(), and stripFromPath().
Definition at line 578 of file util.cpp.
References Config_getBool, constScope, QCString::data(), g_charAroundSpace, QCString::isEmpty(), isId(), QCString::length(), operatorScope, qisspace(), THREAD_LOCAL, virtualScope, and volatileScope.
Referenced by addFrom(), addGlobalFunction(), addMethodToClass(), addVariable(), addVariableToClass(), argListToString(), buildFunctionList(), buildInterfaceAndServiceList(), buildTypedefList(), ClassDefImpl::ClassDefImpl(), extractCanonicalType(), findClassRelation(), DocParser::findDocsForMemberOrCompound(), findMember(), findUsedClassesForClass(), findUsingDeclImports(), generateFunctionLink(), generateFunctionLink(), generateLink(), getCanonicalTypeForIdentifier(), getLink(), getLink(), getLink(), MemberDefImpl::init(), ClassDefImpl::insertTemplateInstance(), MemberDefImpl::MemberDefImpl(), normalizeNonTemplateArgumentsInString(), parseFuncDecl(), resolveRef(), tempArgListToString(), and writeExceptionListImpl().
Definition at line 229 of file util.cpp.
References QCString::data(), QCString::isEmpty(), reg::replace(), and QCString::str().
Referenced by addMemberFunction(), findGlobalMember(), and generateDEFForMember().
Replaces any markers of the form ##AA in input string str by new markers of the form #AABBCC, where #AABBCC represents a valid color, based on the intensity represented by hex number AA and the current HTML_COLORSTYLE_* settings.
Definition at line 6275 of file util.cpp.
References Config_getInt, end(), hex, HEXTONUM, ColoredImage::hsl2rgb(), QCString::isEmpty(), and QCString::str().
Referenced by ResourceMgr::copyResourceAs(), fillColorStyleMaps(), HtmlGenerator::init(), and writeDefaultStyleSheet().
bool resolveLink | ( | const QCString & | scName, |
const QCString & | lr, | ||
bool | inSeeBlock, | ||
const Definition ** | resContext, | ||
QCString & | resAnchor, | ||
SrcLangExt | lang, | ||
const QCString & | prefix ) |
Definition at line 3245 of file util.cpp.
References FileInfo::absFilePath(), Definition::anchor(), AUTO_TRACE, AUTO_TRACE_EXIT, CSharp, SectionInfo::definition(), Doxygen::dirLinkedMap, Doxygen::exampleLinkedMap, FALSE, LinkedMap< T, Hash, KeyEqual, Map >::find(), findFileDef(), getClass(), getConcept(), PageDef::getGroupDef(), Doxygen::groupLinkedMap, Doxygen::inputNameLinkedMap, ModuleManager::instance(), SectionManager::instance(), QCString::isEmpty(), Definition::isLinkable(), Java, SectionInfo::label(), mangleCSharpGenericName(), Definition::name(), Doxygen::namespaceLinkedMap, Doxygen::pageLinkedMap, prefix, resolveRef(), QCString::str(), stripTemplateSpecifiersFromScope(), and TRUE.
Referenced by DocLink::DocLink(), and DocRef::DocRef().
bool resolveRef | ( | const QCString & | scName, |
const QCString & | name, | ||
bool | inSeeBlock, | ||
const Definition ** | resContext, | ||
const MemberDef ** | resMember, | ||
SrcLangExt | lang, | ||
bool | lookForSpecialization, | ||
const FileDef * | currentFile, | ||
bool | checkScope ) |
Returns an object to reference to given its name and context
Definition at line 2964 of file util.cpp.
References ASSERT, AUTO_TRACE, AUTO_TRACE_ADD, GetDefResult::cd, GetDefInput::checkCV, GetDefResult::cnd, Doxygen::conceptLinkedMap, CSharp, GetDefInput::currentFile, FALSE, GetDefResult::fd, QCString::find(), findFileDef(), findParameterList(), QCString::findRev(), GetDefInput::forceEmptyScope, GetDefResult::found, GetDefResult::gd, getClass(), getDefs(), Definition::getOuterScope(), getScopeDefs(), Doxygen::globalScope, Doxygen::groupLinkedMap, Doxygen::inputNameLinkedMap, ModuleManager::instance(), QCString::isEmpty(), MemberDef::isEnumerate(), isLowerCase(), MemberDef::isStrongEnumValue(), MemberDef::isTypedef(), QCString::left(), leftScopeMatch(), QCString::length(), mangleCSharpGenericName(), GetDefResult::md, QCString::mid(), GetDefResult::modd, GetDefResult::nd, removeRedundantWhiteSpace(), resolveRef(), QCString::right(), QCString::startsWith(), substitute(), and TRUE.
Referenced by DocParser::handleLinkedWord(), resolveLink(), and resolveRef().
QCString resolveTypeDef | ( | const Definition * | context, |
const QCString & | qualifiedName, | ||
const Definition ** | typedefContext ) |
Definition at line 384 of file util.cpp.
References MemberDef::argsString(), AUTO_TRACE, AUTO_TRACE_ADD, AUTO_TRACE_EXIT, Definition::definitionType(), LinkedMap< T, Hash, KeyEqual, Map >::find(), QCString::find(), Definition::findInnerCompound(), QCString::findRev(), Doxygen::functionNameLinkedMap, Definition::getOuterScope(), getScopeFragment(), Doxygen::globalScope, SymbolResolver::isAccessibleFrom(), QCString::isEmpty(), MemberDef::isRelated(), MemberDef::isTypedef(), QCString::left(), QCString::length(), Doxygen::memberNameLinkedMap, QCString::mid(), Definition::name(), resolveTypeDef(), QCString::right(), Definition::TypeClass, and MemberDef::typeString().
Referenced by findUsedClassesForClass(), getCanonicalTemplateSpec(), getCanonicalTypeForIdentifier(), isVarWithConstructor(), and resolveTypeDef().
Definition at line 881 of file util.cpp.
References QCString::at(), QCString::length(), and QCString::right().
Referenced by addMemberFunction(), findScopeFromQualifiedName(), getDefsOld(), and isRecursiveBaseClass().
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 at line 6896 of file util.cpp.
References SelectionMarkerInfo::beginLen, SelectionMarkerInfo::beginStr, SelectionMarkerInfo::closeLen, SelectionMarkerInfo::closeStr, QCString::data(), SelectionMarkerInfo::endLen, SelectionMarkerInfo::endStr, found, QCString::isEmpty(), QCString::length(), SelectionMarkerInfo::markerChar, qstrlen(), qstrncmp(), and QCString::reserve().
Referenced by substituteHtmlKeywords(), and substituteLatexKeywords().
Definition at line 3628 of file util.cpp.
References dateTimeFromString(), err, and formatDateTime().
Referenced by substituteKeywords().
QCString showFileDefMatches | ( | const FileNameLinkedMap * | fnMap, |
const QCString & | n ) |
Definition at line 3534 of file util.cpp.
References LinkedMap< T, Hash, KeyEqual, Map >::find(), QCString::findRev(), QCString::isEmpty(), QCString::left(), QCString::length(), and QCString::right().
Referenced by addIncludeFile(), buildFileList(), DocParser::findAndCopyImage(), DocDiaFile::parse(), DocDotFile::parse(), DocMscFile::parse(), DocPlantUmlFile::parse(), readIncludeFile(), DocParser::readTextFileByName(), and readTextFileByName().
StringVector split | ( | const std::string & | s, |
const reg::Ex & | delimiter ) |
split input string s by regular expression delimiter delimiter.
returns a vector of non-empty strings that are between the delimiters
Definition at line 7122 of file util.cpp.
References end().
StringVector split | ( | const std::string & | s, |
const std::string & | delimiter ) |
split input string s by string delimiter delimiter.
returns a vector of non-empty strings that are between the delimiters
Definition at line 7105 of file util.cpp.
Referenced by VHDLOutlineParser::addProto(), VHDLOutlineParser::addVhdlType(), FlowChart::alignCommentNode(), VHDLOutlineParser::checkInlineCode(), checkVhdlString(), VHDLOutlineParser::createFunction(), VhdlDocGen::findArchitecture(), getFilteredImageAttributes(), VhdlDocGen::getIndexWord(), DocPara::handleCommand(), DocParser::handleImage(), DocPara::handleInclude(), Qhp::initialize(), VhdlDocGen::parseForBinding(), VhdlDocGen::parseForConfig(), parseIncludeOptions(), writeFuncProto(), VhdlDocGen::writeInlineClassLink(), and VhdlDocGen::writeRecUnitDocu().
void stackTrace | ( | ) |
Definition at line 5933 of file util.cpp.
References Portable::pclose(), Portable::popen(), and qsnprintf.
Definition at line 241 of file util.cpp.
References QCString::at(), getScopeFragment(), QCString::isEmpty(), QCString::left(), QCString::length(), QCString::mid(), Doxygen::namespaceLinkedMap, and QCString::right().
Referenced by addMemberFunction(), addPageToContext(), addVariable(), buildNamespaceList(), computeTemplateClassRelations(), extractClassName(), findGroupScope(), findUsingDeclImports(), findUsingDirectives(), MemberDefImpl::getClassDefOfAnonymousType(), and resolveClassNestingRelations().
Definition at line 1561 of file util.cpp.
References QCString::find(), QCString::left(), and QCString::mid().
Referenced by getCanonicalTypeForIdentifier().
Definition at line 5421 of file util.cpp.
References Doxygen::htmlFileExtension, and stripExtensionGeneral().
Referenced by anonymous_namespace{tagreader.cpp}::TagFileParser::buildLists(), ClassDefImpl::ClassDefImpl(), and MemberDefImpl::setTagInfo().
Definition at line 5411 of file util.cpp.
References QCString::left(), QCString::length(), and QCString::right().
Referenced by TooltipManager::addTooltip(), anonymous_namespace{tagreader.cpp}::TagFileParser::buildLists(), extraLatexStyleSheet(), MarkdownOutlineParser::parseInput(), stripExtension(), DocbookCodeGenerator::writeCodeLinkLine(), LatexCodeGenerator::writeLineNumber(), and RTFCodeGenerator::writeLineNumber().
strip part of path if it matches one of the paths in the Config_getList(INCLUDE_PATH) list
Definition at line 340 of file util.cpp.
References Config_getList, and stripFromPath().
Referenced by addIncludeFile(), and findFileDef().
|
static |
Definition at line 309 of file util.cpp.
References QCString::left(), QCString::length(), prefix, qstricmp(), removeLongPathMarker(), and QCString::right().
Referenced by Config::checkAndCorrect(), DirDefImpl::DirDefImpl(), FileDefImpl::FileDefImpl(), generateAnonymousAnchor(), generateXMLForClass(), generateXMLForConcept(), generateXMLForDir(), generateXMLForFile(), generateXMLForMember(), generateXMLForModule(), generateXMLForNamespace(), generateXMLForPage(), handleFileInfoResult(), insertPath(), markdownFileNameToId(), MarkdownOutlineParser::parseInput(), ModuleManager::resolveImports(), ClassDefImpl::showUsedFiles(), stripFromIncludePath(), stripFromPath(), ModuleDefImpl::writeFiles(), writeSingleFileIndex(), DirDefImpl::writeTagFile(), and FileDefImpl::writeTagFile().
strip part of path if it matches one of the paths in the Config_getList(STRIP_FROM_PATH) list
Definition at line 332 of file util.cpp.
References Config_getList, and stripFromPath().
Definition at line 6438 of file util.cpp.
References Config_getInt, QCString::data(), QCString::isEmpty(), literal_at(), TextStream::str(), and substitute().
Referenced by handleCommentBlock(), handleCommentBlock(), handleCommentBlock(), handleParametersCommentBlocks(), DocPara::handleStartCode(), and MarkdownOutlineParser::parseInput().
void stripIndentationVerbatim | ( | QCString & | doc, |
const int | indentationLevel ) |
Definition at line 6526 of file util.cpp.
References QCString::data(), QCString::isEmpty(), QCString::rawData(), and QCString::resize().
void stripIrrelevantConstVolatile | ( | QCString & | s | ) |
According to the C++ spec and Ivan Vecerina:
Parameter declarations that differ only in the presence or absence of const and/or volatile are equivalent.
So the following example, show what is stripped by this routine for const. The same is done for volatile.
For Java code we also strip the "final" keyword, see bug 765070.
Definition at line 1551 of file util.cpp.
References stripIrrelevantString().
Referenced by extractCanonicalType(), and matchArgument2().
Definition at line 1500 of file util.cpp.
References QCString::at(), QCString::clear(), FALSE, QCString::find(), isId(), QCString::left(), QCString::length(), QCString::right(), QCString::stripWhiteSpace(), and TRUE.
Referenced by stripIrrelevantConstVolatile().
Special version of QCString::stripWhiteSpace() that only strips completely blank lines.
s | the string to be stripped |
docLine | the line number corresponding to the start of the string. This will be adjusted based on the number of lines stripped from the start. |
Definition at line 5524 of file util.cpp.
References QCString::data(), QCString::isEmpty(), QCString::length(), literal_at(), and QCString::mid().
Referenced by DefinitionImpl::_setBriefDescription(), DocGroup::addDocs(), VHDLOutlineParser::checkInlineCode(), DocPara::handleCommand(), CommentScanner::parseCommentBlock(), and toDefinition().
Definition at line 5448 of file util.cpp.
References QCString::findRev(), and QCString::mid().
Referenced by LatexGenerator::addLabel(), anonymous_namespace{tagreader.cpp}::TagFileParser::buildLists(), RTFGenerator::endDoxyAnchor(), LatexGenerator::endIndexItem(), LatexGenerator::endIndexValue(), LatexGenerator::endTitleHead(), objectLinkToString(), objectLinkToString(), objectLinkToString(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), DotFilePatcher::run(), SearchIndexExternal::setCurrentDoc(), DocbookGenerator::startDoxyAnchor(), LatexGenerator::startDoxyAnchor(), DocbookGenerator::startFile(), LatexGenerator::startFile(), RTFGenerator::startFile(), DocbookDocVisitor::startLink(), LatexDocVisitor::startLink(), RTFDocVisitor::startLink(), DocbookGenerator::startSection(), LatexGenerator::startSection(), LatexGenerator::startTextLink(), RTFGenerator::startTextLink(), substituteHtmlKeywords(), substituteKeywords(), LatexGenerator::writeAnchor(), RTFGenerator::writeAnchor(), LatexCodeGenerator::writeCodeLink(), RTFCodeGenerator::writeCodeLink(), DocbookCodeGenerator::writeCodeLinkLine(), MemberList::writeDeclarations(), writeDocbookLink(), LatexCodeGenerator::writeLineNumber(), RTFCodeGenerator::writeLineNumber(), RTFGenerator::writeRTFReference(), and RTFGenerator::writeStartAnnoItem().
Strips the scope from a name. Examples: A::B will return A and A<T>::B<N::C<D> > will return A<T>.
Definition at line 4279 of file util.cpp.
References QCString::at(), FALSE, QCString::length(), QCString::right(), and TRUE.
Referenced by DotClassGraph::addClass(), DocRef::DocRef(), generateJSLink(), getCanonicalTypeForIdentifier(), DefinitionImpl::Private::init(), DiagramItem::label(), NamespaceDefImpl::writeBriefDescription(), and ClassDefImpl::writeIncludeFilesForSlice().
QCString stripTemplateSpecifiersFromScope | ( | const QCString & | fullName, |
bool | parentOnly, | ||
QCString * | pLastScopeStripped, | ||
QCString | scopeName, | ||
bool | allowArtificial ) |
Strips template specifiers from scope fullName, except those that make up specialized classes. The switch parentOnly determines whether or not a template "at the end" of a scope should be considered, e.g. with parentOnly is TRUE
, A<T>::B<S>
will try to strip <T>
and not <S>
, while parentOnly is FALSE
will strip both unless A<T>
or B<S>
are specialized template classes.
Definition at line 5013 of file util.cpp.
References QCString::at(), QCString::find(), getClass(), Definition::isArtificial(), QCString::length(), mergeScopes(), QCString::mid(), and QCString::right().
Referenced by addClassToContext(), addMemberFunction(), addVariable(), buildFunctionList(), computeTemplateClassRelations(), extractClassName(), findMember(), findScopeFromQualifiedName(), findUsingDeclImports(), getCanonicalTypeForIdentifier(), getDefsOld(), SymbolResolver::Private::getResolvedSymbolRec(), SymbolResolver::Private::getResolvedTypeRec(), SymbolResolver::Private::newResolveTypedef(), and resolveLink().
QCString substituteKeywords | ( | const QCString & | s, |
const KeywordSubstitutionList & | keywords ) |
Definition at line 3564 of file util.cpp.
References QCString::data(), found, QCString::left(), QCString::length(), qstrlen(), and qstrncmp().
Referenced by substituteHtmlKeywords(), substituteKeywords(), and substituteLatexKeywords().
QCString substituteKeywords | ( | const QCString & | s, |
const QCString & | title, | ||
const QCString & | projName, | ||
const QCString & | projNum, | ||
const QCString & | projBrief ) |
Definition at line 3707 of file util.cpp.
References Config_getString, Date, DateTime, dateToString(), QCString::isEmpty(), projectLogoFile(), projectLogoSize(), showDate(), stripPath(), substituteKeywords(), theTranslator, Time, and yearToString().
QCString substituteTemplateArgumentsInString | ( | const QCString & | nm, |
const ArgumentList & | formalArgs, | ||
const ArgumentList * | actualArgs ) |
Substitutes any occurrence of a formal argument from argument list formalArgs in name by the corresponding actual argument in argument list actualArgs. The result after substitution is returned as a string. The argument name is used to prevent recursive substitution.
Definition at line 4851 of file util.cpp.
References argListToString(), AUTO_TRACE, AUTO_TRACE_ADD, AUTO_TRACE_EXIT, ArgumentList::begin(), Argument::defval, ArgumentList::empty(), ArgumentList::end(), end(), FALSE, found, QCString::isEmpty(), isId(), QCString::left(), QCString::mid(), Argument::name, prefix, QCString::simplifyWhiteSpace(), QCString::startsWith(), QCString::str(), QCString::stripWhiteSpace(), substituteTemplateArgumentsInString(), TRUE, and Argument::type.
Referenced by computeTemplateClassRelations(), MemberDefImpl::createTemplateInstanceMember(), findBaseClassesForClass(), findUsedClassesForClass(), SymbolResolver::Private::getResolvedSymbol(), SymbolResolver::Private::newResolveTypedef(), and substituteTemplateArgumentsInString().
QCString tempArgListToString | ( | const ArgumentList & | al, |
SrcLangExt | lang, | ||
bool | includeDefault ) |
Definition at line 1246 of file util.cpp.
References CSharp, ArgumentList::empty(), isId(), Java, removeRedundantWhiteSpace(), and QCString::right().
Referenced by addMemberFunction(), ClassDefImpl::className(), findTemplateInstanceRelation(), makeQualifiedNameWithTemplateParameters(), searchTemplateSpecs(), and writeDefArgumentList().
|
static |
Definition at line 5961 of file util.cpp.
References QCString::data(), QCString::isEmpty(), portable_iconv(), portable_iconv_close(), portable_iconv_open(), qstricmp(), and term.
Referenced by readInputFile().
bool transcodeCharacterStringToUTF8 | ( | std::string & | input, |
const char * | inputEncoding ) |
Definition at line 1403 of file util.cpp.
References QCString::at(), QCString::ExplicitSize, portable_iconv(), portable_iconv_close(), portable_iconv_open(), qstricmp(), QCString::rawData(), QCString::resize(), and QCString::str().
Referenced by LayoutDocManager::parse(), and readCodeFragment().
void trimBaseClassScope | ( | const BaseClassList & | bcl, |
QCString & | s, | ||
int | level = 0 ) |
Definition at line 1478 of file util.cpp.
References ClassDef::baseClasses(), QCString::find(), QCString::left(), QCString::length(), Definition::name(), QCString::right(), and trimBaseClassScope().
Referenced by trimBaseClassScope().
Definition at line 3917 of file util.cpp.
References QCString::data(), getCaseSenseNames(), and QCString::isEmpty().
size_t updateColumnCount | ( | const char * | s, |
size_t | col ) |
Definition at line 7367 of file util.cpp.
References Config_getInt, and getUTF8CharNumBytes().
Referenced by HtmlCodeGenerator::codify(), LatexCodeGenerator::codify(), ManCodeGenerator::codify(), RTFCodeGenerator::codify(), writeDocbookCodeString(), and writeXMLCodeString().
Definition at line 5600 of file util.cpp.
References QCString::at(), QCString::data(), err, FALSE, g_extLookup, g_lang2extMap, QCString::isEmpty(), QCString::lower(), Doxygen::parserManager, QCString::prepend(), QCString::str(), and TRUE.
Referenced by addCodeOnlyMappings(), adjustConfiguration(), and initDefaultExtensionMapping().
void writeColoredImgData | ( | const QCString & | dir, |
ColoredImgDataItem | data[] ) |
Writes the intensity only bitmap represented by data as an image to directory dir using the colors defined by HTML_COLORSTYLE_*.
Definition at line 6251 of file util.cpp.
References ColoredImgDataItem::alpha, Config_getInt, ColoredImgDataItem::content, ColoredImgDataItem::height, Doxygen::indexList, ColoredImgDataItem::name, ColoredImage::save(), and ColoredImgDataItem::width.
Referenced by ResourceMgr::copyResourceAs().
void writeExamples | ( | OutputList & | ol, |
const ExampleList & | list ) |
Definition at line 1127 of file util.cpp.
References OutputList::disable(), Docbook, Html, Latex, Man, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, theTranslator, writeMarkerList(), OutputList::writeObjectLink(), and OutputList::writeString().
Referenced by MemberDefImpl::_writeExamples(), and ClassDefImpl::writeDetailedDocumentationBody().
void writeMarkerList | ( | OutputList & | ol, |
const std::string & | markerText, | ||
size_t | numMarkers, | ||
std::function< void(size_t)> | replaceFunc ) |
Definition at line 1103 of file util.cpp.
References end(), and OutputList::parseText().
Referenced by MemberDefImpl::_writeReimplementedBy(), DefinitionImpl::_writeSourceRefList(), writeExamples(), and ClassDefImpl::writeInheritanceGraph().
void writePageRef | ( | OutputList & | ol, |
const QCString & | cn, | ||
const QCString & | mn ) |
Definition at line 270 of file util.cpp.
References Config_getBool, OutputList::disable(), Docbook, OutputList::docify(), OutputList::endPageRef(), Html, Latex, Man, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, OutputList::startPageRef(), and theTranslator.
Referenced by MemberDefImpl::_writeReimplementedBy(), and MemberDefImpl::_writeReimplements().
out writeString | ( | part | , |
keepSpaces | ) |
void writeTypeConstraints | ( | OutputList & | ol, |
const Definition * | d, | ||
const ArgumentList & | al ) |
Definition at line 5911 of file util.cpp.
References Config_getBool, Definition::docFile(), Definition::docLine(), ArgumentList::empty(), OutputList::endConstraintDocs(), OutputList::endConstraintList(), OutputList::endConstraintParam(), OutputList::endConstraintType(), FALSE, OutputList::generateDoc(), linkifyText(), OutputList::parseText(), OutputList::startConstraintDocs(), OutputList::startConstraintList(), OutputList::startConstraintParam(), OutputList::startConstraintType(), theTranslator, and TRUE.
Referenced by MemberDefImpl::_writeTypeConstraints(), and ClassDefImpl::writeDetailedDocumentationBody().
|
static |
Definition at line 531 of file util.cpp.
Referenced by removeRedundantWhiteSpace().
else |
bool found =FALSE |
Definition at line 984 of file util.cpp.
Referenced by SearchIndex::addWordRec(), buildFunctionList(), buildTypedefList(), DocParser::checkArgumentName(), FlowChart::colTextNodes(), ClassDefImpl::containsOverload(), NamespaceLinkedRefMap::declVisible(), LatexGenerator::endIndexSection(), extractBlock(), extractCopyDocId(), extractNoExcept(), findAndRemoveWord(), findClassRelation(), findEnumDocumentation(), findFilePath(), findGlobalMember(), findMember(), findUsedClassesForClass(), HtmlDocVisitor::forceEndParagraph(), generateJSTree(), genericPatternMatch(), getDefsOld(), getFileFilter(), getFilterFromList(), getScopeFragment(), DocPara::handleCommand(), DocParser::handleImg(), hasNonReferenceNestedGroupRec(), hasNonReferenceNestedNamespaceRec(), hasNonReferenceSuperClassRec(), if(), insertPath(), ClassDefImpl::isSubClass(), VhdlDocGen::isSubClass(), lineBlock(), reg::Ex::match(), reg::Ex::Private::matchAt(), ClassDefImpl::mergeMembersFromBaseClasses(), mergeScopes(), newEntry(), normalizeNonTemplateArgumentsInString(), DocIncOperator::parse(), DocParser::processCopyDoc(), processData(), readCodeFragment(), readSVGSize(), removeIdsAndMarkers(), replaceAliases(), replaceFunctionMacro(), selectBlocks(), DefinitionImpl::setOuterScope(), skipOverFileAndLineCommands(), substituteKeywords(), substituteTemplateArgumentsInString(), substituteTemplatesInString(), LayoutNavEntry::url(), ClassLinkedRefMap::writeDeclaration(), ConceptLinkedRefMap::writeDeclaration(), ModuleLinkedRefMap::writeDeclaration(), ClassDef::writeDeclarationLink(), ClassDefAliasImpl::writeDeclarationLink(), ClassDefImpl::writeDeclarationLink(), ConceptDef::writeDeclarationLink(), ConceptDefAliasImpl::writeDeclarationLink(), ConceptDefImpl::writeDeclarationLink(), ModuleDefImpl::writeDeclarationLink(), ClassLinkedRefMap::writeDocumentation(), MemberDefImpl::writeDocumentation(), writeJavasScriptSearchDataPage(), PageDefImpl::writeTagFile(), and writeWord().
|
static |
Definition at line 575 of file util.cpp.
Referenced by removeRedundantWhiteSpace().
|
static |
Definition at line 5566 of file util.cpp.
Referenced by getLanguageFromFileName(), and updateLanguageMapping().
|
static |
Referenced by findFileDef().
|
static |
Definition at line 3406 of file util.cpp.
Referenced by findFileDef().
|
static |
Definition at line 5576 of file util.cpp.
Referenced by getLanguageFromCodeLang(), and updateLanguageMapping().
|
static |
Definition at line 1850 of file util.cpp.
Referenced by matchArgument2().
|
static |
Definition at line 3994 of file util.cpp.
Referenced by convertNameToFile().
|
static |
Definition at line 3996 of file util.cpp.
Referenced by convertNameToFile().
|
static |
Definition at line 3995 of file util.cpp.
Referenced by convertNameToFile().
std::string_view lastPart = txtStr.substr(skipIndex) |
Definition at line 1099 of file util.cpp.
Referenced by writeString().
QCString matchWord = substitute(substitute(QCString(word),"\\","::"),".","::") |
const int maxInheritanceDepth = 100000 |
Definition at line 156 of file util.cpp.
Referenced by getDefsOld(), ClassDefImpl::getMemberByName(), and minClassDistance().
|
static |
Definition at line 534 of file util.cpp.
Referenced by removeRedundantWhiteSpace().
skipIndex =index=newIndex+matchLen |
Definition at line 1095 of file util.cpp.
Referenced by if(), and linkifyText().
|
static |
Definition at line 533 of file util.cpp.
Referenced by removeRedundantWhiteSpace().
|
static |
Definition at line 532 of file util.cpp.
Referenced by removeRedundantWhiteSpace().
std::string_view word =txtStr.substr(newIndex,matchLen) |
Definition at line 980 of file util.cpp.
Referenced by addDirPrefix(), HtmlHelp::addIndexItem(), Qhp::addIndexItem(), SearchIndex::addWord(), SearchIndexExternal::addWord(), SearchIndexIntf::addWord(), SearchIndex::addWordRec(), DocSimpleSect::appendLinkWord(), charsToIndex(), containsWord(), convertIndexWordToAnchor(), extractCanonicalType(), findAndRemoveWord(), VhdlDocGen::findKeyWord(), getCanonicalTypeForIdentifier(), if(), PerlModDocVisitor::operator()(), splitSearchTokens(), writeColoredWord(), writeJavasScriptSearchDataPage(), writeObjCMethodCall(), and writeWord().