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

#include <write_buffer.h>

Collaboration diagram for UnalignedWriter:
Collaboration graph
[legend]

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
 
shared_ptr< u8m_alignedBuf
 
off_t m_alignedOfs
 
size_t m_bytesUsed
 

Constructor & Destructor Documentation

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

Member Function Documentation

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

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

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.

UnalignedWriter::NONCOPYABLE ( UnalignedWriter  )
private
Status UnalignedWriter::WriteBlock ( ) const
private

Member Data Documentation

shared_ptr<u8> UnalignedWriter::m_alignedBuf
private
off_t UnalignedWriter::m_alignedOfs
mutableprivate
size_t UnalignedWriter::m_bytesUsed
mutableprivate
PFile UnalignedWriter::m_file
private

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