bpp-core3  3.0.0
bpp::BppOParametrizableFormat Class Reference

Parametrizable output in BppO format. More...

#include <Bpp/Io/BppOParametrizableFormat.h>

+ Inheritance diagram for bpp::BppOParametrizableFormat:
+ Collaboration diagram for bpp::BppOParametrizableFormat:

Public Member Functions

 BppOParametrizableFormat ()
 
virtual ~BppOParametrizableFormat ()
 
const std::string getFormatName () const override
 Get the name of the file format. More...
 
const std::string getFormatDescription () const override
 Get a description of the file format. More...
 
void write (const Parametrizable &parametrizable, OutputStream &out, std::vector< std::string > &writtenNames, bool printComma=false) const override
 Write a Parametrizable to a stream. More...
 
void write (const ParameterAliasable &parametrizable, OutputStream &out, std::map< std::string, std::string > &globalAliases, const std::vector< std::string > &names, std::vector< std::string > &writtenNames, bool printLocalAliases=true, bool printComma=false) const override
 Write a ParameterAliasable to a stream. More...
 
virtual const std::string getDataType () const
 Get the type of data this format deals with. More...
 

Detailed Description

Parametrizable output in BppO format.

Writes a new parametrizable object according to BppO description syntax (see the Bio++ Progam Suite manual for a detailed description of this syntax).

Definition at line 21 of file BppOParametrizableFormat.h.

Constructor & Destructor Documentation

◆ BppOParametrizableFormat()

bpp::BppOParametrizableFormat::BppOParametrizableFormat ( )
inline

Definition at line 25 of file BppOParametrizableFormat.h.

◆ ~BppOParametrizableFormat()

virtual bpp::BppOParametrizableFormat::~BppOParametrizableFormat ( )
inlinevirtual

Definition at line 26 of file BppOParametrizableFormat.h.

Member Function Documentation

◆ getDataType()

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

Get the type of data this format deals with.

Returns
The type of data.

Implements bpp::IOFormat.

Definition at line 27 of file IoParametrizable.h.

◆ getFormatDescription()

const std::string bpp::BppOParametrizableFormat::getFormatDescription ( ) const
inlineoverridevirtual

Get a description of the file format.

Returns
A description of the format implemented.

Implements bpp::IOFormat.

Definition at line 31 of file BppOParametrizableFormat.h.

References write().

◆ getFormatName()

const std::string bpp::BppOParametrizableFormat::getFormatName ( ) const
inlineoverridevirtual

Get the name of the file format.

Returns
The name of the format implemented.

Implements bpp::IOFormat.

Definition at line 29 of file BppOParametrizableFormat.h.

◆ write() [1/2]

void BppOParametrizableFormat::write ( const Parametrizable parametrizable,
OutputStream out,
std::vector< std::string > &  writtenNames,
bool  printComma = false 
) const
overridevirtual

Write a Parametrizable to a stream.

Parameters
parametrizableA Parametrizable object;
outThe output stream;
writtenNamesis the vector of the written parameters so far [in, out];
printCommaboolean if a comma should be written at the beginning of the description.

Implements bpp::OParametrizable.

Definition at line 16 of file BppOParametrizableFormat.cpp.

References bpp::Parametrizable::getParameterNameWithoutNamespace(), bpp::Parametrizable::getParameters(), bpp::OutputStream::getPrecision(), bpp::OutputStream::setPrecision(), and bpp::ParameterList::size().

Referenced by getFormatDescription(), and bpp::BppODiscreteDistributionFormat::writeDiscreteDistribution().

◆ write() [2/2]

void BppOParametrizableFormat::write ( const ParameterAliasable parametrizable,
OutputStream out,
std::map< std::string, std::string > &  globalAliases,
const std::vector< std::string > &  names,
std::vector< std::string > &  writtenNames,
bool  printLocalAliases = true,
bool  printComma = false 
) const
overridevirtual

Write a ParameterAliasable to a stream.

Parameters
parametrizableA ParameterAliasable object;
outThe output stream;
globalAliasesparameters linked to global alias;
namesthe names of the parameters to be written;
writtenNamesis the vector of the written parameters so far [in, out];
printLocalAliasesboolean if local aliases should be written;
printCommaboolean if a comma should be written at the beginning of the description.

Implements bpp::OParametrizable.

Definition at line 41 of file BppOParametrizableFormat.cpp.

References bpp::ParameterList::createSubList(), bpp::ParameterAliasable::getAlias(), bpp::ParameterAliasable::getIndependentParameters(), bpp::Parametrizable::getParameterNameWithoutNamespace(), bpp::OutputStream::getPrecision(), bpp::OutputStream::setPrecision(), and bpp::ParameterList::size().


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