Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::LogStream Class Reference

Stream buffer helper for formatted logging output. More...

#include <logger.h>

Public Member Functions

 LogStream ()
 Constructs a log stream with default formatting options.
 LogStream (const LogStream &)=delete
 Copy constructor deleted to prevent accidental copying.
 LogStream (const LogStream &&)=delete
 Move constructor deleted to prevent accidental copying.
LogStream & operator= (const LogStream &)=delete
 Copy assignment operator deleted to prevent accidental copying.
LogStream & operator= (const LogStream &&)=delete
 Move assignment operator deleted to prevent accidental copying.
 ~LogStream ()=default
 Destructor.
void escapeString (const std::string &str)
 Escape a string by adding escape characters.
template<typename T>
LogStream & operator<< (const T &value)
 Stream insertion operator for general types.
LogStream & operator<< (std::ostream &(*manip)(std::ostream &))
 Stream insertion operator for ostream manipulators (e.g. std::endl).
LogStream & operator<< (std::ios_base &(*manip)(std::ios_base &))
 Stream insertion operator for ios_base manipulators (e.g. std::hex).
std::string str () const
 Returns the accumulated formatted string.
LogStream & nospace ()

Detailed Description

Stream buffer helper for formatted logging output.

Constructor & Destructor Documentation

◆ LogStream() [1/3]

sf::LogStream::LogStream ( )
inline

Constructs a log stream with default formatting options.

◆ LogStream() [2/3]

sf::LogStream::LogStream ( const LogStream & )
delete

Copy constructor deleted to prevent accidental copying.

◆ LogStream() [3/3]

sf::LogStream::LogStream ( const LogStream && )
delete

Move constructor deleted to prevent accidental copying.

◆ ~LogStream()

sf::LogStream::~LogStream ( )
default

Destructor.

Member Function Documentation

◆ escapeString()

void sf::LogStream::escapeString ( const std::string & str)

Escape a string by adding escape characters.

◆ nospace()

LogStream & sf::LogStream::nospace ( )
inline

◆ operator<<() [1/3]

template<typename T>
LogStream & sf::LogStream::operator<< ( const T & value)
inline

Stream insertion operator for general types.

◆ operator<<() [2/3]

LogStream & sf::LogStream::operator<< ( std::ios_base &(* manip )(std::ios_base &))
inline

Stream insertion operator for ios_base manipulators (e.g. std::hex).

◆ operator<<() [3/3]

LogStream & sf::LogStream::operator<< ( std::ostream &(* manip )(std::ostream &))
inline

Stream insertion operator for ostream manipulators (e.g. std::endl).

◆ operator=() [1/2]

LogStream & sf::LogStream::operator= ( const LogStream && )
delete

Move assignment operator deleted to prevent accidental copying.

◆ operator=() [2/2]

LogStream & sf::LogStream::operator= ( const LogStream & )
delete

Copy assignment operator deleted to prevent accidental copying.

◆ str()

std::string sf::LogStream::str ( ) const
inline

Returns the accumulated formatted string.


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