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 isHeaderSpi (const std::string &headerFileName)
bool isHeaderPrivate (const std::string &headerFile)
bool isHeaderPCH (const std::string &headerFilename)
bool isHeaderImpl (const std::string &headerFilename) const
bool isHeaderDeprecated (const std::string &headerFilename) const
bool isHeader (const std::filesystem::path &path)
bool isDocFileHeuristic (const std::string &headerFilePath)
bool isHeaderGenerated (const std::string &header)
bool generateForwardingHeader (const std::string &outputFilePath, const std::string &aliasedFilePath, bool useIncludeNext=false)
bool generateAliasedHeaderFileIfTimestampChanged (const std::string &outputFilePath, const std::string &aliasedFilePath, const FileStamp &originalStamp=FileStamp::clock::now())
bool generateModuleMapFile ()
bool writeIfDifferent (const std::string &outputFile, const std::string &buffer) const
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 isHeaderSpi (const std::string &headerFileName)
bool isHeaderPrivate (const std::string &headerFile)
bool isHeaderPCH (const std::string &headerFilename)
bool isHeaderImpl (const std::string &headerFilename) const
bool isHeaderDeprecated (const std::string &headerFilename) const
bool isHeader (const std::filesystem::path &path)
bool isDocFileHeuristic (const std::string &headerFilePath)
bool isHeaderGenerated (const std::string &header)
bool generateForwardingHeader (const std::string &outputFilePath, const std::string &aliasedFilePath, bool useIncludeNext=false)
bool generateAliasedHeaderFileIfTimestampChanged (const std::string &outputFilePath, const std::string &aliasedFilePath, const FileStamp &originalStamp=FileStamp::clock::now())
bool generateModuleMapFile ()
bool writeIfDifferent (const std::string &outputFile, const std::string &buffer) const
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 585 of file main.cpp.

Constructor & Destructor Documentation

◆ SyncScanner() [1/2]

SyncScanner::SyncScanner ( CommandLineOptions * commandLineArgs)
inline

Definition at line 667 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 667 of file main.cpp.

Member Function Documentation

◆ checkLineForSymbols() [1/2]

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

Definition at line 1533 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 1533 of file main.cpp.

◆ copyGeneratedHeadersToStagingDirectory() [1/2]

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

Definition at line 837 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 837 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 1889 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 1694 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 1694 of file main.cpp.

◆ generateForwardingHeader() [1/2]

bool SyncScanner::generateForwardingHeader ( const std::string & outputFilePath,
const std::string & aliasedFilePath,
bool useIncludeNext = false )
nodiscard

Definition at line 1860 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:

◆ generateForwardingHeader() [2/2]

bool SyncScanner::generateForwardingHeader ( const std::string & outputFilePath,
const std::string & aliasedFilePath,
bool useIncludeNext = false )
nodiscard

◆ generateHeaderCheckExceptions() [1/2]

bool SyncScanner::generateHeaderCheckExceptions ( )
inlinenodiscard

Definition at line 1771 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 1771 of file main.cpp.

◆ generateLinkerVersionScript() [1/2]

bool SyncScanner::generateLinkerVersionScript ( )
inlinenodiscard

Definition at line 1782 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 1782 of file main.cpp.

◆ generateMasterHeader() [1/2]

bool SyncScanner::generateMasterHeader ( )
inlinenodiscard

Definition at line 1645 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 1645 of file main.cpp.

◆ generateModuleMapFile() [1/2]

bool SyncScanner::generateModuleMapFile ( )
nodiscard

Definition at line 1930 of file main.cpp.

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

Referenced by sync().

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

◆ generateModuleMapFile() [2/2]

bool SyncScanner::generateModuleMapFile ( )
nodiscard

◆ generateVersionHeader() [1/2]

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

Definition at line 1677 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 1677 of file main.cpp.

◆ isDocFileHeuristic() [1/2]

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

Definition at line 1622 of file main.cpp.

◆ isDocFileHeuristic() [2/2]

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

Definition at line 1622 of file main.cpp.

◆ isHeader() [1/2]

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

Definition at line 1617 of file main.cpp.

◆ isHeader() [2/2]

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

Definition at line 1617 of file main.cpp.

◆ isHeaderDeprecated() [1/2]

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

Definition at line 1609 of file main.cpp.

◆ isHeaderDeprecated() [2/2]

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

Definition at line 1609 of file main.cpp.

◆ isHeaderGenerated() [1/2]

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

Definition at line 1627 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 1627 of file main.cpp.

◆ isHeaderImpl() [1/2]

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

Definition at line 1602 of file main.cpp.

◆ isHeaderImpl() [2/2]

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

Definition at line 1602 of file main.cpp.

◆ isHeaderPCH() [1/2]

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

Definition at line 1595 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 1595 of file main.cpp.

◆ isHeaderPrivate() [1/2]

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

Definition at line 1590 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 1590 of file main.cpp.

◆ isHeaderQpa() [1/2]

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

Definition at line 1570 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 1570 of file main.cpp.

◆ isHeaderRhi() [1/2]

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

Definition at line 1575 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 1575 of file main.cpp.

◆ isHeaderSpi() [1/2]

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

Definition at line 1585 of file main.cpp.

References CommandLineOptions::spiHeadersRegex().

Referenced by resetCurrentFileInfoData().

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

◆ isHeaderSpi() [2/2]

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

Definition at line 1585 of file main.cpp.

◆ isHeaderSsg() [1/2]

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

Definition at line 1580 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 1580 of file main.cpp.

◆ makeHeaderAbsolute() [1/2]

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

Definition at line 1808 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 1191 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 1191 of file main.cpp.

◆ parseVersionScriptContent() [1/2]

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

Definition at line 1112 of file main.cpp.

References CommandLineOptions::binaryDir(), LinkerScriptCommentAlignment, and CommandLineOptions::sourceDir().

Referenced by parseHeader().

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

◆ parseVersionScriptContent() [2/2]

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

Definition at line 1112 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 915 of file main.cpp.

◆ resetCurrentFileInfoData() [1/2]

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

Definition at line 884 of file main.cpp.

References isHeaderPrivate(), isHeaderQpa(), isHeaderRhi(), isHeaderSpi(), 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 884 of file main.cpp.

◆ sync() [1/2]

◆ sync() [2/2]

ErrorCodes SyncScanner::sync ( )
inline

Definition at line 682 of file main.cpp.

◆ updateOrCopy() [1/2]

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

Definition at line 1816 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 1799 of file main.cpp.

References CommandLineOptions::debug(), and 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 ) const

Definition at line 1984 of file main.cpp.

References CommandLineOptions::showOnly().

Referenced by generateDeprecatedHeaders(), generateForwardingHeader(), generateHeaderCheckExceptions(), generateLinkerVersionScript(), generateMasterHeader(), generateModuleMapFile(), 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 ) const

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