Go to the documentation of this file. 1 #ifndef GRAPH_ANALYSIS_GRAPH_ELEMENT_HPP
2 #define GRAPH_ANALYSIS_GRAPH_ELEMENT_HPP
7 #include <boost/uuid/uuid.hpp>
8 #include <boost/uuid/uuid_io.hpp>
9 #include <boost/uuid/uuid_generators.hpp>
46 typedef shared_ptr< GraphElement >
Ptr;
62 virtual std::string
getClassName()
const {
return "graph_analysis::GraphElement"; }
140 void setUuid(
const std::string& uuid);
151 #endif // GRAPH_ANALYSIS_GRAPH_ELEMENT_HPP
std::string toPrefixedString(GraphId graph) const
Definition: GraphElement.cpp:66
std::map< GraphId, GraphElementId > GraphElementMap
Definition: GraphElement.hpp:23
GraphElement(const std::string &label=std::string())
Default constructor.
Definition: GraphElement.cpp:11
virtual ~GraphElement()
Definition: GraphElement.cpp:18
boost::uuids::uuid GraphElementUuid
Definition: GraphElement.hpp:20
void disassociate(GraphId graph)
Definition: GraphElement.hpp:90
weak_ptr< GraphElement > WeakPtr
Definition: GraphElement.hpp:47
virtual std::string toString() const
Definition: GraphElement.hpp:73
uint32_t GraphId
Definition: GraphElement.hpp:22
GraphElement is the base class for all element in a graph, i.e. for edges and vertices.
Definition: GraphElement.hpp:34
void setUuid(const GraphElementUuid &uuid)
Definition: GraphElement.hpp:138
GraphElementUuid getUuid() const
Definition: GraphElement.hpp:107
virtual std::string toString(uint32_t indent) const
Definition: GraphElement.hpp:68
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
virtual const std::string & getLabel() const
Definition: GraphElement.hpp:58
GraphElementUuid getUid() const
Definition: GraphElement.hpp:101
static boost::uuids::random_generator msUuidGenerator
Definition: GraphElement.hpp:145
static GraphElement::Ptr fromUuid(const GraphElementUuid &uuid)
Definition: GraphElement.cpp:40
GraphElementId getId(GraphId graph) const
Definition: GraphElement.cpp:26
void associate(GraphId graph, GraphElementId elementId)
Definition: GraphElement.hpp:85
static std::map< GraphElementUuid, function< GraphElement::Ptr()> > msGraphElements
Definition: GraphElement.hpp:146
virtual void setLabel(const std::string &label)
Definition: GraphElement.hpp:53
GraphElement::Ptr getSharedFromThis()
Definition: GraphElement.hpp:130
std::string mLabel
Definition: GraphElement.hpp:147
uint32_t GraphElementId
Definition: GraphElement.hpp:21
GraphElementUuid mUuid
Definition: GraphElement.hpp:144
std::vector< GraphId > GraphIdList
Definition: GraphElement.hpp:24
void disassociateFromAll()
Definition: GraphElement.hpp:132
shared_ptr< GraphElement > Ptr
Definition: GraphElement.hpp:46
bool associated(GraphId graph) const
Definition: GraphElement.hpp:79
GraphIdList getGraphAssociations() const
Definition: GraphElement.cpp:54
std::vector< Ptr > PtrList
Definition: GraphElement.hpp:48
Interface for Reader implementation that perform custom graph deserialization.
Definition: GraphIO.hpp:56
GraphElementMap mGraphElementMap
Definition: GraphElement.hpp:142
virtual std::string getClassName() const
Definition: GraphElement.hpp:62