graph_analysis
EdgeRegistration.hpp
Go to the documentation of this file.
1 #ifndef GRAPH_ANALYSIS_EDGE_REGISTRATION_HPP
2 #define GRAPH_ANALYSIS_EDGE_REGISTRATION_HPP
3 
4 #include "EdgeTypeManager.hpp"
5 
6 namespace graph_analysis {
7 
13 template<typename T, typename P = graph_analysis::Edge>
15 {
16  bool mIsRegistered;
17 public:
19  : mIsRegistered(false)
20  {
21  using namespace graph_analysis;
22  EdgeTypeManager* eManager = EdgeTypeManager::getInstance();
23  eManager->registerType<T,P>(true);
24  mIsRegistered = true;
25  }
26 
27  bool isRegistered() const { return mIsRegistered; }
28 };
29 
30 } // end namespace graph_analysis
31 #endif // GRAPH_ANALYSIS_EDGE_REGISTRATION_HPP
graph_analysis::EdgeRegistration
Definition: EdgeRegistration.hpp:14
graph_analysis::EdgeTypeManager
Factory for Edge subclasses.
Definition: EdgeTypeManager.hpp:30
graph_analysis
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
graph_analysis::EdgeRegistration::isRegistered
bool isRegistered() const
Definition: EdgeRegistration.hpp:27
graph_analysis::EdgeTypeManager::registerType
void registerType(bool throwOnAlreadyRegistered=false)
Definition: EdgeTypeManager.hpp:63
EdgeTypeManager.hpp
graph_analysis::EdgeRegistration::EdgeRegistration
EdgeRegistration()
Definition: EdgeRegistration.hpp:18