/* sangInsert.h was originally generated by the autoSql program, which also 
 * generated sangInsert.c and sangInsert.sql.  This header links the database and the RAM 
 * representation of objects. */

#ifndef SANGINSERT_H
#define SANGINSERT_H

struct sangInsert
/* Information on a Sanger O+O insert */
    {
    struct sangInsert *next;  /* Next in singly linked list. */
    char id[8];	/* Ascii representation of a number that's uniq ID for insert */
    char name[6];	/* Full name of insert range */
    };

void sangInsertStaticLoad(char **row, struct sangInsert *ret);
/* Load a row from sangInsert table into ret.  The contents of ret will
 * be replaced at the next call to this function. */

struct sangInsert *sangInsertLoad(char **row);
/* Load a sangInsert from row fetched with select * from sangInsert
 * from database.  Dispose of this with sangInsertFree(). */

struct sangInsert *sangInsertCommaIn(char **pS, struct sangInsert *ret);
/* Create a sangInsert out of a comma separated string. 
 * This will fill in ret if non-null, otherwise will
 * return a new sangInsert */

void sangInsertFree(struct sangInsert **pEl);
/* Free a single dynamically allocated sangInsert such as created
 * with sangInsertLoad(). */

void sangInsertFreeList(struct sangInsert **pList);
/* Free a list of dynamically allocated sangInsert's */

void sangInsertOutput(struct sangInsert *el, FILE *f, char sep, char lastSep);
/* Print out sangInsert.  Separate fields with sep. Follow last field with lastSep. */

#define sangInsertTabOut(el,f) sangInsertOutput(el,f,'\t','\n');
/* Print out sangInsert as a line in a tab-separated file. */

#define sangInsertCommaOut(el,f) sangInsertOutput(el,f,',',',');
/* Print out sangInsert as a comma separated list including final comma. */

#endif /* SANGINSERT_H */

