AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
|
Implement a streambuf sub-class that can write messages via the DRAMA Logger interface.
This class implements std::streambuf, which allows it to be used as an output stream buffer for character based output streams (std::ostream). Messages are output via the DRAMA Logger.
You can use this to create an std::ostream which can be used to output to the log file.
Implementation based on code in "The C++ Standard Library", Second Edition, N.M. Josuttis, Pages 837/838.
#include "logger.hh"
Inherits std::streambuf.
Public Member Functions | |
LogStreamBuf (const LogStreamBuf &source)=delete | |
Copy constructor - deleted. | |
LogStreamBuf (Logger *theLogger, unsigned level, const std::string &prefix) | |
Construct a LogStreamBuf object. | |
LogStreamBuf (LogStreamBuf &&source) noexcept | |
Move copy constructor. | |
virtual | ~LogStreamBuf () |
Destroy the LogStreamBuf, any remaining output is sent. | |
LogStreamBuf & | operator= (const LogStreamBuf &rhs)=delete |
Assignment operator - deleted. | |
LogStreamBuf & | operator= (LogStreamBuf &&rhs) noexcept |
Move assignment operator. | |
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tony.farrell@mq.edu.au
Generated on Thu Dec 12 2024 23:07:35 for AAO DRAMA/DRAMA2 C++ Interface by 1.9.8