bpp-phyl  2.2.0
bpp::AbstractOTree Class Referenceabstract

Partial implementation of the OTree interface. More...

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

+ Inheritance diagram for bpp::AbstractOTree:
+ Collaboration diagram for bpp::AbstractOTree:

Public Member Functions

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

Detailed Description

Partial implementation of the OTree interface.

Definition at line 156 of file IoTree.h.

Constructor & Destructor Documentation

◆ AbstractOTree()

bpp::AbstractOTree::AbstractOTree ( )
inline

Definition at line 160 of file IoTree.h.

◆ ~AbstractOTree()

virtual bpp::AbstractOTree::~AbstractOTree ( )
inlinevirtual

Definition at line 161 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]

void bpp::AbstractOTree::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.

Implements bpp::OTree.

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

Referenced by bpp::NexusIOTree::write(), bpp::Newick::write(), write(), and bpp::Nhx::write().

◆ write() [2/2]

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

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.

Implements bpp::OTree.

Reimplemented in bpp::Nhx, bpp::Newick, and bpp::NexusIOTree.

Definition at line 165 of file IoTree.h.

References write().


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