1+ /**
2+ * INTERNAL: Do not use.
3+ * This module defines the IPA layer on top of raw DB entities, and the conversions between the two
4+ * layers.
5+ */
6+
17private import { {import_prefix} }.SynthConstructors
28private import { {import_prefix} }.Raw
39
410cached module Synth {
11+ /**
12+ * INTERNAL: Do not use.
13+ * The synthesized type of all elements.
14+ */
515 cached newtype T{{root} } =
616 { {#final_classes} }
717 { {^first} }
818 or
919 { {/first} }
20+ /**
21+ * INTERNAL: Do not use.
22+ */
1023 T{ {name} }({ {#params} }{ {^first} }, { {/first} }{ {type} } { {param} }{ {/params} }){ {#has_params} } { construct{{name} }({ {#params} }{ {^first} }, { {/first} }{ {param} }{ {/params} }) }{ {/has_params} }
1124 { {/final_classes} }
1225
1326 { {#non_final_classes} }
1427 { {^root} }
28+ /**
29+ * INTERNAL: Do not use.
30+ */
1531 class T{ {name} } = { {#derived} }{ {^first} } or { {/first} }T{ {name} }{ {/derived} };
1632 { {/root} }
1733 { {/non_final_classes} }
1834
1935 { {#final_classes} }
36+ /**
37+ * INTERNAL: Do not use.
38+ * Converts a raw element to a synthesized `T{ {name} }`, if possible.
39+ */
2040 cached T{ {name} } convert{ {name} }FromRaw(Raw::Element e) {
2141 {{^is_fresh_ipa} }
2242 result = T{ {name} }(e)
@@ -28,6 +48,10 @@ cached module Synth {
2848 { {/final_classes} }
2949
3050 { {#non_final_classes} }
51+ /**
52+ * INTERNAL: Do not use.
53+ * Converts a raw DB element to a synthesized `T{ {name} }`, if possible.
54+ */
3155 cached T{ {name} } convert{ {name} }FromRaw(Raw::Element e) {
3256 {{#derived} }
3357 { {^first} }
@@ -39,6 +63,10 @@ cached module Synth {
3963 { {/non_final_classes} }
4064
4165 { {#final_classes} }
66+ /**
67+ * INTERNAL: Do not use.
68+ * Converts a synthesized `T{ {name} }` to a raw DB element, if possible.
69+ */
4270 cached Raw::Element convert{ {name} }ToRaw(T{ {name} } e) {
4371 {{^is_fresh_ipa} }
4472 e = T{ {name} }(result)
@@ -50,6 +78,10 @@ cached module Synth {
5078 { {/final_classes} }
5179
5280 { {#non_final_classes} }
81+ /**
82+ * INTERNAL: Do not use.
83+ * Converts a synthesized `T{ {name} }` to a raw DB element, if possible.
84+ */
5385 cached Raw::Element convert{ {name} }ToRaw(T{ {name} } e) {
5486 {{#derived} }
5587 { {^first} }
0 commit comments