+#ifndef _IR_H_\r
+#define _IR_H_\r
+#include <unitypes.h>\r
+#include "apc.h"\r
+\r
+typedef union ir_setdata_t* ir_setdata;\r
+typedef struct ir_set_t* ir_set;\r
+typedef struct ir_class_t* ir_class;\r
+typedef struct ir_setld_t* ir_setld;\r
+typedef struct ir_classld_t* ir_classld;\r
+/* Classes and Sets\r
+ Classes are rooted at a special root class, representing the current working\r
+ directory at scan-time, named ".". The root class can always be identified\r
+ with ir_class_root, and children may be added to it. The add series of\r
+ functions will return a reference to the newly created object, which may also\r
+ be used the root for further add functions.\r
+\r
+ E.G.\r
+ ir_class x = ir_class_root();\r
+ x = ir_class_addchild(x, "mychild");\r
+ x = ir_class_addchild(x, "child of mychild");\r
+\r
+ Sets, like classes, must be rooted. Unlike classes, sets may be rooted on\r
+ other sets, in addition to classes. ir_class_addset will return a set rooted\r
+ on the class specified, while ir_set_addchild will return a set rooted on the\r
+ specified set.\r
+*/\r
+ir_class ir_class_root(void);\r
+ir_class ir_class_addchild(ir_class,const uint8_t*);\r
+uint8_t* ir_class_name(ir_class);\r
+ir_set ir_class_addset(ir_class,const uint8_t*);\r
+ir_set ir_set_addchild(ir_set,const uint8_t*);\r
+/* Set Data\r
+ Each set can contain up to FACING_MAX each of framesheets and mapsheets, one\r
+ sheet for each facing, per label. Each set can contain any number of audio\r
+ objects, supplied by label. Repeat assignment of conflicting data (e.g. two\r
+ SFACE framesheets assigned to the same set and label, or two audio objects\r
+ with the same label) causes an internal error.\r
+ Each set may also contain any number of link objects, which will be linked in\r
+ the order that they are encountered. At link time, repeated assignments of\r
+ conflicting data cause data to be silently overwritten for those sets. This\r
+ is an intentional side-effect of the linker.\r
+ Each setdata may have a path associated with it. If the data depends on the\r
+ data of an associated file at that path and no path is provided, the data\r
+ will be entered null.\r
+*/\r
+enum ltype { OLINK, MLINK, VLINK, ALINK };\r
+void ir_set_assign_data(ir_set,ir_setdata);\r
+void ir_set_assign_ref(ir_set,uint32_t);\r
+void ir_data_assign_path(ir_setdata,const uint8_t*);\r
+ir_setdata ir_framesheet(const uint8_t*, apc_facing, int,int);\r
+ir_setdata ir_mapsheet(const uint8_t*, apc_facing, int,int);\r
+ir_setdata ir_audio(const uint8_t*);\r
+ir_setdata ir_link(enum ltype,ir_setld,const uint8_t*);\r
+/* Reference Linking Data \r
+ Create linking data to sets or classes that will be resolved at a later\r
+ stage. Class references can be created from an ir_class object, if\r
+ available, or from the root class. Set references can be created from a\r
+ 64-bit integer ID, or from a class linking data and a child name. Once\r
+ created, both Class and Set link data can traverse children, specified by\r
+ name, which will be resolved at the linking stage as well.\r
+*/\r
+ir_classld ir_classld_from_class(ir_class);\r
+ir_classld ir_classld_from_root(void);\r
+ir_classld ir_classld_addchild(ir_classld,const uint8_t*);\r
+ir_setld ir_setld_from_ref(uint32_t);\r
+ir_setld ir_setld_from_classld(ir_classld,const uint8_t*);\r
+ir_setld ir_setld_addchild(ir_setld,const uint8_t*);\r
+#endif //_IR_H_\r