This class inherits Stringbuf and adds the ability to send output to a specific std::ostream buffer as well as redirect output to osm::redirout.
More...
#include <sstream.hpp>
This class inherits Stringbuf and adds the ability to send output to a specific std::ostream buffer as well as redirect output to osm::redirout.
◆ Ostreambuf() [1/2]
osm::Ostreambuf::Ostreambuf |
( |
| ) |
|
Construct a new Ostreambuf object. Default constructor will set the main attributes to default values.
◆ Ostreambuf() [2/2]
osm::Ostreambuf::Ostreambuf |
( |
std::ostream * |
out | ) |
|
|
explicit |
Construct a new Ostreambuf object.
- Parameters
-
out | the std::ostream object to use to output the buffer data. |
◆ ~Ostreambuf()
osm::Ostreambuf::~Ostreambuf |
( |
| ) |
|
|
override |
Destructs OutputRedirector object. Calls this->pubsync() before being destroyed.
◆ getOstream()
std::ostream * osm::Ostreambuf::getOstream |
( |
| ) |
|
Returns the current std::ostream* object.
- Returns
- if present, the std::ostream* object. Otherwise, nullptr.
◆ setOstream()
void osm::Ostreambuf::setOstream |
( |
std::ostream * |
ostream | ) |
|
Sets the std::ostream* object to route output. If there is already an std::ostream* present, it will be flushed before it is replaced.
◆ sync()
int32_t osm::Ostreambuf::sync |
( |
| ) |
|
|
override |
Synchronizes the buffer with the specified object.
- Returns
- the error state of the stream buffer.
The documentation for this class was generated from the following files: