fw4spl
fwAtomsPatch::VersionsGraph Class Reference

Versions graph description. More...

#include <VersionsGraph.hpp>

+ Inheritance diagram for fwAtomsPatch::VersionsGraph:
+ Collaboration diagram for fwAtomsPatch::VersionsGraph:

Public Types

Typedefs
typedef ::fwAtomsPatch::VersionDescriptor NodeType
 
typedef ::fwAtomsPatch::LinkDescriptor EdgeType
 
typedef ::boost::adjacency_list< ::boost::listS,::boost::vecS,::boost::directedS, NodeType, EdgeTypeGraphType
 
typedef ::boost::graph_traits< GraphType >::vertex_descriptor NodeIDType
 
typedef ::boost::graph_traits< GraphType >::edge_descriptor EdgeIDType
 
typedef std::map< NodeType, NodeIDType,::fwAtomsPatch::VersionDescriptor::CompareExistingNodesType
 
typedef std::map< EdgeType, EdgeIDType,::fwAtomsPatch::LinkDescriptor::CompareExistingEdgesType
 
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 &currentVersion)
 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
 

Detailed Description

Versions graph description.

Definition at line 26 of file VersionsGraph.hpp.

Constructor & Destructor Documentation

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.

Member Function Documentation

void fwAtomsPatch::VersionsGraph::addEdge ( EdgeType  edge)

Add a new edge described by the given edge.

Parameters
edgenew 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.

Parameters
nodenew 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).

Parameters
originthe source version name
targetthe target version name

Definition at line 75 of file VersionsGraph.cpp.


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