fw4spl
fwServices::IAppConfigManager Class Referenceabstract

This class provides an interface to manage configurations template. More...

#include <IAppConfigManager.hpp>

+ Inheritance diagram for fwServices::IAppConfigManager:
+ Collaboration diagram for fwServices::IAppConfigManager:

Public Types

typedef registry::FieldAdaptorType FieldAdaptorType
 

Public Member Functions

virtual bool isA (const std::string &type) const override
 
FWSERVICES_API IAppConfigManager ()
 Constructor. Do nothing.
 
virtual FWSERVICES_API ~IAppConfigManager ()
 Destructor. Do nothing.
 
bool isCreated () const
 Return state.
 
bool isStarted () const
 
bool isStopped () const
 
bool isDestroyed () const
 
void setConfig (::fwRuntime::ConfigurationElement::csptr cfgElem)
 Set config param.
 
virtual FWSERVICES_API void setConfig (const std::string &configId, const FieldAdaptorType &replaceFields=FieldAdaptorType())=0
 Set configuration. More...
 
virtual FWSERVICES_API void setConfig (const std::string &configId, const ::fwData::Composite::csptr &replaceFields)=0
 Set configuration. More...
 
virtual FWSERVICES_API::fwData::Object::sptr getConfigRoot () const =0
 Get config root.
 
virtual FWSERVICES_API void launch ()=0
 Calls methods : create, start then update.
 
virtual FWSERVICES_API void stopAndDestroy ()=0
 Stops and destroys services specified in config, then resets the configRoot sptr.
 
virtual FWSERVICES_API void create ()=0
 Creates objects and services from config.
 
virtual FWSERVICES_API void start ()=0
 Starts services specified in config.
 
virtual FWSERVICES_API void update ()=0
 Updates services specified in config.
 
virtual FWSERVICES_API void stop ()=0
 Stops services specified in config.
 
virtual FWSERVICES_API void destroy ()=0
 Destroys services specified in config.
 
- Public Member Functions inherited from fwTools::Object
- Public Member Functions inherited from fwCore::BaseObject
virtual const std::string & getLeafClassname () const
 return object's classname without its namespace, i.e. BaseObject
 

Static Public Member Functions

static bool isTypeOf (const std::string &type)
 
static FWSERVICES_API std::shared_ptr< IAppConfigManagerNew ()
 
- Static Public Member Functions inherited from fwTools::Object
static bool isTypeOf (const std::string &type)
 
static const std::string & classname ()
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
- 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

enum  ConfigState { STATE_CREATED, STATE_STARTED, STATE_STOPPED, STATE_DESTROYED }
 
- Protected Types inherited from fwTools::fwID
enum  Policy { EMPTY = 1, GENERATE, MUST_EXIST }
 
typedef std::string IDType
 

Protected Attributes

::fwRuntime::ConfigurationElement::csptr m_cfgElem
 XML Configuration tree.
 
ConfigState m_state
 Running state of the app config manager.
 
- Protected Attributes inherited from fwTools::Object
std::shared_ptr< ::fwTools::UUIDm_uuid
 UUID used to identify the object, notably for serialization.
 

Demangling methods

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

Additional Inherited Members

- Protected Member Functions inherited from fwTools::fwID
FWTOOLS_API bool hasID () const
 Return true if the object has an id set. More...
 
FWTOOLS_API IDType getID (Policy policy=GENERATE) const
 Returns the id of the object. If it is not set and the policy value is. More...
 
virtual FWTOOLS_API void setID (IDType newID)
 Set a newID for the object, (newID must not exist in fwID), the oldest one is released. More...
 
FWTOOLS_API void resetID ()
 Release the id for the object. More...
 
 fwID ()
 Constructor : does nothing.
 
virtual const std::string & getLeafClassname () const
 return object's classname without its namespace, i.e. BaseObject
 
- Static Protected Member Functions inherited from fwTools::fwID
static bool isTypeOf (const std::string &type)
 
static FWTOOLS_API bool exist (IDType _id)
 
static FWTOOLS_API std::shared_ptr< ::fwTools::ObjectgetObject (IDType requestID)
 Retrieve the object attached to the given id. Return a null sptr if no correspondence exist. More...
 
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 provides an interface to manage configurations template.

Definition at line 22 of file IAppConfigManager.hpp.

Member Function Documentation

IAppConfigManager::sptr fwServices::IAppConfigManager::New ( )
static
virtual FWSERVICES_API void fwServices::IAppConfigManager::setConfig ( const std::string &  configId,
const FieldAdaptorType &  replaceFields = FieldAdaptorType() 
)
pure virtual

Set configuration.

Parameters
configIdthe identifier of the requested config.
replaceFieldsthe associations between the value and the pattern to replace in the config.

Implemented in fwServices::AppConfigManager.

virtual FWSERVICES_API void fwServices::IAppConfigManager::setConfig ( const std::string &  configId,
const ::fwData::Composite::csptr &  replaceFields 
)
pure virtual

Set configuration.

Parameters
configIdthe identifier of the requested config.
replaceFieldscomposite of association between the value and the pattern to replace in the config.

Implemented in fwServices::AppConfigManager.


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