Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
 
shared_ptr< u8m_alignedBuf
 
off_t m_alignedOfs
 
size_t m_bytesUsed
 

Detailed Description

Definition at line 57 of file write_buffer.h.

Constructor & Destructor Documentation

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

Definition at line 81 of file write_buffer.cpp.

UnalignedWriter::~UnalignedWriter ( )

Definition at line 95 of file write_buffer.cpp.

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.

Definition at line 101 of file write_buffer.cpp.

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.

Definition at line 130 of file write_buffer.cpp.

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

Definition at line 140 of file write_buffer.cpp.

Member Data Documentation

shared_ptr<u8> UnalignedWriter::m_alignedBuf
private

Definition at line 79 of file write_buffer.h.

off_t UnalignedWriter::m_alignedOfs
mutableprivate

Definition at line 80 of file write_buffer.h.

size_t UnalignedWriter::m_bytesUsed
mutableprivate

Definition at line 81 of file write_buffer.h.

PFile UnalignedWriter::m_file
private

Definition at line 78 of file write_buffer.h.


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