00001 /* 00002 * libfid - Full-text Index Data structure library 00003 * Copyright (C) 2006, 2007, 2008 Robert Homann 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00018 * MA 02110-1301 USA 00019 */ 00020 00021 #ifndef DBFILES_H 00022 #define DBFILES_H 00023 #include "arrays.h" 00024 /*! 00025 * \brief Information about database file. 00026 * 00027 * This structure is used in conjunction with #fid_Projectfile. It stores 00028 * information about the input files that were used to produce the enhanced 00029 * suffix array project. 00030 */ 00031 typedef struct 00032 { 00033 char *name; /*!<\brief Name of the database file. */ 00034 fid_Uint64 inputfile_length; /*!<\brief Length of the database file. */ 00035 fid_Uint64 sequence_length; /*!<\brief Length of the sequence portion in 00036 * the database file. */ 00037 } fid_DBfileinfo; 00038 00039 /*!\brief An array of database file information structures. */ 00040 fid_DYNARRAY_DECLARE(fid_DBfiles,fid_DBfileinfo); 00041 00042 void fid_dbfiles_free(fid_DBfiles *dbfiles); 00043 int fid_dbfiles_append(fid_DBfiles *dbfiles, char *name, fid_Uint64 inputlen, 00044 fid_Uint64 seqlen, fid_Error *error); 00045 int fid_dbfiles_append_copy(fid_DBfiles *dbfiles, char *name, 00046 fid_Uint64 inputlen, fid_Uint64 seqlen, 00047 fid_Error *error); 00048 int fid_dbfiles_copy(fid_DBfiles *dest, const fid_DBfiles *src, 00049 fid_Error *error); 00050 void fid_dbfiles_dump(const fid_DBfiles *dbfiles, FILE *stream); 00051 #endif /* !DBFILES_H */