def formatCc(bdl: Object) -> str: template = Template.fromPath(Path(__file__).parent / "template/file.h.btl", indent=True) output = template.render(bdl.tree, Transform()) return output
def compositionCc(composition: Composition) -> str: template = Template.fromPath(Path(__file__).parent / "template/composition.cc.btl", indent=True) output = template.render(composition, Transform(composition)) return output
def formatBdl(bdl: Object) -> str: template = Template.fromPath(Path(__file__).parent / "template/file.bdl.btl", indent=True) output = template.render( bdl.tree, { "typeToStr": _typeToStr, "namespaceToStr": _namespaceToStr, "inlineComment": _inlineComment, "normalComment": _normalComment, "inheritanceToStr": _inheritanceToStr }) return output