9 #include "fwRuntime/ConfigurationElement.hpp" 10 #include "fwRuntime/ConfigurationElementContainer.hpp" 27 HasName(
const std::string & name )
32 bool operator() ( ConfigurationElement::csptr element )
const 34 return element->getName() == m_name;
48 m_elements.push_back( element );
55 return m_elements.begin();
62 return m_elements.end();
76 Container::const_iterator found = std::find_if( m_elements.begin(), m_elements.end(), HasName(name) );
77 return found != m_elements.end();
83 const std::string & name )
const 85 Container::const_iterator found = std::find_if( m_elements.begin(), m_elements.end(), HasName(name) );
87 return ( found == m_elements.end() ) ? std::shared_ptr< ConfigurationElement >() : *found;
97 for( Container::const_iterator itCfgElem = m_elements.begin();
98 itCfgElem != m_elements.end();
101 if ( (*itCfgElem)->getName() == _name )
114 return m_elements.size();
FWRUNTIME_API void addConfigurationElement(std::shared_ptr< ConfigurationElement > element)
Adds a new configuration element to the extension.
FWRUNTIME_API Iterator begin()
Retrieves the iterator on the first managed configuration element.
FWRUNTIME_API bool hasConfigurationElement(const std::string &name) const
Test if has an configuration corresponding to the specified name.
std::vector< std::shared_ptr< ConfigurationElement > > Container
Defines the configuration element container type.
FWRUNTIME_API ConfigurationElementContainer findAllConfigurationElement(const std::string &name) const
Retrieves the configurations corresponding to the specified name.
The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...
FWRUNTIME_API size_t size() const
Return the number of configurations.
Defines the generic configuration element container class.
FWRUNTIME_API const Container & getElements() const
Returns the configuration element container.
FWRUNTIME_API Iterator end()
Retrieves the iterator on the end of the configuration element container.
Container::iterator Iterator
Defines the configuration element container type.
FWRUNTIME_API const std::shared_ptr< ConfigurationElement > findConfigurationElement(const std::string &name) const
Retrieves the first configuration corresponding to the specified name.