|
Doxygen
|
#include "util.h"#include <algorithm>#include <cctype>#include <cinttypes>#include <cstdlib>#include <cstring>#include <ctime>#include <mutex>#include <unordered_set>#include "arguments.h"#include "classdef.h"#include "classlist.h"#include "conceptdef.h"#include "config.h"#include "datetime.h"#include "debug.h"#include "defargs.h"#include "dir.h"#include "dirdef.h"#include "doxygen.h"#include "example.h"#include "filedef.h"#include "fileinfo.h"#include "filename.h"#include "groupdef.h"#include "htmlentity.h"#include "image.h"#include "language.h"#include "md5hash.h"#include "membername.h"#include "message.h"#include "moduledef.h"#include "namespacedef.h"#include "outputlist.h"#include "pagedef.h"#include "parserintf.h"#include "portable.h"#include "regex.h"#include "stringutil.h"#include "symbolresolver.h"#include "textstream.h"#include "trace.h"#include "utf8.h"Go to the source code of this file.
Classes | |
| struct | CharAroundSpace |
| struct | CharAroundSpace::CharElem |
| struct | Lang2ExtMap |
Macros | |
| #define | ENABLE_TRACINGSUPPORT 0 |
| #define | REL_PATH_TO_ROOT "../../" |
| #define | MATCH AUTO_TRACE_EXIT("match at line {}",__LINE__); |
| #define | NOMATCH AUTO_TRACE_EXIT("no match at line {}",__LINE__); |
| #define | HEXTONUM(x) |
Functions | |
| DString | removeAnonymousScopes (const DString &str) |
| DString | replaceAnonymousScopes (const DString &s, const DString &replacement) |
| DString | stripAnonymousNamespaceScope (const DString &s) |
| static DString | stripFromPath (const DString &p, StringVector l) |
| DString | stripFromPath (const DString &path) |
| DString | stripFromIncludePath (const DString &path) |
| DString | resolveTypeDef (const Definition *context, const DString &qualifiedName, const Definition **typedefContext) |
| DString | removeRedundantWhiteSpace (const DString &s) |
| static size_t | findParameterList (const DString &name) |
| Returns the position in the string where a function parameter list begins, or DString::npos if one is not found. | |
| bool | rightScopeMatch (const DString &scope, const DString &name) |
| bool | leftScopeMatch (const DString &scope, const DString &name) |
| void | writeMarkerList (OutputList &ol, const std::string &markerText, size_t numMarkers, std::function< void(size_t)> replaceFunc) |
| DString | writeMarkerList (const std::string &markerText, size_t numMarkers, std::function< DString(size_t)> replaceFunc) |
| void | writeExamples (OutputList &ol, const ExampleList &list) |
| DString | inlineTemplateArgListToDoc (const ArgumentList &al) |
| DString | argListToString (const ArgumentList &al, bool useCanonicalType, bool showDefVals) |
| DString | tempArgListToString (const ArgumentList &al, SrcLangExt lang, bool includeDefault) |
| static void | filterCRLF (std::string &contents) |
| static DString | getFilterFromList (const DString &name, const StringVector &filterList, bool &found) |
| DString | getFileFilter (const DString &name, bool isSourceCode) |
| DString | fileToString (const DString &name, bool filter, bool isSourceCode) |
| void | trimBaseClassScope (const BaseClassList &bcl, DString &s, int level=0) |
| static void | stripIrrelevantString (DString &target, const DString &str, bool insideTemplate) |
| void | stripIrrelevantConstVolatile (DString &s, bool insideTemplate) |
| static DString | stripDeclKeywords (const DString &s) |
| static DString | extractCanonicalType (const Definition *d, const FileDef *fs, DString type, SrcLangExt lang, bool insideTemplate) |
| static DString | getCanonicalTemplateSpec (const Definition *d, const FileDef *fs, const DString &spec, SrcLangExt lang) |
| static DString | getCanonicalTypeForIdentifier (const Definition *d, const FileDef *fs, const DString &word, SrcLangExt lang, DString *tSpec, int count=0) |
| static DString | extractCanonicalArgType (const Definition *d, const FileDef *fs, const Argument &arg, SrcLangExt lang) |
| static bool | matchCanonicalTypes (const Definition *srcScope, const FileDef *srcFileScope, const DString &srcType, const Definition *dstScope, const FileDef *dstFileScope, const DString &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 DString &srcReturnType, const ArgumentList *srcAl, const Definition *dstScope, const FileDef *dstFileScope, const DString &dstReturnType, const ArgumentList *dstAl, bool checkCV, SrcLangExt lang) |
| void | mergeArguments (ArgumentList &srcAl, ArgumentList &dstAl, bool forceNameOverwrite) |
| bool | matchTemplateArguments (const ArgumentList &srcAl, const ArgumentList &dstAl) |
| GetDefResult | getDefs (const GetDefInput &input) |
| static bool | getScopeDefs (const DString &docScope, const DString &scope, ClassDef *&cd, ConceptDef *&cnd, NamespaceDef *&nd, ModuleDef *&modd) |
| static bool | isLowerCase (DString &s) |
| bool | resolveRef (const DString &scName, const DString &name, bool inSeeBlock, const Definition **resContext, const MemberDef **resMember, SrcLangExt lang, bool lookForSpecialization, const FileDef *currentFile, bool checkScope) |
| DString | linkToText (SrcLangExt lang, const DString &link, bool ignoreDots) |
| static const DirDef * | resolveDirLink (const DString &linkRef) |
| bool | resolveLink (const DString &scName, const DString &lr, bool, const Definition **resContext, DString &resAnchor, SrcLangExt lang, const DString &prefix, const FileDef *currentFile) |
| DString | findExampleFilePath (const DString &file, bool &ambig) |
| DString | substituteKeywords (const DString &file, const DString &s, const KeywordSubstitutionList &keywords) |
| DString | showDate (const DString &fmt) |
| DString | projectLogoFile () |
| DString | projectLogoSize () |
| int | getPrefixIndex (const DString &name) |
| bool | useCaseSenseNames () |
| Returns true if the names of the symbols can be case sensitive. | |
| DString | escapeCharsInString (const DString &name, bool allowDots, bool allowUnderscore) |
| DString | unescapeCharsInString (const DString &s) |
| DString | convertNameToFile (const DString &name, bool allowDots, bool allowUnderscore) |
| DString | relativePathToRoot (const DString &name) |
| DString | determineAbsoluteIncludeName (const DString &curFile, const DString &incFileName) |
| void | createSubDirs (const Dir &d) |
| void | clearSubDirs (const Dir &d) |
| void | extractNamespaceName (const DString &scopeName, DString &className, DString &namespaceName, bool allowEmptyClass) |
| DString | insertTemplateSpecifierInScope (const DString &scope, const DString &templ) |
| DString | stripScope (const DString &name) |
| DString | convertToId (const DString &s) |
| DString | convertToXML (const DString &s, bool keepEntities, const bool citeEntry) |
| DString | convertToHtml (const DString &s, bool keepEntities) |
| DString | convertToJSString (const DString &s, bool keepEntities, bool singleQuotes) |
| int | extractClassNameFromType (const DString &type, int &pos, DString &name, DString &templSpec, SrcLangExt lang) |
| DString | normalizeNonTemplateArgumentsInString (const DString &name, const Definition *context, const ArgumentList &formalArgs) |
| DString | substituteTemplateArgumentsInString (const DString &nm, const ArgumentList &formalArgs, const ArgumentList *actualArgs) |
| DString | stripTemplateSpecifiersFromScope (const DString &fullName, bool parentOnly, DString *pLastScopeStripped, DString scopeName, bool allowArtificial) |
| DString | mergeScopes (const DString &leftScope, const DString &rightScope) |
| int | getScopeFragment (const DString &s, int p, int *l) |
| 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 DString &fName, const DString &ext) |
| void | addHtmlExtensionIfMissing (DString &fName) |
| DString | stripExtensionGeneral (const DString &fName, const DString &ext) |
| DString | stripExtension (const DString &fName) |
| DString | stripPath (const DString &s) |
| DString | makeBaseName (const DString &name, const DString &ext) |
| DString | stripLeadingAndTrailingEmptyLines (const DString &s, int &docLine) |
| Special version of DString::stripWhiteSpace() that only strips completely blank lines. | |
| bool | updateLanguageMapping (const DString &extension, const DString &language) |
| void | initDefaultExtensionMapping () |
| void | addCodeOnlyMappings () |
| SrcLangExt | getLanguageFromFileName (const DString &fileName, SrcLangExt defLang) |
| SrcLangExt | getLanguageFromCodeLang (DString &fileName) |
| Routine to handle the language attribute of the \code command. | |
| DString | getFileNameExtension (const DString &fn) |
| static MemberDef * | getMemberFromSymbol (const Definition *scope, const FileDef *fileScope, const DString &n) |
| bool | checkIfTypedef (const Definition *scope, const FileDef *fileScope, const DString &n) |
| void | writeTypeConstraints (OutputList &ol, const Definition *d, const ArgumentList &al) |
| void | stackTrace () |
| static void | transcodeCharacterBuffer (const DString &fileName, std::string &contents, const DString &inputEncoding, const DString &outputEncoding) |
| bool | readInputFile (const DString &fileName, std::string &contents, const ReadInputFileOptions &options) |
| read a file name fileName and optionally filter and transcode it | |
| DString | filterTitle (const DString &title) |
| DString | getEncoding (const FileInfo &fi) |
| DString | externalLinkTarget (const bool parent) |
| DString | createHtmlUrl (const DString &relPath, const DString &ref, bool isLocalFile, const DString &targetFileName, const DString &anchor) |
| DString | externalRef (const DString &relPath, const DString &ref) |
| DString | replaceColorMarkers (const DString &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 DString &src, const DString &dest) |
| Copies the contents of file with name src to the newly created file with name dest. | |
| DString | getLanguageSpecificSeparator (SrcLangExt lang, bool classScope) |
| bool | isURL (const DString &url) |
| Checks whether the given url starts with a supported protocol. | |
| DString | correctURL (const DString &url, const DString &relPath) |
| Corrects URL url according to the relative path relPath. | |
| bool | protectionLevelVisible (Protection prot) |
| DString | stripIndentation (const DString &s, bool skipFirstLine) |
| void | stripIndentationVerbatim (DString &doc, size_t indentationLevel, bool skipFirstLine) |
| static DString | extractDirection (DString &docs) |
| Strip the direction part from docs and return it as a string in canonical form. | |
| DString | inlineArgListToDoc (const ArgumentList &al) |
| 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 () |
| DString | getDotImageExtension () |
| DString | getDotImageExtension (const DString &format) |
| DString | getDotImageExtensionGenerated (const DString &format) |
| bool | openOutputFile (const DString &outFile, std::ofstream &f) |
| DString | selectBlocks (const DString &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 DString &s, const DString fileName, const SelectionMarkerInfo &markerInfo) |
| DString | detab (const DString &s, size_t &refIndent) |
| DString | getProjectId () |
| int | computeQualifiedIndex (const DString &name) |
| Return the index of the last :: in the string name that is still before the first <. | |
| DString | mangleCSharpGenericName (const DString &name) |
| DString | demangleCSharpGenericName (const DString &name, const DString &templArgs) |
| DString | extractBeginRawStringDelimiter (const char *rawStart) |
| DString | extractEndRawStringDelimiter (const char *rawEnd) |
| DString | writeInlineGraph (const DString &baseName, const DString &extension, const DString &content, bool &exists) |
| void | cleanupInlineGraphs () |
Variables | |
| static const char * | hex = "0123456789ABCDEF" |
| 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 const char | staticScope [] = { 's', 't', 'a', 't', 'i', 'c', ' ' } |
| static CharAroundSpace | g_charAroundSpace |
| static std::mutex | g_matchArgsMutex |
| 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 |
| static std::mutex | writeFileContents_lock |
| static StringUnorderedSet | writeFileContents_set |
| #define HEXTONUM | ( | x | ) |
Referenced by replaceColorMarkers().
| #define MATCH AUTO_TRACE_EXIT("match at line {}",__LINE__); |
Definition at line 1493 of file util.cpp.
Referenced by matchArgument2(), and matchArguments2().
| #define NOMATCH AUTO_TRACE_EXIT("no match at line {}",__LINE__); |
Definition at line 1494 of file util.cpp.
Referenced by matchArgument2(), and matchArguments2().
| #define REL_PATH_TO_ROOT "../../" |
Definition at line 78 of file util.cpp.
Referenced by relativePathToRoot().
| void addCodeOnlyMappings | ( | ) |
Definition at line 4168 of file util.cpp.
References updateLanguageMapping().
Referenced by generateOutput().
| void addGroupListToTitle | ( | OutputList & | ol, |
| const Definition * | d ) |
Definition at line 3927 of file util.cpp.
References recursivelyAddGroupListToTitle().
Referenced by ClassDefImpl::writeDocumentation(), ConceptDefImpl::writeDocumentation(), FileDefImpl::writeDocumentation(), GroupDefImpl::writeDocumentation(), ModuleDefImpl::writeDocumentation(), and NamespaceDefImpl::writeDocumentation().
| void addHtmlExtensionIfMissing | ( | DString & | fName | ) |
Definition at line 3937 of file util.cpp.
References DString::empty(), DString::find(), Doxygen::htmlFileExtension, DString::npos, and DString::rfind().
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(), 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(), RequirementManager::writeTagFile(), VhdlDocGen::writeTagFile(), DocSets::writeToken(), HtmlCodeGenerator::writeTooltip(), and DotNode::writeUrl().
| DString argListToString | ( | const ArgumentList & | al, |
| bool | useCanonicalType = false, | ||
| bool | showDefVals = true ) |
Returns a string representation of the parameter list al. If useCanonicalType is true then the canonical type is used for each argument. If showDefVals is true then default values are included in the string representation.
Definition at line 864 of file util.cpp.
References Argument::array, Argument::attrib, ArgumentList::begin(), Argument::canType, ArgumentList::constSpecifier(), Argument::defval, DString::empty(), ArgumentList::end(), DString::find(), ArgumentList::hasParameters(), DString::left(), LValue, DString::mid(), Argument::name, DString::npos, 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(), substituteTemplateArgumentsInString(), and ClassDefImpl::title().
| void checkBlocks | ( | const DString & | s, |
| const DString | fileName, | ||
| const SelectionMarkerInfo & | markerInfo ) |
Definition at line 5139 of file util.cpp.
References SelectionMarkerInfo::beginLen, SelectionMarkerInfo::beginStr, SelectionMarkerInfo::closeLen, SelectionMarkerInfo::closeStr, DString::data(), dstrncmp(), DString::empty(), SelectionMarkerInfo::endLen, SelectionMarkerInfo::endStr, SelectionMarkerInfo::markerChar, and warn.
Referenced by HtmlGenerator::init(), and LatexGenerator::init().
Definition at line 3932 of file util.cpp.
References DString::length(), and DString::right().
Referenced by copyLatexStyleSheet(), and extraLatexStyleSheet().
| bool checkIfTypedef | ( | const Definition * | scope, |
| const FileDef * | fileScope, | ||
| const DString & | n ) |
Returns true iff the given name string appears to be a typedef in scope.
Definition at line 4277 of file util.cpp.
References getMemberFromSymbol(), and MemberDef::isTypedef().
Referenced by isVarWithConstructor().
| void cleanupInlineGraphs | ( | ) |
Deletes all graph files written with writeInlineGraph()
Definition at line 5432 of file util.cpp.
References Config_getBool, qPrint(), Dir::remove(), and writeFileContents_set.
Referenced by generateOutput().
| void clearSubDirs | ( | const Dir & | d | ) |
Definition at line 3002 of file util.cpp.
References Config_getBool, Config_getInt, Dir::empty(), Dir::exists(), Dir::rmdir(), DString::sprintf(), and DString::str().
Referenced by DocbookGenerator::cleanup(), HtmlGenerator::cleanup(), LatexGenerator::cleanup(), ManGenerator::cleanup(), RTFGenerator::cleanup(), and generateXML().
| int computeQualifiedIndex | ( | const DString & | name | ) |
Return the index of the last :: in the string name that is still before the first <.
Definition at line 5309 of file util.cpp.
Referenced by addToMap(), addVariable(), buildFunctionList(), buildTypedefList(), getMemberFromSymbol(), SymbolResolver::Private::getResolvedSymbolRec(), and SymbolResolver::Private::getResolvedTypeRec().
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 2869 of file util.cpp.
References Config_getBool, Config_getInt, escapeCharsInString(), g_usedNames, g_usedNamesCount, g_usedNamesMutex, DString::left(), DString::length(), md5hash(), md5str(), DString::prepend(), DString::sprintf(), and DString::view().
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(), NamespaceDefImpl::setFileNameLocal(), and xmlRequirementId().
| 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 4914 of file util.cpp.
References Config_getBool, MemberListType::Invalid(), MemberListType::isPrivate(), MemberListType::isProtected(), MemberListType::isPublic(), MemberListType::toProtected(), and MemberListType::toPublic().
Referenced by ClassDefImpl::countInheritedDecMembers(), and ClassDefImpl::writeInheritedMemberDeclarations().
Converts a string to a HTML-encoded string
Definition at line 3297 of file util.cpp.
References DString::data(), DString::empty(), hex, isId(), DString::length(), and DString::reserve().
Referenced by HtmlCodeGenerator::_writeCodeLink(), HtmlHelp::addContentsItem(), addMembersToIndex(), convertToHtmlAndTruncate(), FTVHelp::Private::generateLink(), RequirementManager::generatePage(), DefinitionImpl::navigationPathAsString(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlGenerator::startFile(), HtmlDocVisitor::startLink(), substituteHtmlKeywords(), writeClassTree(), writeClassTreeForList(), writeClassTreeToOutput(), HtmlHelpIndex::writeFields(), HtmlGenerator::writeInheritedSectionTitle(), HtmlGenerator::writeLogoAsString(), 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 3208 of file util.cpp.
References DString::data(), DString::empty(), hex, DString::length(), and DString::reserve().
Referenced by HtmlGenerator::endClassDiagram(), HtmlGenerator::endMemberTemplateParams(), HtmlGenerator::startGroupHeader(), HtmlGenerator::startMemberItem(), writeMemberList(), writeQuickMemberIndex(), ClassDefImpl::writeSummaryLinks(), and VhdlDocGen::writeVHDLDeclarations().
Definition at line 3357 of file util.cpp.
References HtmlEntityMapper::convertCharEntitiesToUTF8(), DString::data(), DString::empty(), HtmlEntityMapper::instance(), DString::length(), and DString::reserve().
Referenced by generateJSLink(), generateJSNavTree(), writeJavascriptSearchData(), and writeJavasScriptSearchDataPage().
Converts a string to an XML-encoded string
Definition at line 3238 of file util.cpp.
References DString::data(), DString::empty(), HtmlEntityMapper::instance(), isId(), DString::length(), DString::reserve(), HtmlEntityMapper::writeHtmlEntity(), and HtmlEntityMapper::xml().
Referenced by DocSets::addContentsItem(), EclipseHelp::addContentsItem(), Qhp::addFile(), Sitemap::addIndexFile(), Qhp::addIndexItem(), XmlDocVisitor::filter(), generateXMLForClass(), generateXMLForConcept(), generateXMLForDir(), generateXMLForFile(), generateXMLForGroup(), generateXMLForMember(), generateXMLForModule(), generateXMLForNamespace(), generateXMLForPage(), generateXMLForRequirement(), generateXMLForRequirements(), 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(), writeRequirementRefs(), ClassDefImpl::writeTagFile(), ConceptDefImpl::writeTagFile(), DirDefImpl::writeTagFile(), FileDefImpl::writeTagFile(), GroupDefImpl::writeTagFile(), MemberDefImpl::writeTagFile(), ModuleDefImpl::writeTagFile(), NamespaceDefImpl::writeTagFile(), PageDefImpl::writeTagFile(), RequirementManager::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.
Copies the file src to dest. Returns true if the copy was successful, false otherwise. When a relative path is used, is is based on the current working directory.
Definition at line 4629 of file util.cpp.
References err, and DString::str().
Referenced by copyExtraFiles(), copyIcon(), copyLatexStyleSheet(), copyLogo(), copyStyleSheet(), DocParser::findAndCopyImage(), FormulaManager::generateImages(), CitationManager::generatePage(), RTFGenerator::init(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), XmlDocVisitor::operator()(), and substituteLatexKeywords().
Corrects URL url according to the relative path relPath.
Returns the corrected URL. For absolute URLs no correction will be done.
Definition at line 4669 of file util.cpp.
References DString::empty(), isURL(), and DString::prepend().
Referenced by HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), XmlDocVisitor::operator()(), and startQuickIndexItem().
| DString createHtmlUrl | ( | const DString & | relPath, |
| const DString & | ref, | ||
| bool | isLocalFile, | ||
| const DString & | targetFileName, | ||
| const DString & | anchor ) |
Definition at line 4512 of file util.cpp.
References DString::empty(), DString::endsWith(), and externalRef().
Referenced by HtmlCodeGenerator::_writeCodeLink(), RequirementManager::generatePage(), HtmlDocVisitor::startLink(), HtmlGenerator::startTextLink(), HtmlGenerator::writeObjectLink(), and HtmlCodeGenerator::writeTooltip().
| void createSubDirs | ( | const Dir & | d | ) |
Definition at line 2975 of file util.cpp.
References Config_getBool, Config_getInt, Dir::exists(), Dir::mkdir(), DString::sprintf(), DString::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 5377 of file util.cpp.
References DString::endsWith(), DString::find(), and DString::left().
Referenced by ClassDefImpl::className().
Definition at line 5204 of file util.cpp.
References Config_getInt, DString::data(), getUTF8CharNumBytes(), isUTF8NonBreakableSpace(), DString::length(), literal_at(), and DString::reserve().
Referenced by FileDefImpl::parseSource(), Markdown::process(), DocParser::readTextFileByName(), readTextFileByName(), MemberDefImpl::setInitializer(), DefinitionImpl::writeInlineCode(), and FileDefImpl::writeSourceBody().
Definition at line 2935 of file util.cpp.
References FileInfo::absFilePath(), Config_getBool, Config_getList, FileInfo::dirPath(), FileInfo::exists(), FileInfo::isDir(), and DString::str().
Referenced by readIncludeFile(), and ModuleManager::resolveImports().
Definition at line 2694 of file util.cpp.
References Config_getBool, getUTF8CharNumBytes(), hex, DString::reserve(), and useCaseSenseNames().
Referenced by convertNameToFile(), DotClassGraph::getMapLabel(), DotDirDeps::getMapLabel(), DotGfxHierarchyTable::getMapLabel(), DotGroupCollaboration::getMapLabel(), DotInclDepGraph::getMapLabel(), markdownFileNameToId(), and PageDefImpl::writeDocumentation().
| DString externalLinkTarget | ( | const bool | parent | ) |
Definition at line 4501 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().
Resolve a reference via a tagfile reference ref. If after resolving the reference the result points to a relative path then relPath is prepended to create the correct link.
Definition at line 4548 of file util.cpp.
References DString::at(), DString::empty(), end(), DString::length(), DString::prepend(), DString::str(), and Doxygen::tagDestinationMap.
Referenced by HtmlHelp::addContentsItem(), convertMapFile(), createHtmlUrl(), generateJSLink(), FTVHelp::Private::generateLink(), replaceRef(), HtmlGenerator::startIndexItem(), LayoutNavEntry::url(), HtmlGenerator::writeInheritedSectionTitle(), writeJavasScriptSearchDataPage(), and writeMapArea().
| DString extractBeginRawStringDelimiter | ( | const char * | rawStart | ) |
Definition at line 5388 of file util.cpp.
References ASSERT, DString::find(), DString::length(), DString::mid(), and DString::npos.
|
static |
Definition at line 1463 of file util.cpp.
References Argument::array, DString::empty(), extractCanonicalType(), Argument::name, DString::stripWhiteSpace(), and Argument::type.
Referenced by matchArgument2().
|
static |
Definition at line 1377 of file util.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, DString::empty(), end(), extractClassNameFromType(), getCanonicalTypeForIdentifier(), DString::mid(), Definition::name(), removeRedundantWhiteSpace(), DString::str(), stripIrrelevantConstVolatile(), DString::stripPrefix(), DString::stripWhiteSpace(), and DString::substr().
Referenced by extractCanonicalArgType(), and getCanonicalTemplateSpec().
| int extractClassNameFromType | ( | const DString & | type, |
| int & | pos, | ||
| DString & | name, | ||
| DString & | 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 3386 of file util.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, DString::clear(), DString::empty(), end(), DString::length(), DString::lower(), DString::mid(), DString::startsWith(), and DString::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 4839 of file util.cpp.
References end(), DString::str(), and DString::substr().
Referenced by inlineArgListToDoc().
| DString extractEndRawStringDelimiter | ( | const char * | rawEnd | ) |
Definition at line 5396 of file util.cpp.
References DString::length(), and DString::mid().
| void extractNamespaceName | ( | const DString & | scopeName, |
| DString & | className, | ||
| DString & | 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 3032 of file util.cpp.
References DString::clear(), DString::empty(), DString::endsWith(), getClass(), getResolvedNamespace(), DString::left(), DString::length(), DString::mid(), Definition::name(), DString::npos, and DString::rfind().
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 1058 of file util.cpp.
References addTerminalCharIfMissing(), err, FileInfo::exists(), FileInfo::isFile(), and readInputFile().
Referenced by createDVIFile(), extractBoundingBox(), getConvertLatexMacro(), HtmlGenerator::init(), LatexGenerator::init(), LayoutDocManager::parse(), parseInput(), FileDefImpl::parseSource(), parseTagFile(), DocParser::readTextFileByName(), readTextFileByName(), runMermaid(), runPlantumlContent(), FileDefImpl::writeSourceBody(), HtmlGenerator::writeStyleInfo(), and writeXMLCodeBlock().
|
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 964 of file util.cpp.
Referenced by readInputFile().
Definition at line 4464 of file util.cpp.
References end(), and DString::str().
Referenced by addToIndices(), createJavaScriptSearchIndex(), PerlModGenerator::generatePerlModForPage(), generateSqlite3ForPage(), generateXMLForPage(), generateXMLForRequirement(), generateXMLForRequirements(), parseCommentAsHtml(), SearchIndexExternal::setCurrentDoc(), HtmlGenerator::startFile(), and writeJavasScriptSearchDataPage().
Definition at line 2457 of file util.cpp.
References FileDef::absFilePath(), FileInfo::absFilePath(), Config_getList, Doxygen::exampleNameLinkedMap, FileInfo::exists(), FileNameLinkedMap::findFileDef(), Portable::pathSeparator(), and DString::str().
Referenced by readIncludeFile(), and DocParser::readTextFileByName().
|
static |
Definition at line 3859 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().
|
static |
Returns the position in the string where a function parameter list begins, or DString::npos if one is not found.
Definition at line 689 of file util.cpp.
References DString::npos.
Referenced by resolveRef().
|
static |
Definition at line 1202 of file util.cpp.
References DString::at(), AUTO_TRACE, AUTO_TRACE_EXIT, DString::empty(), extractCanonicalType(), DString::mid(), resolveTypeDef(), and DString::stripWhiteSpace().
Referenced by getCanonicalTypeForIdentifier().
|
static |
Definition at line 1223 of file util.cpp.
References AUTO_TRACE, AUTO_TRACE_ADD, AUTO_TRACE_EXIT, DString::empty(), getCanonicalTemplateSpec(), getCanonicalTypeForIdentifier(), Definition::getLanguage(), SymbolResolver::getResolvedType(), SymbolResolver::getTemplateSpec(), SymbolResolver::getTypedef(), MemberDef::isEnumerate(), ClassDef::isTemplate(), MemberDef::isTypedef(), ClassDef::isUsedOnly(), Definition::name(), DString::npos, Definition::qualifiedName(), ClassDef::qualifiedNameWithTemplateParameters(), removeRedundantWhiteSpace(), SymbolResolver::resolveClass(), resolveTypeDef(), DString::rfind(), DString::startsWith(), stripDeclKeywords(), DString::stripPrefix(), stripScope(), stripTemplateSpecifiersFromScope(), and MemberDef::typeString().
Referenced by extractCanonicalType(), and getCanonicalTypeForIdentifier().
| GetDefResult getDefs | ( | const GetDefInput & | input | ) |
Definition at line 1871 of file util.cpp.
References GetDefInput::args, AUTO_TRACE, GetDefResult::cd, GetDefInput::checkCV, GetDefResult::cnd, GetDefInput::currentFile, Definition::definitionType(), DString::empty(), GetDefResult::fd, GetDefInput::forceEmptyScope, GetDefResult::found, GetDefResult::gd, MemberDef::getClassDef(), MemberDef::getFileDef(), MemberDef::getGroupDef(), MemberDef::getNamespaceDef(), Doxygen::globalScope, GetDefInput::insideCode, 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 DocParser::findDocsForMemberOrCompound(), getLinkInScope(), getLinkInScope(), linkifyText(), and resolveRef().
| DString getDotImageExtension | ( | ) |
Returns the file extension to use for dot files as specified via the DOT_IMAGE_FORMAT configuration option.
Definition at line 4974 of file util.cpp.
References Config_getEnumAsString, and getDotImageExtension().
Referenced by MermaidManager::convertToImageFormat(), RTFGenerator::endCallGraph(), RTFGenerator::endDirDepGraph(), RTFGenerator::endDotGraph(), RTFGenerator::endInclDepGraph(), DotGraph::generateCode(), getDotImageExtension(), DotGraph::imgName(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), DotRunner::run(), 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(), HtmlDocVisitor::writeMscFile(), and HtmlDocVisitor::writePlantUMLFile().
Returns the file extension to use for dot files as specified via the argument format.
Definition at line 4978 of file util.cpp.
References DString::find(), DString::left(), and DString::npos.
Definition at line 4984 of file util.cpp.
References split(), and DString::str().
Referenced by DotRunner::run().
Definition at line 4487 of file util.cpp.
References Config_getString, InputFileEncoding::encoding, Doxygen::inputFileEncodingList, FileInfo::match(), and useCaseSenseNames().
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 1025 of file util.cpp.
References Config_getList, Config_getString, DString::empty(), getFilterFromList(), DString::length(), and DString::mid().
Referenced by FilterCache::getFileContents(), CodeFragmentManager::parseCodeFragment(), readCodeFragment(), readInputFile(), and FileDefImpl::writeSourceBody().
Definition at line 4216 of file util.cpp.
References DString::empty(), DString::mid(), DString::npos, and DString::rfind().
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 990 of file util.cpp.
References Portable::fileSystemIsCaseSensitive(), DString::find(), reg::Ex::isValid(), DString::left(), DString::lower(), reg::match(), DString::mid(), DString::npos, DString::str(), and reg::Ex::Wildcard.
Referenced by getFileFilter().
| SrcLangExt getLanguageFromCodeLang | ( | DString & | fileName | ) |
Routine to handle the language attribute of the \code command.
Definition at line 4192 of file util.cpp.
References DString::at(), g_lang2extMap, getLanguageFromFileName(), DString::lower(), and DString::mid().
Referenced by DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), ManDocVisitor::operator()(), RTFDocVisitor::operator()(), and XmlDocVisitor::operator()().
| SrcLangExt getLanguageFromFileName | ( | const DString & | fileName, |
| SrcLangExt | defLang ) |
Definition at line 4174 of file util.cpp.
References DString::at(), DString::empty(), FileInfo::extension(), g_extLookup, DString::lower(), DString::prepend(), and DString::str().
Referenced by MemberDefImpl::_writeMultiLineInitializer(), ClassDefImpl::ClassDefImpl(), convertCppComments(), DocRef::DocRef(), FileDefImpl::FileDefImpl(), generateExampleDocs(), getLanguageFromCodeLang(), EntryType::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().
| DString getLanguageSpecificSeparator | ( | SrcLangExt | lang, |
| bool | classScope = false ) |
Returns the scope separator to use given the programming language lang
Definition at line 4639 of file util.cpp.
Referenced by DefinitionImpl::_writeSourceRefList(), addGlobalFunction(), MemberDefImpl::addListReference(), addMethodToClass(), addVariableToFile(), MemberDefImpl::displayDefinition(), DefinitionAliasImpl::init(), linkToText(), makeDisplayName(), makeDisplayName(), makeQualifiedNameWithTemplateParameters(), ClassDefImpl::mergeMembersFromBaseClasses(), MemberDefImpl::qualifiedName(), SearchIndex::setCurrentDoc(), validatingParseDoc(), MemberDefImpl::warnIfUndocumented(), writeAlphabeticalClassList(), MemberDefImpl::writeDeclaration(), writeDefArgumentList(), MemberDefImpl::writeDocumentation(), writeJavasScriptSearchDataPage(), MemberDefImpl::writeLink(), and writeMemberReference().
|
static |
Definition at line 4225 of file util.cpp.
References computeQualifiedIndex(), Definition::definitionType(), SymbolMap< T >::find(), Doxygen::globalScope, SymbolResolver::isAccessibleFromWithExpScope(), replaceNamespaceAliases(), Doxygen::symbolMap, toMemberDef(), Definition::TypeClass, Definition::TypeMember, and Definition::TypeNamespace.
Referenced by checkIfTypedef().
| int getPrefixIndex | ( | const DString & | 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 2657 of file util.cpp.
References Config_getList.
Referenced by Index::addClassMemberNameToIndex(), Index::addFileMemberNameToIndex(), Index::addModuleMemberNameToIndex(), Index::addNamespaceMemberNameToIndex(), SearchIndex::addWordRec(), parseInput(), writeAlphabeticalClassList(), and writeMemberList().
| DString getProjectId | ( | ) |
Definition at line 5301 of file util.cpp.
References Config_getString, DString::empty(), md5str(), and DString::view().
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:
Definition at line 1941 of file util.cpp.
References DString::at(), Doxygen::conceptLinkedMap, DString::empty(), getClass(), ModuleManager::instance(), Definition::isLinkable(), DString::left(), DString::length(), DString::mid(), Doxygen::namespaceLinkedMap, DString::npos, DString::prepend(), and DString::rfind().
Referenced by resolveRef().
| int getScopeFragment | ( | const DString & | 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 3804 of file util.cpp.
References DString::at(), and DString::length().
Referenced by buildScopeFromQualifiedName(), findScopeFromQualifiedName(), SymbolResolver::Private::followPath(), resolveTypeDef(), and stripAnonymousNamespaceScope().
| void initDefaultExtensionMapping | ( | ) |
Definition at line 4101 of file util.cpp.
References updateLanguageMapping().
Referenced by initDoxygen().
| DString inlineArgListToDoc | ( | const ArgumentList & | al | ) |
Returns a documentation string combining the inline documentation for each parameter in the list al.
Definition at line 4875 of file util.cpp.
References extractDirection(), and ArgumentList::hasDocumentation().
Referenced by DocParser::processCopyDoc(), and MemberDefImpl::writeDocumentation().
| DString inlineTemplateArgListToDoc | ( | const ArgumentList & | al | ) |
Returns a documentation string combining the inline documentation for each template parameter in the list al.
Definition at line 837 of file util.cpp.
References ArgumentList::hasTemplateDocumentation(), DString::stripPrefix(), and DString::stripWhiteSpace().
Referenced by ClassDefImpl::writeDetailedDocumentationBody(), and MemberDefImpl::writeDocumentation().
Definition at line 3082 of file util.cpp.
References ArgumentList::empty(), DString::empty(), DString::find(), getClass(), DString::left(), DString::mid(), DString::npos, and ClassDef::templateArguments().
Referenced by DotClassGraph::addClass(), generateXMLForClass(), DiagramItem::label(), ClassDefImpl::writeInheritanceGraph(), and ClassDefImpl::writeTagFile().
|
static |
Definition at line 2004 of file util.cpp.
References DString::data(), and DString::empty().
Referenced by resolveRef().
| bool isURL | ( | const DString & | url | ) |
Checks whether the given url starts with a supported protocol.
Definition at line 4656 of file util.cpp.
References DString::find(), DString::left(), DString::npos, DString::str(), and DString::stripWhiteSpace().
Referenced by correctURL(), and Markdown::Private::processLink().
Definition at line 745 of file util.cpp.
References DString::length().
Referenced by addClassToContext(), addConceptToContext(), buildFunctionList(), mergeScopes(), pushScope(), and resolveRef().
| DString linkToText | ( | SrcLangExt | lang, |
| const DString & | link, | ||
| bool | ignoreDots ) |
Definition at line 2270 of file util.cpp.
References DString::at(), DString::empty(), DString::find(), getLanguageSpecificSeparator(), DString::mid(), DString::npos, and substitute().
Referenced by DotCallGraph::buildGraph(), DocRef::DocRef(), DotCallGraph::DotCallGraph(), and DocParser::handleLinkedWord().
| bool mainPageHasTitle | ( | ) |
Definition at line 4969 of file util.cpp.
References Doxygen::mainPage.
Referenced by generateJSNavTree(), generateSqlite3ForPage(), and generateXMLForPage().
Definition at line 3980 of file util.cpp.
References stripExtensionGeneral(), and stripPath().
Referenced by HtmlDocVisitor::operator()(), DocbookDocVisitor::startDiaFile(), LatexDocVisitor::startDiaFile(), DocbookDocVisitor::startDotFile(), LatexDocVisitor::startDotFile(), DocbookDocVisitor::startMscFile(), LatexDocVisitor::startMscFile(), DocbookDocVisitor::startPlantUmlFile(), LatexDocVisitor::startPlantUmlFile(), HtmlDocVisitor::writeDiaFile(), RTFDocVisitor::writeDiaFile(), DocbookDocVisitor::writeDotFile(), HtmlDocVisitor::writeDotFile(), RTFDocVisitor::writeDotFile(), HtmlDocVisitor::writeMermaidFile(), RTFDocVisitor::writeMermaidFile(), DocbookDocVisitor::writeMscFile(), HtmlDocVisitor::writeMscFile(), LatexDocVisitor::writeMscFile(), RTFDocVisitor::writeMscFile(), HtmlDocVisitor::writePlantUMLFile(), and RTFDocVisitor::writePlantUMLFile().
Definition at line 5351 of file util.cpp.
References DString::npos, and DString::setNum().
Referenced by addClassToContext(), addEnumValuesToEnums(), addVariable(), buildFunctionList(), extractClassName(), findClassRelation(), findEnums(), SymbolResolver::resolveClass(), resolveLink(), and resolveRef().
|
static |
Definition at line 1528 of file util.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, Argument::canType, DString::empty(), extractCanonicalArgType(), g_matchArgsMutex, DString::length(), MATCH, matchCanonicalTypes(), Argument::name, Definition::name(), NOMATCH, DString::right(), stripIrrelevantConstVolatile(), and Argument::type.
Referenced by matchArguments2().
| bool matchArguments2 | ( | const Definition * | srcScope, |
| const FileDef * | srcFileScope, | ||
| const DString & | srcReturnType, | ||
| const ArgumentList * | srcAl, | ||
| const Definition * | dstScope, | ||
| const FileDef * | dstFileScope, | ||
| const DString & | dstReturnType, | ||
| const ArgumentList * | dstAl, | ||
| bool | checkCV, | ||
| SrcLangExt | lang ) |
Compares two parameter lists srcAl and dstAl and returns true if they match.
Definition at line 1594 of file util.cpp.
References argListToString(), ASSERT, AUTO_TRACE, ArgumentList::begin(), ArgumentList::constSpecifier(), ArgumentList::empty(), ArgumentList::end(), ArgumentList::front(), MATCH, matchArgument2(), Definition::name(), NOMATCH, ArgumentList::refQualifier(), ArgumentList::size(), ArgumentList::trailingReturnType(), Argument::type, and ArgumentList::volatileSpecifier().
Referenced by addMemberDocs(), addMemberFunction(), buildFunctionList(), combineDeclarationAndDefinition(), computeMemberRelationsForBaseClass(), ClassDefImpl::containsOverload(), findFriends(), findGlobalMember(), findMember(), SymbolResolver::Private::getResolvedSymbol(), GroupDefImpl::insertMember(), matchCanonicalTypes(), ClassDefImpl::mergeMembersFromBaseClasses(), transferFunctionReferences(), and transferRelatedFunctionDocumentation().
|
static |
Definition at line 1496 of file util.cpp.
References AUTO_TRACE, DString::find(), DString::left(), matchArguments2(), DString::mid(), DString::npos, and stringToArgumentList().
Referenced by matchArgument2().
| bool matchTemplateArguments | ( | const ArgumentList & | srcAl, |
| const ArgumentList & | dstAl ) |
Returns true if the template parameter lists srcAl and dstAl match. The lists are considered to match if they have the same number of parameters and each matching parameter in srcAl and dstAl has the same constraints (or at least one parameter has no constraints).
Definition at line 1838 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 = false ) |
Merges the information of two parameter lists (typically a declaration and a definition). Missing information is added to either list. The name of parameter of srcAl is only overwritten if forceNameOverwrite is true.
Definition at line 1694 of file util.cpp.
References argListToString(), AUTO_TRACE, AUTO_TRACE_ADD, ArgumentList::begin(), DString::clear(), Argument::defval, Argument::docs, DString::empty(), ArgumentList::end(), DString::find(), DString::left(), DString::length(), Argument::name, DString::npos, qPrint(), DString::right(), ArgumentList::size(), DString::stripWhiteSpace(), and Argument::type.
Referenced by addMemberDocs(), buildFunctionList(), 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 3759 of file util.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, DString::empty(), DString::left(), leftScopeMatch(), DString::length(), DString::mid(), DString::npos, and DString::rfind().
Referenced by addEnumValuesToEnums(), addVariable(), findEnums(), findMember(), and stripTemplateSpecifiersFromScope().
| DString normalizeNonTemplateArgumentsInString | ( | const DString & | name, |
| const Definition * | context, | ||
| const ArgumentList & | formalArgs ) |
Returns a representation of name where all known types have been normalized to their canonical form. The normalization is done in the context of context and using the formal arguments in formalArgs.
Definition at line 3471 of file util.cpp.
References end(), Definition::name(), DString::npos, removeRedundantWhiteSpace(), SymbolResolver::resolveClass(), and DString::substr().
Referenced by findUsedClassesForClass().
| bool openOutputFile | ( | const DString & | outFile, |
| std::ofstream & | f ) |
Helper to open an output search f for writing. If the file already exists it will be renamed to .bak first. If outFile is "-" then the output will be written to standard output.
Definition at line 4996 of file util.cpp.
References ASSERT, FileInfo::exists(), FileInfo::filePath(), Portable::openOutputStream(), Dir::remove(), Dir::rename(), and DString::str().
Referenced by compareDoxyfile(), generateConfigFile(), readConfiguration(), and writeDefaultLayoutFile().
| DString projectLogoFile | ( | ) |
Definition at line 2586 of file util.cpp.
References Config_getString, DString::empty(), DString::find(), DString::left(), and DString::npos.
Referenced by copyLogo(), substituteHtmlKeywords(), and substituteLatexKeywords().
| DString projectLogoSize | ( | ) |
Definition at line 2605 of file util.cpp.
References DString::at(), Config_getString, DString::empty(), DString::find(), DString::length(), DString::mid(), DString::npos, DString::prepend(), DString::quoted(), and DString::stripWhiteSpace().
Referenced by substituteHtmlKeywords(), and substituteLatexKeywords().
| bool protectionLevelVisible | ( | Protection | prot | ) |
Definition at line 4681 of file util.cpp.
References Config_getBool.
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 DString & | fileName, |
| std::string & | contents, | ||
| const ReadInputFileOptions & | options ) |
read a file name fileName and optionally filter and transcode it
Definition at line 4380 of file util.cpp.
References ReadInputFileOptions::binary(), DString::empty(), err, FileInfo::exists(), Debug::ExtCmd, ReadInputFileOptions::filter(), filterCRLF(), Debug::FilterOutput, getEncoding(), getFileFilter(), ReadInputFileOptions::isSourceCode(), Portable::openInputStream(), Portable::pclose(), Portable::popen(), Debug::print(), FileInfo::size(), DString::str(), and transcodeCharacterBuffer().
Referenced by checkAndOpenFile(), fileToString(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), LatexDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), RTFDocVisitor::operator()(), parseFile(), parseInput(), readIncludeFile(), DocbookDocVisitor::startMermaidFile(), LatexDocVisitor::startMermaidFile(), DocbookDocVisitor::startPlantUmlFile(), and LatexDocVisitor::startPlantUmlFile().
|
static |
Definition at line 3888 of file util.cpp.
References OutputList::disableAllBut(), Definition::displayName(), findModuleDef(), Definition::getOutputFileBase(), Definition::getReference(), Html, Definition::partOfGroups(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), recursivelyAddGroupListToTitle(), theTranslator, Translator::trModule(), OutputList::writeObjectLink(), and OutputList::writeString().
Referenced by addGroupListToTitle(), and recursivelyAddGroupListToTitle().
Definition at line 2918 of file util.cpp.
References Config_getBool, DString::npos, 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 98 of file util.cpp.
References DString::empty(), end(), and DString::str().
Referenced by createTagLessInstance(), MemberDefImpl::displayDefinition(), generateClassMemberLink(), ClassDefImpl::internalInsertMember(), makeDisplayName(), makeDisplayName(), simplifyTypeForTable(), MemberDefImpl::writeDeclaration(), and MemberDefImpl::writeDocumentation().
Definition at line 427 of file util.cpp.
References CharAroundSpace::CharElem::after, CharAroundSpace::CharElem::before, CharAroundSpace::charMap, Config_getBool, constScope, DString::data(), disspace(), DString::empty(), g_charAroundSpace, isId(), DString::length(), operatorScope, staticScope, 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(), ArgumentList::finishTrailingReturnType(), generateFunctionLink(), generateFunctionLink(), generateLink(), getCanonicalTypeForIdentifier(), getLink(), getLink(), getLink(), MemberDefImpl::init(), ClassDefImpl::insertTemplateInstance(), MemberDefImpl::MemberDefImpl(), normalizeNonTemplateArgumentsInString(), parseFuncDecl(), resolveRef(), tempArgListToString(), and writeExceptionListImpl().
Definition at line 155 of file util.cpp.
References DString::data(), DString::empty(), reg::replace(), and DString::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 4578 of file util.cpp.
References Config_getInt, DString::empty(), end(), hex, HEXTONUM, ColoredImage::hsl2rgb(), and DString::str().
Referenced by ResourceMgr::copyResourceAs(), fillColorStyleMaps(), HtmlGenerator::init(), and writeDefaultStyleSheet().
Definition at line 2295 of file util.cpp.
References FileInfo::absFilePath(), Config_getList, Doxygen::dirLinkedMap, LinkedMap< T, Hash, KeyEqual, Map >::find(), and DString::str().
Referenced by resolveLink().
| bool resolveLink | ( | const DString & | scName, |
| const DString & | lr, | ||
| bool | inSeeBlock, | ||
| const Definition ** | resContext, | ||
| DString & | resAnchor, | ||
| SrcLangExt | lang, | ||
| const DString & | prefix = DString(), | ||
| const FileDef * | currentFile = nullptr ) |
Returns an symbol definition given its name and context for an explicitly linked symbol.
Definition at line 2313 of file util.cpp.
References Definition::anchor(), AUTO_TRACE, AUTO_TRACE_EXIT, SectionInfo::definition(), DString::empty(), Doxygen::exampleLinkedMap, LinkedMap< T, Hash, KeyEqual, Map >::find(), getClass(), getConcept(), PageDef::getGroupDef(), Doxygen::groupLinkedMap, Doxygen::inputNameLinkedMap, ModuleManager::instance(), SectionManager::instance(), Definition::isLinkable(), SectionInfo::label(), mangleCSharpGenericName(), Definition::name(), Doxygen::namespaceLinkedMap, Doxygen::pageLinkedMap, prefix, resolveDirLink(), resolveRef(), and stripTemplateSpecifiersFromScope().
Referenced by DocLink::DocLink(), and DocRef::DocRef().
| bool resolveRef | ( | const DString & | scName, |
| const DString & | name, | ||
| bool | inSeeBlock, | ||
| const Definition ** | resContext, | ||
| const MemberDef ** | resMember, | ||
| SrcLangExt | lang, | ||
| bool | lookForSpecializations = true, | ||
| const FileDef * | currentFile = nullptr, | ||
| bool | checkScope = false ) |
Returns a symbol definition (compound and/or member) given its name and context.
Definition at line 2013 of file util.cpp.
References ASSERT, AUTO_TRACE, AUTO_TRACE_ADD, GetDefResult::cd, GetDefInput::checkCV, GetDefResult::cnd, Doxygen::conceptLinkedMap, GetDefInput::currentFile, DString::empty(), GetDefResult::fd, DString::find(), LinkedMap< T, Hash, KeyEqual, Map >::find(), FileNameLinkedMap::findFileDef(), findParameterList(), GetDefInput::forceEmptyScope, GetDefResult::found, GetDefResult::gd, getClass(), getDefs(), Definition::getOuterScope(), getScopeDefs(), Doxygen::globalScope, Doxygen::groupLinkedMap, Doxygen::inputNameLinkedMap, ModuleManager::instance(), MemberDef::isEnumerate(), isLowerCase(), MemberDef::isStrongEnumValue(), MemberDef::isTypedef(), DString::left(), leftScopeMatch(), DString::length(), mangleCSharpGenericName(), GetDefResult::md, DString::mid(), GetDefResult::modd, Definition::name(), GetDefResult::nd, DString::npos, removeRedundantWhiteSpace(), resolveRef(), DString::rfind(), DString::startsWith(), and substitute().
Referenced by DocParser::handleLinkedWord(), resolveLink(), and resolveRef().
| DString resolveTypeDef | ( | const Definition * | context, |
| const DString & | qualifiedName, | ||
| const Definition ** | typedefContext ) |
Definition at line 232 of file util.cpp.
References MemberDef::argsString(), AUTO_TRACE, AUTO_TRACE_ADD, AUTO_TRACE_EXIT, Definition::definitionType(), DString::empty(), DString::find(), LinkedMap< T, Hash, KeyEqual, Map >::find(), Definition::findInnerCompound(), Doxygen::functionNameLinkedMap, Definition::getOuterScope(), getScopeFragment(), Doxygen::globalScope, SymbolResolver::isAccessibleFrom(), MemberDef::isRelated(), MemberDef::isTypedef(), DString::left(), Doxygen::memberNameLinkedMap, DString::mid(), Definition::name(), DString::npos, resolveTypeDef(), DString::rfind(), Definition::TypeClass, and MemberDef::typeString().
Referenced by findUsedClassesForClass(), getCanonicalTemplateSpec(), getCanonicalTypeForIdentifier(), isVarWithConstructor(), and resolveTypeDef().
Definition at line 734 of file util.cpp.
References DString::at(), DString::length(), and DString::right().
Referenced by addMemberFunction(), findScopeFromQualifiedName(), and isRecursiveBaseClass().
| DString selectBlocks | ( | const DString & | 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 5026 of file util.cpp.
References SelectionMarkerInfo::beginLen, SelectionMarkerInfo::beginStr, SelectionMarkerInfo::closeLen, SelectionMarkerInfo::closeStr, DString::data(), dstrlen(), dstrncmp(), DString::empty(), SelectionMarkerInfo::endLen, SelectionMarkerInfo::endStr, DString::length(), SelectionMarkerInfo::markerChar, and DString::reserve().
Referenced by substituteHtmlKeywords(), and substituteLatexKeywords().
Definition at line 2573 of file util.cpp.
References dateTimeFromString(), err, and formatDateTime().
Referenced by substituteHtmlKeywords(), and substituteLatexKeywords().
| void stackTrace | ( | ) |
Definition at line 4316 of file util.cpp.
References Portable::pclose(), and Portable::popen().
Definition at line 167 of file util.cpp.
References DString::at(), DString::empty(), getScopeFragment(), DString::left(), DString::length(), DString::mid(), Doxygen::namespaceLinkedMap, and DString::right().
Referenced by addMemberFunction(), addPageToContext(), addVariable(), buildNamespaceList(), computeTemplateClassRelations(), extractClassName(), findGroupScope(), findUsingDeclImports(), findUsingDirectives(), and resolveClassNestingRelations().
Definition at line 1186 of file util.cpp.
References DString::find(), DString::left(), DString::mid(), and DString::npos.
Referenced by getCanonicalTypeForIdentifier().
Definition at line 3961 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 3951 of file util.cpp.
References DString::left(), DString::length(), and DString::right().
Referenced by TooltipManager::addTooltip(), anonymous_namespace{tagreader.cpp}::TagFileParser::buildLists(), extraLatexStyleSheet(), makeBaseName(), 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 227 of file util.cpp.
References Config_getList, and stripFromPath().
Referenced by MemberDefImpl::_writeGroupInclude(), addIncludeFile(), FileNameLinkedMap::findFileDef(), and FileNameLinkedMap::showFileDefMatches().
|
inlinestatic |
Definition at line 196 of file util.cpp.
References dstricmp(), DString::left(), DString::mid(), prefix, and Portable::removeLongPathMarker().
Referenced by stripFromIncludePath(), and stripFromPath().
strip part of path if it matches one of the paths in the Config_getList(STRIP_FROM_PATH) list
Definition at line 219 of file util.cpp.
References Config_getList, and stripFromPath().
Referenced by Config::checkAndCorrect(), DirDefImpl::DirDefImpl(), FileDefImpl::FileDefImpl(), generateAnonymousAnchor(), generateXMLForClass(), generateXMLForConcept(), generateXMLForDir(), generateXMLForFile(), generateXMLForMember(), generateXMLForModule(), generateXMLForNamespace(), generateXMLForPage(), generateXMLForRequirement(), generateXMLForRequirements(), handleFileInfoResult(), insertPath(), markdownFileNameToId(), MarkdownOutlineParser::parseInput(), ModuleManager::resolveImports(), ClassDefImpl::showUsedFiles(), ModuleDefImpl::writeFiles(), writeSingleFileIndex(), DirDefImpl::writeTagFile(), FileDefImpl::writeTagFile(), and GroupDefImpl::writeTagFile().
Definition at line 4693 of file util.cpp.
References Config_getInt, DString::data(), DString::empty(), literal_at(), TextStream::str(), and substitute().
Referenced by handleCommentBlock(), handleCommentBlock(), handleCommentBlock(), handleParametersCommentBlocks(), DocPara::handleStartCode(), and MarkdownOutlineParser::parseInput().
| void stripIndentationVerbatim | ( | DString & | doc, |
| size_t | indentationLevel, | ||
| bool | skipFirstLine ) |
Definition at line 4782 of file util.cpp.
References DString::data(), DString::empty(), DString::rawData(), and DString::resize().
Referenced by MemberDefImpl::setInitializer().
| void stripIrrelevantConstVolatile | ( | DString & | s, |
| bool | insideTemplate ) |
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 1176 of file util.cpp.
References stripIrrelevantString().
Referenced by extractCanonicalType(), and matchArgument2().
Definition at line 1116 of file util.cpp.
References DString::at(), AUTO_TRACE, AUTO_TRACE_EXIT, DString::clear(), DString::find(), isId(), DString::left(), DString::length(), DString::mid(), DString::npos, and DString::stripWhiteSpace().
Referenced by stripIrrelevantConstVolatile().
Special version of DString::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 3993 of file util.cpp.
References DString::data(), DString::empty(), DString::length(), literal_at(), and DString::mid().
Referenced by DefinitionImpl::_setBriefDescription(), DocGroup::addDocs(), VHDLOutlineParser::checkInlineCode(), DocPara::handleCommand(), CommentScanner::parseCommentBlock(), and toDefinition().
Definition at line 3966 of file util.cpp.
References DString::mid(), DString::npos, and DString::rfind().
Referenced by LatexGenerator::addLabel(), anonymous_namespace{tagreader.cpp}::TagFileParser::buildLists(), RTFGenerator::endDoxyAnchor(), LatexGenerator::endIndexItem(), LatexGenerator::endIndexValue(), LatexGenerator::endTitleHead(), makeBaseName(), objectLinkToString(), objectLinkToString(), objectLinkToString(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), DocbookDocVisitor::operator()(), HtmlDocVisitor::operator()(), HtmlDocVisitor::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()(), LatexDocVisitor::operator()(), RTFDocVisitor::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()(), XmlDocVisitor::operator()(), DotFilePatcher::run(), SearchIndexExternal::setCurrentDoc(), DocbookGenerator::startDoxyAnchor(), LatexGenerator::startDoxyAnchor(), DocbookGenerator::startFile(), LatexGenerator::startFile(), RTFGenerator::startFile(), DocbookDocVisitor::startLink(), LatexDocVisitor::startLink(), RTFDocVisitor::startLink(), DocbookDocVisitor::startMermaidFile(), LatexDocVisitor::startMermaidFile(), LatexDocVisitor::startPlantUmlFile(), DocbookGenerator::startSection(), LatexGenerator::startSection(), LatexGenerator::startTextLink(), RTFGenerator::startTextLink(), substituteHtmlKeywords(), substituteLatexKeywords(), LatexGenerator::writeAnchor(), RTFGenerator::writeAnchor(), LatexCodeGenerator::writeCodeLink(), RTFCodeGenerator::writeCodeLink(), DocbookCodeGenerator::writeCodeLinkLine(), MemberList::writeDeclarations(), DocbookDocVisitor::writeDiaFile(), writeDocbookLink(), LatexCodeGenerator::writeLineNumber(), RTFCodeGenerator::writeLineNumber(), DocbookDocVisitor::writeMermaidFile(), LatexDocVisitor::writeMermaidFile(), DocbookDocVisitor::writePlantUMLFile(), LatexDocVisitor::writePlantUMLFile(), 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 3115 of file util.cpp.
References DString::at(), DString::length(), and DString::right().
Referenced by DotClassGraph::addClass(), DocRef::DocRef(), generateJSLink(), getCanonicalTypeForIdentifier(), DefinitionImpl::Private::init(), DiagramItem::label(), NamespaceDefImpl::writeBriefDescription(), and ClassDefImpl::writeIncludeFilesForSlice().
| DString stripTemplateSpecifiersFromScope | ( | const DString & | fullName, |
| bool | parentOnly, | ||
| DString * | pLastScopeStripped, | ||
| DString | 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 3692 of file util.cpp.
References DString::at(), DString::find(), getClass(), Definition::isArtificial(), DString::length(), mergeScopes(), DString::mid(), DString::npos, and DString::right().
Referenced by addClassToContext(), addMemberFunction(), addVariable(), buildFunctionList(), computeTemplateClassRelations(), extractClassName(), findMember(), findScopeFromQualifiedName(), findUsingDeclImports(), getCanonicalTypeForIdentifier(), SymbolResolver::Private::getResolvedSymbolRec(), SymbolResolver::Private::getResolvedTypeRec(), SymbolResolver::Private::newResolveTypedef(), and resolveLink().
| DString substituteKeywords | ( | const DString & | file, |
| const DString & | s, | ||
| const KeywordSubstitutionList & | keywords ) |
Definition at line 2500 of file util.cpp.
References DString::data(), dstrlen(), dstrncmp(), DString::left(), DString::length(), and warn.
Referenced by substituteHtmlKeywords(), and substituteLatexKeywords().
| DString substituteTemplateArgumentsInString | ( | const DString & | name, |
| 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 3530 of file util.cpp.
References argListToString(), AUTO_TRACE, AUTO_TRACE_ADD, AUTO_TRACE_EXIT, ArgumentList::begin(), Argument::defval, ArgumentList::empty(), DString::empty(), ArgumentList::end(), end(), isId(), DString::left(), DString::mid(), Argument::name, DString::npos, prefix, DString::simplifyWhiteSpace(), DString::startsWith(), DString::str(), DString::stripWhiteSpace(), substituteTemplateArgumentsInString(), and Argument::type.
Referenced by computeMemberRelationsForBaseClass(), computeTemplateClassRelations(), MemberDefImpl::createTemplateInstanceMember(), findBaseClassesForClass(), findUsedClassesForClass(), SymbolResolver::Private::getResolvedSymbol(), SymbolResolver::Private::newResolveTypedef(), and substituteTemplateArgumentsInString().
| DString tempArgListToString | ( | const ArgumentList & | al, |
| SrcLangExt | lang, | ||
| bool | includeDefaults = true ) |
Returns a string representation of the template parameter list al. The lang parameter is used to determine the correct syntax for the template parameters. If includeDefaults is true then default values are included in the string representation.
Definition at line 908 of file util.cpp.
References ArgumentList::empty(), isId(), DString::npos, removeRedundantWhiteSpace(), and DString::right().
Referenced by addMemberFunction(), ClassDefImpl::className(), findTemplateInstanceRelation(), makeQualifiedNameWithTemplateParameters(), searchTemplateSpecs(), and writeDefArgumentList().
|
static |
Definition at line 4344 of file util.cpp.
References DString::data(), dstricmp(), DString::empty(), portable_iconv(), portable_iconv_close(), portable_iconv_open(), and term.
Referenced by readInputFile().
| void trimBaseClassScope | ( | const BaseClassList & | bcl, |
| DString & | s, | ||
| int | level = 0 ) |
Definition at line 1095 of file util.cpp.
References ClassDef::baseClasses(), DString::find(), DString::left(), DString::length(), Definition::name(), DString::npos, DString::right(), and trimBaseClassScope().
Referenced by trimBaseClassScope().
Definition at line 2781 of file util.cpp.
References DString::data(), DString::empty(), DString::length(), DString::reserve(), and useCaseSenseNames().
Definition at line 4069 of file util.cpp.
References DString::at(), DString::data(), DString::empty(), err, g_extLookup, g_lang2extMap, DString::lower(), Doxygen::parserManager, DString::prepend(), and DString::str().
Referenced by addCodeOnlyMappings(), adjustConfiguration(), and initDefaultExtensionMapping().
| bool useCaseSenseNames | ( | ) |
Returns true if the names of the symbols can be case sensitive.
Definition at line 2685 of file util.cpp.
References Config_getEnum, and Portable::fileSystemIsCaseSensitive().
Referenced by checkAndOpenFile(), escapeCharsInString(), getEncoding(), readDir(), FileNameFn::searchKey(), and unescapeCharsInString().
| void writeExamples | ( | OutputList & | ol, |
| const ExampleList & | list ) |
Definition at line 809 of file util.cpp.
References OutputList::disable(), Docbook, Html, Latex, Man, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), RTF, DString::str(), theTranslator, Translator::trWriteList(), writeMarkerList(), OutputList::writeObjectLink(), and OutputList::writeString().
Referenced by MemberDefImpl::_writeExamples(), and ClassDefImpl::writeDetailedDocumentationBody().
| DString writeInlineGraph | ( | const DString & | baseName, |
| const DString & | extension, | ||
| const DString & | content, | ||
| bool & | exists ) |
Thread-safe function to write a string representing an inline graph to a file. The contents will be used to create a hash that will be used to make the name unique.
| [in] | baseName | the base name of the file to write including path. |
| [in] | extension | the file extension to use. |
| [in] | content | the data to write to the file |
| [out] | exists | is set to true if the file was already written before. |
Definition at line 5407 of file util.cpp.
References DString::data(), err, DString::length(), md5str(), Portable::openOutputStream(), DString::str(), DString::view(), writeFileContents_lock, and writeFileContents_set.
Referenced by 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()(), and RTFDocVisitor::operator()().
| DString writeMarkerList | ( | const std::string & | markerText, |
| size_t | numMarkers, | ||
| std::function< DString(size_t)> | replaceFunc ) |
Definition at line 781 of file util.cpp.
References end(), and DString::substr().
| void writeMarkerList | ( | OutputList & | ol, |
| const std::string & | markerText, | ||
| size_t | numMarkers, | ||
| std::function< void(size_t)> | replaceFunc ) |
Definition at line 758 of file util.cpp.
References end(), and OutputList::parseText().
Referenced by MemberDefImpl::_writeReimplementedBy(), DefinitionImpl::_writeSourceRefList(), RequirementManager::generatePage(), writeExamples(), ClassDefImpl::writeInheritanceGraph(), and DefinitionImpl::writeRequirementRefs().
| void writeTypeConstraints | ( | OutputList & | ol, |
| const Definition * | d, | ||
| const ArgumentList & | al ) |
Definition at line 4289 of file util.cpp.
References Definition::docFile(), Definition::docLine(), ArgumentList::empty(), OutputList::endConstraintDocs(), OutputList::endConstraintList(), OutputList::endConstraintParam(), OutputList::endConstraintType(), OutputList::generateDoc(), linkifyText(), OutputList::parseText(), OutputList::startConstraintDocs(), OutputList::startConstraintList(), OutputList::startConstraintParam(), OutputList::startConstraintType(), theTranslator, and Translator::trTypeConstraints().
Referenced by MemberDefImpl::_writeTypeConstraints(), and ClassDefImpl::writeDetailedDocumentationBody().
|
static |
Definition at line 379 of file util.cpp.
Referenced by removeRedundantWhiteSpace().
|
static |
Definition at line 424 of file util.cpp.
Referenced by removeRedundantWhiteSpace().
|
static |
Definition at line 4035 of file util.cpp.
Referenced by getLanguageFromFileName(), and updateLanguageMapping().
|
static |
Definition at line 4045 of file util.cpp.
Referenced by getLanguageFromCodeLang(), and updateLanguageMapping().
|
static |
Definition at line 1486 of file util.cpp.
Referenced by matchArgument2().
|
static |
Definition at line 2859 of file util.cpp.
Referenced by convertNameToFile().
|
static |
Definition at line 2861 of file util.cpp.
Referenced by convertNameToFile().
|
static |
Definition at line 2860 of file util.cpp.
Referenced by convertNameToFile().
|
static |
Definition at line 80 of file util.cpp.
Referenced by convertToHtml(), convertToId(), escapeCharsInString(), and replaceColorMarkers().
|
static |
Definition at line 382 of file util.cpp.
Referenced by removeRedundantWhiteSpace().
|
static |
Definition at line 383 of file util.cpp.
Referenced by removeRedundantWhiteSpace().
|
static |
Definition at line 381 of file util.cpp.
Referenced by removeRedundantWhiteSpace().
|
static |
Definition at line 380 of file util.cpp.
Referenced by removeRedundantWhiteSpace().
|
static |
Definition at line 5404 of file util.cpp.
Referenced by writeInlineGraph().
|
static |
Definition at line 5405 of file util.cpp.
Referenced by cleanupInlineGraphs(), and writeInlineGraph().