7 #ifndef __FWDATA_PROCESSOBJECT_HPP__ 8 #define __FWDATA_PROCESSOBJECT_HPP__ 10 #include "fwData/factory/new.hpp" 11 #include "fwData/Object.hpp" 21 fwCampAutoDeclareDataMacro((
fwData)(ProcessObject), FWDATA_API);
33 ::fwData::factory::New< ProcessObject >);
37 typedef std::string ParamNameType;
38 typedef std::vector<std::string> ParamNameVectorType;
39 typedef std::map< ParamNameType, ::fwData::Object::sptr > ProcessObjectMapType;
57 FWDATA_API ::fwData::Object::sptr getInput(
const ParamNameType& name);
64 template<
class OBJECTTYPE >
65 typename OBJECTTYPE::sptr getInput(
const ParamNameType& name);
72 FWDATA_API ::fwData::Object::sptr getOutput(
const ParamNameType& name);
79 template<
class OBJECTTYPE >
80 typename OBJECTTYPE::sptr getOutput(
const ParamNameType& name);
86 const ProcessObjectMapType& getInputs ()
const;
88 void setInputs (
const ProcessObjectMapType& val);
95 const ProcessObjectMapType& getOutputs ()
const;
97 void setOutputs (
const ProcessObjectMapType& val);
106 FWDATA_API
void setInputValue(
const ParamNameType& name, ::fwData::Object::sptr
object);
114 FWDATA_API
void setOutputValue(
const ParamNameType& name, ::fwData::Object::sptr
object);
119 FWDATA_API ParamNameVectorType getInputsParamNames()
const;
124 FWDATA_API ParamNameVectorType getOutputsParamNames()
const;
129 FWDATA_API
void clearInputs();
134 FWDATA_API
void clearOutputs();
137 FWDATA_API
void shallowCopy(
const Object::csptr& source )
override;
140 FWDATA_API
void cachedDeepCopy(
const Object::csptr& source, DeepCopyCacheType& cache)
override;
147 FWDATA_API ParamNameVectorType getParamNames(
const ProcessObjectMapType& params)
const;
156 FWDATA_API
void setValue(
const ParamNameType& name, ::fwData::Object::sptr
object, ProcessObjectMapType& params);
164 FWDATA_API ::fwData::Object::sptr getValue(
const ParamNameType& name,
const ProcessObjectMapType& params);
169 FWDATA_API
void clearParams(ProcessObjectMapType& params);
180 template<
class OBJECTTYPE >
183 return OBJECTTYPE::dynamicCast( this->getInput( name ) );
188 template<
class OBJECTTYPE >
191 return OBJECTTYPE::dynamicCast( this->getOutput( name ) );
226 #endif // __FWDATA_PROCESSOBJECT_HPP__ Provides the notion of Process Object: object having inputs and outputs.
ProcessObjectMapType m_outputs
Outputs values map.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
ProcessObjectMapType m_inputs
Inputs values map.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
FWDATA_API::fwData::Object::sptr getOutput(const ParamNameType &name)
Retrieves the output data associated with specified name (null if non exist).
Base class for each data object.
FWDATA_API::fwData::Object::sptr getInput(const ParamNameType &name)
Retrieves the input data associated with specified name (null if non exist).
const ProcessObjectMapType & getInputs() const
Retrieve the input data.
void setOutputs(const ProcessObjectMapType &val)
Contains the representation of the data objects used in the framework.
const ProcessObjectMapType & getOutputs() const
void setInputs(const ProcessObjectMapType &val)
Retrieve the input data.