8 #include "fwData/Exception.hpp" 9 #include "fwData/ProcessObject.hpp" 10 #include "fwData/registry/macros.hpp" 12 #include <fwCore/base.hpp> 37 ::fwData::Object::sptr object;
38 ProcessObjectMapType::const_iterator iter = params.find(name);
39 if(iter != params.end())
41 object = iter->second;
64 std::pair<ProcessObjectMapType::iterator, bool> res;
65 res = params.insert(ProcessObjectMapType::value_type(name,
object));
68 res.first->second = object;
90 ParamNameVectorType names;
91 std::transform( params.begin(), params.end(),
92 std::back_inserter(names),
93 std::bind(&ProcessObjectMapType::value_type::first, std::placeholders::_1) );
136 ProcessObject::csptr other = ProcessObject::dynamicConstCast(source);
138 "Unable to copy" + (source ? source->getClassname() : std::string(
"<NULL>"))
150 ProcessObject::csptr other = ProcessObject::dynamicConstCast(source);
152 "Unable to copy" + (source ? source->getClassname() : std::string(
"<NULL>"))
159 for(
const ProcessObjectMapType::value_type& elt : other->m_inputs)
164 for(
const ProcessObjectMapType::value_type& elt : other->m_outputs)
FWDATA_API void setValue(const ParamNameType &name,::fwData::Object::sptr object, ProcessObjectMapType ¶ms)
Register value with specified name in params map. If the name does already exist, the matching value ...
Provides the notion of Process Object: object having inputs and outputs.
FWDATA_API void clearOutputs()
Unregister all output parameters.
FWDATA_API void setOutputValue(const ParamNameType &name,::fwData::Object::sptr object)
Register output value with specified name. If the name does already exist, the matching value will be...
ProcessObjectMapType m_outputs
Outputs values map.
FWDATA_API ProcessObject(::fwData::Object::Key key)
Constructor.
virtual FWDATA_API ~ProcessObject()
Destructor.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
Implements data exception class.
FWDATA_API ParamNameVectorType getParamNames(const ProcessObjectMapType ¶ms) const
Returns vector of parameters names from params map.
ProcessObjectMapType m_inputs
Inputs values map.
FWDATA_API::fwData::Object::sptr getValue(const ParamNameType &name, const ProcessObjectMapType ¶ms)
Retrieves data associated with specified name in params map (null if non exist).
FWDATA_API void fieldDeepCopy(const ::fwData::Object::csptr &source)
A deep copy of fields (objects in m_children)
FWDATA_API void clearParams(ProcessObjectMapType ¶ms)
Unregister all parameters in params map.
static FWDATA_API::fwData::Object::sptr copy(const ::fwData::Object::csptr &source)
return a copy of the source. if source is a null pointer, return a null pointer.
FWDATA_API void clearInputs()
Unregister all inputs parameters.
FWDATA_API::fwData::Object::sptr getOutput(const ParamNameType &name)
Retrieves the output data associated with specified name (null if non exist).
virtual const std::string & getClassname() const override
return full object's classname with its namespace, i.e. fwCore::BaseObject
FWDATA_API::fwData::Object::sptr getInput(const ParamNameType &name)
Retrieves the input data associated with specified name (null if non exist).
FWDATA_API void setInputValue(const ParamNameType &name,::fwData::Object::sptr object)
Register input value with specified name. If the name does already exist, the matching value will be ...
Contains the representation of the data objects used in the framework.
FWDATA_API void shallowCopy(const Object::csptr &source) override
Defines shallow copy.
FWDATA_API void fieldShallowCopy(const ::fwData::Object::csptr &source)
A shallow copy of fields (objects in m_children)
FWDATA_API void cachedDeepCopy(const Object::csptr &source, DeepCopyCacheType &cache) override
Defines deep copy.
FWDATA_API ParamNameVectorType getOutputsParamNames() const
Returns vector of output parameters names.
FWDATA_API ParamNameVectorType getInputsParamNames() const
Returns vector of input parameters names.