Qt 6.x
The Qt SDK
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 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)
 
void updateSymbolDescriptor (const std::string &symbol, const std::string &file, SymbolDescriptor::SourceType type)
 

Detailed Description

Definition at line 477 of file main.cpp.

Constructor & Destructor Documentation

◆ SyncScanner()

SyncScanner::SyncScanner ( CommandLineOptions commandLineArgs)
inline

Definition at line 549 of file main.cpp.

Member Function Documentation

◆ checkLineForSymbols()

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

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

References header(), CommandLineOptions::includeDir(), 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 1575 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 1448 of file main.cpp.

References QSet< T >::begin(), QSet< T >::end(), CommandLineOptions::includeDir(), it, CommandLineOptions::moduleName(), 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 1475 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 1486 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 1402 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 1559 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 1431 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 1382 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 1377 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 1387 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 1370 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 1365 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 1355 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 1360 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:

◆ makeHeaderAbsolute()

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

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

References AllChecks, QString::append(), QString::at(), checkLineForSymbols(), QString::clear(), ErrorMessagePreamble, i, IncludeChecks, CommandLineOptions::includeDir(), isHeaderPrivate(), CommandLineOptions::knownModules(), line, match(), CommandLineOptions::moduleName(), NamespaceChecks, NoChecks, parseVersionScriptContent(), 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 914 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 727 of file main.cpp.

References isHeaderPrivate(), isHeaderQpa(), isHeaderRhi(), 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 
)

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

References 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: