Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef __Blueprint_hxx
#define __Blueprint_hxx
#include <boost/graph/graphviz.hpp>
#include "elxBlueprint.h"
namespace elastix {
void
Blueprint< ComponentDescriptor >
::Blueprint( void )
{
this->m_Graph = GraphType;
}
ComponentDescriptorType
Blueprint< ComponentDescriptor >
::AddComponent( ComponentDescriptorType component )
{
this->Modified();
return this->m_Graph->add_vertex( component );
}
void
Blueprint< ComponentDescriptor >
::RemoveComponent( ComponentDescriptorType component )
{
this->Modified();
this->m_Graph->remove_vertex( connection );
}
void
Blueprint< ComponentDescriptor >
::AddConnection( ComponentDescriptorType upsteam, ComponentDescriptorType downstream )
{
this->Modified();
this->m_Graph->add_edge( upstream, downstream );
}
void
Blueprint< ComponentDescriptor >
::RemoveConnection( ConnectionType connection )
{
this->Modified();
this->m_Graph->remove_edge( connection );
}
void Blueprint< ComponentDescriptor >
::PrintSelf( void )
{
boost::write_graphviz(std::cout, this->m_Graph);
}
}
#endif // __Blueprint_hxx