(self, s: Union[string.Template, str], **kwargs)
| 645 | [m.generate_constructor(self.name) for m in self.constructors]) |
| 646 | |
| 647 | def substitute(self, s: Union[string.Template, str], **kwargs) -> str: |
| 648 | t = string.Template(s) if isinstance(s, str) else s |
| 649 | destroy = self.ctype + '_destroy' |
| 650 | return t.safe_substitute(name=self.name, |
| 651 | ctype=self.ctype, |
| 652 | destroy=destroy, |
| 653 | **kwargs) |
| 654 | |
| 655 | def generate(self) -> str: |
| 656 | return self.substitute( |