44 def generate_file(self,overwrite,full_qualified_filename,template_file):
45 if template_file!=
None and write_file(overwrite,self.
default_overwrite,full_qualified_filename):
46 Logger().log(
"write " + full_qualified_filename )
47 with open( os.path.realpath(template_file),
"r" )
as input:
48 template = input.read()
49 rendered_text = template.format(**self.
d)
51 rendered_text = WARNING_BANNER + rendered_text
52 with open( full_qualified_filename,
"w" )
as output:
53 output.write( rendered_text )
56 subdirectory_path = os.path.normpath( directory +
"/" + self.
subdirectory )
57 if not os.path.exists( subdirectory_path ):
58 os.mkdir(subdirectory_path)
60 header_filename = os.path.normpath( subdirectory_path +
"/" + self.
classname +
".h" )
61 cpp_filename = os.path.normpath( subdirectory_path +
"/" + self.
classname +
".cpp" )