FileLogger::Buffer Class Reference
String buffer for the file logger. More...
#include <Console.hh>
Public Member Functions | |
Buffer (const std::string &_filename) | |
Constructor. More... | |
virtual | ~Buffer () |
Destructor. More... | |
int | sync () override |
Sync the stream (output the string buffer contents). More... | |
std::streamsize | xsputn (const char *_char, std::streamsize _count) override |
Writes _count characters to the string buffer. More... | |
Public Member Functions inherited from stringbuf | |
T | stringbuf (T... args) |
T | eback (T... args) |
T | egptr (T... args) |
T | epptr (T... args) |
T | gbump (T... args) |
T | getloc (T... args) |
T | gptr (T... args) |
T | imbue (T... args) |
T | in_avail (T... args) |
T | operator= (T... args) |
T | overflow (T... args) |
T | pbackfail (T... args) |
T | pbase (T... args) |
T | pbump (T... args) |
T | pptr (T... args) |
T | pubimbue (T... args) |
T | pubseekoff (T... args) |
T | pubseekpos (T... args) |
T | pubsetbuf (T... args) |
T | pubsync (T... args) |
T | sbumpc (T... args) |
T | seekoff (T... args) |
T | seekpos (T... args) |
T | setbuf (T... args) |
T | setg (T... args) |
T | setp (T... args) |
T | sgetc (T... args) |
T | sgetn (T... args) |
T | showmanyc (T... args) |
T | snextc (T... args) |
T | sputbackc (T... args) |
T | sputc (T... args) |
T | sputn (T... args) |
T | str (T... args) |
T | sungetc (T... args) |
T | swap (T... args) |
T | sync (T... args) |
T | uflow (T... args) |
T | underflow (T... args) |
T | xsgetn (T... args) |
T | xsputn (T... args) |
Public Attributes | |
std::ofstream * | stream |
Stream to output information into. More... | |
std::mutex | syncMutex |
Mutex to synchronize writes to the string buffer and the output stream. More... | |
Detailed Description
String buffer for the file logger.
Constructor & Destructor Documentation
◆ Buffer()
|
explicit |
Constructor.
- Parameters
-
[in] _filename Filename to write into.
◆ ~Buffer()
|
virtual |
Destructor.
Member Function Documentation
◆ sync()
|
override |
Sync the stream (output the string buffer contents).
- Returns
- Return 0 on success.
◆ xsputn()
|
override |
Writes _count characters to the string buffer.
- Parameters
-
[in] _char Input rharacter array. [in] _count Number of characters in array.
- Returns
- The number of characters successfully written.
Member Data Documentation
◆ stream
std::ofstream* stream |
Stream to output information into.
◆ syncMutex
std::mutex syncMutex |
Mutex to synchronize writes to the string buffer and the output stream.
The documentation for this class was generated from the following file: