Fix various indentation issues (tabs->spaces)
This commit is contained in:
@@ -9,33 +9,33 @@ import generateBase.generateModel_Module
|
||||
import generateBase.generateTools
|
||||
|
||||
class TemplateClassPyExport (template.ModelTemplate):
|
||||
def Generate(self):
|
||||
#self.ParentNamespace = "Base"
|
||||
#self.Namespace = "Base"
|
||||
encoding = sys.getfilesystemencoding()
|
||||
path = self.path
|
||||
if hasattr(path,"decode"): # this is python2. Otherwise this is unicode already
|
||||
path = path.decode(encoding)
|
||||
exportName = self.export.Name
|
||||
if hasattr(exportName,"decode"): # this is python2. Otherwise this is unicode already
|
||||
exportName = exportName.decode(encoding)
|
||||
dirname = self.dirname
|
||||
if hasattr(dirname,"decode"): # this is python2. Otherwise this is unicode already
|
||||
dirname = dirname.decode(encoding)
|
||||
print("TemplateClassPyExport",path + exportName)
|
||||
# Imp.cpp must not exist, neither in path nor in dirname
|
||||
if(not os.path.exists(path + exportName + "Imp.cpp")):
|
||||
if(not os.path.exists(dirname + exportName + "Imp.cpp")):
|
||||
file = open(path + exportName + "Imp.cpp",'wb')
|
||||
generateBase.generateTools.replace(self.TemplateImplement,locals(),file)
|
||||
file.close()
|
||||
with open(path + exportName + ".cpp", 'wb') as file:
|
||||
generateBase.generateTools.replace(self.TemplateModule,locals(),file)
|
||||
with open(path + exportName + ".h", 'wb') as file:
|
||||
generateBase.generateTools.replace(self.TemplateHeader,locals(),file)
|
||||
#file.write( generateBase.generateTools.replace(self.Template,locals()))
|
||||
def Generate(self):
|
||||
#self.ParentNamespace = "Base"
|
||||
#self.Namespace = "Base"
|
||||
encoding = sys.getfilesystemencoding()
|
||||
path = self.path
|
||||
if hasattr(path,"decode"): # this is python2. Otherwise this is unicode already
|
||||
path = path.decode(encoding)
|
||||
exportName = self.export.Name
|
||||
if hasattr(exportName,"decode"): # this is python2. Otherwise this is unicode already
|
||||
exportName = exportName.decode(encoding)
|
||||
dirname = self.dirname
|
||||
if hasattr(dirname,"decode"): # this is python2. Otherwise this is unicode already
|
||||
dirname = dirname.decode(encoding)
|
||||
print("TemplateClassPyExport",path + exportName)
|
||||
# Imp.cpp must not exist, neither in path nor in dirname
|
||||
if(not os.path.exists(path + exportName + "Imp.cpp")):
|
||||
if(not os.path.exists(dirname + exportName + "Imp.cpp")):
|
||||
file = open(path + exportName + "Imp.cpp",'wb')
|
||||
generateBase.generateTools.replace(self.TemplateImplement,locals(),file)
|
||||
file.close()
|
||||
with open(path + exportName + ".cpp", 'wb') as file:
|
||||
generateBase.generateTools.replace(self.TemplateModule,locals(),file)
|
||||
with open(path + exportName + ".h", 'wb') as file:
|
||||
generateBase.generateTools.replace(self.TemplateHeader,locals(),file)
|
||||
#file.write( generateBase.generateTools.replace(self.Template,locals()))
|
||||
|
||||
TemplateHeader = """
|
||||
TemplateHeader = """
|
||||
// This file is generated by src/Tools/generateTemplates/templateClassPyExport.py out of the XML file
|
||||
// Every change you make here gets lost in the next full rebuild!
|
||||
#ifndef @self.export.Namespace.upper().replace("::", "_")@_@self.export.Name.upper()@_H
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
|
||||
"""
|
||||
|
||||
TemplateModule = """
|
||||
TemplateModule = """
|
||||
// This file is generated by src/Tools/generateTemplates/templateClassPyExport.py out of the .XML file
|
||||
// Every change you make here gets lost in the next full rebuild!
|
||||
// This File is normally built as an include in @self.export.Name@Imp.cpp! It's not intended to be in a project!
|
||||
@@ -1136,8 +1136,8 @@ int @self.export.Name@::setCustomAttributes(const char* /*attr*/, PyObject* /*ob
|
||||
|
||||
"""
|
||||
|
||||
# Here's the template for the user part of the implementation. This does NOT get overridden if it already exists.
|
||||
TemplateImplement = """
|
||||
# Here's the template for the user part of the implementation. This does NOT get overridden if it already exists.
|
||||
TemplateImplement = """
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include "@self.export.Include@"
|
||||
|
||||
Reference in New Issue
Block a user