Vector BLF
|
#include <UncompressedFile.h>
Public Member Functions | |
std::streamsize | gcount () const override |
void | read (char *s, std::streamsize n) override |
std::streampos | tellg () override |
void | seekg (std::streamoff off, const std::ios_base::seekdir way=std::ios_base::cur) override |
void | write (const char *s, std::streamsize n) override |
std::streampos | tellp () override |
bool | good () const override |
bool | eof () const override |
virtual void | abort () |
virtual void | write (const std::shared_ptr< LogContainer > &logContainer) |
virtual void | nextLogContainer () |
virtual std::streamsize | fileSize () const |
virtual void | setFileSize (std::streamsize fileSize) |
virtual void | setBufferSize (std::streamsize bufferSize) |
virtual void | dropOldData () |
virtual uint32_t | defaultLogContainerSize () const |
virtual void | setDefaultLogContainerSize (uint32_t defaultLogContainerSize) |
![]() | |
AbstractFile (const AbstractFile &)=default | |
AbstractFile & | operator= (const AbstractFile &)=default |
AbstractFile (AbstractFile &&)=default | |
AbstractFile & | operator= (AbstractFile &&)=default |
virtual void | skipp (std::streamsize s) final |
Public Attributes | |
std::condition_variable | tellgChanged |
std::condition_variable | tellpChanged |
UncompressedFile (Input/output memory stream)
This class is like a virtual file buffer. It only sees the fragments that are contained in m_data and addresses by the underlying uncompressed LogContainers. Read is done at position m_tellg and write position is at m_tellp. Write or seek operations exceeding the end of the file, will automatically create new logContainers. An explicit dropOldData drops logContainers that have already been processed.
This class is thread-safe.
|
virtual |
Stop further operations. Return from waiting reads.
|
virtual |
Get default log container size.
|
virtual |
drop old log container, if tellg/tellp are beyond it
|
overridevirtual |
|
virtual |
Return current file size resp. end-of-file position.
|
overridevirtual |
Get characters returned by last read operation.
Implements Vector::BLF::AbstractFile.
|
overridevirtual |
Check whether state of stream is good.
Implements Vector::BLF::AbstractFile.
|
virtual |
Close the current logContainer.
|
overridevirtual |
Read block of data.
This operation blocks until the data is available.
[out] | s | Pointer to data |
[in] | n | Requested size of data |
Implements Vector::BLF::AbstractFile.
|
overridevirtual |
Set position in input sequence.
[in] | off | Offset |
[in] | way | Direction |
Implements Vector::BLF::AbstractFile.
|
virtual |
Sets the maximum file size. Write operations block, if the size is reached.
[in] | bufferSize | maximum file size |
|
virtual |
Set default log container size.
[in] | defaultLogContainerSize | default log container size |
|
virtual |
Set file size resp. end-of-file position.
[in] | fileSize | file size |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Write block of data.
[in] | s | Pointer to data |
[in] | n | Size of data |
Implements Vector::BLF::AbstractFile.
|
virtual |
write LogContainer
[in] | logContainer | log container |
std::condition_variable Vector::BLF::UncompressedFile::tellgChanged |
tellg was changed (after read or seekg)
std::condition_variable Vector::BLF::UncompressedFile::tellpChanged |
tellp was changed (after write or seekp)