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/annoStreamer.h src/inc/annoStreamer.h index c1e158d..a4cdfbe 100644 --- src/inc/annoStreamer.h +++ src/inc/annoStreamer.h @@ -27,32 +27,35 @@ struct asObject *(*getAutoSqlObject)(struct annoStreamer *self); // Set genomic region for query (should be called only by annoGratorQuerySetRegion) void (*setRegion)(struct annoStreamer *self, char *chrom, uint rStart, uint rEnd); // Get and set filters struct annoFilter *(*getFilters)(struct annoStreamer *self); void (*setFilters)(struct annoStreamer *self, struct annoFilter *newFilters); // Get and set output fields struct annoColumn *(*getColumns)(struct annoStreamer *self); void (*setColumns)(struct annoStreamer *self, struct annoColumn *newColumns); // Get next item's output fields from this source struct annoRow *(*nextRow)(struct annoStreamer *self); // Close connection to source and free self. void (*close)(struct annoStreamer **pSelf); // For use by annoGratorQuery only: hook up query object after creation void (*setQuery)(struct annoStreamer *self, struct annoGratorQuery *query); - // Private members -- callers are on the honor system to access these using only methods above. + // Public members -- callers are on the honor system to access these read-only. struct annoGratorQuery *query; // The query object that owns this streamer. + enum annoRowType rowType; + int numCols; + // Private members -- callers are on the honor system to access these using only methods above. boolean positionIsGenome; char *chrom; uint regionStart; uint regionEnd; struct asObject *asObj; struct annoFilter *filters; struct annoColumn *columns; }; // ---------------------- annoStreamer default methods ----------------------- struct asObject *annoStreamerGetAutoSqlObject(struct annoStreamer *self); /* Return parsed autoSql definition of this streamer's data type. */ void annoStreamerSetRegion(struct annoStreamer *self, char *chrom, uint rStart, uint rEnd);