7 #include "fwActivities/builder/ActivitySeriesInitData.hpp" 9 #include "fwActivities/builder/registry/macros.hpp" 11 #include <fwData/Composite.hpp> 12 #include <fwData/Vector.hpp> 19 fwActivitiesBuilderRegisterMacro(
31 ActivitySeriesInitData::~ActivitySeriesInitData()
37 ::fwMedData::ActivitySeries::sptr ActivitySeriesInitData::buildData(
38 const ::fwActivities::registry::ActivityInfo& activityInfo,
39 const ::fwData::Vector::csptr& currentSelection )
const 41 ::fwMedData::ActivitySeries::sptr actSeries = this->ActivitySeries::buildData(activityInfo, currentSelection);
42 ::fwData::Composite::sptr data = actSeries->getData();
44 namespace ActReg = ::fwActivities::registry;
46 ActReg::ActivityInfo::RequirementsType reqVect = activityInfo.requirements;
47 for(
const ActReg::ActivityRequirement& req : reqVect)
49 if(req.maxOccurs == 0 && req.minOccurs == 0)
51 (*data)[req.name] = ::fwData::factory::New(req.type);
Defines an activity builder which instanciates a new requirement if minOccurs and maxOccurs are set t...
FWACTIVITIES_API ActivitySeriesInitData(::fwActivities::IBuilder::Key key)
Constructor. Do nothing.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
Namespace containing activities data and builder.