fw4spl
fwAtomsPatch::SemanticPatchDB Class Reference

Contextual patch database. All contextual patches are stored in this database. More...

#include <SemanticPatchDB.hpp>

Public Types

typedef std::shared_ptr< SemanticPatchDBsptr
 
typedef std::pair< std::string, std::string > VersionIDType
 Typedef used to store the pair type/version of a data structure.
 
typedef std::vector< std::shared_ptr< ::fwAtomsPatch::ISemanticPatch > > PatchVectorType
 Typedef used to store a list of contextual patches applicable on an object.
 
typedef std::map< VersionIDType, PatchVectorTypePatchesType
 Typedef used to store all the contextual patches.
 

Public Member Functions

FWATOMSPATCH_API void registerPatch (std::shared_ptr< ::fwAtomsPatch::ISemanticPatch > patch)
 Registers a new patch.
 
FWATOMSPATCH_API std::shared_ptr< ::fwAtomsPatch::ISemanticPatchgetPatch (const std::string &context, const std::string &originVersion, const std::string &targetVersion, const std::string &objOriginClassname, const std::string &objOriginVersion) const
 Retrieves a patch allowing to go to specified data type/version target. More...
 
FWATOMSPATCH_API size_t size () const
 Returns the number of patches.
 
FWATOMSPATCH_API SemanticPatchDB ()
 Constructor. Does nothing.
 
virtual FWATOMSPATCH_API ~SemanticPatchDB ()
 Destructor. Does nothing.
 

Static Public Member Functions

static FWATOMSPATCH_API SemanticPatchDB::sptr getDefault ()
 Return default instance of SemanticPatchDB.
 

Detailed Description

Contextual patch database. All contextual patches are stored in this database.

Definition at line 30 of file SemanticPatchDB.hpp.

Member Function Documentation

fwAtomsPatch::ISemanticPatch::sptr fwAtomsPatch::SemanticPatchDB::getPatch ( const std::string &  context,
const std::string &  originVersion,
const std::string &  targetVersion,
const std::string &  objOriginClassname,
const std::string &  objOriginVersion 
) const

Retrieves a patch allowing to go to specified data type/version target.

Parameters
contextcurrent context
originVersionorigin context version.
targetVersiontarget version.
objOriginClassnameorigin classname of the object.
objOriginVersionorigin version of the object.
Returns
patch applicable for data patching, or empty pointer if no such patch found.

Definition at line 46 of file SemanticPatchDB.cpp.


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