#include <genbasic.h>
Classes | |
class | FileList |
the list of files to generate and their sources More... | |
Public Member Functions | |
GenBasic (Project *p, const QString &s_name) | |
constructor | |
virtual | ~GenBasic (void) |
destructor; | |
virtual bool | addTemplate (const QString &s_path) |
add a template (TEMPL command uses this) More... | |
virtual bool | generate (void) |
generate content | |
Public Member Functions inherited from scaffold::Generator | |
Generator (Project *p, const QString &s_name) | |
constructor | |
virtual | ~Generator (void) |
destructor; | |
Project * | parent (void) const |
parent project | |
const QString & | name (void) const |
the name of this generator | |
QString | outputPath (void) const |
where we should generate content | |
ExistingPolicy | overwriteMode (void) const |
how to deal with existing files | |
void | setOverwriteMode (ExistingPolicy new_p) |
set how to deal with existing files | |
Static Public Member Functions | |
static Generator * | create (Project *p, const QString &s_name) |
factory method in line with Generator::generatorFactory | |
Static Public Member Functions inherited from scaffold::Generator | |
static void | addGeneratorFactory (const QString &s_gen_name, generatorFactory factory) |
add a generator | |
static void | remGeneratorFactory (const QString &s_gen_name) |
remove a generator | |
static generatorFactory | factory (const QString &s_name) |
get generator factory for given name of NULL | |
Additional Inherited Members | |
Public Types inherited from scaffold::Generator | |
enum | ExistingPolicy { OVERWRITE, KEEP, BLEND } |
how to deal with existing files | |
typedef Generator *(* | generatorFactory )(Project *p, const QString &s_name) |
function capable of creating a generator | |
Simple Generator.
This is a simple generator that copies files from the templates it recieves, replaces variables and creates coresponding files in output path.
When looking for files to use as templates the directories that start with an underscore ( _ ) are ignoed.
|
virtual |
add a template (TEMPL command uses this)
Informs the generator that a template was added to it.
s_path | the path to the template |
Implements scaffold::Generator.