fw4spl
fwServices::IHasServices Class Reference

Interface for objects that need to manage services. More...

#include <IHasServices.hpp>

+ Inheritance diagram for fwServices::IHasServices:

Public Types

typedef std::vector< std::weak_ptr< ::fwServices::IService > > ServiceVector
 

Public Member Functions

const ServiceVector & getRegisteredServices () const
 Get all subservices linked to this service. More...
 
FWSERVICES_API std::shared_ptr< const ::fwServices::IServicegetRegisteredService (const ::fwTools::fwID::IDType &_id) const
 Return a specific registered service. More...
 

Protected Member Functions

FWSERVICES_API IHasServices () noexcept
 Constructor.
 
virtual FWSERVICES_API ~IHasServices () noexcept
 Destructor.
 
FWSERVICES_API std::shared_ptr< ::fwServices::IServiceregisterService (const std::string &_implType, const std::string &_id="")
 Register a new service linked to this service. More...
 
template<class T >
std::shared_ptr< T > registerService (const std::string &_implType, const std::string &_id="")
 Register a new service linked to this service. More...
 
FWSERVICES_API void unregisterService (const ::fwTools::fwID::IDType &_id)
 Unregister a specific service. More...
 
FWSERVICES_API void unregisterService (const ::fwServices::IService::sptr &_service)
 Unregister a specific service. More...
 
FWSERVICES_API void unregisterServices (const std::string &_implType="")
 Unregister all services linked to this service, optionally matches only a given type of services. More...
 

Detailed Description

Interface for objects that need to manage services.

Definition at line 24 of file IHasServices.hpp.

Member Function Documentation

fwServices::IService::csptr fwServices::IHasServices::getRegisteredService ( const ::fwTools::fwID::IDType &  _id) const

Return a specific registered service.

Parameters
[in]idIdentifier of the service

Definition at line 32 of file IHasServices.cpp.

References SLM_ASSERT, and unregisterService().

+ Here is the call graph for this function:

const IHasServices::ServiceVector & fwServices::IHasServices::getRegisteredServices ( ) const
inline

Get all subservices linked to this service.

Returns
The vector of linked services

Definition at line 92 of file IHasServices.hpp.

Referenced by fwRenderVTK::IAdaptor::getAllSubProps(), fwRenderVTK::IAdaptor::getAssociatedAdaptor(), visuVTKAdaptor::SPlane::selectPlane(), visuVTKAdaptor::SModelSeries::showReconstructions(), visuVTKAdaptor::SModelSeries::showReconstructionsOnFieldChanged(), visuVTKAdaptor::SNegatoMPR::stopping(), visuVTKAdaptor::SImagesBlend::swapping(), visuVTKAdaptor::SNegatoMPR::swapping(), and visuVTKAdaptor::SModelSeries::updateNormalMode().

+ Here is the caller graph for this function:

fwServices::IService::sptr fwServices::IHasServices::registerService ( const std::string &  _implType,
const std::string &  _id = "" 
)
protected

Register a new service linked to this service.

Parameters
[in]_implTypeType of the service
[in]idOptional identifier of the service

Definition at line 86 of file IHasServices.cpp.

template<class T >
std::shared_ptr< T > fwServices::IHasServices::registerService ( const std::string &  _implType,
const std::string &  _id = "" 
)
protected

Register a new service linked to this service.

Parameters
[in]_implTypeType of the service
[in]idOptional identifier of the service

Definition at line 100 of file IHasServices.hpp.

FWSERVICES_API void fwServices::IHasServices::unregisterService ( const ::fwTools::fwID::IDType &  _id)
protected

Unregister a specific service.

Parameters
idIdentifier of the service

Referenced by getRegisteredService(), and visuVTKAdaptor::SReconstruction::updating().

+ Here is the caller graph for this function:

FWSERVICES_API void fwServices::IHasServices::unregisterService ( const ::fwServices::IService::sptr &  _service)
protected

Unregister a specific service.

Parameters
servicePointer to the service
void fwServices::IHasServices::unregisterServices ( const std::string &  _implType = "")
protected

Unregister all services linked to this service, optionally matches only a given type of services.

Parameters
_implTypeOptional type of the services to unregister

Definition at line 96 of file IHasServices.cpp.

Referenced by visuVTKAdaptor::SImagesBlend::checkImageInformations(), visuVTKAdaptor::SResectionDB::stopping(), visuVTKAdaptor::SSliceFollowerCamera::stopping(), visuVTKAdaptor::SResection::stopping(), visuVTKAdaptor::SPointList::stopping(), visuVTKAdaptor::SImageSeries::stopping(), visuVTKAdaptor::SModelSeries::stopping(), visuVTKAdaptor::SNegatoOneSlice::stopping(), visuVTKAdaptor::SPlane::stopping(), visuVTKAdaptor::SReconstruction::stopping(), and visuVTKAdaptor::SNegatoMPR::stopping().

+ Here is the caller graph for this function:


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