Skip to content

Commit 718b9e8

Browse files
committed
add support for post-includes
1 parent ca6f558 commit 718b9e8

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

StructType.pm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ sub render_struct_type {
316316
emit 'friend struct ' . fully_qualified_name($types{$backref}, $backref) . ';';
317317
}
318318
}
319+
320+
for my $extra ($tag->findnodes('extra-post-include')) {
321+
emit '#include "', $extra->getAttribute('filename'), "'";
322+
}
323+
}
324+
319325
} $tag, "$typename$ispec", -export => 1;
320326
}
321327

data-definition.xsd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
<xs:choice minOccurs="0" maxOccurs="unbounded">
132132
<xs:group ref="CompoundField" />
133133
<xs:element name="extra-include" type="ExtraInclude" />
134+
<xs:element name="extra-post-include" type="ExtraPostInclude" />
134135
</xs:choice>
135136
<xs:choice minOccurs="0">
136137
<xs:sequence>
@@ -252,6 +253,9 @@
252253
<xs:attribute name="type-name" />
253254
<xs:attribute name="filename" />
254255
</xs:complexType>
256+
<xs:complexType name="ExtraPostInclude">
257+
<xs:attribute name="filename" />
258+
</xs:complexType>
255259
<xs:complexType name="CustomMethods" mixed="true">
256260
<xs:sequence>
257261
<xs:element name="cmethod" type="Method" minOccurs="1" maxOccurs="unbounded" />

df.d_interface.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1975,7 +1975,7 @@
19751975
</enum-type>
19761976

19771977
<struct-type type-name='labor_kitchen_interface_food_key' custom-methods='true'>
1978-
<extra-include filename='df/custom/hash/labor_kitchen_interface_food_key.h'/>
1978+
<extra-post-include filename='df/custom/hash/labor_kitchen_interface_food_key.h'/>
19791979
<enum name='type' type-name='item_type'/>
19801980
<int16_t name='subtype'/>
19811981
<int16_t name='mat'/>

0 commit comments

Comments
 (0)