foobar2000 SDK  2015-08-03
Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes | Protected Member Functions | Private Attributes
service_factory_baseabstract

#include <service.h>

+ Inheritance diagram for service_factory_base:

Public Member Functions

const GUIDget_class_guid () const
 
virtual void instance_create (service_ptr_t< service_base > &p_out)=0
 

Static Public Member Functions

static bool enum_create (service_ptr_t< service_base > &p_out, service_class_ref p_class, t_size p_index)
 
static service_class_ref enum_find_class (const GUID &p_guid)
 
static t_size enum_get_count (service_class_ref p_class)
 
static bool is_service_present (const GUID &g)
 

Data Fields

service_factory_base__internal__next
 

Static Public Attributes

static service_factory_base__internal__list = NULL
 

Protected Member Functions

 service_factory_base (const GUID &p_guid, service_factory_base *&factoryList)
 
 ~service_factory_base ()
 

Private Attributes

const GUIDm_guid
 

Detailed Description

Definition at line 383 of file service.h.

Constructor & Destructor Documentation

service_factory_base::service_factory_base ( const GUID p_guid,
service_factory_base *&  factoryList 
)
inlineprotected

Definition at line 385 of file service.h.

385 : m_guid(p_guid) {PFC_ASSERT(!core_api::are_services_available());__internal__next=factoryList;factoryList=this;}
const GUID & m_guid
Definition: service.h:404
service_factory_base * __internal__next
FOR INTERNAL USE ONLY.
Definition: service.h:402
bool are_services_available()
Tests whether services are available at this time. They are not available only during DLL startup or ...
service_factory_base::~service_factory_base ( )
inlineprotected

Definition at line 386 of file service.h.

386 {PFC_ASSERT(!core_api::are_services_available());}
bool are_services_available()
Tests whether services are available at this time. They are not available only during DLL startup or ...

Member Function Documentation

bool service_factory_base::enum_create ( service_ptr_t< service_base > &  p_out,
service_class_ref  p_class,
t_size  p_index 
)
static

Definition at line 12 of file service.cpp.

13 {
15  return g_foobar2000_api->service_enum_create(p_out,p_class,p_index);
16 }
foobar2000_api * g_foobar2000_api
Definition: service.cpp:4
bool are_services_available()
Tests whether services are available at this time. They are not available only during DLL startup or ...
virtual bool service_enum_create(service_ptr_t< service_base > &p_out, service_class_ref p_class, t_size p_index)=0
service_class_ref service_factory_base::enum_find_class ( const GUID p_guid)
static

Definition at line 6 of file service.cpp.

7 {
10 }
virtual service_class_ref service_enum_find_class(const GUID &p_guid)=0
foobar2000_api * g_foobar2000_api
Definition: service.cpp:4
bool are_services_available()
Tests whether services are available at this time. They are not available only during DLL startup or ...
t_size service_factory_base::enum_get_count ( service_class_ref  p_class)
static

Definition at line 18 of file service.cpp.

19 {
22 }
foobar2000_api * g_foobar2000_api
Definition: service.cpp:4
virtual t_size service_enum_get_count(service_class_ref p_class)=0
bool are_services_available()
Tests whether services are available at this time. They are not available only during DLL startup or ...
const GUID& service_factory_base::get_class_guid ( ) const
inline

Definition at line 388 of file service.h.

388 {return m_guid;}
const GUID & m_guid
Definition: service.h:404
virtual void service_factory_base::instance_create ( service_ptr_t< service_base > &  p_out)
pure virtual

Throws std::bad_alloc or another exception on failure.

Implemented in service_factory_single_ref_t< T >, and service_factory_t< T >.

static bool service_factory_base::is_service_present ( const GUID g)
inlinestatic

Definition at line 394 of file service.h.

394 {return enum_get_count(enum_find_class(g))>0;}
static t_size enum_get_count(service_class_ref p_class)
Definition: service.cpp:18
static service_class_ref enum_find_class(const GUID &p_guid)
Definition: service.cpp:6

Field Documentation

service_factory_base * service_factory_base::__internal__list = NULL
static

FOR INTERNAL USE ONLY.

Definition at line 400 of file service.h.

service_factory_base* service_factory_base::__internal__next

FOR INTERNAL USE ONLY.

Definition at line 402 of file service.h.

const GUID& service_factory_base::m_guid
private

Definition at line 404 of file service.h.


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