@@ -33,27 +33,24 @@ module;
3333
3434// Include all component headers
3535{% for comp in components %}
36- #include "{{ incfolder }}{{ comp.bare }}.h"
36+ #include "{{ incfolder }}{{ comp.bare_type }}.h"
3737{% endfor %}
3838
3939// Include all datatype headers (Object, MutableObject, Collection, etc.)
4040{% for dt in datatypes %}
41- #include "{{ incfolder }}{{ dt.bare }}.h"
42- #include "{{ incfolder }}Mutable{{ dt.bare }}.h"
43- #include "{{ incfolder }}{{ dt.bare }}Obj.h"
44- #include "{{ incfolder }}{{ dt.bare }}Data.h"
45- #include "{{ incfolder }}{{ dt.bare }}Collection.h"
46- #include "{{ incfolder }}{{ dt.bare }}CollectionData.h"
41+ #include "{{ incfolder }}{{ dt.bare_type }}.h"
42+ #include "{{ incfolder }}Mutable{{ dt.bare_type }}.h"
43+ #include "{{ incfolder }}{{ dt.bare_type }}Collection.h"
4744{% endfor %}
4845
4946// Include all interface headers
5047{% for iface in interfaces %}
51- #include "{{ incfolder }}{{ iface.bare }}.h"
48+ #include "{{ incfolder }}{{ iface.bare_type }}.h"
5249{% endfor %}
5350
5451// Include all link headers
5552{% for link in links %}
56- #include "{{ incfolder }}{{ link.bare }}Collection.h"
53+ #include "{{ incfolder }}{{ link.bare_type }}Collection.h"
5754{% endfor %}
5855
5956export module {{ package_name }}.datamodel;
@@ -70,48 +67,30 @@ export namespace podio {
7067{% if components %}
7168export namespace {{ package_name }} {
7269{% for comp in components %}
73- {% if comp .ns %}
74- using {{ comp.ns }}::{{ comp.bare }};
75- {% else %}
76- using ::{{ comp.bare }};
77- {% endif %}
70+ using {{ comp.qualified_for_modules() }};
7871{% endfor %}
7972}
8073{% endif %}
8174
8275// Export all datatypes (Object, MutableObject, Collection)
8376{% for dt in datatypes %}
8477export namespace {{ package_name }} {
85- // {{ dt.full }} datatype
86- {% if dt .ns %}
87- using {{ dt.ns }}::{{ dt.bare }};
88- using {{ dt.ns }}::Mutable{{ dt.bare }};
89- using {{ dt.ns }}::{{ dt.bare }}Collection;
90- using {{ dt.ns }}::{{ dt.bare }}CollectionIterator;
91- using {{ dt.ns }}::{{ dt.bare }}MutableCollectionIterator; // Note: pattern is {Type}MutableCollectionIterator
92- // Note: {{ dt.bare }}Obj, {{ dt.bare }}Data, and {{ dt.bare }}CollectionData are internal implementation
93- // details and are not exported. They are only accessible through the public handle and collection APIs.
94- {% else %}
95- using ::{{ dt.bare }};
96- using ::Mutable{{ dt.bare }};
97- using ::{{ dt.bare }}Collection;
98- using ::{{ dt.bare }}CollectionIterator;
99- using ::{{ dt.bare }}MutableCollectionIterator; // Note: pattern is {Type}MutableCollectionIterator
100- // Note: {{ dt.bare }}Obj, {{ dt.bare }}Data, and {{ dt.bare }}CollectionData are internal implementation
78+ // {{ dt.full_type }} datatype
79+ using {{ dt.qualified_for_modules() }};
80+ using {{ dt.qualified_for_modules(prefix="Mutable") }};
81+ using {{ dt.qualified_for_modules(suffix="Collection") }};
82+ using {{ dt.qualified_for_modules(suffix="CollectionIterator") }};
83+ using {{ dt.qualified_for_modules(suffix="MutableCollectionIterator") }}; // Note: pattern is {Type}MutableCollectionIterator
84+ // Note: {{ dt.bare_type }}Obj, {{ dt.bare_type }}Data, and {{ dt.bare_type }}CollectionData are internal implementation
10185 // details and are not exported. They are only accessible through the public handle and collection APIs.
102- {% endif %}
10386}
10487{% endfor %}
10588
10689// Export all interfaces
10790{% if interfaces %}
10891export namespace {{ package_name }} {
10992{% for iface in interfaces %}
110- {% if iface .ns %}
111- using {{ iface.ns }}::{{ iface.bare }};
112- {% else %}
113- using ::{{ iface.bare }};
114- {% endif %}
93+ using {{ iface.qualified_for_modules() }};
11594{% endfor %}
11695}
11796{% endif %}
@@ -120,11 +99,7 @@ export namespace {{ package_name }} {
12099{% if links %}
121100export namespace {{ package_name }} {
122101{% for link in links %}
123- {% if link .ns %}
124- using {{ link.ns }}::{{ link.bare }}Collection;
125- {% else %}
126- using ::{{ link.bare }}Collection;
127- {% endif %}
102+ using {{ link.qualified_for_modules(suffix="Collection") }};
128103{% endfor %}
129104}
130105{% endif %}
0 commit comments