7 #include <fwAtomsPatch/types.hpp> 9 #include "fwAtomsPatch/IStructuralPatch.hpp" 10 #include "fwAtomsPatch/helper/functions.hpp" 46 const ::fwAtoms::Object::sptr& current,
47 ::fwAtomsPatch::IPatch::NewVersionsType& newVersions)
55 <<
") does not match the required version (" <<
m_originVersion <<
").",
virtual FWATOMSPATCH_API const std::string & getOriginClassname() const
Returns the origin classname of the object.
virtual FWATOMSPATCH_API ~IStructuralPatch()
Destructor.
#define OSLM_ASSERT(message, cond)
work like 'assert' from 'cassert', with in addition a message logged by spylog (with FATAL loglevel) ...
FWATOMSPATCH_API std::string getClassname(const ::fwAtoms::Object::sptr &obj)
Get classname of an object.
FWATOMSPATCH_API void updateVersion(std::shared_ptr< ::fwAtoms::Object > current)
Updates the version of the patched object.
Contains base functionalities used to transform objects from a version to another.
std::string m_targetClassname
Target type.
FWATOMSPATCH_API IStructuralPatch()
Constructor.
std::string m_originClassname
Origin classname of the object.
virtual FWATOMSPATCH_API const std::string & getTargetClassname() const
Returns the target classname of the object.
std::string m_originVersion
Origin version of the object.
virtual FWATOMSPATCH_API const std::string & getTargetVersion() const
Returns the target version of the object.
virtual FWATOMSPATCH_API void apply(const std::shared_ptr< ::fwAtoms::Object > &previous, const std::shared_ptr< ::fwAtoms::Object > ¤t,::fwAtomsPatch::IPatch::NewVersionsType &newVersions) override
Applies the patch to the specified object.
std::string m_targetVersion
Target version.
Base class of all structural patches.
FWATOMSPATCH_API std::string getVersion(const ::fwAtoms::Object::sptr &obj)
Get version of an object.
virtual FWATOMSPATCH_API const std::string & getOriginVersion() const
Returns the origin version of the object.
Base class of all patches.