ARB
Macros | Functions
TreeWrite.cxx File Reference
#include <TreeWrite.h>
#include <TreeNode.h>
#include <arb_strbuf.h>
#include <arb_file.h>
#include <xml.hxx>
Include dependency graph for TreeWrite.cxx:

Go to the source code of this file.

Macros

#define tree_assert(cond)   arb_assert(cond)
 

Functions

void replace_by_underscore (char *str, const char *toReplace)
 
bool isQuoteChar (char c)
 
bool whole_label_quoted (const char *label, size_t length)
 
static void export_tree_label (const char *label, FILE *out, TREE_node_quoting qmode)
 
void indentTo (int indent, FILE *out)
 
static const charexport_tree_node_print (GBDATA *gb_main, FILE *out, TreeNode *tree, const char *tree_name, bool pretty, int indent, const TREE_node_text_gen *node_gen, bool save_branchlengths, bool save_bootstraps, bool save_groupnames, TREE_node_quoting qmode)
 
string buildNodeIdentifier (const string &parent_id, int &son_counter)
 
static const charexport_tree_node_print_xml (GBDATA *gb_main, TreeNode *tree, double my_length, const char *tree_name, const TREE_node_text_gen *node_gen, bool skip_folded, const string &parent_id, int &parent_son_counter)
 
GB_ERROR TREE_write_XML (GBDATA *gb_main, const char *db_name, const char *tree_name, const TREE_node_text_gen *node_gen, bool skip_folded, const char *path)
 
static charcomplete_newick_comment (const char *comment)
 
GB_ERROR TREE_write_Newick (GBDATA *gb_main, const char *tree_name, const TREE_node_text_gen *node_gen, bool save_branchlengths, bool save_bootstraps, bool save_groupnames, bool pretty, TREE_node_quoting quoteMode, const char *path)
 
static void export_tree_node_print_remove (char *str)
 
static void export_tree_rek (TreeNode *tree, FILE *out, bool export_branchlens, bool dquot)
 
GB_ERROR TREE_export_tree (GBDATA *, FILE *out, TreeNode *tree, bool triple_root, bool export_branchlens, bool dquot)
 

Macro Definition Documentation

#define tree_assert (   cond)    arb_assert(cond)

Function Documentation

void replace_by_underscore ( char str,
const char toReplace 
)
inline

Definition at line 21 of file TreeWrite.cxx.

Referenced by export_tree_label().

bool isQuoteChar ( char  c)
inline

Definition at line 29 of file TreeWrite.cxx.

Referenced by whole_label_quoted().

bool whole_label_quoted ( const char label,
size_t  length 
)
inline

Definition at line 30 of file TreeWrite.cxx.

References isQuoteChar().

Referenced by export_tree_label().

static void export_tree_label ( const char label,
FILE *  out,
TREE_node_quoting  qmode 
)
static
void indentTo ( int  indent,
FILE *  out 
)
inline

Definition at line 93 of file TreeWrite.cxx.

Referenced by export_tree_node_print().

static const char* export_tree_node_print ( GBDATA gb_main,
FILE *  out,
TreeNode tree,
const char tree_name,
bool  pretty,
int  indent,
const TREE_node_text_gen node_gen,
bool  save_branchlengths,
bool  save_bootstraps,
bool  save_groupnames,
TREE_node_quoting  qmode 
)
static
string buildNodeIdentifier ( const string parent_id,
int son_counter 
)
inline

Definition at line 167 of file TreeWrite.cxx.

References GBS_global_string().

Referenced by export_tree_node_print_xml().

static const char* export_tree_node_print_xml ( GBDATA gb_main,
TreeNode tree,
double  my_length,
const char tree_name,
const TREE_node_text_gen node_gen,
bool  skip_folded,
const string parent_id,
int parent_son_counter 
)
static
GB_ERROR TREE_write_XML ( GBDATA gb_main,
const char db_name,
const char tree_name,
const TREE_node_text_gen node_gen,
bool  skip_folded,
const char path 
)
static char* complete_newick_comment ( const char comment)
static

Definition at line 300 of file TreeWrite.cxx.

References GBS_chrcat(), GBS_strclose(), GBS_stropen(), and tree_assert.

Referenced by TREE_write_Newick().

GB_ERROR TREE_write_Newick ( GBDATA gb_main,
const char tree_name,
const TREE_node_text_gen node_gen,
bool  save_branchlengths,
bool  save_bootstraps,
bool  save_groupnames,
bool  pretty,
TREE_node_quoting  quoteMode,
const char path 
)
static void export_tree_node_print_remove ( char str)
static

Definition at line 396 of file TreeWrite.cxx.

Referenced by export_tree_rek().

static void export_tree_rek ( TreeNode tree,
FILE *  out,
bool  export_branchlens,
bool  dquot 
)
static
GB_ERROR TREE_export_tree ( GBDATA ,
FILE *  out,
TreeNode tree,
bool  triple_root,
bool  export_branchlens,
bool  dquot 
)