3dd6cd1eed6c6f52a3506dd53d1f4a81a6e4532b
kent
  Tue Aug 6 12:09:34 2013 -0700
Added basesInSample output.
diff --git src/inc/raToStruct.h src/inc/raToStruct.h
new file mode 100644
index 0000000..2955635
--- /dev/null
+++ src/inc/raToStruct.h
@@ -0,0 +1,31 @@
+/* raToStruct - stuff to help read ra files into C structures.  Works with raToStructGen
+ * which makes parsers based on .as files. */
+
+#ifndef RATOSTRUCT_H
+
+struct raToStructReader
+/* Something to help us parse RAs into C structures. */
+    {
+    struct raToStructReader *next;
+    char *name;		      /* Name of structure */
+    int fieldCount;	      /* Number of fields. */
+    char **fields;	      /* Names of all fields - not allocated here. */
+    char **requiredFields;    /* Names of required fields - not allocated here */
+    int requiredFieldCount;   /* Count of required fields. */
+    struct hash *fieldIds;    /* So we can do hashLookup/switch instead of strcmp chain */
+    int *requiredFieldIds;    /* An array of IDs of required fields. */
+    bool *fieldsObserved;  /* An entry for each field we've observed. */
+    };
+
+struct raToStructReader *raToStructReaderNew(char *name,  int fieldCount, char **fields,  
+    int requiredFieldCount, char **requiredFields);
+/* Create a helper object for parsing an ra file into a C structure.  This structure will
+ * contain */
+
+void raToStructReaderFree(struct raToStructReader **pReader);
+/* Free up memory associated with reader. */
+
+void raToStructReaderCheckRequiredFields(struct raToStructReader *reader, struct lineFile *lf);
+/* Make sure that all required files have been seen in the stanza we just parsed. */
+
+#endif /* RATOSTRUCT_H */