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

/* Copyright (C) 2004 The Regents of the University of California 
 * See README in this or parent directory for licensing information. */

#ifndef BACENDALIAS_H
#define BACENDALIAS_H

#define BACENDALIAS_NUM_COLS 3

struct bacEndAlias
/* BAC ends aliases and associated identification numbers */
    {
    struct bacEndAlias *next;  /* Next in singly linked list. */
    char *alias;	/* BAC end read name */
    unsigned identNo;	/* Identification number of BAC End */
    char *acc;	/* GenBank accession for the BAC End */
    };

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

struct bacEndAlias *bacEndAliasLoad(char **row);
/* Load a bacEndAlias from row fetched with select * from bacEndAlias
 * from database.  Dispose of this with bacEndAliasFree(). */

struct bacEndAlias *bacEndAliasLoadAll(char *fileName);
/* Load all bacEndAlias from whitespace-separated file.
 * Dispose of this with bacEndAliasFreeList(). */

struct bacEndAlias *bacEndAliasLoadAllByChar(char *fileName, char chopper);
/* Load all bacEndAlias from chopper separated file.
 * Dispose of this with bacEndAliasFreeList(). */

#define bacEndAliasLoadAllByTab(a) bacEndAliasLoadAllByChar(a, '\t');
/* Load all bacEndAlias from tab separated file.
 * Dispose of this with bacEndAliasFreeList(). */

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

void bacEndAliasFree(struct bacEndAlias **pEl);
/* Free a single dynamically allocated bacEndAlias such as created
 * with bacEndAliasLoad(). */

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

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

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

#define bacEndAliasCommaOut(el,f) bacEndAliasOutput(el,f,',',',');
/* Print out bacEndAlias as a comma separated list including final comma. */

/* -------------------------------- End autoSql Generated Code -------------------------------- */

#endif /* BACENDALIAS_H */

