static void aftFormatOne(struct annoFormatter *vSelf, struct annoStreamRows *primaryData, struct annoStreamRows *gratorData, int gratorCount) /* Print out tab-separated columns that we have gathered in prior calls to aftCollect, * and start over fresh for the next line of output. */ { struct annoFormatTab *self = (struct annoFormatTab *)vSelf; // Got one row from primary; what's the largest # of rows from any grator? int maxRows = 1; int iG; for (iG = 0; iG < gratorCount; iG++) { int gratorRowCount = slCount(gratorData[iG].rowList); if (gratorRowCount > maxRows) maxRows = gratorRowCount; } // Print out enough rows to make sure that all grator rows are included. int iR; for (iR = 0; iR < maxRows; iR++) { printColumns(self, primaryData->streamer, primaryData->rowList, TRUE); for (iG = 0; iG < gratorCount; iG++) { struct annoRow *gratorRow = slElementFromIx(gratorData[iG].rowList, iR); printColumns(self, gratorData[iG].streamer, gratorRow, FALSE); } fputc('\n', self->f); } }
string Table::printSelf(){ ostringstream stringForConversion; ostringstream stringForConversion2; string s = getTableName() + ", "; stringForConversion << columnCount(); s += stringForConversion.str() + ", "; stringForConversion2 << rowCount(); s += stringForConversion2.str() + "; "; s += printColumns(); return s; }