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

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

#ifndef ECATTRIBUTECODE_H
#define ECATTRIBUTECODE_H

#define ECATTRIBUTECODE_NUM_COLS 2

struct ecAttributeCode
/* Enzyme Commission (EC) Attribute code */
    {
    struct ecAttributeCode *next;  /* Next in singly linked list. */
    char type[3];	/* attribute type */
    char *description;	/* EC attribute code description */
    };

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

struct ecAttributeCode *ecAttributeCodeLoad(char **row);
/* Load a ecAttributeCode from row fetched with select * from ecAttributeCode
 * from database.  Dispose of this with ecAttributeCodeFree(). */

struct ecAttributeCode *ecAttributeCodeLoadAll(char *fileName);
/* Load all ecAttributeCode from whitespace-separated file.
 * Dispose of this with ecAttributeCodeFreeList(). */

struct ecAttributeCode *ecAttributeCodeLoadAllByChar(char *fileName, char chopper);
/* Load all ecAttributeCode from chopper separated file.
 * Dispose of this with ecAttributeCodeFreeList(). */

#define ecAttributeCodeLoadAllByTab(a) ecAttributeCodeLoadAllByChar(a, '\t');
/* Load all ecAttributeCode from tab separated file.
 * Dispose of this with ecAttributeCodeFreeList(). */

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

void ecAttributeCodeFree(struct ecAttributeCode **pEl);
/* Free a single dynamically allocated ecAttributeCode such as created
 * with ecAttributeCodeLoad(). */

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

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

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

#define ecAttributeCodeCommaOut(el,f) ecAttributeCodeOutput(el,f,',',',');
/* Print out ecAttributeCode as a comma separated list including final comma. */

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

#endif /* ECATTRIBUTECODE_H */

