osmanip
Library with useful output stream tools like: color and style manipulators, progress bars and terminal graphics.
Public Member Functions | List of all members
osm::Stringbuf Class Reference

This class inherits std::stringbuf and adds additional functionality and thread safety. More...

#include <sstream.hpp>

Inheritance diagram for osm::Stringbuf:
Inheritance graph
[legend]
Collaboration diagram for osm::Stringbuf:
Collaboration graph
[legend]

Public Member Functions

 Stringbuf ()
 Construct a new Stringbuf object. Default constructor will set the main attributes to default values. More...
 
 ~Stringbuf () override
 Destructs OutputRedirector object. Calls this->pubsync() before being destroyed. More...
 
std::mutex & getMutex ()
 Get the mutex for the object. More...
 
int32_t sync () override
 Calls the base class sync() function. More...
 

Detailed Description

This class inherits std::stringbuf and adds additional functionality and thread safety.

Constructor & Destructor Documentation

◆ Stringbuf()

osm::Stringbuf::Stringbuf ( )
default

Construct a new Stringbuf object. Default constructor will set the main attributes to default values.

◆ ~Stringbuf()

osm::Stringbuf::~Stringbuf ( )
override

Destructs OutputRedirector object. Calls this->pubsync() before being destroyed.

Member Function Documentation

◆ getMutex()

std::mutex & osm::Stringbuf::getMutex ( )

Get the mutex for the object.

Returns
the mutex of the object.

◆ sync()

int32_t osm::Stringbuf::sync ( )
override

Calls the base class sync() function.

Returns
the error state of the underlying buffer.

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