fw4spl
fwAtomsPatch::StructuralPatchDB Class Reference

Structural patch database. All structural patches are stored in this database. More...

#include <StructuralPatchDB.hpp>

Public Types

typedef std::shared_ptr< StructuralPatchDBsptr
 
typedef std::pair< std::string, std::string > VersionIDType
 Typedef used to store the pair classname/version of a data structure.
 
typedef std::pair< VersionIDType, VersionIDTypePatchKeyType
 Typedef used to store link to data structure.
 
typedef std::map< PatchKeyType, std::shared_ptr< ::fwAtomsPatch::IStructuralPatch > > PatchesType
 Typedef used to store all the structural patches.
 

Public Member Functions

FWATOMSPATCH_API void registerPatch (std::shared_ptr< ::fwAtomsPatch::IStructuralPatch > patch)
 Registers a new Path. More...
 
FWATOMSPATCH_API std::shared_ptr< ::fwAtomsPatch::IStructuralPatchgetPatch (const std::string &originClassname, const std::string &originVersion, const std::string &targetClassname, const std::string &targetVersion) const
 Retrieves patch to go to specified data revision. More...
 
FWATOMSPATCH_API size_t size () const
 Retrieves number of patch.
 
 StructuralPatchDB ()
 Constructor.
 
 ~StructuralPatchDB ()
 Destructor.
 

Static Public Member Functions

::fwAtomsPatch::StructuralPatchDB::sptr getDefault ()
 Returns default instance.
 

Detailed Description

Structural patch database. All structural patches are stored in this database.

Definition at line 31 of file StructuralPatchDB.hpp.

Member Function Documentation

fwAtomsPatch::IStructuralPatch::sptr fwAtomsPatch::StructuralPatchDB::getPatch ( const std::string &  originClassname,
const std::string &  originVersion,
const std::string &  targetClassname,
const std::string &  targetVersion 
) const

Retrieves patch to go to specified data revision.

Parameters
originClassnameorigin classname.
originVersionorigin version.
targetClassnametarget classname.
targetVersiontarget version.
Returns
patch that must be applied, or empty pointer if no such patch is found.
Note
This method is thread safe.

Definition at line 26 of file StructuralPatchDB.cpp.

void fwAtomsPatch::StructuralPatchDB::registerPatch ( std::shared_ptr< ::fwAtomsPatch::IStructuralPatch patch)

Registers a new Path.

Parameters
patchthe new Patch.
Note
This method is thread safe.

Definition at line 15 of file StructuralPatchDB.cpp.


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