fw4spl
fwAtomsPatch::VersionsManager Class Reference

Maintains a table of object versions and a table of links between objects. More...

#include <VersionsManager.hpp>

Public Types

Typedefs
typedef std::vector< ::boost::filesystem::path > ListPathType
 
typedef std::map< std::string, VersionsGraph::sptr > VersionsGraphMapType
 

Public Member Functions

FWATOMSPATCH_API VersionsGraph::sptr getGraph (const std::string &context)
 Returns graph corresponding to given context. More...
 
FWATOMSPATCH_API void buildVersionTable (const std::string &dirPath)
 Builds version table. More...
 
FWATOMSPATCH_API void buildLinkTable (const std::string &dirPath)
 Builds link table. More...
 

Static Public Member Functions

static FWATOMSPATCH_API void generateNewFile (const ::boost::filesystem::path &filePath, const std::string &context, const std::string &versionName)
 Generates a .versions file with currently known data versions. More...
 
static std::shared_ptr< VersionsManagergetDefault ()
 Returns the default instance of VersionsManager.
 

Detailed Description

Maintains a table of object versions and a table of links between objects.

Version and link tables are built from .versions and .graphlink files.

Definition at line 30 of file VersionsManager.hpp.

Member Function Documentation

void fwAtomsPatch::VersionsManager::buildLinkTable ( const std::string &  dirPath)

Builds link table.

Parameters
dirPathdirectory to search for .graphlink files
Note
This method is thread safe.

Definition at line 74 of file VersionsManager.cpp.

void fwAtomsPatch::VersionsManager::buildVersionTable ( const std::string &  dirPath)

Builds version table.

Parameters
dirPathdirectory to search for .versions files
Note
This method is thread safe.

Definition at line 59 of file VersionsManager.cpp.

void fwAtomsPatch::VersionsManager::generateNewFile ( const ::boost::filesystem::path &  filePath,
const std::string &  context,
const std::string &  versionName 
)
static

Generates a .versions file with currently known data versions.

Parameters
filePathpath of .versions file to write.
contextcontext of the VersionGraph.
versionNamename of the version to write.

Definition at line 90 of file VersionsManager.cpp.

References fwAtomsPatch::LinkDescriptor::getContext(), fwAtomsPatch::VersionDescriptor::getContext(), and OSLM_ASSERT.

+ Here is the call graph for this function:

VersionsGraph::sptr fwAtomsPatch::VersionsManager::getGraph ( const std::string &  context)

Returns graph corresponding to given context.

Parameters
contextcontext of the requested VersionGraph.
Note
This method is thread safe.

Definition at line 230 of file VersionsManager.cpp.


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