winss
Public Member Functions | List of all members
winss::LogStreamWriter Class Reference

A stream writer for writing logs. More...

#include <log_stream_wrapper.hpp>

Public Member Functions

 LogStreamWriter ()
 Log stream writer constructor. More...
 
 LogStreamWriter (const LogStreamWriter &)=delete
 No copy. More...
 
 LogStreamWriter (LogStreamWriter &&)=delete
 No move. More...
 
virtual bool Open (fs::path log_path)
 Opens the file stream at the given location. More...
 
virtual void Write (const std::string &line)
 Writes the given string to the log stream. More...
 
virtual void WriteLine ()
 Writes a line terminator to the stream. More...
 
virtual std::streamoff GetPos ()
 Gets the current position in the stream. More...
 
virtual void Close ()
 Closes the currently open stream. More...
 
LogStreamWriteroperator= (const LogStreamWriter &)=delete
 No copy. More...
 
LogStreamWriteroperator= (LogStreamWriter &&)=delete
 No move. More...
 
virtual ~LogStreamWriter ()
 Log stream writer destructor. More...
 

Detailed Description

A stream writer for writing logs.

Constructor & Destructor Documentation

winss::LogStreamWriter::LogStreamWriter ( )
inline

Log stream writer constructor.

References winss::LogStreamReader::operator=().

winss::LogStreamWriter::LogStreamWriter ( const LogStreamWriter )
delete

No copy.

winss::LogStreamWriter::LogStreamWriter ( LogStreamWriter &&  )
delete

No move.

winss::LogStreamWriter::~LogStreamWriter ( )
virtual

Log stream writer destructor.

Member Function Documentation

void winss::LogStreamWriter::Close ( )
virtual

Closes the currently open stream.

Referenced by winss::LogTmpl< TMutex >::Rotate(), and winss::LogTmpl< TMutex >::Start().

std::streamoff winss::LogStreamWriter::GetPos ( )
virtual

Gets the current position in the stream.

Returns
The current stream position.

Referenced by winss::LogTmpl< TMutex >::Start().

bool winss::LogStreamWriter::Open ( fs::path  log_path)
virtual

Opens the file stream at the given location.

Parameters
[in]log_pathThe location of the log file.
Returns
True if the open was successful otherwise false.

Referenced by winss::LogTmpl< TMutex >::Rotate(), and winss::LogTmpl< TMutex >::Start().

LogStreamWriter& winss::LogStreamWriter::operator= ( const LogStreamWriter )
delete

No copy.

LogStreamWriter& winss::LogStreamWriter::operator= ( LogStreamWriter &&  )
delete

No move.

void winss::LogStreamWriter::Write ( const std::string &  line)
virtual

Writes the given string to the log stream.

Parameters
[in]lineThe log line as a string.

Referenced by winss::LogTmpl< TMutex >::Start().

void winss::LogStreamWriter::WriteLine ( )
virtual

Writes a line terminator to the stream.

Referenced by winss::LogTmpl< TMutex >::Start().


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