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

/* Copyright (C) 2006 The Regents of the University of California 
 * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */

#ifndef GBEXTFILE_H
#define GBEXTFILE_H

#define GBEXTFILE_NUM_COLS 3

struct gbExtFile
/* gbExtFile */
    {
    struct gbExtFile *next;  /* Next in singly linked list. */
    unsigned id;	/* id */
    char *path;	/* path */
    unsigned size;	/* size */
    };

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

struct gbExtFile *gbExtFileLoad(char **row);
/* Load a gbExtFile from row fetched with select * from gbExtFile
 * from database.  Dispose of this with gbExtFileFree(). */

struct gbExtFile *gbExtFileLoadAll(char *fileName);
/* Load all gbExtFile from whitespace-separated file.
 * Dispose of this with gbExtFileFreeList(). */

struct gbExtFile *gbExtFileLoadAllByChar(char *fileName, char chopper);
/* Load all gbExtFile from chopper separated file.
 * Dispose of this with gbExtFileFreeList(). */

#define gbExtFileLoadAllByTab(a) gbExtFileLoadAllByChar(a, '\t');
/* Load all gbExtFile from tab separated file.
 * Dispose of this with gbExtFileFreeList(). */

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

void gbExtFileFree(struct gbExtFile **pEl);
/* Free a single dynamically allocated gbExtFile such as created
 * with gbExtFileLoad(). */

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

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

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

#define gbExtFileCommaOut(el,f) gbExtFileOutput(el,f,',',',');
/* Print out gbExtFile as a comma separated list including final comma. */

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

#endif /* GBEXTFILE_H */

