7 #include <fwTools/UUID.hpp> 9 #include <fwAtoms/Object.hpp> 10 #include <fwAtoms/Object.hxx> 11 #include <fwAtoms/String.hpp> 13 #include <fwAtomsPatch/helper/functions.hpp> 15 #include "fwMDSemanticPatch/V1/V2/fwData/Study.hpp" 48 const ::fwAtoms::Object::sptr& previous,
49 const ::fwAtoms::Object::sptr& current,
50 ::fwAtomsPatch::IPatch::NewVersionsType& newVersions)
52 ISemanticPatch::apply(previous, current, newVersions);
53 ::fwAtomsPatch::helper::cleanFields( current );
56 ::fwAtoms::String::sptr uid = current->getAttribute<
::fwAtoms::String >(
"instance_uid");
57 if( uid->getValue().empty() )
Contains the semantic patches within the context "MedicalData".
static FWATOMS_API String::sptr New(std::string value)
Construct a new Object represented a string.
FWMDSEMANTICPATCH_API Study()
Constructor.
FWMDSEMANTICPATCH_API ~Study()
Destructor.
Contains base functionalities used to transform objects from a version to another.
std::string m_originClassname
Origin classname of the object.
virtual FWMDSEMANTICPATCH_API void apply(const ::fwAtoms::Object::sptr &previous, const ::fwAtoms::Object::sptr ¤t,::fwAtomsPatch::IPatch::NewVersionsType &newVersions) override
Applies patch.
virtual FWATOMSPATCH_API void addContext(const std::string &context, const std::string &originVersion, const std::string &targetVersion)
Add a context where the patch can be applied.
Patch a study from version V'1' to 'V2' within 'MedicalData' context.
FWATOMSPATCH_API void replaceAttribute(const std::string &name,::fwAtoms::Base::sptr newValue, conditions::Abstract::sptr condition=conditions::Abstract::New())
Replaces an attribute.
std::string m_originVersion
Origin version of the object.
FWATOMSPATCH_API ISemanticPatch()
Constructor.
Contains the representation of the data objects used in the framework.
Class represented a String.