C++ main module for gpm Package  1.0
GPM_Types.h
Go to the documentation of this file.
1 #ifndef GPM_Types_H
2 #define GPM_Types_H
3 
4 #include "CORE_Object.h"
5 
6 #include <boost/graph/adjacency_list.hpp>
7 
11 
12 // *******
13 // Data 1
14 // *******
15 
16 
19  SP::GPM_Vertex vertex;
20 };
21 
22 
24  SP::GPM_Edge edge;
25 };
26 
27 // the definition of graph type
28 typedef boost::adjacency_list<boost::listS,//container for edges leaving from a vertex
29  boost::vecS,//container for all graph's vertices
30  //boost::hash_setS,//container for all graph's vertices
31  //boost::bidirectionalS,// 2 oriented edges in both direction or
32  //boost::directedS,//oriented edge or
33  boost::undirectedS,//unoriented edge
34  VertexProperties, // vertex properties
35  EdgeProperties//edge properties
36  > tGraph;
37 
38 // vertex property fields
39 typedef boost::property_map<tGraph, boost::vertex_index_t>::type tVertexIIdMap;
40 typedef boost::property_map<tGraph, boost::vertex_index_t>::const_type tVertexIIdConstMap;
41 
42 // edge property fields
43 
44 // the definition of vertex id type
45 typedef tGraph::vertex_descriptor tVertexIID;
46 // the vertex iterator
47 typedef boost::graph_traits<tGraph>::vertex_iterator tVertexIterator;
48 
49 // the definition of edge id type
50 typedef tGraph::edge_descriptor tEdgeIID;
51 // the edge iterator
52 typedef boost::graph_traits<tGraph>::edge_iterator tEdgeIterator;
53 // the in edge iterator
54 typedef boost::graph_traits<tGraph>::in_edge_iterator tInEdgeIterator;
55 
56 // the graph iterator
57 typedef std::pair <boost::graph_traits<tGraph>::adjacency_iterator,
58  boost::graph_traits<tGraph>::adjacency_iterator> tGraphIterator;
59 
60 // //morphism maps
61 // typedef boost::property_map<tGraph,GPM_Vertex>::type tVertexNameMap;
62 // typedef boost::property_map_equivalent<tVertexNameMap,tVertexNameMap> tVertexComp;
63 
64 // typedef boost::property_map<tGraph,boost::edge_name_t>::type tEdgeNameMap;
65 // typedef boost::property_map_equivalent<tEdgeNameMap,tEdgeNameMap> tEdgeComp;
66 
67 
68 //*******
69 // Data 2
70 //*******
71 // // vertex property
72 // typedef boost::property<boost::vertex_index1_t, int,
73 // boost::property<boost::vertex_name_t, tString>
74 // > vertex_property;
75 
76 
77 // //edge property
78 // typedef boost::property<boost::edge_index_t, int,
79 // boost::property<boost::edge_name_t, tString>
80 // > edge_property;
81 
82 // // the definition of graph type
83 // typedef boost::adjacency_list<boost::listS,//container for edges leaving from a vertex
84 // boost::vecS,//container for all graph's vertices
85 // //boost::hash_setS,//container for all graph's vertices
86 // //boost::bidirectionalS,// 2 oriented edges in both direction or
87 // //boost::directedS,//oriented edge or
88 // boost::undirectedS,//unoriented edge
89 // vertex_property, // vertex properties
90 // edge_property //edge property
91 // > tGraph;
92 
93 // // vertex property fields
94 // typedef boost::property_map<tGraph, boost::vertex_index_t>::type tVertexIIdMap;
95 // typedef boost::property_map<tGraph, boost::vertex_index_t>::const_type tVertexIIdConstMap;
96 // typedef boost::property_map<tGraph, boost::vertex_index1_t>::type tVertexIdMap;
97 // typedef boost::property_map<tGraph, boost::vertex_index1_t>::const_type tVertexIdConstMap;
98 // typedef boost::property_map<tGraph, boost::vertex_name_t>::type tVertexTypeMap;
99 // typedef boost::property_map<tGraph, boost::vertex_name_t>::const_type tVertexTypeConstMap;
100 
101 // // edge property fields
102 // typedef boost::property_map<tGraph, boost::edge_index_t>::type tEdgeIdMap;
103 // typedef boost::property_map<tGraph, boost::edge_index_t>::const_type tEdgeIdConstMap;
104 // typedef boost::property_map<tGraph, boost::edge_name_t>::type tEdgeTypeMap;
105 // typedef boost::property_map<tGraph, boost::edge_name_t>::const_type tEdgeTypeConstMap;
106 
107 // // the definition of vertex id type
108 // typedef tGraph::vertex_descriptor tVertexIID;
109 // // the vertex iterator
110 // typedef boost::graph_traits<tGraph>::vertex_iterator tVertexIterator;
111 
112 // // the definition of edge id type
113 // typedef tGraph::edge_descriptor tEdgeIID;
114 // // the edge iterator
115 // typedef boost::graph_traits<tGraph>::edge_iterator tEdgeIterator;
116 
117 // // the graph iterator
118 // typedef std::pair <boost::graph_traits<tGraph>::adjacency_iterator,
119 // boost::graph_traits<tGraph>::adjacency_iterator> tGraphIterator;
120 
121 // // //morphism maps
122 // // typedef boost::property_map<tGraph,GPM_Vertex>::type tVertexNameMap;
123 // // typedef boost::property_map_equivalent<tVertexNameMap,tVertexNameMap> tVertexComp;
124 
125 // // typedef boost::property_map<tGraph,boost::edge_name_t>::type tEdgeNameMap;
126 // // typedef boost::property_map_equivalent<tEdgeNameMap,tEdgeNameMap> tEdgeComp;
127 
128 
129 
130 
131 #endif
tGraph::edge_descriptor tEdgeIID
Definition: GPM_Types.h:50
boost::property_map< tGraph, boost::vertex_index_t >::type tVertexIIdMap
Definition: GPM_Types.h:39
boost::adjacency_list< boost::listS, boost::vecS, boost::undirectedS, VertexProperties, EdgeProperties > tGraph
Definition: GPM_Types.h:36
boost::graph_traits< tGraph >::edge_iterator tEdgeIterator
Definition: GPM_Types.h:52
This class describes a node.
Definition: GPM_Vertex.h:16
Definition: GPM_Types.h:17
This class describes a edge.
Definition: GPM_Edge.h:15
tGraph::vertex_descriptor tVertexIID
Definition: GPM_Types.h:45
std::pair< boost::graph_traits< tGraph >::adjacency_iterator, boost::graph_traits< tGraph >::adjacency_iterator > tGraphIterator
Definition: GPM_Types.h:58
boost::graph_traits< tGraph >::in_edge_iterator tInEdgeIterator
Definition: GPM_Types.h:54
tString groupId
Definition: GPM_Types.h:18
DEFINE_SPTR(GPM_Vertex)
#define tString
Definition: types.h:36
SP::GPM_Vertex vertex
Definition: GPM_Types.h:19
boost::property_map< tGraph, boost::vertex_index_t >::const_type tVertexIIdConstMap
Definition: GPM_Types.h:40
SP::GPM_Edge edge
Definition: GPM_Types.h:24
This class describes a graph which is a list of nodes & ports.
Definition: GPM_Graph.h:19
boost::graph_traits< tGraph >::vertex_iterator tVertexIterator
Definition: GPM_Types.h:47
Definition: GPM_Types.h:23