foobar2000 SDK
2015-08-03
|
#include <service.h>
Public Types | |
typedef service_base | t_interface |
Public Member Functions | |
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 () |
Protected Member Functions | |
service_base () | |
~service_base () | |
Private Member Functions | |
service_base (const service_base &) | |
const service_base & | operator= (const service_base &) |
Base class for all service classes.
Provides interfaces for reference counter and querying for different interfaces supported by the object.
.
|
inlineprivate |
|
inline |
New shortened version, same as service_query_t.
Definition at line 357 of file service.h.
|
inlineprivate |
|
pure virtual |
Increments reference count. This is normally not called directly but managed by service_ptr_t<> template.
Implemented in service_impl_single_t< contextmenu_group_impl >, service_impl_single_t< input_entry_impl_t< input_wrapper_singletrack_t< T >, t_flags, t_decoder, t_inforeader, t_infowriter > >, service_impl_single_t< advconfig_entry_string_impl_MT >, service_impl_single_t< contextmenu_group_popup_impl >, service_impl_single_t< dsp_entry_impl_nopreset_t< T > >, service_impl_single_t< advconfig_entry_integer_impl >, service_impl_single_t< advconfig_branch_impl >, service_impl_single_t< input_entry_impl_t< T, t_flags, t_decoder, t_inforeader, t_infowriter > >, service_impl_single_t< output_entry_impl_t< T > >, service_impl_single_t< advconfig_entry_checkbox_impl< p_is_radio, prefFlags > >, service_impl_single_t< advconfig_entry_string_impl >, service_impl_single_t< cue_parser::chapterizer_impl_t< t_input_impl > >, service_impl_single_t< input_entry_impl_t< input_wrapper_singletrack_t< T >, 0 > >, service_impl_single_t< input_entry_impl_t< cue_parser::input_wrapper_cue_t< t_input_impl >, t_flags, input_decoder_v2, input_info_reader, input_info_writer > >, service_impl_single_t< input_entry_impl_t< T, 0 > >, service_impl_single_t< input_file_type >, service_impl_single_t< resampler_entry_impl_t< T > >, service_impl_single_t< packet_decoder_entry_impl_t< T > >, service_impl_single_t< input_file_type_impl >, and service_impl_single_t< dsp_entry_v2_impl_t< T > >.
|
inlinevirtual |
Queries whether the object supports specific interface and retrieves a pointer to that interface. This is normally not called directly but managed by service_query_t<> function template. Typical implementation checks the parameter against GUIDs of interfaces supported by this object, if the GUID is one of supported interfaces, p_out is set to service_base pointer that can be static_cast<>'ed to queried interface and the method returns true; otherwise the method returns false.
|
inline |
Queries whether the object supports specific interface and retrieves a pointer to that interface.
p_out | Receives pointer to queried interface on success. returns true on success, false on failure (interface not supported by the object). |
Definition at line 350 of file service.h.
|
pure virtual |
Decrements reference count; deletes the object if reference count reaches zero. This is normally not called directly but managed by service_ptr_t<> template.
Implemented in service_impl_single_t< contextmenu_group_impl >, service_impl_single_t< input_entry_impl_t< input_wrapper_singletrack_t< T >, t_flags, t_decoder, t_inforeader, t_infowriter > >, service_impl_single_t< advconfig_entry_string_impl_MT >, service_impl_single_t< contextmenu_group_popup_impl >, service_impl_single_t< dsp_entry_impl_nopreset_t< T > >, service_impl_single_t< advconfig_entry_integer_impl >, service_impl_single_t< advconfig_branch_impl >, service_impl_single_t< input_entry_impl_t< T, t_flags, t_decoder, t_inforeader, t_infowriter > >, service_impl_single_t< output_entry_impl_t< T > >, service_impl_single_t< advconfig_entry_checkbox_impl< p_is_radio, prefFlags > >, service_impl_single_t< advconfig_entry_string_impl >, service_impl_single_t< cue_parser::chapterizer_impl_t< t_input_impl > >, service_impl_single_t< input_entry_impl_t< input_wrapper_singletrack_t< T >, 0 > >, service_impl_single_t< input_entry_impl_t< cue_parser::input_wrapper_cue_t< t_input_impl >, t_flags, input_decoder_v2, input_info_reader, input_info_writer > >, service_impl_single_t< input_entry_impl_t< T, 0 > >, service_impl_single_t< input_file_type >, service_impl_single_t< resampler_entry_impl_t< T > >, service_impl_single_t< packet_decoder_entry_impl_t< T > >, service_impl_single_t< input_file_type_impl >, and service_impl_single_t< dsp_entry_v2_impl_t< T > >.