Fawkes API
Fawkes Development Version
|
Generate basic plugins from minimal input. More...
#include <plugin_generator.h>
Public Member Functions | |
PluginGenerator (std::string directory, std::string author, std::string year, std::string creation_date, std::string plugin_name, std::string description) | |
Constructor. More... | |
~PluginGenerator () | |
Destructor. More... | |
void | write_thread_h (FILE *f) |
Write h file. More... | |
void | write_thread_cpp (FILE *f) |
Write cpp file. More... | |
void | write_plugin_cpp (FILE *f) |
Write plugin cpp file. More... | |
void | write_makefile (FILE *f) |
Write Makefile. More... | |
void | write_makefile_header (FILE *f) |
Write makefile header. More... | |
void | write_header (FILE *f, std::string filename) |
Write header to file. More... | |
void | write_deflector (FILE *f) |
Write header deflector. More... | |
std::string | format_class_name (std::string plugin_name, std::string append) |
Format a lowercase plugin name to CamelCase class. More... | |
std::string | replace_dash_w_undescore (std::string source) |
Replace dash with underscore. More... | |
void | generate () |
Generator cpp and h files. More... | |
Generate basic plugins from minimal input.
Definition at line 31 of file plugin_generator.h.
PluginGenerator::PluginGenerator | ( | std::string | directory, |
std::string | author, | ||
std::string | year, | ||
std::string | creation_date, | ||
std::string | plugin_name, | ||
std::string | description | ||
) |
Constructor.
directory | Directory where to create the files |
author | Author of the plugin |
year | Year of copyright |
creation_date | Creation date of the plugin |
plugin_name | Name of the plugin |
description | Plugin description |
Definition at line 50 of file plugin_generator.cpp.
References fawkes::StringConversions::to_upper().
PluginGenerator::~PluginGenerator | ( | ) |
Destructor.
Definition at line 81 of file plugin_generator.cpp.
std::string PluginGenerator::format_class_name | ( | std::string | plugin_name, |
std::string | appendix | ||
) |
Format a lowercase plugin name to CamelCase class.
Example: plugin_name to PluginNameThread
plugin_name | name of plugin |
appendix | class name appendix, e.g., Thread or Plugin |
Definition at line 322 of file plugin_generator.cpp.
void PluginGenerator::generate | ( | ) |
Generator cpp and h files.
Definition at line 354 of file plugin_generator.cpp.
std::string PluginGenerator::replace_dash_w_undescore | ( | std::string | source | ) |
Replace dash with underscore.
Example: plugin-generator to plugin_generator
source | input string |
Definition at line 305 of file plugin_generator.cpp.
void PluginGenerator::write_deflector | ( | FILE * | f | ) |
Write header deflector.
f | file to write to |
Definition at line 148 of file plugin_generator.cpp.
void PluginGenerator::write_header | ( | FILE * | f, |
std::string | filename | ||
) |
Write header to file.
f | file to write to |
filename | name of file |
Definition at line 90 of file plugin_generator.cpp.
void PluginGenerator::write_makefile | ( | FILE * | f | ) |
void PluginGenerator::write_makefile_header | ( | FILE * | f | ) |
Write makefile header.
f | file to write to |
Definition at line 122 of file plugin_generator.cpp.
void PluginGenerator::write_plugin_cpp | ( | FILE * | f | ) |
Write plugin cpp file.
f | file to write to |
Definition at line 238 of file plugin_generator.cpp.
void PluginGenerator::write_thread_cpp | ( | FILE * | f | ) |
void PluginGenerator::write_thread_h | ( | FILE * | f | ) |