Vector BLF

Loading...
Searching...
No Matches
Vector::BLF::UncompressedFile Class Referencefinal

`#include <UncompressedFile.h>`

Inheritance diagram for Vector::BLF::UncompressedFile:

## 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 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

## ◆ abort()

void Vector::BLF::UncompressedFile::abort | ( |  | ) |
| virtual

Stop further operations. Return from waiting reads.

## ◆ defaultLogContainerSize()

uint32_t Vector::BLF::UncompressedFile::defaultLogContainerSize | ( |  | ) | const
| virtual

Get default log container size.

Returns
  default log container size

## ◆ dropOldData()

void Vector::BLF::UncompressedFile::dropOldData | ( |  | ) |
| virtual

drop old log container, if tellg/tellp are beyond it

## ◆ eof()

bool Vector::BLF::UncompressedFile::eof | ( |  | ) | const
| override virtual

Check whether eofbit is set.

Returns
  true if eofbit is set

Implements Vector::BLF::AbstractFile.

## ◆ fileSize()

std::streamsize Vector::BLF::UncompressedFile::fileSize | ( |  | ) | const
| virtual

Return current file size resp. end-of-file position.

Returns
  file size

## ◆ gcount()

std::streamsize Vector::BLF::UncompressedFile::gcount | ( |  | ) | const
| override virtual

Get characters returned by last read operation.

Returns
  Number of characters

Implements Vector::BLF::AbstractFile.

## ◆ good()

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.

## ◆ nextLogContainer()

void Vector::BLF::UncompressedFile::nextLogContainer | ( |  | ) |
| virtual

Close the current logContainer.

## ◆ read()

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

  [out] | s | Pointer to data
  [in] | n | Requested size of data

Implements Vector::BLF::AbstractFile.

## ◆ seekg()

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

  [in] | off | Offset
  [in] | way | Direction

Implements Vector::BLF::AbstractFile.

## ◆ setBufferSize()

void Vector::BLF::UncompressedFile::setBufferSize | ( | std::streamsize | bufferSize | ) |
| virtual

Sets the maximum file size. Write operations block, if the size is reached.

Parameters

  [in] | bufferSize | maximum file size

## ◆ setDefaultLogContainerSize()

void Vector::BLF::UncompressedFile::setDefaultLogContainerSize | ( | uint32_t | defaultLogContainerSize | ) |
| virtual

Set default log container size.

Parameters

  [in] | defaultLogContainerSize | default log container size

## ◆ setFileSize()

void Vector::BLF::UncompressedFile::setFileSize | ( | std::streamsize | fileSize | ) |
| virtual

Set file size resp. end-of-file position.

Parameters

  [in] | fileSize | file size

## ◆ tellg()

std::streampos Vector::BLF::UncompressedFile::tellg | ( |  | ) |
| override virtual

Get position in input sequence.

Returns
  Read position

Implements Vector::BLF::AbstractFile.

## ◆ tellp()

std::streampos Vector::BLF::UncompressedFile::tellp | ( |  | ) |
| override virtual

Get position in output sequence.

Returns
  Write position

Implements Vector::BLF::AbstractFile.

## ◆ write() [1/2]

void Vector::BLF::UncompressedFile::write | ( | const char * | s,
|  | std::streamsize | n )
| override virtual

Write block of data.

Parameters

  [in] | s | Pointer to data
  [in] | n | Size of data

Implements Vector::BLF::AbstractFile.

## ◆ write() [2/2]

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

write LogContainer

Parameters

  [in] | logContainer | log container

## Member Data Documentation

## ◆ tellgChanged

std::condition_variable Vector::BLF::UncompressedFile::tellgChanged

tellg was changed (after read or seekg)

## ◆ tellpChanged

std::condition_variable Vector::BLF::UncompressedFile::tellpChanged

tellp was changed (after write or seekp)

The documentation for this class was generated from the following files:

- UncompressedFile.h
- UncompressedFile.cpp