graph_analysis
src
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>
14
class
VertexRegistration
15
{
16
bool
mIsRegistered;
17
18
public
:
19
VertexRegistration
()
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
graph_analysis::VertexRegistration::VertexRegistration
VertexRegistration()
Definition:
VertexRegistration.hpp:19
graph_analysis
Main namespace of the graph analysis library.
Definition:
BFS.cpp:3
VertexTypeManager.hpp
graph_analysis::VertexRegistration::isRegistered
bool isRegistered() const
Definition:
VertexRegistration.hpp:28
graph_analysis::VertexTypeManager::registerType
void registerType(bool throwOnAlreadyRegistered=false)
Definition:
VertexTypeManager.hpp:70
graph_analysis::VertexTypeManager
Factory for Vertex subclasses.
Definition:
VertexTypeManager.hpp:29
graph_analysis::VertexRegistration
Definition:
VertexRegistration.hpp:14
Generated by
1.8.17