bpp-seq  2.2.0
bpp::OSequence Class Referenceabstract

The OSequence interface. More...

#include <Bpp/Seq/Io/OSequence.h>

+ Inheritance diagram for bpp::OSequence:
+ Collaboration diagram for bpp::OSequence:

Public Member Functions

 OSequence ()
 
virtual ~OSequence ()
 
virtual void writeSequences (std::ostream &output, const SequenceContainer &sc) const =0 throw (Exception)
 Write a container to a stream. More...
 
virtual void writeSequences (const std::string &path, const SequenceContainer &sc, bool overwrite) const =0 throw (Exception)
 Write a container to a file. More...
 
const std::string getDataType () const
 

Detailed Description

The OSequence interface.

This interface defines the basic methods for writing sequences to a file.

Definition at line 58 of file OSequence.h.

Constructor & Destructor Documentation

◆ OSequence()

bpp::OSequence::OSequence ( )
inline

Definition at line 62 of file OSequence.h.

◆ ~OSequence()

virtual bpp::OSequence::~OSequence ( )
inlinevirtual

Definition at line 63 of file OSequence.h.

Member Function Documentation

◆ getDataType()

const std::string bpp::IOSequence::getDataType ( ) const
inlineinherited

Definition at line 65 of file IoSequence.h.

◆ writeSequences() [1/2]

virtual void bpp::OSequence::writeSequences ( std::ostream &  output,
const SequenceContainer sc 
) const
throw (Exception
)
pure virtual

Write a container to a stream.

Parameters
outputThe output stream where to write.
scThe container to write.
Exceptions
ExceptionIf the file is not in the specified format.

Implemented in bpp::Mase, bpp::Fasta, and bpp::AbstractOSequence.

◆ writeSequences() [2/2]

virtual void bpp::OSequence::writeSequences ( const std::string &  path,
const SequenceContainer sc,
bool  overwrite 
) const
throw (Exception
)
pure virtual

Write a container to a file.

Parameters
pathThe path to the file to write.
scThe container to write.
overwriteIf true the sequences are written at the beginning of the file instead of being appended. Any previous content will be lost.
Exceptions
ExceptionIf the file is not in the specified format.

Implemented in bpp::Mase, bpp::Fasta, and bpp::AbstractOSequence.


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