fw4spl
fwServices::OSR Namespace Reference

OSR wraps main Object-Service registry access. More...

Functions

FWSERVICES_API::fwServices::registry::ObjectService::sptr get ()
 returns the Object-Service registry main instance
 
FWSERVICES_API::fwServices::registry::ObjectService::ObjectVectorType getObjects ()
 Wraps ObjectService::getObjects.
 
FWSERVICES_API std::string getRegistryInformation ()
 Wraps ObjectService::getRegistryInformation.
 
template<class SERVICE >
std::set< std::shared_ptr< SERVICE > > getServices ()
 Wraps ObjectService::getServices.
 
template<class SERVICE >
std::set< std::shared_ptr< SERVICE > > getServices (::fwData::Object::sptr obj)
 Wraps ObjectService::getServices.
 
FWSERVICES_API::fwServices::registry::ObjectService::ServiceVectorType getServices (const std::string &serviceType)
 Wraps ObjectService::getServices.
 
FWSERVICES_API::fwServices::registry::ObjectService::ServiceVectorType getServices (::fwData::Object::sptr obj, const std::string &serviceType)
 Wraps ObjectService::getServices.
 
FWSERVICES_API bool has (::fwData::Object::sptr obj, const std::string &srvType)
 return true if the object has at least one service of type srvType More...
 
FWSERVICES_API void registerService (::fwServices::IService::sptr service)
 Register the service alone. More...
 
FWSERVICES_API void registerService (::fwData::Object::sptr obj,::fwServices::IService::sptr service)
 Register the service (service) for the object (obj) It also updates IService::m_associatedObject of service to point to obj removal at obj destruction. More...
 
FWSERVICES_API void registerService (::fwData::Object::sptr obj, const ::fwServices::IService::KeyType &objKey,::fwServices::IService::AccessType access,::fwServices::IService::sptr service)
 Register the service (service) for the object (obj) at the given service key. It also updates IService::m_associatedObject of service to point to obj removal at obj destruction. More...
 
FWSERVICES_API void registerServiceInput (::fwData::Object::csptr obj, const ::fwServices::IService::KeyType &objKey,::fwServices::IService::sptr service)
 Register the service (service) for the input object (obj) at the given service key. It also updates IService::m_associatedObject of service to point to obj removal at obj destruction. More...
 
FWSERVICES_API void registerServiceOutput (::fwData::Object::sptr obj, const ::fwServices::IService::KeyType &objKey,::fwServices::IService::sptr service)
 Emit the signal 'registered'. More...
 
FWSERVICES_API void swapService (::fwData::Object::sptr objDst,::fwServices::IService::sptr service)
 Wraps ObjectService::swapService. More...
 
FWSERVICES_API void unregisterService (::fwServices::IService::sptr service)
 Remove the service (service) from the m_container. More...
 
FWSERVICES_API void unregisterService (const ::fwServices::IService::KeyType &objKey,::fwServices::IService::AccessType access,::fwServices::IService::sptr service)
 Remove an object key from a service. More...
 
FWSERVICES_API void unregisterServiceOutput (const ::fwServices::IService::KeyType &objKey,::fwServices::IService::sptr service)
 Emit the signal 'unregistered'. More...
 
FWSERVICES_API bool isRegistered (const ::fwServices::IService::KeyType &objKey,::fwServices::IService::AccessType access,::fwServices::IService::sptr service)
 Return true if a key is registered for a given service. More...
 
FWSERVICES_API::fwData::Object::csptr getRegistered (const ::fwServices::IService::KeyType &objKey,::fwServices::IService::AccessType access,::fwServices::IService::sptr service)
 Return the object pointer of a key of a given service. More...
 
FWSERVICES_API std::shared_ptr< ::fwServices::registry::ObjectService::RegisterSignalTypegetRegisterSignal ()
 
FWSERVICES_API std::shared_ptr< ::fwServices::registry::ObjectService::RegisterSignalTypegetUnregisterSignal ()
 
void unregisterService (const ::fwServices::IService::KeyType &objKey,::fwServices::IService::AccessType access, IService::sptr service)
 
void unregisterServiceOutput (const ::fwServices::IService::KeyType &objKey, IService::sptr service)
 
bool isRegistered (const ::fwServices::IService::KeyType &objKey,::fwServices::IService::AccessType access, IService::sptr service)
 
::fwData::Object::csptr getRegistered (const ::fwServices::IService::KeyType &objKey,::fwServices::IService::AccessType access, IService::sptr service)
 

Detailed Description

OSR wraps main Object-Service registry access.

Function Documentation

FWSERVICES_API ::fwData::Object::csptr fwServices::OSR::getRegistered ( const ::fwServices::IService::KeyType &  objKey,
::fwServices::IService::AccessType  access,
::fwServices::IService::sptr  service 
)

Return the object pointer of a key of a given service.

Parameters
objKeyKey of the object
accessAccess (INPUT, INOUT, OUTPUT) of this key
serviceService where to look for the key

Referenced by unregisterService().

+ Here is the caller graph for this function:

bool fwServices::OSR::has ( ::fwData::Object::sptr  obj,
const std::string &  srvType 
)

return true if the object has at least one service of type srvType

Parameters
objObject to add to the OSR
srvTypeType of the service
Deprecated:
This method is deprecated

Definition at line 78 of file ObjectService.cpp.

FWSERVICES_API bool fwServices::OSR::isRegistered ( const ::fwServices::IService::KeyType &  objKey,
::fwServices::IService::AccessType  access,
::fwServices::IService::sptr  service 
)

Return true if a key is registered for a given service.

Parameters
objKeyKey of the object
accessAccess (INPUT, INOUT, OUTPUT) of this key
serviceService where to look for the key

Referenced by fwServices::AppConfigManager::getConfigRoot(), fwServices::IService::setOutput(), visuVTKAdaptor::SNegatoOneSlice::swapping(), visuVTKAdaptor::SImagesBlend::swapping(), visuVTKAdaptor::SNegatoMPR::swapping(), unregisterService(), and gui::action::SPushObject::updating().

+ Here is the caller graph for this function:

void fwServices::OSR::registerService ( ::fwServices::IService::sptr  service)

Register the service alone.

Parameters
serviceService to add to the OSR

Definition at line 85 of file ObjectService.cpp.

void fwServices::OSR::registerService ( ::fwData::Object::sptr  obj,
::fwServices::IService::sptr  service 
)

Register the service (service) for the object (obj) It also updates IService::m_associatedObject of service to point to obj removal at obj destruction.

Parameters
objectObject to register
serviceService whose key should be added
Deprecated:
Use the new API: registerService(::fwData::Object::sptr obj, const ::fwServices::IService::KeyType& objKey, ::fwServices::IService::AccessType access, ::fwServices::IService::sptr service)

Definition at line 92 of file ObjectService.cpp.

void fwServices::OSR::registerService ( ::fwData::Object::sptr  obj,
const ::fwServices::IService::KeyType &  objKey,
::fwServices::IService::AccessType  access,
::fwServices::IService::sptr  service 
)

Register the service (service) for the object (obj) at the given service key. It also updates IService::m_associatedObject of service to point to obj removal at obj destruction.

Parameters
objectObject to register
objKeyKey of the object
accessAccess (INPUT, INOUT, OUTPUT) of this key
serviceService whose key should be added

Definition at line 99 of file ObjectService.cpp.

void fwServices::OSR::registerServiceInput ( ::fwData::Object::csptr  obj,
const ::fwServices::IService::KeyType &  objKey,
::fwServices::IService::sptr  service 
)

Register the service (service) for the input object (obj) at the given service key. It also updates IService::m_associatedObject of service to point to obj removal at obj destruction.

Parameters
objectObject to register
objKeyKey of the object
serviceService whose key should be added

Definition at line 107 of file ObjectService.cpp.

void fwServices::OSR::registerServiceOutput ( ::fwData::Object::sptr  obj,
const ::fwServices::IService::KeyType &  objKey,
::fwServices::IService::sptr  service 
)

Emit the signal 'registered'.

Parameters
objectObject to register
objKeyKey of the object
serviceService whose key should be added

Definition at line 115 of file ObjectService.cpp.

void fwServices::OSR::swapService ( ::fwData::Object::sptr  objDst,
::fwServices::IService::sptr  service 
)

Wraps ObjectService::swapService.

Deprecated:

Definition at line 123 of file ObjectService.cpp.

void fwServices::OSR::unregisterService ( ::fwServices::IService::sptr  service)

Remove the service (service) from the m_container.

Parameters
serviceService whose key should be removed

Definition at line 130 of file ObjectService.cpp.

References getRegistered(), isRegistered(), and unregisterServiceOutput().

+ Here is the call graph for this function:

FWSERVICES_API void fwServices::OSR::unregisterService ( const ::fwServices::IService::KeyType &  objKey,
::fwServices::IService::AccessType  access,
::fwServices::IService::sptr  service 
)

Remove an object key from a service.

Parameters
objKeyKey of the object
accessAccess (INPUT, INOUT, OUTPUT) of this key
serviceService whose key should be removed
FWSERVICES_API void fwServices::OSR::unregisterServiceOutput ( const ::fwServices::IService::KeyType &  objKey,
::fwServices::IService::sptr  service 
)

Emit the signal 'unregistered'.

Parameters
objKeyKey of the object
serviceService whose key should be removed

Referenced by unregisterService().

+ Here is the caller graph for this function: