9 #include "fwRuntime/config.hpp" 10 #include "fwRuntime/ConfigurationElementContainer.hpp" 11 #include "fwRuntime/RuntimeException.hpp" 13 #include <fwCore/base.hpp> 28 struct BundleDescriptorReader;
40 public std::enable_shared_from_this< ConfigurationElement >
43 friend struct ::fwRuntime::io::BundleDescriptorReader;
46 (((
const std::shared_ptr< Bundle > ))((
const std::string ))),
48 __FWCORE_GENERATE_CAST(__FWCORE_GET_CLASSNAME((
ConfigurationElement)), __FWCORE_TYPEDEF_ROOTCLASS_NAME)
73 FWRUNTIME_API
const std::shared_ptr< Bundle > getBundle()
const noexcept;
90 FWRUNTIME_API
const std::string getAttributeValue(
const std::string& name)
const noexcept;
108 FWRUNTIME_API
const std::string getExistingAttributeValue(
const std::string& name)
const;
124 FWRUNTIME_API
const AttributePair getSafeAttributeValue(
const std::string& name)
const noexcept;
131 FWRUNTIME_API
const std::string getName()
const noexcept;
138 FWRUNTIME_API
const std::string getValue()
const noexcept;
147 FWRUNTIME_API
bool hasAttribute(
const std::string& name)
const noexcept;
152 FWRUNTIME_API
const std::map<std::string, std::string> getAttributes()
const noexcept;
157 FWRUNTIME_API
friend std::ostream& operator<<(std::ostream& _sstream,
170 FWRUNTIME_API std::vector < ConfigurationElement::sptr > find(
171 std::string name =
"",
172 std::string attribute =
"",
173 std::string attributeValue =
"",
192 FWRUNTIME_API
ConfigurationElement(
const std::shared_ptr<Bundle> bundle,
const std::string& name);
202 FWRUNTIME_API
void setAttributeValue(
const std::string& name,
const std::string& value) noexcept;
209 FWRUNTIME_API
void setValue(
const std::string& value) noexcept;
216 typedef std::map<std::string, std::string> AttributeContainer;
221 const std::string m_name;
231 AttributeContainer m_attributes;
238 void operator=(
const ConfigurationElement&) noexcept;
243 const std::weak_ptr<Bundle> m_bundle;
std::pair< bool, std::string > AttributePair
Defines the attribute pair type.
This namespace fwCore provides common foundations for FW4SPL.
Defines the configuration element class.
The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...
#define fwCoreInterfaceIsTypeOfMacro(_classinfo_)
Generate getSptr and getConstSptr methods.
#define fwCoreInterfaceMacro()
Generate getSptr and getConstSptr methods.
Defines the generic configuration element container class.
#define fwCoreClassFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate methods for classes with one factory.
Defines the a class for attributes exceptions.