7 #ifndef __FWATOMSPATCH_VERSIONSMANAGER_HPP__ 8 #define __FWATOMSPATCH_VERSIONSMANAGER_HPP__ 14 #include <boost/filesystem/path.hpp> 16 #include <fwCore/mt/types.hpp> 18 #include "fwAtomsPatch/VersionsGraph.hpp" 19 #include "fwAtomsPatch/config.hpp" 38 typedef std::vector< ::boost::filesystem::path > ListPathType;
39 typedef std::map< std::string, VersionsGraph::sptr > VersionsGraphMapType;
43 FWATOMSPATCH_API ~VersionsManager();
50 FWATOMSPATCH_API VersionsGraph::sptr getGraph(
const std::string& context);
59 FWATOMSPATCH_API
static void generateNewFile(const ::boost::filesystem::path& filePath,
const std::string& context,
60 const std::string& versionName);
67 FWATOMSPATCH_API
void buildVersionTable(
const std::string& dirPath);
74 FWATOMSPATCH_API
void buildLinkTable(
const std::string& dirPath);
77 static SPTR(VersionsManager) getDefault() {
88 FWATOMSPATCH_API static ::fwAtomsPatch::VersionDescriptor getVersion(
89 const ::boost::filesystem::path& filePath);
95 FWATOMSPATCH_API static ::fwAtomsPatch::LinkDescriptor getLink(
96 const ::boost::filesystem::path& filePath);
102 FWATOMSPATCH_API
void generateVersionsGraph();
114 ListPathType m_versionTable;
117 ListPathType m_linkTable;
120 VersionsGraphMapType m_versionsGraphMap;
123 FWATOMSPATCH_API
static SPTR(VersionsManager) s_default;
::boost::shared_mutex ReadWriteMutex
Defines a single writer, multiple readers mutex.
Contains base functionalities used to transform objects from a version to another.
Maintains a table of object versions and a table of links between objects.