Runtime schema by name

This commit is contained in:
Thomas Krijnen
2017-12-12 10:33:24 +01:00
parent 33e1fa6a14
commit 33fc2080df
13 changed files with 967 additions and 73 deletions
+3 -1
View File
@@ -194,11 +194,13 @@ class SchemaClass(codegen.Base):
#endif
""")
statements.append("namespace %s {" % mapping.schema.name)
statements.extend(('const schema_definition& get_schema() {',
'',
' static const schema_definition* s = populate_schema();',
' return *s;',
'}','',''))
'}','}','',''))
self.str = "\n".join(statements)