foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
service_factory_single_ref_t< T >

#include <service.h>

+ Inheritance diagram for service_factory_single_ref_t< T >:

Public Member Functions

 service_factory_single_ref_t (T &param)
 
Tget_static_instance ()
 
void instance_create (service_ptr_t< service_base > &p_out)
 
- Public Member Functions inherited from service_factory_base_t< T::t_interface_entrypoint >
 service_factory_base_t ()
 
- Public Member Functions inherited from service_factory_base
const GUIDget_class_guid () const
 

Private Attributes

Tinstance
 

Additional Inherited Members

- Static Public Member Functions inherited from service_factory_base
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 inherited from service_factory_base
service_factory_base__internal__next
 
- Static Public Attributes inherited from service_factory_base
static service_factory_base__internal__list = NULL
 
- Protected Member Functions inherited from service_factory_base
 service_factory_base (const GUID &p_guid, service_factory_base *&factoryList)
 
 ~service_factory_base ()
 

Detailed Description

template<typename T>
class service_factory_single_ref_t< T >

Definition at line 634 of file service.h.

Constructor & Destructor Documentation

template<typename T >
service_factory_single_ref_t< T >::service_factory_single_ref_t ( T param)
inline

Definition at line 639 of file service.h.

639 : instance(param) {}

Member Function Documentation

template<typename T >
T& service_factory_single_ref_t< T >::get_static_instance ( )
inline

Definition at line 645 of file service.h.

645 {return instance;}
template<typename T >
void service_factory_single_ref_t< T >::instance_create ( service_ptr_t< service_base > &  p_out)
inlinevirtual

Throws std::bad_alloc or another exception on failure.

Implements service_factory_base.

Definition at line 641 of file service.h.

641  {
642  p_out = pfc::implicit_cast<service_base*>(pfc::implicit_cast<typename T::t_interface_entrypoint*>(pfc::implicit_cast<T*>(&instance)));
643  }
Base class for all service classes. Provides interfaces for reference counter and querying for differ...
Definition: service.h:333
t_ret implicit_cast(t_ret val)
Definition: primitives.h:182

Field Documentation

template<typename T >
T& service_factory_single_ref_t< T >::instance
private

Definition at line 637 of file service.h.


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