37 #ifndef H_OGF_DEVEL_TYPES_MODULE_MAKER_H
38 #define H_OGF_DEVEL_TYPES_MODULE_MAKER_H
71 const std::string& module_name,
72 const std::string& author_name
91 const std::string& module_name,
92 const std::string& subdirectory,
93 const std::string& file_name,
94 const std::string& header_skel =
"devel/file.h.skel",
95 const std::string& source_skel =
"devel/file.cpp.skel"
116 const std::string& module_name,
117 const std::string& subdirectory,
118 const std::string& class_name,
119 const std::string& header_skel =
"devel/class.h.skel",
120 const std::string& source_skel =
"devel/class.cpp.skel"
145 const std::string& module_name,
146 const std::string& subdirectory,
147 const std::string& base_class_name,
148 const std::string& class_name,
149 const std::string& header_skel =
"devel/gom_class.h.skel",
150 const std::string& source_skel =
"devel/gom_class.cpp.skel"
177 const std::string& module_name,
178 const std::string& subdirectory,
179 const std::string& base_class_name,
180 const std::string& class_name,
181 const std::string& header_skel,
182 const std::string& source_skel,
199 const std::string& module_name,
200 const std::string& grob_class_name,
201 const std::string& commands_name
219 const std::string& module_name,
220 const std::string& grob_class_name,
221 const std::string& shader_name,
222 const std::string& base_class_name =
""
240 const std::string& module_name,
241 const std::string& grob_class_name,
242 const std::string& tool_name,
243 const std::string& base_class_name =
""
259 const std::string& module_name,
260 const std::string& grob_name,
261 const std::string& file_extension =
"",
262 const std::string& base_class_name =
"OGF::Grob"
275 bool set_module(
const std::string& module_name,
bool check =
true);
304 const std::string& file_name,
305 const std::string& skel_name,
307 bool insert_header =
false
352 const std::string& file_name,
353 const std::string& insertion_point,
354 const std::string& line
373 std::string project_root_;
374 std::string package_;
375 std::string package_path_;
Generates plugins using skeletons in lib/devel/.
bool insert(const std::string &file_name, const std::string &insertion_point, const std::string &line)
Inserts a new line in a file.
void add_directory_to_cmake(const std::string &directory)
Adds a directory to the list of directories where source files should be gathered in the CMake file.
bool create_gom_class(const std::string &module_name, const std::string &subdirectory, const std::string &base_class_name, const std::string &class_name, const std::string &header_skel="devel/gom_class.h.skel", const std::string &source_skel="devel/gom_class.cpp.skel")
Creates sources for a new C++ GOM class in a module.
void set_module_name(TextUtils::Environment &env)
Sets the substitution rules deduced from the name of the current module.
void create_file(const std::string &module_name, const std::string &subdirectory, const std::string &file_name, const std::string &header_skel="devel/file.h.skel", const std::string &source_skel="devel/file.cpp.skel")
Creates a new C++ source in a module.
bool create_gom_class(const std::string &module_name, const std::string &subdirectory, const std::string &base_class_name, const std::string &class_name, const std::string &header_skel, const std::string &source_skel, TextUtils::Environment &env)
Creates sources for a new C++ GOM class in a module.
bool create_file_from_skel(const std::string &file_name, const std::string &skel_name, const TextUtils::Environment &env, bool insert_header=false)
Creates a file from an skeleton file and a set of substitution rules.
void create_grob(const std::string &module_name, const std::string &grob_name, const std::string &file_extension="", const std::string &base_class_name="OGF::Grob")
Creates source files for a new Grob class.
void create_class(const std::string &module_name, const std::string &subdirectory, const std::string &class_name, const std::string &header_skel="devel/class.h.skel", const std::string &source_skel="devel/class.cpp.skel")
Creates sources for a new C++ class in a module.
void create_shader(const std::string &module_name, const std::string &grob_class_name, const std::string &shader_name, const std::string &base_class_name="")
Creates source files for a new Shader class.
void create_tool(const std::string &module_name, const std::string &grob_class_name, const std::string &tool_name, const std::string &base_class_name="")
Creates source files for a new Tool class.
std::string file_name_to_include_guard(const std::string &file_name)
Converts a file name to an include guard.
void touch_root_cmake()
Changes the modification time of the root CMakeLists.txt in order to trigger recompilation.
void create_commands(const std::string &module_name, const std::string &grob_class_name, const std::string &commands_name)
Creates source files for a new Commands class.
std::string class_name_to_file_name(const std::string &class_name)
Converts a class name to a file name.
bool create_module(const std::string &module_name, const std::string &author_name)
Creates a new module (a plugin).
ModuleMaker()
ModuleMaker constructor.
bool create_directory(const std::string &dir_name)
Creates a new directory.
bool set_module(const std::string &module_name, bool check=true)
Sets the name of the current module where files should be generated.
Manages a set of name-value or name-values pairs, used to manipulate text files.
std::string dir_name(const std::string &path)
Gets a path directory.
Global Graphite namespace.
Definitions common to all include files in the devel library.
Utilities to manipulate text files.