bpp-core3  3.0.0
bpp::StdStr Class Reference

String output stream. More...

#include <Bpp/Io/OutputStream.h>

+ Inheritance diagram for bpp::StdStr:
+ Collaboration diagram for bpp::StdStr:

Public Member Functions

 StdStr ()
 
std::string str () const
 
 ~StdStr ()
 
StlOutputStreamWrapperoperator<< (const std::string &message)
 
StlOutputStreamWrapperoperator<< (const char *message)
 
StlOutputStreamWrapperoperator<< (const char &message)
 
StlOutputStreamWrapperoperator<< (const int &message)
 
StlOutputStreamWrapperoperator<< (const unsigned int &message)
 
StlOutputStreamWrapperoperator<< (const long int &message)
 
StlOutputStreamWrapperoperator<< (const unsigned long int &message)
 
StlOutputStreamWrapperoperator<< (const double &message)
 
StlOutputStreamWrapperoperator<< (const long double &message)
 
StlOutputStreamWrapperoperator<< (const bool &message)
 
StlOutputStreamWrapperendLine ()
 
StlOutputStreamWrapperflush ()
 
StlOutputStreamWrapperclone () const
 Create a copy of this object and send a pointer to it. More...
 
OutputStreamsetPrecision (int digit)
 
int getPrecision () const
 
virtual OutputStreamenableScientificNotation (bool yn)
 
virtual bool isScientificNotationEnabled () const
 

Protected Attributes

std::ostream * stream_
 

Private Attributes

int precision_
 
bool scienceNotation_
 

Detailed Description

String output stream.

This class wraps the std::ostringstream stream.

Definition at line 315 of file OutputStream.h.

Constructor & Destructor Documentation

◆ StdStr()

bpp::StdStr::StdStr ( )
inline

Definition at line 319 of file OutputStream.h.

◆ ~StdStr()

bpp::StdStr::~StdStr ( )
inline

Definition at line 323 of file OutputStream.h.

References bpp::StlOutputStreamWrapper::stream_.

Member Function Documentation

◆ clone()

StlOutputStreamWrapper* bpp::StlOutputStreamWrapper::clone ( ) const
inlinevirtualinherited

Create a copy of this object and send a pointer to it.

Returns
A pointer toward the copy object.

Implements bpp::OutputStream.

Definition at line 240 of file OutputStream.h.

References bpp::StlOutputStreamWrapper::StlOutputStreamWrapper().

◆ enableScientificNotation()

virtual OutputStream& bpp::AbstractOutputStream::enableScientificNotation ( bool  yn)
inlinevirtualinherited

Implements bpp::OutputStream.

Definition at line 117 of file OutputStream.h.

References bpp::AbstractOutputStream::scienceNotation_.

◆ endLine()

StlOutputStreamWrapper& bpp::StlOutputStreamWrapper::endLine ( )
inlinevirtualinherited

Implements bpp::OutputStream.

Definition at line 237 of file OutputStream.h.

References bpp::StlOutputStreamWrapper::stream_.

◆ flush()

StlOutputStreamWrapper& bpp::StlOutputStreamWrapper::flush ( )
inlinevirtualinherited

Implements bpp::OutputStream.

Definition at line 238 of file OutputStream.h.

References bpp::StlOutputStreamWrapper::stream_.

◆ getPrecision()

int bpp::AbstractOutputStream::getPrecision ( ) const
inlinevirtualinherited

◆ isScientificNotationEnabled()

virtual bool bpp::AbstractOutputStream::isScientificNotationEnabled ( ) const
inlinevirtualinherited

◆ operator<<() [1/10]

StlOutputStreamWrapper& bpp::StlOutputStreamWrapper::operator<< ( const bool &  message)
inlinevirtualinherited

Implements bpp::OutputStream.

Definition at line 236 of file OutputStream.h.

References bpp::StlOutputStreamWrapper::stream_.

◆ operator<<() [2/10]

StlOutputStreamWrapper& bpp::StlOutputStreamWrapper::operator<< ( const char &  message)
inlinevirtualinherited

Implements bpp::OutputStream.

Definition at line 218 of file OutputStream.h.

References bpp::StlOutputStreamWrapper::stream_.

◆ operator<<() [3/10]

StlOutputStreamWrapper& bpp::StlOutputStreamWrapper::operator<< ( const char *  message)
inlinevirtualinherited

Implements bpp::OutputStream.

Definition at line 217 of file OutputStream.h.

References bpp::StlOutputStreamWrapper::stream_.

◆ operator<<() [4/10]

StlOutputStreamWrapper& bpp::StlOutputStreamWrapper::operator<< ( const double &  message)
inlinevirtualinherited

◆ operator<<() [5/10]

StlOutputStreamWrapper& bpp::StlOutputStreamWrapper::operator<< ( const int &  message)
inlinevirtualinherited

Implements bpp::OutputStream.

Definition at line 219 of file OutputStream.h.

References bpp::StlOutputStreamWrapper::stream_.

◆ operator<<() [6/10]

StlOutputStreamWrapper& bpp::StlOutputStreamWrapper::operator<< ( const long double &  message)
inlinevirtualinherited

◆ operator<<() [7/10]

StlOutputStreamWrapper& bpp::StlOutputStreamWrapper::operator<< ( const long int &  message)
inlinevirtualinherited

Implements bpp::OutputStream.

Definition at line 222 of file OutputStream.h.

References bpp::StlOutputStreamWrapper::stream_.

◆ operator<<() [8/10]

StlOutputStreamWrapper& bpp::StlOutputStreamWrapper::operator<< ( const std::string &  message)
inlinevirtualinherited

Implements bpp::OutputStream.

Definition at line 216 of file OutputStream.h.

References bpp::StlOutputStreamWrapper::stream_.

◆ operator<<() [9/10]

StlOutputStreamWrapper& bpp::StlOutputStreamWrapper::operator<< ( const unsigned int &  message)
inlinevirtualinherited

Implements bpp::OutputStream.

Definition at line 220 of file OutputStream.h.

References bpp::StlOutputStreamWrapper::stream_.

◆ operator<<() [10/10]

StlOutputStreamWrapper& bpp::StlOutputStreamWrapper::operator<< ( const unsigned long int &  message)
inlinevirtualinherited

Implements bpp::OutputStream.

Definition at line 223 of file OutputStream.h.

References bpp::StlOutputStreamWrapper::stream_.

◆ setPrecision()

OutputStream& bpp::AbstractOutputStream::setPrecision ( int  digit)
inlinevirtualinherited

Implements bpp::OutputStream.

Definition at line 110 of file OutputStream.h.

References bpp::AbstractOutputStream::precision_.

◆ str()

std::string bpp::StdStr::str ( ) const
inline

Definition at line 321 of file OutputStream.h.

References str(), and bpp::StlOutputStreamWrapper::stream_.

Referenced by str().

Member Data Documentation

◆ precision_

int bpp::AbstractOutputStream::precision_
privateinherited

◆ scienceNotation_

bool bpp::AbstractOutputStream::scienceNotation_
privateinherited

◆ stream_

std::ostream* bpp::StlOutputStreamWrapper::stream_
protectedinherited

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