7 #include "dataReg/parser/GenericField.hpp" 9 #include <fwData/Boolean.hpp> 10 #include <fwData/Float.hpp> 11 #include <fwData/GenericField.hpp> 12 #include <fwData/Integer.hpp> 13 #include <fwData/String.hpp> 15 #include <fwServices/macros.hpp> 36 SLM_FATAL(
"This method is deprecated, and thus shouldn't be used.");
41 void GenericField::createConfig( ::fwTools::Object::sptr _obj )
43 ::fwData::GenericFieldBase::sptr field = ::fwData::GenericFieldBase::dynamicCast( _obj );
44 SLM_ASSERT(
"GenericField not instanced", field);
47 SLM_ASSERT(
"GenericField config must contain at most one tag <value>...</value>", configs.
size() <= 1);
49 if ( configs.
size() >= 1 )
51 ::fwRuntime::ConfigurationElement::sptr config = *configs.
begin();
52 std::string input = config->getValue();
53 field->fromString(input);
FWRUNTIME_API Iterator begin()
Retrieves the iterator on the first managed configuration element.
This class contains an integer value. Integer object is essentially used as a field in other objects...
The namespace dataReg (data registration) contains classes which allow to parse the xml configuration...
Specialisation of GenericField parser for float.
virtual DATAREG_API void updating() override
Updating method : create the process object.
#define SLM_FATAL(message)
Specialisation of GenericField parser for string.
#define SLM_ASSERT(message, cond)
work like 'assert' from 'cassert', with in addition a message logged by spylog (with FATAL loglevel) ...
FWRUNTIME_API size_t size() const
Return the number of configurations.
Specialisation of GenericField parser for integer.
Defines the generic configuration element container class.
This class contains an float value.
Service type for the construction of an object and associated services from an XML-based description...
Specialisation of GenericField parser for boolean.
This class contains an std::string value.
This class contains a boolean value.