0e594d3b2ff344384b4cd9c24761fe2f5ec79a1e Merge parents 3df0f0e 37a5223 tdreszer Thu Nov 10 09:40:02 2011 -0800 merge-o-matic mania diff --cc src/hg/inc/trackDb.h index 17331ec,20a477a..600c181 --- src/hg/inc/trackDb.h +++ src/hg/inc/trackDb.h @@@ -235,51 -234,38 +235,50 @@@ // Is this trackDb struct marked as a child of a composite or multiTrack ? { return tdb && tdb->parent && CONTAINER_CHILD_NODE(tdb->treeNodeType); } #define tdbIsSubtrack(tdb) tdbIsContainerChild(tdb) INLINE struct trackDb *tdbGetContainer(struct trackDb *tdb) // Return closest ancestor who is a container track. { struct trackDb *parent = tdb->parent; for ( ; parent != NULL && !tdbIsContainer(parent); parent = parent->parent) ; return parent; } +// Solo (or stand alone) tracks are non-containers which may only be contained by folders +INLINE boolean tdbIsSoloTrack(struct trackDb *tdb) +// Is this trackDb struct marked as a solo so it should have data +{ +return tdb && SOLO_NODE(tdb->treeNodeType); +} +#define tdbIsStandAlone(tdb) tdbIsSoloTrack(tdb) + +// TrackUi Top level means composite, multitrack or solo +// These are not folders, views or subtracks. +#define tdbIsTrackUiTopLevel(tdb) (tdbIsContainer(tdb) || tdbIsSoloTrack(tdb)) + #define DOWNLOADS_ONLY_TYPE "downloadsOnly" INLINE boolean tdbIsDownloadsOnly(struct trackDb *tdb) // Is this a downloadsOnly tdb { return (tdb && sameWord(tdb->type,DOWNLOADS_ONLY_TYPE)); } - struct trackDb *trackDbLoad(char **row); /* Load a trackDb from row fetched with select * from trackDb * from database. Dispose of this with trackDbFree(). */ struct trackDb *trackDbLoadAll(char *fileName); /* Load all trackDb from whitespace-separated file. * Dispose of this with trackDbFreeList(). */ struct trackDb *trackDbLoadWhere(struct sqlConnection *conn, char *table, char *where); /* Load all trackDb from table that satisfy where clause. The * where clause may be NULL in which case whole table is loaded * Dispose of this with trackDbFreeList(). */ struct trackDb *trackDbLoadAllByChar(char *fileName, char chopper);