// ============================================================ //
//                                                              //
//   File      : TreeWrite.h                                    //
//   Purpose   :                                                //
//                                                              //
//   Institute of Microbiology (Technical University Munich)    //
//   www.arb-home.de                                            //
//                                                              //
// ============================================================ //

#ifndef TREEWRITE_H
#define TREEWRITE_H

#ifndef NDS_H
#include <nds.h>
#endif

enum LabelQuoting {
    LABEL_DISALLOW_QUOTES = 0, // don't use quotes
    LABEL_SINGLE_QUOTES   = 1, // use single quotes
    LABEL_DOUBLE_QUOTES   = 2, // use double quotes

    LABEL_FORCE_QUOTES  = 4, // force usage of quotes
    LABEL_FORCE_REPLACE = 8, // replace all problematic characters (default is to replace quotes in quoted labels)

    LABEL_ACCEPT_NON_ASCII = 16, // accept non-ASCII characters in export
};

GB_ERROR TREE_write_Newick(GBDATA *gb_main, const char *tree_name, const TreeLabeler& labeler, bool save_branchlengths, bool save_bootstraps, bool save_groupnames, bool pretty, LabelQuoting quoteMode, const char *path);
GB_ERROR TREE_write_XML(GBDATA *gb_main, const char *db_name, const char *tree_name, const TreeLabeler& labeler, bool skip_folded, const char *path);
GB_ERROR TREE_export_tree(GBDATA *gb_main, FILE *out, TreeNode *tree, bool triple_root, bool export_branchlens, bool use_double_quotes);

#else
#error TreeWrite.h included twice
#endif // TREEWRITE_H
