loci: move parsing functions out of the headers

These did not need to be inlined. Moved to of_type_maps.c, which is combined
with the old of_type_data.c to get all the necessary macros in one place.
diff --git a/c_gen/codegen.py b/c_gen/codegen.py
index 92d0f11..2bc62ca 100644
--- a/c_gen/codegen.py
+++ b/c_gen/codegen.py
@@ -41,6 +41,7 @@
 import c_code_gen
 import c_gen.of_g_legacy as of_g
 import c_gen.type_maps as type_maps
+import c_gen.c_type_maps as c_type_maps
 
 PushWireTypesData = namedtuple('PushWireTypesData',
     ['class_name', 'versioned_type_members'])
@@ -131,3 +132,14 @@
 def generate_init_map(install_dir):
     with template_utils.open_output(install_dir, "loci/src/loci_init_map.c") as out:
         util.render_template(out, "loci_init_map.c", classes=of_g.standard_class_order)
+
+def generate_type_maps(install_dir):
+    # Collect legacy code
+    tmp = StringIO()
+    c_type_maps.gen_type_to_obj_map_functions(tmp)
+    c_type_maps.gen_type_maps(tmp)
+    c_type_maps.gen_length_array(tmp)
+    c_type_maps.gen_extra_length_array(tmp)
+
+    with template_utils.open_output(install_dir, "loci/src/of_type_maps.c") as out:
+        util.render_template(out, "of_type_maps.c", legacy_code=tmp.getvalue())