MySQL 9.1.0
Source Code Documentation
|
Wraps my_h_service struct conforming ABI into RAII C++ object with ability to cast to desired service type. More...
#include <my_service.h>
Public Member Functions | |
my_service () | |
Default contructor: constructs an empty my_service. More... | |
my_service (const char *name, const mysql_service_registry_t *registry) | |
An acquire convenience constructor. More... | |
void | acquire (const char *name, const mysql_service_registry_t *registry) |
Acquires service by name. More... | |
my_service (const char *name, my_h_service related_service, const mysql_service_registry_t *registry) | |
Acquires service by name. More... | |
my_service (my_h_service service, const mysql_service_registry_t *registry) | |
Wraps service implementation already acquired. More... | |
my_service (const my_service< TService > &other)=delete | |
my_service (my_service< TService > &&other) | |
my_service< TService > & | operator= (const my_service< TService > &other)=delete |
my_service< TService > & | operator= (my_service< TService > &other) |
void | release () |
Releases the reference, if any, and cleans the instance up. More... | |
~my_service () | |
operator TService * () const | |
operator my_h_service () const | |
TService * | operator-> () const |
Returns managed service typed as desired service type to execute operations specified after -> on it. More... | |
operator bool () const | |
bool | is_valid () const |
TService * | untie () |
Unties and returns the underlying service handle. More... | |
Private Attributes | |
my_h_service | m_service |
const mysql_service_registry_t * | m_registry |
Wraps my_h_service struct conforming ABI into RAII C++ object with ability to cast to desired service type.
|
inline |
Default contructor: constructs an empty my_service.
|
inline |
An acquire convenience constructor.
|
inline |
Acquires service by name.
name | Name of service, with or without component name, to acquire. |
related_service | Handle to service to acquire related to. |
registry | Handle to registry service to use. |
|
inline |
Wraps service implementation already acquired.
service | Service handle to manage. |
registry | Handle to registry service to use. |
|
delete |
|
inline |
|
inline |
|
inline |
Acquires service by name.
name | Name of service, with or without component name, to acquire. |
registry | Handle to registry service to use. The registry service must be valid (i.e. not released) up to the moment when this instance dies. |
|
inline |
|
inline |
false | Object manages valid service. |
true | Object does not manage any service. |
|
inline |
|
inline |
|
inline |
Returns managed service typed as desired service type to execute operations specified after -> on it.
|
delete |
|
inline |
|
inline |
Releases the reference, if any, and cleans the instance up.
|
inline |
Unties and returns the underlying service handle.
It will not be released by the destructor.
the | handle |
|
private |
|
private |