46 if (inType ==
EMBL)
return dynamic_cast<const Embl&
>(in);
52 case GENBANK: ok =
gtoe(dynamic_cast<const GenBank&>(in), dynamic_cast<Embl&>(*embl), seq);
break;
53 case MACKE: ok =
mtoe(dynamic_cast<const Macke&>(in), dynamic_cast<Embl&>(*embl), seq);
break;
59 return dynamic_cast<const Embl&
>(*embl);
65 if (inType ==
GENBANK)
return dynamic_cast<const GenBank&
>(in);
71 case EMBL: ok =
etog(dynamic_cast<const Embl&>(in), dynamic_cast<GenBank&>(*gbk), seq);
break;
72 case MACKE: ok =
mtog(dynamic_cast<const Macke&>(in), dynamic_cast<GenBank&>(*gbk), seq);
break;
78 return dynamic_cast<const GenBank&
>(*gbk);
84 if (inType ==
MACKE)
return dynamic_cast<const Macke&
>(in);
90 case EMBL: ok =
etom(dynamic_cast<const Embl&>(in), dynamic_cast<Macke&>(*macke), seq);
break;
91 case GENBANK: ok =
gtom(dynamic_cast<const GenBank&>(in), dynamic_cast<Macke&>(*macke));
break;
97 return dynamic_cast<const Macke&
>(*macke);
101 const Embl& embl = data.
to_embl(seq);
112 const Macke& macke = data.
to_macke(seq);
134 for (
int phase = 0; phase<3; ++phase) {
138 if (!reader->read_one_entry(seq))
break;
156 throw_error(30,
"Input file and output file must be different file");
158 bool converted =
true;
159 switch (out.
type()) {
179 if (!reader->read_one_entry(seq))
break;
187 write.expect_written();
197 default: converted =
false;
break;
int mtog(const Macke &macke, GenBank &gbk, const Seq &seq)
void macke_seq_display_out(const Macke &macke, Writer &write, Format inType, bool first_sequence)
void genbank_out(const GenBank &gbk, const Seq &seq, Writer &write)
void out(char ch) FINAL_OVERRIDE
int gtom(const GenBank &gbk, Macke &macke)
const Macke & to_macke(const Seq &seq) const
void embl_out(const Embl &embl, const Seq &seq, Writer &write)
static void write_to_macke(FileWriter &write, const ConvertibleData &data, const Seq &seq, int phase, bool first)
void macke_seq_data_out(const Seq &seq, const Macke &macke, Writer &write)
void to_gcg(const FormattedFile &in, const char *outf)
void convert(const FormattedFile &in, const FormattedFile &out)
int mtoe(const Macke &macke, Embl &embl, const Seq &seq)
void throw_conversion_not_implemented(Format inType, Format ouType)
bool isNull() const
test if SmartPtr is NULp
static void write_to_embl(FileWriter &write, const ConvertibleData &data, const Seq &seq)
void to_paup(const FormattedFile &in, const char *outf)
int etom(const Embl &embl, Macke &macke, const Seq &seq)
void macke_out_header(Writer &write)
void to_phylip(const FormattedFile &in, const char *outf, bool for_fastdnaml)
const Embl & to_embl(const Seq &seq) const
static void write_to_genbank(FileWriter &write, const ConvertibleData &data, const Seq &seq)
int gtoe(const GenBank &gbk, Embl &embl, const Seq &seq)
void throw_conversion_failure(Format inType, Format ouType)
void throw_unsupported_input_format(Format inType)
void throw_conversion_not_supported(Format inType, Format ouType)
void to_printable(const FormattedFile &in, const char *outf)
void throw_error(int error_num, const char *error_message) __ATTR__NORETURN
CONSTEXPR_INLINE bool str_equal(const char *s1, const char *s2)
static void to_macke(const FormattedFile &in, const char *outf)
const GenBank & to_genbank(const Seq &seq) const
ConvertibleData(const InputFormat &in_)
void macke_seq_info_out(const Macke &macke, Writer &write)
int etog(const Embl &embl, GenBank &gbk, const Seq &seq)