Falaise
4.0.1
SuperNEMO Software Toolkit
|
Semi-smart pointer holding a service interface. More...
#include <falaise/snemo/services/service_handle.h>
Public Member Functions | |
service_handle ()=default | |
Default constructor. More... | |
service_handle (datatools::service_manager &sm) | |
Construct from a service provider. More... | |
T * | operator-> () const |
Return pointer to service interface. More... | |
Semi-smart pointer holding a service interface.
Provides a convenient adaptor interface over datatools::service_manager to ease checked access and use of service interfaces. It may be constructed from a datatools::service_manager instance as
The template parameter must be a type for which a specialization of snemo::service_traits exists otherwise a compile-time error will be emitted Access and use of the service is checked at construction and access via
nullptr
It is only a semi-smart pointer as it does not own the raw pointer to the service interface. The lifetime of service interface pointers is expected, but not guaranteed, to be equal to the lifetime of an flreconstruct
process.
|
default |
Default constructor.
|
inline |
Construct from a service provider.
|
inline |
Return pointer to service interface.
bad_service_access | if pointer is null |