fw4spl
|
Versions graph description. More...
#include <VersionsGraph.hpp>
Public Types | |
Typedefs | |
typedef ::fwAtomsPatch::VersionDescriptor | NodeType |
typedef ::fwAtomsPatch::LinkDescriptor | EdgeType |
typedef ::boost::adjacency_list< ::boost::listS,::boost::vecS,::boost::directedS, NodeType, EdgeType > | GraphType |
typedef ::boost::graph_traits< GraphType >::vertex_descriptor | NodeIDType |
typedef ::boost::graph_traits< GraphType >::edge_descriptor | EdgeIDType |
typedef std::map< NodeType, NodeIDType,::fwAtomsPatch::VersionDescriptor::Compare > | ExistingNodesType |
typedef std::map< EdgeType, EdgeIDType,::fwAtomsPatch::LinkDescriptor::Compare > | ExistingEdgesType |
typedef std::vector< NodeIDType > | VersionSeriesType |
typedef std::pair< LinkDescriptor::VersionIDType, bool > | LinkedVersionType |
Public Member Functions | |
virtual bool | isA (const std::string &type) const override |
FWATOMSPATCH_API | VersionsGraph () |
FWATOMSPATCH_API | ~VersionsGraph () |
FWATOMSPATCH_API void | addNode (NodeType node) |
Add a new version described by the given node. More... | |
FWATOMSPATCH_API void | addEdge (EdgeType edge) |
Add a new edge described by the given edge. More... | |
FWATOMSPATCH_API VersionSeriesType | shortestPath (const std::string &origin, const std::string &target) |
Compute shortest path between two data version (i.e nodes). More... | |
FWATOMSPATCH_API NodeType | getNode (const NodeIDType &nodeID) |
Returns the node matching given node ID. | |
FWATOMSPATCH_API NodeIDType | getNode (const std::string &name) const |
Returns node ID matching given version name. | |
FWATOMSPATCH_API EdgeType | getEdge (const NodeIDType &origin, const NodeIDType &target) |
Returns the edge located between given node IDs. | |
FWATOMSPATCH_API LinkedVersionType | getLinkedVersion (const NodeIDType &originID, const NodeIDType &targetID, LinkDescriptor::VersionIDType current) |
Returns the linked version of the current version and a boolean to say if a match has been found. (Do not rely on the versionID if returned bool is set to false). | |
FWATOMSPATCH_API std::vector< std::string > | getConnectedVersions (const std::string ¤tVersion) |
Get connected versions. | |
Public Member Functions inherited from fwCore::BaseObject |
Static Public Member Functions | |
static bool | isTypeOf (const std::string &type) |
Static Public Member Functions inherited from fwCore::BaseObject | |
static bool | isTypeOf (const std::string &type) |
static const std::string & | leafClassname () |
return object's classname without its namespace, i.e. BaseObject | |
static const std::string & | classname () |
return object's classname without its namespace, i.e. BaseObject | |
Friends | |
template<class , class , class > | |
class | ::fwTools::ClassFactory |
class | ::fwTools::Factory |
Demangling methods | |
virtual const std::string & | getLeafClassname () const override |
return object's classname without its namespace, i.e. BaseObject | |
virtual const std::string & | getClassname () const override |
return full object's classname with its namespace, i.e. fwCore::BaseObject | |
static const std::string & | leafClassname () |
return object's classname without its namespace, i.e. BaseObject | |
static const std::string & | classname () |
return object's classname without its namespace, i.e. BaseObject | |
Versions graph description.
Definition at line 26 of file VersionsGraph.hpp.
fwAtomsPatch::VersionsGraph::VersionsGraph | ( | ) |
Default constructor
Definition at line 45 of file VersionsGraph.cpp.
fwAtomsPatch::VersionsGraph::~VersionsGraph | ( | ) |
Default destructor
Definition at line 51 of file VersionsGraph.cpp.
void fwAtomsPatch::VersionsGraph::addEdge | ( | EdgeType | edge | ) |
Add a new edge described by the given edge.
edge | new edge to be added to the versions graph. |
Definition at line 66 of file VersionsGraph.cpp.
void fwAtomsPatch::VersionsGraph::addNode | ( | NodeType | node | ) |
Add a new version described by the given node.
node | new version to be added to the versions graph. |
Definition at line 57 of file VersionsGraph.cpp.
VersionsGraph::VersionSeriesType fwAtomsPatch::VersionsGraph::shortestPath | ( | const std::string & | origin, |
const std::string & | target | ||
) |
Compute shortest path between two data version (i.e nodes).
origin | the source version name |
target | the target version name |
Definition at line 75 of file VersionsGraph.cpp.