18d303bb4f14e1edff401c8a85276ff1344f0f37
angie
  Tue Apr 3 10:18:14 2012 -0700
Feature #6152 (Variant Annotation Tool): Added annoStreamVcf, whichled to yet more significant changes to annoRow: instead of every row
declaring its type and annoRow{Free,Clone} taking a numCols argument
that is meaningless for wig, now annoRow{Free,Clone} take the row's
source annoStreamer as an argument.  The annoStreamer now has public
members (rowType and numCols) that provide all information needed about
the row.  annoStreamer constructors need to set rowType.

diff --git src/inc/annoRow.h src/inc/annoRow.h
index 5d17590..01b57cd 100644
--- src/inc/annoRow.h
+++ src/inc/annoRow.h
@@ -1,45 +1,47 @@
 /* annoRow -- basic data interchange unit of annoGratorQuery framework. */
 
 #ifndef ANNOROW_H
 #define ANNOROW_H
 
 #include "common.h"
 
-enum annoRowType { arWords, arWig };
+enum annoRowType { arUnknown, arWords, arWig, arVcf };
+
+// stub in order to avoid problems with circular .h references:
+struct annoStreamer;
 
 struct annoRow
 /* Representation of a row from a database table or file.  The chrom, start and end
  * facilitate intersection by position.  If type is arWords, then data is an array
  * of strings corresponding to columns in the autoSql definition provided by the
  * source of the annoRow.  If type is arWig, then data is an array of floats.
  * rightJoinFail is true if this row failed a filter marked as rightJoin, meaning it
  * can knock out the primary row (see annoFilter.h). */
     {
     struct annoRow *next;
     char *chrom;
     uint start;
     uint end;
     void *data;
-    enum annoRowType type;
     boolean rightJoinFail;
     };
 
 struct annoRow *annoRowFromStringArray(char *chrom, uint start, uint end, boolean rightJoinFail,
 				       char **wordsIn, int numCols);
 /* Allocate & return an annoRow with data cloned from wordsIn. */
 
 struct annoRow *annoRowWigNew(char *chrom, uint start, uint end, boolean rightJoinFail,
 			      float *values);
 /* Allocate & return an annoRowWig, with clone of values; length of values is (end-start). */
 
-struct annoRow *annoRowClone(struct annoRow *rowIn, int numCols);
+struct annoRow *annoRowClone(struct annoRow *rowIn, struct annoStreamer *source);
 /* Allocate & return a single annoRow cloned from rowIn.
  * numCols is used only if rowIn->type is arWords. */
 
-void annoRowFree(struct annoRow **pRow, int numCols);
+void annoRowFree(struct annoRow **pRow, struct annoStreamer *source);
 /* Free a single annoRow. */
 
-void annoRowFreeList(struct annoRow **pList, int numCols);
+void annoRowFreeList(struct annoRow **pList, struct annoStreamer *source);
 /* Free a list of annoRows. */
 
 #endif//ndef ANNOROW_H