Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
SyncScanner Class Reference
Collaboration diagram for SyncScanner:

Public Member Functions

 SyncScanner (CommandLineOptions *commandLineArgs)
std::filesystem::path makeHeaderAbsolute (const std::string &filename) const
ErrorCodes sync ()
bool copyGeneratedHeadersToStagingDirectory (const std::string &outputDirectory, bool skipCleanup=false)
void resetCurrentFileInfoData (const std::filesystem::path &headerFile)
bool processHeader (const std::filesystem::path &headerFile)
void parseVersionScriptContent (const std::string buffer, ParsingResult &result)
bool parseHeader (const std::filesystem::path &headerFile, ParsingResult &result, unsigned int skipChecks)
bool checkLineForSymbols (const std::string &line, std::string &symbol)
bool isHeaderQpa (const std::string &headerFileName)
bool isHeaderRhi (const std::string &headerFileName)
bool isHeaderSsg (const std::string &headerFileName)
bool isHeaderPrivate (const std::string &headerFile)
bool isHeaderPCH (const std::string &headerFilename)
bool isHeader (const std::filesystem::path &path)
bool isDocFileHeuristic (const std::string &headerFilePath)
bool isHeaderGenerated (const std::string &header)
bool generateQtCamelCaseFileIfContentChanged (const std::string &outputFilePath, const std::string &aliasedFilePath)
bool generateAliasedHeaderFileIfTimestampChanged (const std::string &outputFilePath, const std::string &aliasedFilePath, const FileStamp &originalStamp=FileStamp::clock::now())
bool writeIfDifferent (const std::string &outputFile, const std::string &buffer)
bool generateMasterHeader ()
bool generateVersionHeader (const std::string &outputFile)
bool generateDeprecatedHeaders ()
bool generateHeaderCheckExceptions ()
bool generateLinkerVersionScript ()
bool updateOrCopy (const std::filesystem::path &src, const std::filesystem::path &dst) noexcept
void updateSymbolDescriptor (const std::string &symbol, const std::string &file, SymbolDescriptor::SourceType type)
 SyncScanner (CommandLineOptions *commandLineArgs)
std::filesystem::path makeHeaderAbsolute (const std::string &filename) const
ErrorCodes sync ()
bool copyGeneratedHeadersToStagingDirectory (const std::string &outputDirectory, bool skipCleanup=false)
void resetCurrentFileInfoData (const std::filesystem::path &headerFile)
bool processHeader (const std::filesystem::path &headerFile)
void parseVersionScriptContent (const std::string buffer, ParsingResult &result)
bool parseHeader (const std::filesystem::path &headerFile, ParsingResult &result, unsigned int skipChecks)
bool checkLineForSymbols (const std::string &line, std::string &symbol)
bool isHeaderQpa (const std::string &headerFileName)
bool isHeaderRhi (const std::string &headerFileName)
bool isHeaderSsg (const std::string &headerFileName)
bool isHeaderPrivate (const std::string &headerFile)
bool isHeaderPCH (const std::string &headerFilename)
bool isHeader (const std::filesystem::path &path)
bool isDocFileHeuristic (const std::string &headerFilePath)
bool isHeaderGenerated (const std::string &header)
bool generateQtCamelCaseFileIfContentChanged (const std::string &outputFilePath, const std::string &aliasedFilePath)
bool generateAliasedHeaderFileIfTimestampChanged (const std::string &outputFilePath, const std::string &aliasedFilePath, const FileStamp &originalStamp=FileStamp::clock::now())
bool writeIfDifferent (const std::string &outputFile, const std::string &buffer)
bool generateMasterHeader ()
bool generateVersionHeader (const std::string &outputFile)
bool generateDeprecatedHeaders ()
bool generateHeaderCheckExceptions ()
bool generateLinkerVersionScript ()
bool updateOrCopy (const std::filesystem::path &src, const std::filesystem::path &dst) noexcept
void updateSymbolDescriptor (const std::string &symbol, const std::string &file, SymbolDescriptor::SourceType type)

Detailed Description

Definition at line 549 of file main.cpp.

Constructor & Destructor Documentation

◆ SyncScanner() [1/2]

SyncScanner::SyncScanner ( CommandLineOptions * commandLineArgs)
inline

Definition at line 621 of file main.cpp.

References SyncScanner().

Referenced by SyncScanner(), and main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SyncScanner() [2/2]

SyncScanner::SyncScanner ( CommandLineOptions * commandLineArgs)
inline

Definition at line 621 of file main.cpp.

Member Function Documentation

◆ checkLineForSymbols() [1/2]

bool SyncScanner::checkLineForSymbols ( const std::string & line,
std::string & symbol )
inlinenodiscard

Definition at line 1431 of file main.cpp.

Referenced by parseHeader().

Here is the caller graph for this function:

◆ checkLineForSymbols() [2/2]

bool SyncScanner::checkLineForSymbols ( const std::string & line,
std::string & symbol )
inlinenodiscard

Definition at line 1431 of file main.cpp.

◆ copyGeneratedHeadersToStagingDirectory() [1/2]

bool SyncScanner::copyGeneratedHeadersToStagingDirectory ( const std::string & outputDirectory,
bool skipCleanup = false )
inlinenodiscard

Definition at line 767 of file main.cpp.

References utils::printFilesystemError().

Referenced by sync().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copyGeneratedHeadersToStagingDirectory() [2/2]

bool SyncScanner::copyGeneratedHeadersToStagingDirectory ( const std::string & outputDirectory,
bool skipCleanup = false )
inlinenodiscard

Definition at line 767 of file main.cpp.

◆ generateAliasedHeaderFileIfTimestampChanged() [1/2]

bool SyncScanner::generateAliasedHeaderFileIfTimestampChanged ( const std::string & outputFilePath,
const std::string & aliasedFilePath,
const FileStamp & originalStamp = FileStamp::clock::now() )
nodiscard

Definition at line 1747 of file main.cpp.

References CommandLineOptions::includeDir(), CommandLineOptions::moduleName(), and CommandLineOptions::showOnly().

Here is the call graph for this function:

◆ generateAliasedHeaderFileIfTimestampChanged() [2/2]

bool SyncScanner::generateAliasedHeaderFileIfTimestampChanged ( const std::string & outputFilePath,
const std::string & aliasedFilePath,
const FileStamp & originalStamp = FileStamp::clock::now() )
nodiscard

◆ generateDeprecatedHeaders() [1/2]

bool SyncScanner::generateDeprecatedHeaders ( )
inlinenodiscard

Definition at line 1568 of file main.cpp.

References CommandLineOptions::includeDir(), CommandLineOptions::moduleName(), utils::parseVersion(), and writeIfDifferent().

Referenced by sync().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateDeprecatedHeaders() [2/2]

bool SyncScanner::generateDeprecatedHeaders ( )
inlinenodiscard

Definition at line 1568 of file main.cpp.

◆ generateHeaderCheckExceptions() [1/2]

bool SyncScanner::generateHeaderCheckExceptions ( )
inlinenodiscard

Definition at line 1645 of file main.cpp.

References CommandLineOptions::binaryDir(), CommandLineOptions::moduleName(), and writeIfDifferent().

Referenced by sync().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateHeaderCheckExceptions() [2/2]

bool SyncScanner::generateHeaderCheckExceptions ( )
inlinenodiscard

Definition at line 1645 of file main.cpp.

◆ generateLinkerVersionScript() [1/2]

bool SyncScanner::generateLinkerVersionScript ( )
inlinenodiscard

Definition at line 1656 of file main.cpp.

References CommandLineOptions::versionScriptFile(), and writeIfDifferent().

Referenced by sync().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateLinkerVersionScript() [2/2]

bool SyncScanner::generateLinkerVersionScript ( )
inlinenodiscard

Definition at line 1656 of file main.cpp.

◆ generateMasterHeader() [1/2]

bool SyncScanner::generateMasterHeader ( )
inlinenodiscard

Definition at line 1520 of file main.cpp.

References utils::asciiToUpper(), CommandLineOptions::includeDir(), CommandLineOptions::moduleName(), and writeIfDifferent().

Referenced by sync().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateMasterHeader() [2/2]

bool SyncScanner::generateMasterHeader ( )
inlinenodiscard

Definition at line 1520 of file main.cpp.

◆ generateQtCamelCaseFileIfContentChanged() [1/2]

bool SyncScanner::generateQtCamelCaseFileIfContentChanged ( const std::string & outputFilePath,
const std::string & aliasedFilePath )
nodiscard

Definition at line 1730 of file main.cpp.

References CommandLineOptions::moduleName(), CommandLineOptions::showOnly(), and writeIfDifferent().

Referenced by sync().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateQtCamelCaseFileIfContentChanged() [2/2]

bool SyncScanner::generateQtCamelCaseFileIfContentChanged ( const std::string & outputFilePath,
const std::string & aliasedFilePath )
nodiscard

◆ generateVersionHeader() [1/2]

bool SyncScanner::generateVersionHeader ( const std::string & outputFile)
inlinenodiscard

Definition at line 1551 of file main.cpp.

References utils::asciiToUpper(), CommandLineOptions::moduleName(), and writeIfDifferent().

Referenced by sync().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateVersionHeader() [2/2]

bool SyncScanner::generateVersionHeader ( const std::string & outputFile)
inlinenodiscard

Definition at line 1551 of file main.cpp.

◆ isDocFileHeuristic() [1/2]

bool SyncScanner::isDocFileHeuristic ( const std::string & headerFilePath)
inlinenodiscard

Definition at line 1500 of file main.cpp.

◆ isDocFileHeuristic() [2/2]

bool SyncScanner::isDocFileHeuristic ( const std::string & headerFilePath)
inlinenodiscard

Definition at line 1500 of file main.cpp.

◆ isHeader() [1/2]

bool SyncScanner::isHeader ( const std::filesystem::path & path)
inlinenodiscard

Definition at line 1495 of file main.cpp.

◆ isHeader() [2/2]

bool SyncScanner::isHeader ( const std::filesystem::path & path)
inlinenodiscard

Definition at line 1495 of file main.cpp.

◆ isHeaderGenerated() [1/2]

bool SyncScanner::isHeaderGenerated ( const std::string & header)
inlinenodiscard

Definition at line 1505 of file main.cpp.

Referenced by processHeader().

Here is the caller graph for this function:

◆ isHeaderGenerated() [2/2]

bool SyncScanner::isHeaderGenerated ( const std::string & header)
inlinenodiscard

Definition at line 1505 of file main.cpp.

◆ isHeaderPCH() [1/2]

bool SyncScanner::isHeaderPCH ( const std::string & headerFilename)
inlinenodiscard

Definition at line 1488 of file main.cpp.

Referenced by processHeader().

Here is the caller graph for this function:

◆ isHeaderPCH() [2/2]

bool SyncScanner::isHeaderPCH ( const std::string & headerFilename)
inlinenodiscard

Definition at line 1488 of file main.cpp.

◆ isHeaderPrivate() [1/2]

bool SyncScanner::isHeaderPrivate ( const std::string & headerFile)
inlinenodiscard

Definition at line 1483 of file main.cpp.

References CommandLineOptions::privateHeadersRegex().

Referenced by parseHeader(), and resetCurrentFileInfoData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isHeaderPrivate() [2/2]

bool SyncScanner::isHeaderPrivate ( const std::string & headerFile)
inlinenodiscard

Definition at line 1483 of file main.cpp.

◆ isHeaderQpa() [1/2]

bool SyncScanner::isHeaderQpa ( const std::string & headerFileName)
inlinenodiscard

Definition at line 1468 of file main.cpp.

References CommandLineOptions::qpaHeadersRegex().

Referenced by resetCurrentFileInfoData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isHeaderQpa() [2/2]

bool SyncScanner::isHeaderQpa ( const std::string & headerFileName)
inlinenodiscard

Definition at line 1468 of file main.cpp.

◆ isHeaderRhi() [1/2]

bool SyncScanner::isHeaderRhi ( const std::string & headerFileName)
inlinenodiscard

Definition at line 1473 of file main.cpp.

References CommandLineOptions::rhiHeadersRegex().

Referenced by resetCurrentFileInfoData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isHeaderRhi() [2/2]

bool SyncScanner::isHeaderRhi ( const std::string & headerFileName)
inlinenodiscard

Definition at line 1473 of file main.cpp.

◆ isHeaderSsg() [1/2]

bool SyncScanner::isHeaderSsg ( const std::string & headerFileName)
inlinenodiscard

Definition at line 1478 of file main.cpp.

References CommandLineOptions::ssgHeadersRegex().

Referenced by resetCurrentFileInfoData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isHeaderSsg() [2/2]

bool SyncScanner::isHeaderSsg ( const std::string & headerFileName)
inlinenodiscard

Definition at line 1478 of file main.cpp.

◆ makeHeaderAbsolute() [1/2]

std::filesystem::path SyncScanner::makeHeaderAbsolute ( const std::string & filename) const
nodiscard

Definition at line 1682 of file main.cpp.

References utils::normilizedPath(), and CommandLineOptions::sourceDir().

Referenced by sync().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeHeaderAbsolute() [2/2]

std::filesystem::path SyncScanner::makeHeaderAbsolute ( const std::string & filename) const
nodiscard

◆ parseHeader() [1/2]

bool SyncScanner::parseHeader ( const std::filesystem::path & headerFile,
ParsingResult & result,
unsigned int skipChecks )
inlinenodiscard

Definition at line 1089 of file main.cpp.

References AllChecks, checkLineForSymbols(), IncludeChecks, isHeaderPrivate(), CommandLineOptions::moduleName(), NamespaceChecks, NoChecks, parseVersionScriptContent(), PragmaOnceChecks, PrivateHeaderChecks, CommandLineOptions::publicNamespaceRegex(), CommandLineOptions::showOnly(), updateSymbolDescriptor(), and WeMeantItChecks.

Referenced by processHeader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseHeader() [2/2]

bool SyncScanner::parseHeader ( const std::filesystem::path & headerFile,
ParsingResult & result,
unsigned int skipChecks )
inlinenodiscard

Definition at line 1089 of file main.cpp.

◆ parseVersionScriptContent() [1/2]

void SyncScanner::parseVersionScriptContent ( const std::string buffer,
ParsingResult & result )
inline

Definition at line 1010 of file main.cpp.

References LinkerScriptCommentAlignment.

Referenced by parseHeader().

Here is the caller graph for this function:

◆ parseVersionScriptContent() [2/2]

void SyncScanner::parseVersionScriptContent ( const std::string buffer,
ParsingResult & result )
inline

Definition at line 1010 of file main.cpp.

◆ processHeader() [1/2]

bool SyncScanner::processHeader ( const std::filesystem::path & headerFile)
inlinenodiscard

◆ processHeader() [2/2]

bool SyncScanner::processHeader ( const std::filesystem::path & headerFile)
inlinenodiscard

Definition at line 842 of file main.cpp.

◆ resetCurrentFileInfoData() [1/2]

void SyncScanner::resetCurrentFileInfoData ( const std::filesystem::path & headerFile)
inline

Definition at line 814 of file main.cpp.

References isHeaderPrivate(), isHeaderQpa(), isHeaderRhi(), isHeaderSsg(), and CommandLineOptions::sourceDir().

Referenced by processHeader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetCurrentFileInfoData() [2/2]

void SyncScanner::resetCurrentFileInfoData ( const std::filesystem::path & headerFile)
inline

Definition at line 814 of file main.cpp.

◆ sync() [1/2]

ErrorCodes SyncScanner::sync ( )
inline

◆ sync() [2/2]

ErrorCodes SyncScanner::sync ( )
inline

Definition at line 636 of file main.cpp.

◆ updateOrCopy() [1/2]

bool SyncScanner::updateOrCopy ( const std::filesystem::path & src,
const std::filesystem::path & dst )
noexcept

Definition at line 1690 of file main.cpp.

References CommandLineOptions::showOnly().

Referenced by processHeader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateOrCopy() [2/2]

bool SyncScanner::updateOrCopy ( const std::filesystem::path & src,
const std::filesystem::path & dst )
noexcept

◆ updateSymbolDescriptor() [1/2]

void SyncScanner::updateSymbolDescriptor ( const std::string & symbol,
const std::string & file,
SymbolDescriptor::SourceType type )

Definition at line 1673 of file main.cpp.

References CommandLineOptions::showOnly().

Referenced by parseHeader(), and processHeader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSymbolDescriptor() [2/2]

void SyncScanner::updateSymbolDescriptor ( const std::string & symbol,
const std::string & file,
SymbolDescriptor::SourceType type )

◆ writeIfDifferent() [1/2]

bool SyncScanner::writeIfDifferent ( const std::string & outputFile,
const std::string & buffer )

Definition at line 1780 of file main.cpp.

References CommandLineOptions::showOnly().

Referenced by generateDeprecatedHeaders(), generateHeaderCheckExceptions(), generateLinkerVersionScript(), generateMasterHeader(), generateQtCamelCaseFileIfContentChanged(), and generateVersionHeader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeIfDifferent() [2/2]

bool SyncScanner::writeIfDifferent ( const std::string & outputFile,
const std::string & buffer )

The documentation for this class was generated from the following file: