7 #ifndef __FWATOMSPATCH_ISEMANTICPATCH_HPP__ 8 #define __FWATOMSPATCH_ISEMANTICPATCH_HPP__ 10 #include "fwAtomsPatch/config.hpp" 11 #include "fwAtomsPatch/helper/Object.hpp" 12 #include "fwAtomsPatch/IPatch.hpp" 14 #include <fwCore/base.hpp> 15 #include <fwCore/mt/types.hpp> 57 ::fwAtomsPatch::IPatch::NewVersionsType& newVersions)
override;
63 FWATOMSPATCH_API
virtual bool isApplicable(
64 const std::string& context,
65 const std::string& originVersion,
66 const std::string& targetVersion)
const;
73 std::string m_context;
74 std::string m_originVersion;
75 std::string m_targetVersion;
77 Context(
const std::string& context,
const std::string& originVersion,
const std::string& targetVersion) :
79 m_originVersion(originVersion),
80 m_targetVersion(targetVersion)
86 bool operator==(
const Context& b)
const 88 return m_context == b.m_context
89 && m_originVersion == b.m_originVersion
90 && m_targetVersion == b.m_targetVersion;
98 FWATOMSPATCH_API
virtual void addContext(
const std::string& context,
99 const std::string& originVersion,
100 const std::string& targetVersion);
105 typedef std::vector< Context > ContextVectorType;
108 mutable ::fwCore::mt::ReadWriteMutex m_mutex;
#define fwCoreNonInstanciableClassDefinitionsMacro(_classinfo_)
Generate common code for Non Instanciable classes (Interfaces, Abstract classes, ...)
fwAtoms contains basic objects to represent any other kind of object
Contains base functionalities used to transform objects from a version to another.
Class represented a fwData::Object.
Base class of contextual patches.
#define fwCoreAllowSharedFromThis()
Generate getSptr and getConstSptr methods.
Struct used to store a context and the versions where the patch can be applied.
Base class of all patches.
ContextVectorType m_contexts
Vector used to store the contexts where the patch can be applied.