1 """Class constructor instantiator."""
5 from typing
import Iterable, List
12 Instantiate constructor with template parameters.
21 original: parser.Constructor,
22 instantiations: Iterable[parser.Typename] = ()):
28 self.
parent = original.parent
36 def construct(cls, original: parser.Constructor, typenames: List[str],
37 class_instantiations: List[parser.Typename],
38 method_instantiations: List[parser.Typename],
39 instantiated_args: List[parser.Argument],
40 parent:
'InstantiatedClass'):
41 """Class method to construct object as required by InstantiationHelper."""
42 method = parser.Constructor(
44 args=parser.ArgumentList(instantiated_args),
45 template=original.template,
49 instantiations=method_instantiations)
52 """Generate the C++ code for wrapping."""
58 ",".join(instantiation_list))