1 #ifndef GRAPH_ANALYSIS_EDGE_TYPE_MANAGER_HPP 2 #define GRAPH_ANALYSIS_EDGE_TYPE_MANAGER_HPP 4 #include <base-logging/Singleton.hpp> 32 typedef std::map<edge::Type, Edge::Ptr>
TypeMap;
38 std::set<std::string> mRegisteredTypes;
40 std::string mDefaultType;
42 typedef std::map<std::string, io::AttributeSerializationCallbacks> AttributeSerializationCallbackMap;
43 std::map<std::string, AttributeSerializationCallbackMap > mRegisteredCallbacks;
60 void registerType(
const Edge::Ptr& edge,
bool throwOnAlreadyRegistered =
false);
63 void registerType(
const edge::Type& type,
const Edge::Ptr& edge,
bool throwOnAlreadyRegistered =
false);
68 void setDefaultType(
const std::string& type);
82 Edge::Ptr createEdge(
const edge::Type& type,
const std::string& label =
"",
bool throwOnMissing =
false);
85 ,
const std::string& label =
"" 86 ,
bool throwOnMissing =
false);
88 std::set<std::string> getSupportedTypes()
const;
90 std::vector<Attribute> getKnownAttributes(
const std::set<std::string>& classnames = std::set<std::string>())
const;
95 std::vector< std::pair<Attribute::Id, std::string> >
96 getAttributeValues(
const Edge::Ptr& edge)
const;
Factory for Edge subclasses.
Definition: EdgeTypeManager.hpp:29
const std::string & getDefaultType() const
Definition: EdgeTypeManager.hpp:73
shared_ptr< Edge > Ptr
Definition: Edge.hpp:21
Manage object (vertex/edge) attributes and allow them to be serialized, e.g., using GEXF or GraphML...
Definition: AttributeManager.hpp:13
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
std::string Type
Definition: EdgeTypeManager.hpp:18
shared_ptr< Vertex > Ptr
Definition: Vertex.hpp:22
std::map< edge::Type, Edge::Ptr > TypeMap
Definition: EdgeTypeManager.hpp:32