Skip to content

Commit

Permalink
handle nested name spaces in Python generation script
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Nov 20, 2019
1 parent ef73ab5 commit 1ec6701
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Tools/generateTemplates/templateClassPyExport.py
Expand Up @@ -38,8 +38,8 @@ def Generate(self):
TemplateHeader = """
// This file is generated by src/Tools/generateTemaplates/templateClassPyExport.py out of the XML file
// Every change you make here gets lost in the next full rebuild!
#ifndef @self.export.Namespace.upper()@_@self.export.Name.upper()@_H
#define @self.export.Namespace.upper()@_@self.export.Name.upper()@_H
#ifndef @self.export.Namespace.upper().replace("::", "_")@_@self.export.Name.upper()@_H
#define @self.export.Namespace.upper().replace("::", "_")@_@self.export.Name.upper()@_H
#include <@self.export.FatherInclude@>
#include <@self.export.Include@>
Expand All @@ -50,7 +50,7 @@ def Generate(self):
@self.export.ForwardDeclarations@
-
namespace @self.export.Namespace@
namespace @self.export.Namespace.replace("::"," { namespace ")@
{
//===========================================================================
Expand All @@ -59,7 +59,7 @@ def Generate(self):
/** The python export class for @self.export.Twin@
*/
class @self.export.Namespace@Export @self.export.Name@ : public @self.export.FatherNamespace@::@self.export.Father@
class @self.export.Namespace.replace("::","_")@Export @self.export.Name@ : public @self.export.FatherNamespace@::@self.export.Father@
{
protected:
~@self.export.Name@();
Expand Down Expand Up @@ -248,9 +248,9 @@ class @self.export.Namespace@Export @self.export.Name@ : public @self.export.Fat
-
};
} //namespace @self.export.Namespace@
@"}"*len(self.export.Namespace.split("::"))@ //namespace @self.export.Namespace@
#endif // @self.export.Namespace.upper()@_@self.export.Name.upper()@_H
#endif // @self.export.Namespace.upper().replace("::", "_")@_@self.export.Name.upper()@_H
"""

Expand Down

0 comments on commit 1ec6701

Please sign in to comment.