Main class for the program, as a singleton. More...
#include <scaffold.h>
Inheritance diagram for scaffold::Scaffold:Public Types | |
| enum | LogTypes { LOG_PROJECTS = 0x0000100, LOG_GENERATORS = 0x0000200, LOG_GENFILES = 0x0000400, LOG_ALL } |
| bitmask for types of messages that are being logged More... | |
Public Member Functions | |
| bool | initDMP (void) |
| initialise diff_match_patch module at the beginning of second stage More... | |
Static Public Member Functions | |
| static Scaffold * | unique (void) |
| the one and only instance | |
| static bool | init (const QStringList &init_files, const bbb::VarMap &var_map) |
| initialisation method | |
| static ExitCode | perform (QCoreApplication &app) |
| acts as main | |
| static void | end (void) |
| finish method | |
| static Scafrex * | scafrex (void) |
| enhanced rexscript interpreter | |
| static bool | blendTwoFiles (const QString &s_path_1, const QString &s_path_2) |
| mixes two files and saves the result in first file | |
| static bool | readTextFile (const QString &s_path, QString &s_out) |
| get the content of a file; throw an error if it fails | |
| static bool | writeTextFile (const QString &s_path, const QString &s_out) |
| write the string to a file; throw an error if it fails | |
Generators | |
Shortcuts for dealing with generators | |
| static Generator * | getValidGenerator (void) |
| expect current project to be a valid generator | |
| static Generator * | getValidGenerator (const QString &s_name) |
| expect current project to be a valid generator | |
Messages | |
Communication with the user | |
| static void | fileError (const QString &s) |
| show an error message related to current file and line | |
| static void | error (const QString &s) |
| show an error message not related to control file | |
| static void | info (const QString &s) |
| show an informative message | |
| static void | log (int ty, const QString &s) |
| show a log message | |
Projects | |
| static int | findProjectId (const QString &s_name) |
| find a project given its name | |
| static int | findProjectId (const Project *trg) |
| find a project given its name | |
| static Project * | findProject (const QString &s_name) |
| find a project given its name | |
| static Project * | getProject (const QString &s_name) |
| get existing project or start a new one | |
| static Project * | currentProject (void) |
| current project | |
| static Project * | getValidProject (void) |
| expect current project to be a valid project | |
| static Project * | getValidProject (const QString &s_name) |
| expect named project to be a valid project | |
| static Project * | startProject (const QString &s_name) |
| launch a project | |
| QString | defaultProjectPath (void) |
| default path to projects; retrieves the value of PRJPATH | |
Main class for the program, as a singleton.
bitmask for types of messages that are being logged
The bits here must be synced with the ones in RexScript::LogTypes; as such, 0x00FF byte is reserved and we start with next available it.
| Enumerator | |
|---|---|
| LOG_PROJECTS |
Changes in projects |
| LOG_GENERATORS |
Changes in generators |
| LOG_GENFILES |
Files generated by us |
| LOG_ALL |
all tests are enabled with this |
| bool Scaffold::initDMP | ( | void | ) |
initialise diff_match_patch module at the beginning of second stage
The method will look at the variables that influence DMP and, if found, will use their values; the method throws an error if there are problems in interpreting the values.