Go to the source code of this file.
|
template<typename T > |
void | __validate_service_class_helper () |
|
template<> |
void | __validate_service_class_helper< service_base > () |
|
template<typename T > |
static service_class_ref | _service_find_class () |
|
template<typename what > |
static bool | _service_instantiate_helper (service_ptr_t< what > &out, service_class_ref servClass, t_size index) |
|
void | _standard_api_create_internal (service_ptr &out, const GUID &classID) |
|
template<typename T > |
static void | _validate_service_ptr (service_ptr_t< T > const &ptr) |
|
| PFC_DECLARE_EXCEPTION (exception_service_not_found, pfc::exception,"Service not found") |
|
| PFC_DECLARE_EXCEPTION (exception_service_extension_not_found, pfc::exception,"Service extension not found") |
|
| PFC_DECLARE_EXCEPTION (exception_service_duplicated, pfc::exception,"Service duplicated") |
|
template<typename T > |
static void | service_add_ref_safe (T *p_ptr) throw () |
|
template<typename what > |
static bool | service_by_guid (service_ptr_t< what > &out, const GUID &theID) |
|
template<typename what > |
static service_ptr_t< what > | service_by_guid (const GUID &theID) |
|
template<typename what > |
static bool | service_by_guid_fallback (service_ptr_t< what > &out, const GUID &id) |
|
template<typename what > |
static void | service_by_guid_init () |
|
template<class T > |
static bool | service_enum_create_t (service_ptr_t< T > &p_out, t_size p_index) |
|
template<typename T > |
static service_obscure_refcounting< T > * | service_obscure_refcounting_cast (T *p_source) throw () |
|
template<typename T > |
static void | service_release_safe (T *p_ptr) throw () |
|
template<typename T > |
void | standard_api_create_t (service_ptr_t< T > &p_out) |
|
template<typename T > |
void | standard_api_create_t (T *&p_out) |
|
template<typename T > |
service_ptr_t< T > | standard_api_create_t () |
|
template<typename T > |
bool | static_api_test_t () |
|
template<typename T >
void __validate_service_class_helper |
( |
| ) |
|
|
inline |
Definition at line 373 of file service.h.
374 __validate_service_class_helper<typename T::t_interface_parent>();
Definition at line 445 of file service.h.
static service_class_ref enum_find_class(const GUID &p_guid)
Definition at line 451 of file service.h.
461 FB2K_ASSERT_VALID_SERVICE_PTR( out );
void attach(t_source *p_ptr)
static bool enum_create(service_ptr_t< service_base > &p_out, service_class_ref p_class, t_size p_index)
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
void _standard_api_create_internal |
( |
service_ptr & |
out, |
|
|
const GUID & |
classID |
|
) |
| |
Definition at line 48 of file service.cpp.
52 throw exception_service_not_found();
57 throw exception_service_duplicated();
const void * service_class_ref
static t_size enum_get_count(service_class_ref p_class)
static service_class_ref enum_find_class(const GUID &p_guid)
static bool enum_create(service_ptr_t< service_base > &p_out, service_class_ref p_class, t_size p_index)
Definition at line 421 of file service.h.
424 PFC_ASSERT( ptr->service_query_t(test) );
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
PFC_DECLARE_EXCEPTION |
( |
exception_service_not_found |
, |
|
|
pfc::exception |
, |
|
|
"Service not found" |
|
|
) |
| |
PFC_DECLARE_EXCEPTION |
( |
exception_service_extension_not_found |
, |
|
|
pfc::exception |
, |
|
|
"Service extension not found" |
|
|
) |
| |
PFC_DECLARE_EXCEPTION |
( |
exception_service_duplicated |
, |
|
|
pfc::exception |
, |
|
|
"Service duplicated" |
|
|
) |
| |
template<typename T >
static void service_add_ref_safe |
( |
T * |
p_ptr | ) |
|
throw | ( | |
| ) | | |
|
static |
Definition at line 36 of file service.h.
37 if (p_ptr != NULL) PFC_ASSERT_NO_EXCEPTION( p_ptr->service_add_ref() );
Definition at line 738 of file service.h.
747 FB2K_DebugLog() <<
"Warning: service_by_guid() used in non-main thread without initialization, using fallback";
751 return data.create(out,theID);
bool is_main_thread()
Returns true if calling thread is main app thread, false otherwise.
static bool service_by_guid_fallback(service_ptr_t< what > &out, const GUID &id)
Definition at line 754 of file service.h.
static bool service_by_guid(service_ptr_t< what > &out, const GUID &theID)
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
template<typename what >
static bool service_by_guid_fallback |
( |
service_ptr_t< what > & |
out, |
|
|
const GUID & |
id |
|
) |
| |
|
static |
Definition at line 677 of file service.h.
681 if (ptr->get_guid() == id) {out = ptr;
return true;}
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
bool next(service_ptr_t< t_query > &p_out)
template<typename what >
static void service_by_guid_init |
( |
| ) |
|
|
static |
Definition at line 433 of file service.h.
437 p_out =
static_cast<T*
>(ptr.get_ptr());
static service_class_ref enum_find_class(const GUID &p_guid)
static bool enum_create(service_ptr_t< service_base > &p_out, service_class_ref p_class, t_size p_index)
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
Converts a service interface pointer to a pointer that obscures service counter functionality.
Definition at line 28 of file service.h.
Special hack to ensure errors when someone tries to ->service_add_ref()/->service_release() on a serv...
template<typename T >
static void service_release_safe |
( |
T * |
p_ptr | ) |
|
throw | ( | |
| ) | | |
|
static |
Definition at line 31 of file service.h.
32 if (p_ptr != NULL) PFC_ASSERT_NO_EXCEPTION( p_ptr->service_release() );
Definition at line 492 of file service.h.
495 FB2K_ASSERT_VALID_SERVICE_PTR(p_out);
499 if (!temp->service_query_t(p_out))
throw exception_service_extension_not_found();
void standard_api_create_t(service_ptr_t< T > &p_out)
void _standard_api_create_internal(service_ptr &out, const GUID &classID)
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
service_ptr_t< service_base > & _as_base_ptr()
template<typename T >
void standard_api_create_t |
( |
T *& |
p_out | ) |
|
|
inline |
Definition at line 503 of file service.h.
void standard_api_create_t(service_ptr_t< T > &p_out)
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
Definition at line 508 of file service.h.
void standard_api_create_t(service_ptr_t< T > &p_out)
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
template<typename T >
bool static_api_test_t |
( |
| ) |
|
|
inline |
Definition at line 515 of file service.h.
516 typedef typename T::t_interface_entrypoint EP;
518 if (helper.
get_count() != 1)
return false;
521 if (!helper.
create(0)->service_query_t(t))
return false;
bool create(service_ptr_t< T > &p_out, t_size p_index) const
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.