foobar2000 SDK  2015-08-03
Public Member Functions | Static Public Member Functions | Protected Member Functions
dsp_presetabstract

#include <dsp.h>

+ Inheritance diagram for dsp_preset:

Public Member Functions

void contents_from_stream (stream_reader *p_stream, abort_callback &p_abort)
 
void contents_to_stream (stream_writer *p_stream, abort_callback &p_abort) const
 
void copy (const dsp_preset &p_source)
 
virtual const void * get_data () const =0
 
virtual t_size get_data_size () const =0
 
virtual GUID get_owner () const =0
 
bool operator!= (const dsp_preset &p_other) const
 
const dsp_presetoperator= (const dsp_preset &p_source)
 
bool operator== (const dsp_preset &p_other) const
 
virtual void set_data (const void *p_data, t_size p_data_size)=0
 
virtual void set_data_from_stream (stream_reader *p_stream, t_size p_bytes, abort_callback &p_abort)=0
 
virtual void set_owner (const GUID &p_owner)=0
 

Static Public Member Functions

static void g_contents_from_stream_skip (stream_reader *p_stream, abort_callback &p_abort)
 

Protected Member Functions

 dsp_preset ()
 
 ~dsp_preset ()
 

Detailed Description

Definition at line 186 of file dsp.h.

Constructor & Destructor Documentation

dsp_preset::dsp_preset ( )
inlineprotected

Definition at line 213 of file dsp.h.

213 {}
dsp_preset::~dsp_preset ( )
inlineprotected

Definition at line 214 of file dsp.h.

214 {}

Member Function Documentation

void dsp_preset::contents_from_stream ( stream_reader p_stream,
abort_callback p_abort 
)

Definition at line 227 of file dsp.cpp.

227  {
228  t_uint32 size;
229  GUID guid;
230  p_stream->read_lendian_t(guid,p_abort);
231  set_owner(guid);
232  p_stream->read_lendian_t(size,p_abort);
233  if (size > 1024*1024*32) throw exception_io_data();
234  set_data_from_stream(p_stream,size,p_abort);
235 }
virtual void set_owner(const GUID &p_owner)=0
Definition: pfc.h:71
virtual void set_data_from_stream(stream_reader *p_stream, t_size p_bytes, abort_callback &p_abort)=0
uint32_t t_uint32
Definition: int_types.h:5
void dsp_preset::contents_to_stream ( stream_writer p_stream,
abort_callback p_abort 
) const

Definition at line 218 of file dsp.cpp.

218  {
219  t_size size = get_data_size();
220  p_stream->write_lendian_t(get_owner(),p_abort);
221  p_stream->write_lendian_t(size,p_abort);
222  if (size > 0) {
223  p_stream->write_object(get_data(),size,p_abort);
224  }
225 }
virtual const void * get_data() const =0
size_t t_size
Definition: int_types.h:48
virtual t_size get_data_size() const =0
virtual GUID get_owner() const =0
void dsp_preset::copy ( const dsp_preset p_source)
inline

Definition at line 197 of file dsp.h.

197 {set_owner(p_source.get_owner());set_data(p_source.get_data(),p_source.get_data_size());}
virtual void set_owner(const GUID &p_owner)=0
virtual const void * get_data() const =0
virtual t_size get_data_size() const =0
virtual void set_data(const void *p_data, t_size p_data_size)=0
virtual GUID get_owner() const =0
void dsp_preset::g_contents_from_stream_skip ( stream_reader p_stream,
abort_callback p_abort 
)
static

Definition at line 237 of file dsp.cpp.

237  {
238  t_uint32 size;
239  GUID guid;
240  p_stream->read_lendian_t(guid,p_abort);
241  p_stream->read_lendian_t(size,p_abort);
242  if (size > 1024*1024*32) throw exception_io_data();
243  p_stream->skip_object(size,p_abort);
244 }
Definition: pfc.h:71
uint32_t t_uint32
Definition: int_types.h:5
virtual const void* dsp_preset::get_data ( ) const
pure virtual

Implemented in dsp_preset_impl.

virtual t_size dsp_preset::get_data_size ( ) const
pure virtual

Implemented in dsp_preset_impl.

virtual GUID dsp_preset::get_owner ( ) const
pure virtual

Implemented in dsp_preset_impl.

bool dsp_preset::operator!= ( const dsp_preset p_other) const
inline

Definition at line 209 of file dsp.h.

209  {
210  return !(*this == p_other);
211  }
const dsp_preset& dsp_preset::operator= ( const dsp_preset p_source)
inline

Definition at line 195 of file dsp.h.

195 {copy(p_source); return *this;}
void copy(const dsp_preset &p_source)
Definition: dsp.h:197
bool dsp_preset::operator== ( const dsp_preset p_other) const
inline

Definition at line 203 of file dsp.h.

203  {
204  if (get_owner() != p_other.get_owner()) return false;
205  if (get_data_size() != p_other.get_data_size()) return false;
206  if (memcmp(get_data(),p_other.get_data(),get_data_size()) != 0) return false;
207  return true;
208  }
virtual const void * get_data() const =0
virtual t_size get_data_size() const =0
virtual GUID get_owner() const =0
virtual void dsp_preset::set_data ( const void *  p_data,
t_size  p_data_size 
)
pure virtual

Implemented in dsp_preset_impl.

virtual void dsp_preset::set_data_from_stream ( stream_reader p_stream,
t_size  p_bytes,
abort_callback p_abort 
)
pure virtual

Implemented in dsp_preset_impl.

virtual void dsp_preset::set_owner ( const GUID p_owner)
pure virtual

Implemented in dsp_preset_impl.


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