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)
 
char first_non_ascii_char (const char *label)
 
static GB_ERROR export_tree_label (const char *label, FILE *out, LabelQuoting qmode)
 
void indentTo (int indent, FILE *out)
 
static GB_ERROR export_tree_node_print (GBDATA *gb_main, FILE *out, TreeNode *tree, const char *tree_name, bool pretty, int indent, const TreeLabeler &labeler, bool save_branchlengths, bool save_bootstraps, bool save_groupnames, LabelQuoting 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 TreeLabeler &labeler, 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 TreeLabeler &labeler, 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 TreeLabeler &labeler, bool save_branchlengths, bool save_bootstraps, bool save_groupnames, bool pretty, LabelQuoting 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().

char first_non_ascii_char ( const char label)
inline

Definition at line 40 of file TreeWrite.cxx.

Referenced by export_tree_label().

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

Definition at line 123 of file TreeWrite.cxx.

Referenced by export_tree_node_print().

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

Definition at line 200 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 TreeLabeler labeler,
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 TreeLabeler labeler,
bool  skip_folded,
const char path 
)
static char* complete_newick_comment ( const char comment)
static

Definition at line 323 of file TreeWrite.cxx.

References GBS_strstruct::put(), GBS_strstruct::release(), and tree_assert.

Referenced by TREE_write_Newick().

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 
)
static void export_tree_node_print_remove ( char str)
static

Definition at line 418 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 
)