Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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)
 

Detailed Description

Definition at line 544 of file main.cpp.

Constructor & Destructor Documentation

◆ SyncScanner()

SyncScanner::SyncScanner ( CommandLineOptions * commandLineArgs)
inline

Definition at line 616 of file main.cpp.

Member Function Documentation

◆ checkLineForSymbols()

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

Definition at line 1423 of file main.cpp.

References line, and match().

Referenced by parseHeader().

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

◆ copyGeneratedHeadersToStagingDirectory()

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

Definition at line 762 of file main.cpp.

References utils::createDirectories(), header(), CommandLineOptions::includeDir(), CommandLineOptions::moduleName(), utils::printFilesystemError(), CommandLineOptions::showOnly(), and updateOrCopy().

Referenced by sync().

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

◆ generateAliasedHeaderFileIfTimestampChanged()

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

Definition at line 1743 of file main.cpp.

References CommandLineOptions::showOnly().

Referenced by processHeader(), and sync().

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

◆ generateDeprecatedHeaders()

bool SyncScanner::generateDeprecatedHeaders ( )
inline

Definition at line 1565 of file main.cpp.

References QSet< T >::begin(), QSet< T >::end(), ErrorMessagePreamble, QSet< T >::find(), headerName(), CommandLineOptions::includeDir(), it, CommandLineOptions::moduleName(), utils::parseVersion(), WarningMessagePreamble, and writeIfDifferent().

Referenced by sync().

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

◆ generateHeaderCheckExceptions()

bool SyncScanner::generateHeaderCheckExceptions ( )
inline

Definition at line 1642 of file main.cpp.

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

Referenced by sync().

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

◆ generateLinkerVersionScript()

bool SyncScanner::generateLinkerVersionScript ( )
inline

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

◆ generateMasterHeader()

bool SyncScanner::generateMasterHeader ( )
inline

Definition at line 1519 of file main.cpp.

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

Referenced by sync().

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

◆ generateQtCamelCaseFileIfContentChanged()

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

Definition at line 1727 of file main.cpp.

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

Referenced by sync().

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

◆ generateVersionHeader()

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

Definition at line 1548 of file main.cpp.

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

Referenced by sync().

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

◆ isDocFileHeuristic()

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

Definition at line 1499 of file main.cpp.

Referenced by sync().

+ Here is the caller graph for this function:

◆ isHeader()

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

Definition at line 1494 of file main.cpp.

Referenced by sync().

+ Here is the caller graph for this function:

◆ isHeaderGenerated()

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

Definition at line 1504 of file main.cpp.

References CommandLineOptions::generatedHeaders(), and header().

Referenced by processHeader().

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

◆ isHeaderPCH()

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

Definition at line 1487 of file main.cpp.

Referenced by processHeader().

+ Here is the caller graph for this function:

◆ isHeaderPrivate()

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

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

◆ isHeaderQpa()

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

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

◆ isHeaderRhi()

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

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

◆ isHeaderSsg()

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

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

◆ makeHeaderAbsolute()

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

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

◆ parseHeader()

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

Definition at line 1084 of file main.cpp.

References AllChecks, QString::append(), QString::at(), checkLineForSymbols(), QString::clear(), error, ErrorMessagePreamble, i, IncludeChecks, CommandLineOptions::includeDir(), isHeaderPrivate(), CommandLineOptions::knownModules(), line, match(), CommandLineOptions::moduleName(), NamespaceChecks, NoChecks, parseVersionScriptContent(), PragmaOnceChecks, PrivateHeaderChecks, CommandLineOptions::publicNamespaceRegex(), CommandLineOptions::showOnly(), QString::size(), str, updateSymbolDescriptor(), and WeMeantItChecks.

Referenced by processHeader().

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

◆ parseVersionScriptContent()

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

Definition at line 1005 of file main.cpp.

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

Referenced by parseHeader().

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

◆ processHeader()

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

◆ resetCurrentFileInfoData()

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

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

◆ sync()

◆ updateOrCopy()

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

Definition at line 1687 of file main.cpp.

References CommandLineOptions::showOnly().

Referenced by copyGeneratedHeadersToStagingDirectory(), and processHeader().

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

◆ updateSymbolDescriptor()

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

Definition at line 1670 of file main.cpp.

References file, and CommandLineOptions::showOnly().

Referenced by parseHeader(), and processHeader().

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

◆ writeIfDifferent()

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

Definition at line 1767 of file main.cpp.

References utils::createDirectories(), outputFile, and 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:

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