foobar2000 SDK  2015-08-03
mem_block_container.cpp
Go to the documentation of this file.
1 #include "foobar2000.h"
2 
4  if (p_bytes == 0) {set_size(0);}
5  set_size(p_bytes);
6  p_stream->read_object(get_ptr(),p_bytes,p_abort);
7 }
8 
9 void mem_block_container::set(const void * p_buffer,t_size p_size) {
10  set_size(p_size);
11  memcpy(get_ptr(),p_buffer,p_size);
12 }
virtual void set_size(t_size p_size)=0
size_t t_size
Definition: int_types.h:48
void set(const void *p_buffer, t_size p_size)
void from_stream(stream_reader *p_stream, t_size p_bytes, abort_callback &p_abort)
virtual const void * get_ptr() const =0