bpp-phyl  2.2.0
bpp::OTree Class Referenceabstract

General interface for tree writers. More...

#include <Bpp/Phyl/Io/IoTree.h>

+ Inheritance diagram for bpp::OTree:
+ Collaboration diagram for bpp::OTree:

Public Member Functions

 OTree ()
 
virtual ~OTree ()
 
virtual void write (const Tree &tree, const std::string &path, bool overwrite) const =0 throw (Exception)
 Write a tree to a file. More...
 
virtual void write (const Tree &tree, std::ostream &out) const =0 throw (Exception)
 Write a tree to a stream. More...
 
virtual const std::string getDataType () const
 

Detailed Description

General interface for tree writers.

Definition at line 103 of file IoTree.h.

Constructor & Destructor Documentation

◆ OTree()

bpp::OTree::OTree ( )
inline

Definition at line 107 of file IoTree.h.

◆ ~OTree()

virtual bpp::OTree::~OTree ( )
inlinevirtual

Definition at line 108 of file IoTree.h.

Member Function Documentation

◆ getDataType()

virtual const std::string bpp::IOTree::getDataType ( ) const
inlinevirtualinherited

Definition at line 68 of file IoTree.h.

◆ write() [1/2]

virtual void bpp::OTree::write ( const Tree tree,
const std::string &  path,
bool  overwrite 
) const
throw (Exception
)
pure virtual

Write a tree to a file.

Parameters
treeA tree object.
pathThe file path.
overwriteTell if existing file must be overwritten. Otherwise append to the file.
Exceptions
ExceptionIf an error occured.

Implemented in bpp::Nhx, bpp::AbstractOTree, bpp::Newick, and bpp::NexusIOTree.

Referenced by bpp::PhylogeneticsApplicationTools::writeTree().

◆ write() [2/2]

virtual void bpp::OTree::write ( const Tree tree,
std::ostream &  out 
) const
throw (Exception
)
pure virtual

Write a tree to a stream.

Parameters
treeA tree object.
outThe output stream.
Exceptions
ExceptionIf an error occured.

Implemented in bpp::Nhx, bpp::AbstractOTree, bpp::Newick, and bpp::NexusIOTree.


The documentation for this class was generated from the following file: