kwave  18.07.70
Kwave::RecoverySource Class Referenceabstract

#include <RecoverySource.h>

Inheritance diagram for Kwave::RecoverySource:
Inheritance graph
Collaboration diagram for Kwave::RecoverySource:
Collaboration graph

Public Member Functions

 RecoverySource (quint64 offset, quint64 length)
 
virtual ~RecoverySource ()
 
virtual quint64 offset () const
 
virtual quint64 length () const
 
virtual quint64 end () const
 
virtual qint64 read (quint64 offset, char *data, unsigned int bytes)=0
 

Private Attributes

quint64 m_offset
 
quint64 m_length
 

Detailed Description

Definition at line 27 of file RecoverySource.h.

Constructor & Destructor Documentation

◆ RecoverySource()

Kwave::RecoverySource::RecoverySource ( quint64  offset,
quint64  length 
)

Constructor

Parameters
offsetposition within the recovered file
lengthnumber of bytes of the recovered area

Definition at line 23 of file RecoverySource.cpp.

25 {
26 }
virtual quint64 length() const
virtual quint64 offset() const

◆ ~RecoverySource()

virtual Kwave::RecoverySource::~RecoverySource ( )
inlinevirtual

Destructor

Definition at line 38 of file RecoverySource.h.

References end(), length(), offset(), and read().

38 {}
Here is the call graph for this function:

Member Function Documentation

◆ end()

quint64 Kwave::RecoverySource::end ( ) const
virtual

Returns the end offset in the recovered file

Definition at line 41 of file RecoverySource.cpp.

References m_length, and m_offset.

Referenced by Kwave::RecoveryBuffer::read(), Kwave::RecoveryMapping::read(), and ~RecoverySource().

42 {
43  return m_offset + ((m_length) ? (m_length - 1) : 0);
44 }
Here is the caller graph for this function:

◆ length()

quint64 Kwave::RecoverySource::length ( ) const
virtual

Returns the number of bytes of the recovered range

Definition at line 35 of file RecoverySource.cpp.

References m_length.

Referenced by Kwave::RepairVirtualAudioFile::length(), Kwave::RecoveryBuffer::read(), Kwave::RecoveryMapping::read(), and ~RecoverySource().

36 {
37  return m_length;
38 }
Here is the caller graph for this function:

◆ offset()

quint64 Kwave::RecoverySource::offset ( ) const
virtual

Returns the start offset in the recovered file

Definition at line 29 of file RecoverySource.cpp.

References m_offset.

Referenced by Kwave::RepairVirtualAudioFile::length(), Kwave::RecoveryBuffer::read(), Kwave::RecoveryMapping::read(), and ~RecoverySource().

30 {
31  return m_offset;
32 }
Here is the caller graph for this function:

◆ read()

virtual qint64 Kwave::RecoverySource::read ( quint64  offset,
char *  data,
unsigned int  bytes 
)
pure virtual

Reads bytes from the recovered file into a buffer

Parameters
offsetposition within the recovered file
datapointer to the buffer to be filled
bytesnumber of bytes to read
Returns
number of successfully read bytes

Implemented in Kwave::RecoveryMapping, and Kwave::RecoveryBuffer.

Referenced by Kwave::RepairVirtualAudioFile::read(), and ~RecoverySource().

Here is the caller graph for this function:

Member Data Documentation

◆ m_length

quint64 Kwave::RecoverySource::m_length
private

length in bytes

Definition at line 64 of file RecoverySource.h.

Referenced by end(), and length().

◆ m_offset

quint64 Kwave::RecoverySource::m_offset
private

offset in the file

Definition at line 61 of file RecoverySource.h.

Referenced by end(), and offset().


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