Vector::BLF::UncompressedFile(3)

NAME
Vector::BLF::UncompressedFile

SYNOPSIS

#include <UncompressedFile.h>

Inherits Vector::BLF::AbstractFile.

  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)
Public Member Functions inherited from Vector::BLF::AbstractFile
AbstractFile (const AbstractFile &)=default
AbstractFile & operator= (const AbstractFile &)=default
AbstractFile (AbstractFile &&)=default
AbstractFile & operator= (AbstractFile &&)=default
virtual std::streamsize gcount () const =0
virtual void read (char *s, std::streamsize n)=0
virtual std::streampos tellg ()=0
virtual void seekg (std::streamoff off, const std::ios_base::seekdir way=std::ios_base::cur)=0
virtual void write (const char *s, std::streamsize n)=0
virtual std::streampos tellp ()=0
virtual bool good () const =0
virtual bool eof () const =0
virtual void skipp (std::streamsize s) final

  Public Attributes
std::condition_variable tellgChanged
std::condition_variable tellpChanged

Detailed Description

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.

Member Function Documentation

  void Vector::BLF::UncompressedFile::abort () [virtual]
Stop further operations. Return from waiting reads.

  uint32_t Vector::BLF::UncompressedFile::defaultLogContainerSize () const [virtual]
Get default log container size.

Returns
    default log container size

  void Vector::BLF::UncompressedFile::dropOldData () [virtual]
drop old log container, if tellg/tellp are beyond it

  bool Vector::BLF::UncompressedFile::eof () const [override], [virtual]
Check whether eofbit is set.

Returns
    true if eofbit is set

Implements Vector::BLF::AbstractFile.

  std::streamsize Vector::BLF::UncompressedFile::fileSize () const [virtual]
Return current file size resp. end-of-file position.

Returns
    file size

  std::streamsize Vector::BLF::UncompressedFile::gcount () const [override], [virtual]
Get characters returned by last read operation.

Returns
    Number of characters

Implements Vector::BLF::AbstractFile.

  bool Vector::BLF::UncompressedFile::good () const [override], [virtual]
Check whether state of stream is good.

Returns
    true if no error flags are set

Implements Vector::BLF::AbstractFile.

  void Vector::BLF::UncompressedFile::nextLogContainer () [virtual]
Close the current logContainer.

  void Vector::BLF::UncompressedFile::read (char * s, std::streamsize n) [override], [virtual]
Read block of data.

This operation blocks until the data is available.

Parameters
    s Pointer to data
    n Requested size of data

Implements Vector::BLF::AbstractFile.

  void Vector::BLF::UncompressedFile::seekg (std::streamoff off, const std::ios_base::seekdir way = std::ios_base::cur) [override], [virtual]
Set position in input sequence.

Parameters
    off Offset
    way Direction

Implements Vector::BLF::AbstractFile.

  void Vector::BLF::UncompressedFile::setBufferSize (std::streamsize bufferSize) [virtual]
Sets the maximum file size. Write operations block, if the size is reached.

Parameters
    bufferSize maximum file size

  void Vector::BLF::UncompressedFile::setDefaultLogContainerSize (uint32_t defaultLogContainerSize) [virtual]
Set default log container size.

Parameters
    defaultLogContainerSize default log container size

  void Vector::BLF::UncompressedFile::setFileSize (std::streamsize fileSize) [virtual]
Set file size resp. end-of-file position.

Parameters
    fileSize file size

  std::streampos Vector::BLF::UncompressedFile::tellg () [override], [virtual]
Get position in input sequence.

Returns
    Read position

Implements Vector::BLF::AbstractFile.

  std::streampos Vector::BLF::UncompressedFile::tellp () [override], [virtual]
Get position in output sequence.

Returns
    Write position

Implements Vector::BLF::AbstractFile.

  void Vector::BLF::UncompressedFile::write (const char * s, std::streamsize n) [override], [virtual]
Write block of data.

Parameters
    s Pointer to data
    n Size of data

Implements Vector::BLF::AbstractFile.

  void Vector::BLF::UncompressedFile::write (const std::shared_ptr< LogContainer > & logContainer) [virtual]
write LogContainer

Parameters
    logContainer log container

Member Data Documentation

  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)

Author

Generated automatically by Doxygen for Vector BLF from the source code.