foobar2000 SDK  2015-08-03
Public Member Functions | Static Public Member Functions
ui_element_configabstract

#include <ui_element.h>

+ Inheritance diagram for ui_element_config:

Public Member Functions

service_ptr_t< ui_element_configclone () const
 
 FB2K_MAKE_SERVICE_INTERFACE (ui_element_config, service_base)
 
virtual const void * get_data () const =0
 
virtual t_size get_data_size () const =0
 
virtual GUID get_guid () const =0
 
- Public Member Functions inherited from service_base
template<typename outPtr_t >
bool cast (outPtr_t &outPtr)
 
virtual int service_add_ref ()=0 throw ()
 
virtual bool service_query (service_ptr_t< service_base > &p_out, const GUID &p_guid)
 
template<class T >
bool service_query_t (service_ptr_t< T > &p_out)
 
virtual int service_release ()=0 throw ()
 

Static Public Member Functions

static service_ptr_t< ui_element_configg_create (const GUID &id, const void *data, t_size size)
 
template<typename t_source >
static service_ptr_t< ui_element_configg_create (const GUID &id, t_source const &data)
 
static service_ptr_t< ui_element_configg_create (const GUID &id, stream_reader *in, t_size bytes, abort_callback &abort)
 
static service_ptr_t< ui_element_configg_create (stream_reader *in, t_size bytes, abort_callback &abort)
 
static service_ptr_t< ui_element_configg_create (const void *data, t_size size)
 
static service_ptr_t< ui_element_configg_create_empty (const GUID &id=pfc::guid_null)
 

Additional Inherited Members

- Public Types inherited from service_base
typedef service_base t_interface
 
- Protected Member Functions inherited from service_base
 service_base ()
 
 ~service_base ()
 

Detailed Description

Configuration of a UI element.

Definition at line 2 of file ui_element.h.

Member Function Documentation

service_ptr_t<ui_element_config> ui_element_config::clone ( ) const
inline

Definition at line 25 of file ui_element.h.

25  {
26  return g_create(get_guid(), get_data(), get_data_size());
27  }
virtual const void * get_data() const =0
Returns raw configuration data pointer.
virtual t_size get_data_size() const =0
Returns raw configuration data size, in bytes.
virtual GUID get_guid() const =0
Returns GUID of the UI element this configuration data belongs to.
static service_ptr_t< ui_element_config > g_create(const GUID &id, const void *data, t_size size)
Helper.
Definition: ui_element.cpp:25
ui_element_config::FB2K_MAKE_SERVICE_INTERFACE ( ui_element_config  ,
service_base   
)
service_ptr_t< ui_element_config > ui_element_config::g_create ( const GUID id,
const void *  data,
t_size  size 
)
static

Helper.

Definition at line 25 of file ui_element.cpp.

25  {
26  return new service_impl_t<ui_element_config_impl>(id,data,size);
27 }
Template implementing reference-counting features of service_base. Intended for dynamic instantiation...
Definition: service_impl.h:4
template<typename t_source >
static service_ptr_t<ui_element_config> ui_element_config::g_create ( const GUID id,
t_source const &  data 
)
inlinestatic

Definition at line 15 of file ui_element.h.

15  {
17  return g_create(id, data.get_ptr(), data.get_size());
18  }
static service_ptr_t< ui_element_config > g_create(const GUID &id, const void *data, t_size size)
Helper.
Definition: ui_element.cpp:25
service_ptr_t< ui_element_config > ui_element_config::g_create ( const GUID id,
stream_reader in,
t_size  bytes,
abort_callback abort 
)
static

Definition at line 29 of file ui_element.cpp.

29  {
31  data->set_data_size(bytes);
32  in->read_object(data->get_data_var(),bytes,abort);
33  return data;
34 }
Template implementing reference-counting features of service_base. Intended for dynamic instantiation...
Definition: service_impl.h:4
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
Definition: service.h:55
service_ptr_t< ui_element_config > ui_element_config::g_create ( stream_reader in,
t_size  bytes,
abort_callback abort 
)
static

Definition at line 36 of file ui_element.cpp.

36  {
37  if (bytes < sizeof(GUID)) throw exception_io_data_truncation();
38  GUID id; stream_reader_formatter<>(*in,abort) >> id;
39  return g_create(id,in,bytes - sizeof(GUID),abort);
40 }
Definition: pfc.h:71
static service_ptr_t< ui_element_config > g_create(const GUID &id, const void *data, t_size size)
Helper.
Definition: ui_element.cpp:25
service_ptr_t< ui_element_config > ui_element_config::g_create ( const void *  data,
t_size  size 
)
static

Definition at line 49 of file ui_element.cpp.

49  {
50  stream_reader_memblock_ref stream(data,size);
51  return g_create(&stream,size,abort_callback_dummy());
52 }
abort_callback_impl abort_callback_dummy
static service_ptr_t< ui_element_config > g_create(const GUID &id, const void *data, t_size size)
Helper.
Definition: ui_element.cpp:25
static service_ptr_t<ui_element_config> ui_element_config::g_create_empty ( const GUID id = pfc::guid_null)
inlinestatic

Definition at line 20 of file ui_element.h.

20 {return g_create(id,NULL,0);}
static service_ptr_t< ui_element_config > g_create(const GUID &id, const void *data, t_size size)
Helper.
Definition: ui_element.cpp:25
virtual const void* ui_element_config::get_data ( ) const
pure virtual

Returns raw configuration data pointer.

virtual t_size ui_element_config::get_data_size ( ) const
pure virtual

Returns raw configuration data size, in bytes.

virtual GUID ui_element_config::get_guid ( ) const
pure virtual

Returns GUID of the UI element this configuration data belongs to.


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