foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
stream_writer_chunk_dwordheader

#include <filesystem_helper.h>

+ Inheritance diagram for stream_writer_chunk_dwordheader:

Public Member Functions

 stream_writer_chunk_dwordheader (const service_ptr_t< file > &p_writer)
 
void finalize (abort_callback &p_abort)
 
void initialize (abort_callback &p_abort)
 
void write (const void *p_buffer, t_size p_bytes, abort_callback &p_abort)
 

Private Attributes

t_filesize m_headerposition
 
service_ptr_t< filem_writer
 
t_filesize m_written
 

Detailed Description

Definition at line 314 of file filesystem_helper.h.

Constructor & Destructor Documentation

stream_writer_chunk_dwordheader::stream_writer_chunk_dwordheader ( const service_ptr_t< file > &  p_writer)
inline

Definition at line 317 of file filesystem_helper.h.

317 : m_writer(p_writer) {}

Member Function Documentation

void stream_writer_chunk_dwordheader::finalize ( abort_callback p_abort)
inline

Definition at line 325 of file filesystem_helper.h.

325  {
326  t_filesize end_offset;
327  end_offset = m_writer->get_position(p_abort);
328  m_writer->seek(m_headerposition,p_abort);
329  m_writer->write_lendian_t(pfc::downcast_guarded<t_uint32>(m_written),p_abort);
330  m_writer->seek(end_offset,p_abort);
331  }
t_uint64 t_filesize
Type used for file size related variables.
Definition: filesystem.h:8
void stream_writer_chunk_dwordheader::initialize ( abort_callback p_abort)
inline

Definition at line 319 of file filesystem_helper.h.

319  {
320  m_headerposition = m_writer->get_position(p_abort);
321  m_written = 0;
322  m_writer->write_lendian_t((t_uint32)0,p_abort);
323  }
uint32_t t_uint32
Definition: int_types.h:5
void stream_writer_chunk_dwordheader::write ( const void *  p_buffer,
t_size  p_bytes,
abort_callback p_abort 
)
inline

Definition at line 333 of file filesystem_helper.h.

333  {
334  m_writer->write(p_buffer,p_bytes,p_abort);
335  m_written += p_bytes;
336  }

Field Documentation

t_filesize stream_writer_chunk_dwordheader::m_headerposition
private

Definition at line 340 of file filesystem_helper.h.

service_ptr_t<file> stream_writer_chunk_dwordheader::m_writer
private

Definition at line 339 of file filesystem_helper.h.

t_filesize stream_writer_chunk_dwordheader::m_written
private

Definition at line 341 of file filesystem_helper.h.


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