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