fw4spl
|
Contextual patch database. All contextual patches are stored in this database. More...
#include <SemanticPatchDB.hpp>
Public Types | |
typedef std::shared_ptr< SemanticPatchDB > | sptr |
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, PatchVectorType > | PatchesType |
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::ISemanticPatch > | 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. 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. | |
Contextual patch database. All contextual patches are stored in this database.
Definition at line 30 of file SemanticPatchDB.hpp.
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.
context | current context |
originVersion | origin context version. |
targetVersion | target version. |
objOriginClassname | origin classname of the object. |
objOriginVersion | origin version of the object. |
Definition at line 46 of file SemanticPatchDB.cpp.