Pyrogenesis  trunk
Public Member Functions | Private Member Functions | Private Attributes | List of all members
UnalignedWriter Class Reference

#include <write_buffer.h>

Public Member Functions

 UnalignedWriter (const PFile &file, off_t ofs)
 
 ~UnalignedWriter ()
 
Status Append (const u8 *data, size_t size) const
 add data to the align buffer, writing it out to disk if full. More...
 
void Flush () const
 zero-initialize any remaining space in the align buffer and write it to the file. More...
 

Private Member Functions

 NONCOPYABLE (UnalignedWriter)
 
Status WriteBlock () const
 

Private Attributes

PFile m_file
 
std::shared_ptr< u8m_alignedBuf
 
off_t m_alignedOfs
 
size_t m_bytesUsed
 

Constructor & Destructor Documentation

◆ UnalignedWriter()

UnalignedWriter::UnalignedWriter ( const PFile file,
off_t  ofs 
)

◆ ~UnalignedWriter()

UnalignedWriter::~UnalignedWriter ( )

Member Function Documentation

◆ Append()

Status UnalignedWriter::Append ( const u8 data,
size_t  size 
) const

add data to the align buffer, writing it out to disk if full.

◆ Flush()

void UnalignedWriter::Flush ( ) const

zero-initialize any remaining space in the align buffer and write it to the file.

this is called by the destructor.

◆ NONCOPYABLE()

UnalignedWriter::NONCOPYABLE ( UnalignedWriter  )
private

◆ WriteBlock()

Status UnalignedWriter::WriteBlock ( ) const
private

Member Data Documentation

◆ m_alignedBuf

std::shared_ptr<u8> UnalignedWriter::m_alignedBuf
private

◆ m_alignedOfs

off_t UnalignedWriter::m_alignedOfs
mutableprivate

◆ m_bytesUsed

size_t UnalignedWriter::m_bytesUsed
mutableprivate

◆ m_file

PFile UnalignedWriter::m_file
private

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