bpp-core3  3.0.0
bpp::StlOutputStreamWrapper Class Reference

STL wrapper for output stream. More...

#include <Bpp/Io/OutputStream.h>

+ Inheritance diagram for bpp::StlOutputStreamWrapper:
+ Collaboration diagram for bpp::StlOutputStreamWrapper:

Public Member Functions

 StlOutputStreamWrapper (std::ostream *stream)
 
 StlOutputStreamWrapper (const StlOutputStreamWrapper &stlos)
 
StlOutputStreamWrapperoperator= (const StlOutputStreamWrapper &stlos)
 
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

STL wrapper for output stream.

This class wraps the std::ostream class, by forwarding to the STL class. It does not own the STL stream and won't delete it.

Definition at line 204 of file OutputStream.h.

Constructor & Destructor Documentation

◆ StlOutputStreamWrapper() [1/2]

bpp::StlOutputStreamWrapper::StlOutputStreamWrapper ( std::ostream *  stream)
inline

Definition at line 211 of file OutputStream.h.

Referenced by clone().

◆ StlOutputStreamWrapper() [2/2]

bpp::StlOutputStreamWrapper::StlOutputStreamWrapper ( const StlOutputStreamWrapper stlos)
inline

Definition at line 212 of file OutputStream.h.

Member Function Documentation

◆ clone()

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

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 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 ( )
inlinevirtual

Implements bpp::OutputStream.

Definition at line 237 of file OutputStream.h.

References stream_.

◆ flush()

StlOutputStreamWrapper& bpp::StlOutputStreamWrapper::flush ( )
inlinevirtual

Implements bpp::OutputStream.

Definition at line 238 of file OutputStream.h.

References 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)
inlinevirtual

Implements bpp::OutputStream.

Definition at line 236 of file OutputStream.h.

References stream_.

◆ operator<<() [2/10]

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

Implements bpp::OutputStream.

Definition at line 218 of file OutputStream.h.

References stream_.

◆ operator<<() [3/10]

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

Implements bpp::OutputStream.

Definition at line 217 of file OutputStream.h.

References stream_.

◆ operator<<() [4/10]

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

◆ operator<<() [5/10]

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

Implements bpp::OutputStream.

Definition at line 219 of file OutputStream.h.

References stream_.

◆ operator<<() [6/10]

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

◆ operator<<() [7/10]

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

Implements bpp::OutputStream.

Definition at line 222 of file OutputStream.h.

References stream_.

◆ operator<<() [8/10]

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

Implements bpp::OutputStream.

Definition at line 216 of file OutputStream.h.

References stream_.

◆ operator<<() [9/10]

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

Implements bpp::OutputStream.

Definition at line 220 of file OutputStream.h.

References stream_.

◆ operator<<() [10/10]

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

Implements bpp::OutputStream.

Definition at line 223 of file OutputStream.h.

References stream_.

◆ operator=()

StlOutputStreamWrapper& bpp::StlOutputStreamWrapper::operator= ( const StlOutputStreamWrapper stlos)
inline

Definition at line 213 of file OutputStream.h.

References stream_.

◆ setPrecision()

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

Implements bpp::OutputStream.

Definition at line 110 of file OutputStream.h.

References bpp::AbstractOutputStream::precision_.

Member Data Documentation

◆ precision_

int bpp::AbstractOutputStream::precision_
privateinherited

◆ scienceNotation_

bool bpp::AbstractOutputStream::scienceNotation_
privateinherited

◆ stream_

std::ostream* bpp::StlOutputStreamWrapper::stream_
protected

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