Initial community commit
This commit is contained in:
parent
537bcbc862
commit
fc06254474
16440 changed files with 4239995 additions and 2 deletions
28
Src/Components/wac_network/ServiceBuild.h
Normal file
28
Src/Components/wac_network/ServiceBuild.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef NULLSOFT_WAC_NETWORK_SERVICEBUILD_H
|
||||
#define NULLSOFT_WAC_NETWORK_SERVICEBUILD_H
|
||||
|
||||
template <class api_T>
|
||||
static void ServiceBuild( api_T *&p_api_t, GUID p_factoryGUID_t )
|
||||
{
|
||||
if ( WASABI_API_SVC )
|
||||
{
|
||||
waServiceFactory *factory = WASABI_API_SVC->service_getServiceByGuid( p_factoryGUID_t );
|
||||
if ( factory )
|
||||
p_api_t = reinterpret_cast<api_T *>( factory->getInterface() );
|
||||
}
|
||||
}
|
||||
|
||||
template <class api_T>
|
||||
static void ServiceRelease( api_T *p_api_t, GUID p_factoryGUID_t )
|
||||
{
|
||||
if ( WASABI_API_SVC && p_api_t )
|
||||
{
|
||||
waServiceFactory *factory = WASABI_API_SVC->service_getServiceByGuid( p_factoryGUID_t );
|
||||
if ( factory )
|
||||
factory->releaseInterface( p_api_t );
|
||||
}
|
||||
|
||||
p_api_t = NULL;
|
||||
}
|
||||
|
||||
#endif // !NULLSOFT_WAC_NETWORK_SERVICEBUILD_H
|
Loading…
Add table
Add a link
Reference in a new issue