foobar2000 SDK  2015-08-03
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 268 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 271 of file filesystem_helper.h.

271 : 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 272 of file filesystem_helper.h.

272  {
273  PFC_STATIC_ASSERT( sizeof(m_output[0]) == 1 );
274  p_abort.check();
275  t_size base = m_output.get_size();
276  if (base + p_bytes < base) throw std::bad_alloc();
277  m_output.set_size(base + p_bytes);
278  memcpy( (t_uint8*) m_output.get_ptr() + base, p_buffer, p_bytes );
279  }
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 281 of file filesystem_helper.h.


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