|
Project Documentation Manager BRIGADOON-0002
Project Documentation Manager
|
Instantiate the Thread Worker Class. More...
#include <worker.h>
Public Slots | |
| void | DoWork (PROJECT_INFORMATION *ProjectInfo) |
| Process the Generation of Documentation by Doxygen & other processes. | |
Signals | |
| void | WorkDone (PROJECT_INFORMATION *ProjectInfo) |
| void | SendLogEntry (REMOTE_LOG_ENTRY LogEntry) |
Public Member Functions | |
| Worker (QObject *parent=nullptr) | |
| Worker Class Constructor. | |
Private Member Functions | |
| void | LogAdd (LOGGING_SEVERITY Severity, LOGGING_MODE Mode, const QString Message) |
| Send Message to the Log. | |
| void | DoDoxygen (PROJECT_INFORMATION *ProjectInfo) |
| Run Doxygen to Generate the Source Documentaiton. | |
| QString | UpdateLine (PROJECT_INFORMATION *Project, QString SourceLine) |
| Process text substitutions for a single line. | |
| bool | UpdateFile (PROJECT_INFORMATION *Project, QString SourceFile, QString DestinationFile) |
| Process text substituitions for a complete text file. | |
| bool | TranslateRecursively (PROJECT_INFORMATION *Store, const QString &srcFilePath, const QString &tgtFilePath) |
| Recursively process text substituition for a Directory Tree. | |
| bool | CleanDirectory (QString Directory) |
| Clean a Directory Tree by recursively removing all files and subdirectories. | |
| bool | PreProcessProject (PROJECT_INFORMATION *ProjectInfo) |
| Preprocess the Project's Documentation. | |
| bool | TrimDirectory (QString Directory, QStringList FileFilter) |
| Remove files defined by the FileFilter from the Directory. | |
| QString | CountLines (PROJECT_INFORMATION *Store, QString Directory) |
| QString | FindLibraries (PROJECT_INFORMATION *Store) |
| Find the shared libraries the program needs to run. | |
| QString | ParserLddResults (QString ResultFilename) |
| Converts the Library List into an HTML compatible format. | |
| bool | CreateSourceArchive (PROJECT_INFORMATION *Store) |
| Create an Archive using git. | |
| QString | CppCheck (PROJECT_INFORMATION *ProjectInfo) |
| Conduct Static Analysis of C++ code. | |
| bool | CreateSourceListFile (const QString Directory, const QString ResultFileName, const QString DevLanguage) |
| Create a List of Project Software Source Files. | |
| bool | RecursiveCopy (QString Source, QString Destination) |
| bool | CreateInstallScript (PROJECT_INFORMATION *ProjectInfo) |
Private Attributes | |
| QString | autodoc_dir |
| QStringList | source_dirs |
| QStringList | source_filter |
| QStringList | docs_dirs |
| QStringList | docs_filter |
| QStringList | all_filter |
| QString | leadin_string |
| QString | leadout_string |
| QSqlDatabase | db |
Instantiate the Thread Worker Class.
Class for running on the Thread.
|
explicit |
Worker Class Constructor.
| parent | Pointer to the Parent Object |
Definition at line 9 of file worker.cpp.
References all_filter, docs_filter, leadin_string, leadout_string, source_dirs, and source_filter.
|
private |
Clean a Directory Tree by recursively removing all files and subdirectories.
| Directory | Directory to be removed recursively and recreated |
Definition at line 381 of file worker.cpp.
Referenced by PreProcessProject().
|
private |
Definition at line 420 of file worker.cpp.
References PROGRAM_INFORMATION::LocalDevelopmentDirectory, LOG_DEBUG, LOG_ERROR, LogAdd(), MODE_FILE, MODE_THREAD, PROJECT_INFORMATION::ProgramInformation, PROJECT_INFORMATION::ProjectDesc, and PROJECT_DESCRIPTION::ProjectIdent.
Referenced by PreProcessProject().
|
private |
Conduct Static Analysis of C++ code.
| ProjectInfo | Pointer to Inforamtion about the Project |
Definition at line 792 of file worker.cpp.
References CPP_CHECK_FILE, CreateSourceListFile(), PROJECT_DESCRIPTION::ExeName, PROJECT_INFORMATION::LangFamilyInfo, LOG_DEBUG, LOG_ERROR, LogAdd(), MODE_FILE, MODE_THREAD, PROGRAM_INFORMATION::PrimaryWebsiteDirectory, PROJECT_INFORMATION::ProgramInformation, PROJECT_INFORMATION::ProjectDesc, PROJECT_DESCRIPTION::ProjectDirectory, PROJECT_DESCRIPTION::ProjectIdent, and LANG_FAMILY_INFO::ShortName.
Referenced by PreProcessProject().
|
private |
Definition at line 924 of file worker.cpp.
References PROJECT_INFORMATION::ProjectDesc, PROJECT_DESCRIPTION::ProjectDirectory, and TranslateRecursively().
Referenced by DoWork().
|
private |
Create an Archive using git.
| Store | Pointer to the Project's Inforamtion |
Definition at line 644 of file worker.cpp.
References CREATE_SOURCE_ARCHIVE, PROJECT_DESCRIPTION::ExeName, PROGRAM_INFORMATION::LocalDevelopmentDirectory, LOG_DEBUG, LOG_ERROR, LogAdd(), MODE_FILE, MODE_THREAD, PROGRAM_INFORMATION::PrimaryWebsiteDirectory, PROJECT_INFORMATION::ProgramInformation, PROJECT_INFORMATION::ProjectDesc, PROJECT_DESCRIPTION::ProjectIdent, and PROJECT_DESCRIPTION::ProjectOptions.
Referenced by DoWork().
|
private |
Create a List of Project Software Source Files.
| Directory | Directory Holding the Source Files |
| ResultFileName | The name of the file holding the results |
| DevLanguage | The Software Development Language |
Definition at line 697 of file worker.cpp.
References LOG_DEBUG, LOG_ERROR, LogAdd(), and MODE_FILE.
Referenced by CppCheck().
|
private |
Run Doxygen to Generate the Source Documentaiton.
| ProjectInfo | Pointer to the Project's Inforamtion |
Definition at line 97 of file worker.cpp.
References DOXY_LOG_FILE, EXECUTION_FAILURE, EXECUTION_SUCCESS, PROJECT_INFORMATION::ExecutionStatus, PROJECT_DESCRIPTION::ExeName, LOG_DEBUG, LOG_ERROR, LogAdd(), MODE_THREAD, PROGRAM_INFORMATION::PrimaryWebsiteDirectory, PROJECT_INFORMATION::ProgramInformation, PROJECT_INFORMATION::ProjectDesc, PROJECT_DESCRIPTION::ProjectDirectory, and PROJECT_DESCRIPTION::ProjectIdent.
Referenced by DoWork().
|
slot |
Process the Generation of Documentation by Doxygen & other processes.
| ProjectInfo | Pointer to the Project's Information Structure |
Definition at line 37 of file worker.cpp.
References autodoc_dir, CreateInstallScript(), CreateSourceArchive(), docs_dirs, DoDoxygen(), LOG_INFO, LogAdd(), MODE_THREAD, PreProcessProject(), project_opts_manager, PROJECT_INFORMATION::ProjectDesc, PROJECT_DESCRIPTION::ProjectIdent, PROJECT_DESCRIPTION::ProjectOptions, TARGET_DEVELOPMENT, TARGET_DOCUMENTATION, TARGET_HARDWARE, TARGET_NOT_DEFINED, TARGET_OPEN_SIM_PROJECT, TARGET_OPEN_SIM_SCRIPT, TARGET_SOFTWARE, TARGET_FAMILY_INFO::TargetFamilyIndex, PROJECT_INFORMATION::TargetFamilyInfo, and WorkDone().
|
private |
Find the shared libraries the program needs to run.
| Store | Pointer to Project's Information |
NOTE: The program must have been compiled before this function will work as it extracts the information from the program's executable file.
Definition at line 545 of file worker.cpp.
References PROJECT_DESCRIPTION::ExeDirectory, PROJECT_DESCRIPTION::ExeName, PROGRAM_INFORMATION::LocalDevelopmentDirectory, LOG_DEBUG, LOG_ERROR, LogAdd(), MODE_THREAD, ParserLddResults(), PROJECT_INFORMATION::ProgramInformation, PROJECT_INFORMATION::ProjectDesc, and PROJECT_DESCRIPTION::ProjectIdent.
Referenced by PreProcessProject().
|
private |
Send Message to the Log.
| Severity | Severity of the Log Message |
| Mode | Which part of the program does the message relate to |
| Message | Text message to be added to the Log |
Definition at line 27 of file worker.cpp.
References REMOTE_LOG_ENTRY::Message, REMOTE_LOG_ENTRY::Mode, SendLogEntry(), and REMOTE_LOG_ENTRY::Severity.
Referenced by CountLines(), CppCheck(), CreateSourceArchive(), CreateSourceListFile(), DoDoxygen(), DoWork(), FindLibraries(), ParserLddResults(), PreProcessProject(), TranslateRecursively(), and UpdateFile().
|
private |
Converts the Library List into an HTML compatible format.
| ResultFilename | Name of the file holding hte result of the ldd scan |
Definition at line 520 of file worker.cpp.
References LOG_ERROR, LogAdd(), and MODE_FILE.
Referenced by FindLibraries().
|
private |
Preprocess the Project's Documentation.
| ProjectInfo | Pointer to the Projects's Info |
This routine checks to see that the Project is available to Process, then cleans out the destination directory. It then check to see if only the default page is to be processed or all files should be processed. If all files, it counts the lines of code, checks which libraries are rquired, checks the C++ source files with cpp_check and then updates the files recursively.
The routine then copies associated documents and images to the destination directory.
Definition at line 272 of file worker.cpp.
References autodoc_dir, CleanDirectory(), CONTROL_DOC_ACCESS, CountLines(), CppCheck(), docs_filter, EXCLUDE_PROJECT_LIST, PROJECT_DESCRIPTION::ExeName, FindLibraries(), LANG_FAMILY_INFO::LangFamilyIndex, PROJECT_INFORMATION::LangFamilyInfo, LOG_DEBUG, LOG_ERROR, LogAdd(), MODE_FILE, ONLY_DEFAULT_PAGE, PROGRAM_INFORMATION::PrimaryWebsiteDirectory, PROJECT_INFORMATION::ProgramInformation, PROJECT_INFORMATION::ProjectDesc, PROJECT_DESCRIPTION::ProjectDirectory, PROJECT_DESCRIPTION::ProjectIdent, PROJECT_INFORMATION::ProjectLock, PROJECT_DESCRIPTION::ProjectOptions, RecursiveCopy(), PROJECT_INFORMATION::SubsMap, TranslateRecursively(), TrimDirectory(), and UpdateFile().
Referenced by DoWork().
|
private |
Definition at line 884 of file worker.cpp.
References RecursiveCopy().
Referenced by PreProcessProject(), and RecursiveCopy().
|
signal |
Referenced by DoxygenManager::DoxygenManager(), and LogAdd().
|
private |
Recursively process text substituition for a Directory Tree.
| SrcDirPath | Source Directory Path holding the files to be processed |
| TgtDirPath | Destination Directory Path to hold the Processed Files |
Definition at line 227 of file worker.cpp.
References LOG_ERROR, LogAdd(), MODE_FILE, TranslateRecursively(), and UpdateFile().
Referenced by CreateInstallScript(), PreProcessProject(), and TranslateRecursively().
|
private |
Remove files defined by the FileFilter from the Directory.
| Directory | Name of teh Directory to be trimmed |
| FileFilter | Filter String that defines the files to remove |
This function is used to remove previous versions of documentation files so that old information is not left hanging around in the directory.
Definition at line 399 of file worker.cpp.
Referenced by PreProcessProject().
|
private |
Process text substituitions for a complete text file.
| Project | Pointer to the Project's Data Structure |
| SourceFile | Name of the File to be processed |
| DestinationFile | Name of the file to hold the processed file |
Definition at line 161 of file worker.cpp.
References LOG_DEBUG, LOG_ERROR, LogAdd(), MODE_FILE, and UpdateLine().
Referenced by PreProcessProject(), and TranslateRecursively().
|
private |
Process text substitutions for a single line.
| Project | Pointer to the Project's Data Structure \parame SourceLine Line to the be proceassed |
Definition at line 142 of file worker.cpp.
References leadin_string, leadout_string, and PROJECT_INFORMATION::SubsMap.
Referenced by UpdateFile().
|
signal |
Referenced by DoWork(), and DoxygenManager::DoxygenManager().
|
private |
|
private |
Definition at line 35 of file worker.h.
Referenced by DoWork(), and PreProcessProject().
|
private |
|
private |
Definition at line 176 of file worker.h.
Referenced by PreProcessProject(), and Worker().
|
private |
Definition at line 178 of file worker.h.
Referenced by UpdateLine(), and Worker().
|
private |
Definition at line 179 of file worker.h.
Referenced by UpdateLine(), and Worker().
|
private |
|
private |