loci: generate wire type parsers from the IR
Every virtual class gets a function that reads the discriminator and returns an
object id. If the subclass is a virtual class then the parsing recurses.
diff --git a/c_gen/templates/loci_classes.h b/c_gen/templates/loci_classes.h
index 3486055..12c07d1 100644
--- a/c_gen/templates/loci_classes.h
+++ b/c_gen/templates/loci_classes.h
@@ -25,11 +25,16 @@
:: # EPL for the specific language governing permissions and limitations
:: # under the EPL.
::
+:: import loxi_globals
:: include('_copyright.c')
::
#ifndef __LOCI_CLASSES_H__
#define __LOCI_CLASSES_H__
+:: for uclass in loxi_globals.unified.classes:
+void ${uclass.name}_wire_object_id_get(of_object_t *obj, of_object_id_t *id);
+:: #endfor
+
${legacy_code}
#endif