int refCount() volatile const
Returns the current ref count value.
~JournalFile()
Destructor, flushes remaining data and closes the file.
A class containing a journal file and some meta-data.
void flush()
Flush remaining data to disk.
int addRef()
Increase reference count of JournalFile by 1.
XsString filename() const
Returns the (path +) filename of the open file.
JournalFile & operator<<(std::string const &msg)
Appends msg to the end of the current data stream.
volatile std::atomic_int m_refCount
A reference counter that tracks how many Journaller objects use this file.
JournalFile(const XsString &name, bool purge)
Constructor, requires a filename.
int removeRef()
Decrease reference count of JournalFile by 1.
Encapsulates a file, providing a platform independent interface.
XsFile & xsFile()
Return the internal XsFile object, only to be used directly when absolutely necessary.
A 0-terminated managed string of characters.