fw4spl
fwServices::helper::Config Class Reference

Provides configuration element parsing tools. More...

#include <Config.hpp>

Classes

struct  ConnectionInfo
 

Public Types

typedef std::pair< std::string,::fwCom::Signals::SignalKeyType > SignalInfoType
 
typedef std::pair< std::string,::fwCom::Slots::SlotKeyType > SlotInfoType
 
typedef std::vector< SlotInfoType > SlotInfoContainerType
 
typedef std::string ObjectIdType
 
typedef std::vector< ProxyConnectionsProxyConnectionsVectType
 
typedef std::map< ObjectIdType, ProxyConnectionsVectType > ProxyConnectionsMapType
 

Static Public Member Functions

static FWSERVICES_API ConnectionInfo parseConnections (const std::shared_ptr< const ::fwRuntime::ConfigurationElement > &cfg, const std::shared_ptr< const ::fwTools::Object > &obj=std::shared_ptr< const ::fwTools::Object >())
 Parses "<connect>" tags from given configuration and return a structure containing the signal and slots informations. More...
 
static FWSERVICES_API ProxyConnections parseConnections2 (const std::shared_ptr< const ::fwRuntime::ConfigurationElement > &connectionCfg, const std::string &errMsgHead, std::function< std::string()> generateChannelNameFn)
 Parses "<connect>" tags from given configuration and return a structure containing the signal and slots informations. More...
 
static FWSERVICES_API void createConnections (const std::shared_ptr< const ::fwRuntime::ConfigurationElement > &cfg,::fwCom::helper::SigSlotConnection &helper, const std::shared_ptr< const ::fwTools::Object > &obj=std::shared_ptr< const ::fwTools::Object >())
 Parses "<connect>" tags from given configuration to connect signals and slots using given helper. More...
 
static FWSERVICES_API void createProxy (const std::string &objectKey, const std::shared_ptr< const ::fwRuntime::ConfigurationElement > &cfg, ProxyConnectionsMapType &proxyMap, const std::shared_ptr< const ::fwData::Object > &obj=std::shared_ptr< const ::fwData::Object >())
 Parses "<proxy>" tags from given configuration to connect signals and slots using proxies. More...
 
static FWSERVICES_API void disconnectProxies (const std::string &objectKey, Config::ProxyConnectionsMapType &proxyMap)
 Disconnects all proxies associated to objectKey.
 
static FWSERVICES_API::fwServices::IService::Config parseService (const std::shared_ptr< const ::fwRuntime::ConfigurationElement > &srvElem, const std::string &errMsgHead)
 Parse a service and return a service configuration.
 

Detailed Description

Provides configuration element parsing tools.

Definition at line 47 of file Config.hpp.

Member Function Documentation

void fwServices::helper::Config::createConnections ( const std::shared_ptr< const ::fwRuntime::ConfigurationElement > &  cfg,
::fwCom::helper::SigSlotConnection helper,
const std::shared_ptr< const ::fwTools::Object > &  obj = std::shared_ptr < const ::fwTools::Object >() 
)
static

Parses "<connect>" tags from given configuration to connect signals and slots using given helper.

Parameters
cfgconfiguration element containing "<connect>" tags
helperSigSlotConnection helper to connect signals and slots
objoptional object used to retrieve signal if uid is not defined [deprecated]

Definition at line 38 of file Config.cpp.

References fwCom::helper::SigSlotConnection::connect(), fwTools::fwID::getObject(), parseConnections(), and SLM_ASSERT.

Referenced by ctrlSelection::IManagerSrv::manageConnection().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fwServices::helper::Config::createProxy ( const std::string &  objectKey,
const std::shared_ptr< const ::fwRuntime::ConfigurationElement > &  cfg,
Config::ProxyConnectionsMapType &  proxyMap,
const std::shared_ptr< const ::fwData::Object > &  obj = std::shared_ptr < const ::fwData::Object >() 
)
static

Parses "<proxy>" tags from given configuration to connect signals and slots using proxies.

Parameters
objectKeyId of the object
cfgconfiguration element containing "<proxy>" tags
proxyMapmap containing the proxy's signals and slots connections
objoptional object used to retrieve signal if uid is not defined

Definition at line 170 of file Config.cpp.

References fwServices::registry::Proxy::getDefault(), fwRuntime::ConfigurationElementContainer::getElements(), fwRuntime::ConfigurationElement::getExistingAttributeValue(), fwTools::fwID::getID(), fwTools::fwID::getObject(), fwRuntime::ConfigurationElement::hasAttribute(), and SLM_ASSERT.

Referenced by ctrlSelection::IManagerSrv::manageProxies().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Config::ConnectionInfo fwServices::helper::Config::parseConnections ( const std::shared_ptr< const ::fwRuntime::ConfigurationElement > &  cfg,
const std::shared_ptr< const ::fwTools::Object > &  obj = std::shared_ptr < const ::fwTools::Object >() 
)
static

Parses "<connect>" tags from given configuration and return a structure containing the signal and slots informations.

Parameters
cfgconfiguration element containing "<connect>" tags
objoptional object used to retrieve signal if uid is not defined [deprecated]

Definition at line 63 of file Config.cpp.

References fwTools::fwID::getID(), OSLM_ASSERT, and SLM_ASSERT.

Referenced by createConnections().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ProxyConnections fwServices::helper::Config::parseConnections2 ( const std::shared_ptr< const ::fwRuntime::ConfigurationElement > &  connectionCfg,
const std::string &  errMsgHead,
std::function< std::string()>  generateChannelNameFn 
)
static

Parses "<connect>" tags from given configuration and return a structure containing the signal and slots informations.

Parameters
cfgconfiguration element containing "<connect>" tags

Definition at line 113 of file Config.cpp.

References OSLM_ASSERT, and SLM_ASSERT.

Referenced by fwServices::AppConfigManager::getConfigRoot().

+ Here is the caller graph for this function:


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