foobar2000 SDK  2015-01-14
Public Member Functions | Private Attributes
stream_writer_buffer_append_ref_t< t_storage >

#include <filesystem_helper.h>

+ Inheritance diagram for stream_writer_buffer_append_ref_t< t_storage >:

Public Member Functions

 stream_writer_buffer_append_ref_t (t_storage &p_output)
 
void write (const void *p_buffer, t_size p_bytes, abort_callback &p_abort)
 

Private Attributes

t_storage & m_output
 

Detailed Description

template<class t_storage>
class stream_writer_buffer_append_ref_t< t_storage >

Definition at line 260 of file filesystem_helper.h.

Constructor & Destructor Documentation

template<class t_storage>
stream_writer_buffer_append_ref_t< t_storage >::stream_writer_buffer_append_ref_t ( t_storage &  p_output)
inline

Definition at line 263 of file filesystem_helper.h.

263 : m_output(p_output) {}

Member Function Documentation

template<class t_storage>
void stream_writer_buffer_append_ref_t< t_storage >::write ( const void *  p_buffer,
t_size  p_bytes,
abort_callback p_abort 
)
inline

Definition at line 264 of file filesystem_helper.h.

264  {
265  PFC_STATIC_ASSERT( sizeof(m_output[0]) == 1 );
266  p_abort.check();
267  t_size base = m_output.get_size();
268  if (base + p_bytes < base) throw std::bad_alloc();
269  m_output.set_size(base + p_bytes);
270  memcpy( (t_uint8*) m_output.get_ptr() + base, p_buffer, p_bytes );
271  }
uint8_t t_uint8
Definition: int_types.h:9
size_t t_size
Definition: int_types.h:48

Field Documentation

template<class t_storage>
t_storage& stream_writer_buffer_append_ref_t< t_storage >::m_output
private

Definition at line 273 of file filesystem_helper.h.


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