527428fffb4613aff49b19580e90b8e66ee99204 angie Mon Apr 15 12:36:13 2013 -0700 Ripping out unused annoColumn -- it's really an output option for tab-sep or CT output and could simply be an slName list. refs #6152 diff --git src/lib/annoStreamer.c src/lib/annoStreamer.c index b895361..d86e111 100644 --- src/lib/annoStreamer.c +++ src/lib/annoStreamer.c @@ -3,34 +3,32 @@ #include "annoStreamer.h" #include "errabort.h" // ----------------------- annoStreamer base methods -------------------------- struct asObject *annoStreamerGetAutoSqlObject(struct annoStreamer *self) /* Return parsed autoSql definition of this streamer's data type. */ { return self->asObj; } void annoStreamerSetAutoSqlObject(struct annoStreamer *self, struct asObject *asObj) /* Use new asObj and update internal state derived from asObj. */ { annoFilterFreeList(&(self->filters)); -annoColumnFreeList(&(self->columns)); self->asObj = asObj; self->filters = annoFiltersFromAsObject(asObj); -self->columns = annoColumnsFromAsObject(asObj); self->numCols = slCount(asObj->columnList); } void annoStreamerSetRegion(struct annoStreamer *self, char *chrom, uint rStart, uint rEnd) /* Set genomic region for query; if chrom is NULL, position is genome. * Many subclasses should make their own setRegion method that calls this and * configures their data connection to change to the new position. */ { freez(&(self->chrom)); if (chrom == NULL) { self->positionIsGenome = TRUE; self->regionStart = self->regionEnd = 0; } else @@ -49,73 +47,57 @@ } struct annoFilter *annoStreamerGetFilters(struct annoStreamer *self) /* Return supported filters with current settings. Callers can modify and free when done. */ { return annoFilterCloneList(self->filters); } void annoStreamerSetFilters(struct annoStreamer *self, struct annoFilter *newFilters) /* Free old filters and use clone of newFilters. */ { annoFilterFreeList(&(self->filters)); self->filters = annoFilterCloneList(newFilters); } -struct annoColumn *annoStreamerGetColumns(struct annoStreamer *self) -/* Return supported columns with current settings. Callers can modify and free when done. */ -{ -return annoColumnCloneList(self->columns); -} - -void annoStreamerSetColumns(struct annoStreamer *self, struct annoColumn *newColumns) -/* Free old columns and use clone of newColumns. */ -{ -annoColumnFreeList(&(self->columns)); -self->columns = annoColumnCloneList(newColumns); -} - void annoStreamerInit(struct annoStreamer *self, struct annoAssembly *assembly, struct asObject *asObj) /* Initialize a newly allocated annoStreamer with default annoStreamer methods and * default filters and columns based on asObj. * In general, subclasses' constructors will call this first; override nextRow, close, * and probably setRegion; and then initialize their private data. */ { self->assembly = assembly; self->getAutoSqlObject = annoStreamerGetAutoSqlObject; self->setAutoSqlObject = annoStreamerSetAutoSqlObject; self->setRegion = annoStreamerSetRegion; self->getHeader = annoStreamerGetHeader; self->getFilters = annoStreamerGetFilters; self->setFilters = annoStreamerSetFilters; -self->getColumns = annoStreamerGetColumns; -self->setColumns = annoStreamerSetColumns; self->positionIsGenome = TRUE; self->setAutoSqlObject(self, asObj); } void annoStreamerFree(struct annoStreamer **pSelf) /* Free self. This should be called at the end of subclass close methods, after * subclass-specific connections are closed and resources are freed. */ { if (pSelf == NULL) return; struct annoStreamer *self = *pSelf; freez(&(self->chrom)); annoFilterFreeList(&(self->filters)); -annoColumnFreeList(&(self->columns)); freez(pSelf); } INLINE boolean findColumn(struct asColumn *columns, char *name, int *retIx, char **retName) /* Scan columns for name. * If found, set retIx to column index, set retName to clone of name, and return TRUE. * If not found, set retIx to -1, set retName to NULL, and return FALSE; */ { int ix = asColumnFindIx(columns, name); if (retIx != NULL) *retIx = ix; if (retName != NULL) { if (ix >= 0) *retName = cloneString(name);