fw4spl
fwActivities::registry::Activities Class Reference

This class allows to register all the configuration parameters which has the point extension "::activityReg::registry::Activities". More...

#include <Activities.hpp>

+ Inheritance diagram for fwActivities::registry::Activities:
+ Collaboration diagram for fwActivities::registry::Activities:

Public Types

typedef std::vector< ActivityInfoActivitiesType
 

Public Member Functions

virtual bool isA (const std::string &type) const override
 
virtual FWACTIVITIES_API ~Activities ()
 Destructor.
 
FWACTIVITIES_API const ActivityInfo getInfo (const std::string &extensionId) const
 Get the parameters associated to extension id. More...
 
FWACTIVITIES_API bool hasInfo (const std::string &extensionId) const
 Tests if we have information about operator. More...
 
FWACTIVITIES_API ActivityInfo::DataCountType getDataCount (const std::shared_ptr< const ::fwData::Vector > &data) const
 Get the number of vector objects in the same type.
 
FWACTIVITIES_API ActivitiesType getInfos () const
 Get all infos. More...
 
FWACTIVITIES_API ActivitiesType getInfos (const std::shared_ptr< const ::fwData::Vector > &data) const
 Get available activities for given data. More...
 
FWACTIVITIES_API std::vector< std::string > getKeys () const
 Get all keys. More...
 
FWACTIVITIES_API void clearRegistry ()
 Clear the registry. More...
 
FWACTIVITIES_API void parseBundleInformation ()
 Parse bundle information to retrieve config parameters declaration. More...
 
FWACTIVITIES_API void parseBundleInformation (const std::vector< std::shared_ptr< ::fwRuntime::Extension > > &extensions)
 Parse bundle information to retrieve config parameters declaration. More...
 
- Public Member Functions inherited from fwCore::BaseObject

Static Public Member Functions

static bool isTypeOf (const std::string &type)
 
static FWACTIVITIES_API Activities::sptr getDefault ()
 Return the default global instance of Activities.
 
- Static Public Member Functions inherited from fwCore::BaseObject
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Protected Types

typedef std::map< std::string, ActivityInfoRegistry
 

Protected Member Functions

FWACTIVITIES_API Activities ()
 Constructor.
 

Protected Attributes

Registry m_reg
 Container of parameter information.
 
mutable::fwCore::mt::ReadWriteMutex m_registryMutex
 Used to protect the registry access.
 

Static Protected Attributes

static Activities::sptr s_activities = Activities::New()
 The global instance of the app config parameters.
 

Friends

template<class , class , class >
class ::fwTools::ClassFactory
 
class ::fwTools::Factory
 

Demangling methods

virtual const std::string & getLeafClassname () const override
 return object's classname without its namespace, i.e. BaseObject
 
virtual const std::string & getClassname () const override
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Detailed Description

This class allows to register all the configuration parameters which has the point extension "::activityReg::registry::Activities".

See also
fwActivities::registry::ActivityInfo

Definition at line 216 of file Activities.hpp.

Member Function Documentation

void fwActivities::registry::Activities::clearRegistry ( )

Clear the registry.

Note
This method is thread safe.

Definition at line 273 of file Activities.cpp.

References fwServices::registry::ActiveWorkers::m_registryMutex.

const ActivityInfo fwActivities::registry::Activities::getInfo ( const std::string &  extensionId) const

Get the parameters associated to extension id.

Note
This method is thread safe.

Definition at line 357 of file Activities.cpp.

References fwServices::registry::ActiveWorkers::m_registryMutex, and SLM_ASSERT.

std::vector< ActivityInfo > fwActivities::registry::Activities::getInfos ( ) const

Get all infos.

Note
This method is thread safe.

Definition at line 290 of file Activities.cpp.

References fwServices::registry::ActiveWorkers::m_registryMutex.

FWACTIVITIES_API ActivitiesType fwActivities::registry::Activities::getInfos ( const std::shared_ptr< const ::fwData::Vector > &  data) const

Get available activities for given data.

Note
This method is thread safe.
std::vector< std::string > fwActivities::registry::Activities::getKeys ( ) const

Get all keys.

Note
This method is thread safe.

Definition at line 341 of file Activities.cpp.

References fwServices::registry::ActiveWorkers::m_registryMutex.

bool fwActivities::registry::Activities::hasInfo ( const std::string &  extensionId) const

Tests if we have information about operator.

Note
This method is thread safe.

Definition at line 281 of file Activities.cpp.

References fwServices::registry::ActiveWorkers::m_registryMutex.

void fwActivities::registry::Activities::parseBundleInformation ( )

Parse bundle information to retrieve config parameters declaration.

Warning
This method must be launch only once. The same extension will not be parsed twice.
Note
This method is thread safe.

Definition at line 239 of file Activities.cpp.

void fwActivities::registry::Activities::parseBundleInformation ( const std::vector< std::shared_ptr< ::fwRuntime::Extension > > &  extensions)

Parse bundle information to retrieve config parameters declaration.

Warning
This method must be launch only once. The same extension will not be parsed twice.
Note
This method is thread safe.

Definition at line 250 of file Activities.cpp.

References fwRuntime::BundleElement::getBundle(), fwServices::registry::ActiveWorkers::m_registryMutex, OSLM_DEBUG, SLM_ASSERT, and SPTR.

+ Here is the call graph for this function:


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