@@ -181,7 +181,9 @@ def _get_datamap(classname):
181
181
182
182
def _dump_datamap (open_file , class_name , datamap ):
183
183
"""Dump a DataMap object to the given file object."""
184
- open_file .write ('{0}\n ' .format (class_name ))
184
+ base = datamap .base
185
+ open_file .write ('{} -> {}\n ' .format (
186
+ class_name , base and base .class_name ))
185
187
for desc in datamap :
186
188
_dump_type_description (open_file , desc )
187
189
@@ -216,11 +218,14 @@ def dump_server_classes(filename):
216
218
# Loop through all server classes
217
219
for server_class in ServerClassGenerator ():
218
220
221
+ table = server_class .table
222
+
219
223
# Print the server class' name to file
220
- open_file .write ('{0}\n ' .format (server_class .name ))
224
+ open_file .write ('{} -> {}\n ' .format (
225
+ server_class .name , _find_base_server_class_name (table )))
221
226
222
227
# Get all items in the server class' table
223
- _dump_server_class_table (server_class . table , open_file )
228
+ _dump_server_class_table (table , open_file )
224
229
225
230
# Move to the next server class
226
231
server_class = server_class .next
@@ -232,6 +237,22 @@ def dump_server_classes(filename):
232
237
open_file .write ('\n ' )
233
238
234
239
240
+ def _find_base_server_class_name (table ):
241
+ """Return the name of table's base server class."""
242
+ for prop in table :
243
+ if prop .name != 'baseclass' :
244
+ continue
245
+
246
+ base_name = prop .data_table .name
247
+ for server_class in ServerClassGenerator ():
248
+ if server_class .table .name == base_name :
249
+ return server_class .name
250
+
251
+ return None
252
+
253
+ return None
254
+
255
+
235
256
def _dump_server_class_table (table , open_file , level = 1 , offset = 0 ):
236
257
"""Dump all items in the given table to the given file."""
237
258
# Loop through the send props in the table
0 commit comments