ARB
seqio.hxx
Go to the documentation of this file.
1 // ============================================================= //
2 // //
3 // File : seqio.hxx //
4 // Purpose : //
5 // //
6 // Institute of Microbiology (Technical University Munich) //
7 // http://www.arb-home.de/ //
8 // //
9 // ============================================================= //
10 
11 #ifndef SEQIO_HXX
12 #define SEQIO_HXX
13 
14 #ifndef ARBDB_BASE_H
15 #include <arbdb_base.h>
16 #endif
17 #ifndef ARB_MSG_H
18 #include <arb_msg.h>
19 #endif
20 #ifndef SMARTPTR_H
21 #include <smartptr.h>
22 #endif
23 
24 class AP_filter;
25 
26 namespace SEQIO {
27 
28  enum ExportWhich {
31  EBF_ONE, // export explicitely specified species
32  };
33 
34  inline void appendTo(char*& content, char sep, char*& toAppend) {
35  if (content) {
36  freeset(content, GBS_global_string_copy("%s%c%s", content, sep, toAppend));
37  freenull(toAppend);
38  }
39  else {
40  reassign(content, toAppend);
41  }
42  }
43 
44  bool read_string_pair(FILE *in, char *&s1, char *&s2, size_t& lineNr);
45  char *fgets_smartLF(char *s, int size, FILE *stream);
46 
47  GB_ERROR export_by_format(GBDATA *gb_main, ExportWhich which, const char *one_species,
48  AP_filter *filter, int cut_stop_codon, int compress,
49  const char *dbname, const char *formname, const char *field_transfer_set,
50  const char *outname, int multiple, char **real_outname);
51 
53  SmartCharPtr suffix; // default output file suffix (optional)
54  SmartCharPtr description; // description (optional)
55  };
56 
57  GB_ERROR get_exportFormat_information(const char *eft_formname, ExportFormatInfo& info);
58  char *get_exportFormat_evalForm(const char *eft_formname, GB_ERROR& error);
59 };
60 
61 #else
62 #error seqio.hxx included twice
63 #endif // SEQIO_HXX
ExportWhich
Definition: seqio.hxx:28
const char * GB_ERROR
Definition: arb_core.h:25
bool read_string_pair(FILE *in, char *&s1, char *&s2, size_t &lineNr)
Definition: seqio.cxx:37
SmartCharPtr description
Definition: seqio.hxx:54
static void error(const char *msg)
Definition: mkptypes.cxx:96
GB_ERROR get_exportFormat_information(const char *eft_formname, ExportFormatInfo &info)
Definition: seq_export.cxx:812
GB_ERROR export_by_format(GBDATA *gb_main, ExportWhich which, const char *one_species, AP_filter *filter, int cut_stop_codon, int compress, const char *dbname, const char *formname, const char *field_transfer_set, const char *outname, int multiple, char **real_outname)
Definition: seq_export.cxx:763
void appendTo(char *&content, char sep, char *&toAppend)
Definition: seqio.hxx:34
SmartCharPtr suffix
Definition: seqio.hxx:53
const struct formatTable formname[]
char * get_exportFormat_evalForm(const char *eft_formname, GB_ERROR &error)
Definition: seq_export.cxx:830
GBDATA * gb_main
Definition: adname.cxx:32
char * fgets_smartLF(char *s, int size, FILE *stream)
Definition: seqio.cxx:19
static int info[maxsites+1]
char * GBS_global_string_copy(const char *templat,...)
Definition: arb_msg.cxx:194
GB_write_int const char s
Definition: AW_awar.cxx:154