fw4spl
fwAtomsPatch::patcher::DefaultPatcher Class Reference

Default patcher. More...

#include <DefaultPatcher.hpp>

+ Inheritance diagram for fwAtomsPatch::patcher::DefaultPatcher:
+ Collaboration diagram for fwAtomsPatch::patcher::DefaultPatcher:

Public Member Functions

virtual bool isA (const std::string &type) const override
 
FWATOMSPATCH_API DefaultPatcher (::fwAtomsPatch::patcher::IPatcher::Key key)
 Constructor.
 
virtual FWATOMSPATCH_API ~DefaultPatcher ()
 Destructor.
 
virtual FWATOMSPATCH_API::fwAtoms::Object::sptr transformObject (::fwAtoms::Object::sptr object, const std::string &context, const std::string &currentVersion, const std::string &targetVersion) override
 Apply the patch to the specified object.
 
- Public Member Functions inherited from fwAtomsPatch::patcher::IPatcher
FWATOMSPATCH_API IPatcher ()
 Constructor.
 
virtual FWATOMSPATCH_API ~IPatcher ()
 Destructor.
 
- Public Member Functions inherited from fwTools::Object
- Public Member Functions inherited from fwCore::BaseObject

Static Public Member Functions

static bool isTypeOf (const std::string &type)
 
- Static Public Member Functions inherited from fwAtomsPatch::patcher::IPatcher
static bool isTypeOf (const std::string &type)
 
static const std::string & classname ()
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
- Static Public Member Functions inherited from fwTools::Object
static bool isTypeOf (const std::string &type)
 
static const std::string & classname ()
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
- Static Public Member Functions inherited from fwCore::BaseObject
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Protected Types

enum  PassType { Structural, Contextual }
 Type of the pass.
 
Typedefs
typedef std::map< std::string,::fwAtoms::Object::sptr > CacheType
 
typedef std::map< ::fwAtoms::Object::sptr,::fwAtoms::Object::sptr > NewVersionsType
 
- Protected Types inherited from fwTools::fwID
enum  Policy { EMPTY = 1, GENERATE, MUST_EXIST }
 
typedef std::string IDType
 

Protected Member Functions

virtual FWATOMSPATCH_API::fwAtoms::Object::sptr processStructuralObject (::fwAtoms::Object::sptr current)
 Process structural atom object.
 
virtual FWATOMSPATCH_API::fwAtoms::Object::sptr processContextualObject (::fwAtoms::Object::sptr current)
 Process contextual atom object.
 
virtual FWATOMSPATCH_API::fwAtoms::Base::sptr processBase (::fwAtoms::Base::sptr base)
 Process atom base.
 
virtual FWATOMSPATCH_API::fwAtoms::Map::sptr processMapping (::fwAtoms::Map::sptr map)
 Process atom mapping.
 
virtual FWATOMSPATCH_API::fwAtoms::Sequence::sptr processSequence (::fwAtoms::Sequence::sptr seq)
 Process atom sequence.
 
virtual FWATOMSPATCH_API::fwAtoms::Object::sptr applyStructuralPatch (::fwAtoms::Object::sptr previous,::fwAtoms::Object::sptr current)
 Apply structural patch.
 
virtual FWATOMSPATCH_API::fwAtoms::Object::sptr applyContextualPatch (::fwAtoms::Object::sptr previous,::fwAtoms::Object::sptr current)
 Apply contextual patch.
 
FWATOMSPATCH_API bool isKnown (const ::fwAtoms::Base::sptr &base)
 Return true if the object is known in the target version.
 
- Protected Member Functions inherited from fwTools::fwID
FWTOOLS_API bool hasID () const
 Return true if the object has an id set. More...
 
FWTOOLS_API IDType getID (Policy policy=GENERATE) const
 Returns the id of the object. If it is not set and the policy value is. More...
 
virtual FWTOOLS_API void setID (IDType newID)
 Set a newID for the object, (newID must not exist in fwID), the oldest one is released. More...
 
FWTOOLS_API void resetID ()
 Release the id for the object. More...
 
 fwID ()
 Constructor : does nothing.
 

Protected Attributes

PassType m_pass
 Current type of pass during patching.
 
CacheType m_cache
 Cache used to store objects which have already been patched (in order to avoid patching the same object twice).
 
NewVersionsType m_newVersions
 Map used to store the correspondence between an old object and a new one.
 
::fwAtoms::Object::sptr m_object
 Current object being patched.
 
std::string m_context
 Context where the object is patched.
 
::fwAtomsPatch::VersionsGraph::NodeIDType m_currentVersion
 Current object version.
 
::fwAtomsPatch::VersionsGraph::NodeIDType m_targetVersion
 Target version for current object.
 
::fwAtomsPatch::VersionsGraph::sptr m_versionsGraph
 Versions graph.
 
- Protected Attributes inherited from fwTools::Object
std::shared_ptr< ::fwTools::UUIDm_uuid
 UUID used to identify the object, notably for serialization.
 

Friends

template<class , class , class >
class ::fwTools::ClassFactory
 
class ::fwTools::Factory
 

Demangling methods

virtual const std::string & getLeafClassname () const override
 return object's classname without its namespace, i.e. BaseObject
 
virtual const std::string & getClassname () const override
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Additional Inherited Members

- Public Types inherited from fwAtomsPatch::patcher::IPatcher
typedef ::fwAtomsPatch::patcher::factory::Key Key
 Factory key used by IPatcher implementations.
 
- Static Protected Member Functions inherited from fwTools::fwID
static bool isTypeOf (const std::string &type)
 
static FWTOOLS_API bool exist (IDType _id)
 
static FWTOOLS_API std::shared_ptr< ::fwTools::ObjectgetObject (IDType requestID)
 Retrieve the object attached to the given id. Return a null sptr if no correspondence exist. More...
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Detailed Description

Default patcher.

Definition at line 36 of file DefaultPatcher.hpp.


The documentation for this class was generated from the following files: