LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
AnnotationGraph.h
Go to the documentation of this file.
1// Copyright 2002-2013 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
18#ifndef LIMA_ANNOTATIONGRAPHS_ANNOTATIONGRAPH_H
19#define LIMA_ANNOTATIONGRAPHS_ANNOTATIONGRAPH_H
20
24
25#include <vector>
26#include <stdexcept>
27#include <boost/graph/adjacency_list.hpp>
29
30//========== Vertex properties
31
33typedef boost::property<boost::vertex_color_t, boost::default_color_type> AGVertexColorProperty;
34
36typedef std::map< uint64_t, uint64_t > AGIannotProp;
38typedef boost::property< vertex_iannot_t, AGIannotProp, AGVertexColorProperty > AGVIannotProperty;
39namespace boost {BOOST_INSTALL_PROPERTY(vertex, iannot);}
40
42typedef std::map< uint64_t, Lima::LimaString > AGSannotProp;
44typedef boost::property< vertex_sannot_t, AGSannotProp, AGVIannotProperty> AGVSannotProperty;
45namespace boost {BOOST_INSTALL_PROPERTY(vertex, sannot);}
46
48typedef std::map< uint64_t, Lima::Common::AnnotationGraphs::GenericAnnotation > AGGannotProp;
50typedef boost::property< vertex_gannot_t, AGGannotProp, AGVSannotProperty> AGVGannotProperty;
51namespace boost {BOOST_INSTALL_PROPERTY(vertex, gannot);}
52
55
56
57//========== Edges properties
58
59
61typedef std::map< uint64_t, uint64_t > AGIannotProp;
63typedef boost::property< edge_iannot_t, AGIannotProp > AGEIannotProperty;
64namespace boost {BOOST_INSTALL_PROPERTY(edge, iannot);}
65
67typedef std::map< uint64_t, Lima::LimaString > AGSannotProp;
69typedef boost::property< edge_sannot_t, AGSannotProp, AGEIannotProperty> AGESannotProperty;
70namespace boost {BOOST_INSTALL_PROPERTY(edge, sannot);}
71
73typedef std::map< uint64_t, Lima::Common::AnnotationGraphs::GenericAnnotation > AGGannotProp;
75typedef boost::property< edge_gannot_t, AGGannotProp, AGESannotProperty> AGEGannotProperty;
76namespace boost {BOOST_INSTALL_PROPERTY(edge, gannot);}
77
78
81
82
83// ============ Graph class
84
87typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS,
89
90
93typedef AnnotationGraph::edge_descriptor AnnotationGraphEdge;
94typedef AnnotationGraph::edge_iterator AnnotationGraphEdgeIt;
95typedef AnnotationGraph::out_edge_iterator AnnotationGraphOutEdgeIt;
96typedef AnnotationGraph::in_edge_iterator AnnotationGraphInEdgeIt;
97typedef AnnotationGraph::vertex_descriptor AnnotationGraphVertex;
98typedef AnnotationGraph::vertex_iterator AnnotationGraphVertexIt;
99typedef AnnotationGraph::adjacency_iterator AnnotationGraphAdjacencyIt;
100typedef boost::property_map<AnnotationGraph, edge_iannot_t>::type EdgeAGIannotPropertyMap;
101typedef boost::property_map<AnnotationGraph, edge_iannot_t>::const_type CEdgeAGIannotPropertyMap;
102typedef boost::property_map<AnnotationGraph, edge_sannot_t>::type EdgeAGSannotPropertyMap;
103typedef boost::property_map<AnnotationGraph, edge_sannot_t>::const_type CEdgeAGSannotPropertyMap;
104typedef boost::property_map<AnnotationGraph, edge_gannot_t>::type EdgeAGGannotPropertyMap;
105typedef boost::property_map<AnnotationGraph, edge_gannot_t>::const_type CEdgeAGGannotPropertyMap;
106typedef boost::property_map<AnnotationGraph, edge_iannot_t>::type EdgeAGIannotPropertyMap;
107
108typedef boost::property_map<AnnotationGraph, vertex_iannot_t>::type VertexAGIannotPropertyMap;
109typedef boost::property_map<AnnotationGraph, vertex_iannot_t>::const_type CVertexAGIannotPropertyMap;
110typedef boost::property_map<AnnotationGraph, vertex_sannot_t>::type VertexAGSannotPropertyMap;
111typedef boost::property_map<AnnotationGraph, vertex_sannot_t>::const_type CVertexAGSannotPropertyMap;
112typedef boost::property_map<AnnotationGraph, vertex_gannot_t>::type VertexAGGannotPropertyMap;
113typedef boost::property_map<AnnotationGraph, vertex_gannot_t>::const_type CVertexAGGannotPropertyMap;
114
115typedef boost::property_map<AnnotationGraph, boost::vertex_color_t >::type AGVertexColorPropertyMap;
118namespace Lima {
119namespace Common {
120namespace AnnotationGraphs {
121
122 LIMA_ANNOTATIONGRAPH_EXPORT QDebug& operator<< (QDebug& os, const AnnotationGraphEdge& e);
123
124} // closing namespace AnnotationGraphs
125} // closing namespace Common
126} // closing namespace Lima
127
128
129#endif // LIMA_ANNOTATIONGRAPHS_ANNOTATIONGRAPH_H
boost::property< vertex_sannot_t, AGSannotProp, AGVIannotProperty > AGVSannotProperty
edge_sannot_t
@ edge_sannot
vertex_gannot_t
@ vertex_gannot
boost::property< boost::vertex_color_t, boost::default_color_type > AGVertexColorProperty
Default color property to use in various algorithms.
AGEGannotProperty AGEdgeProperties
Final declaration of the edges properties.
std::map< uint64_t, Lima::Common::AnnotationGraphs::GenericAnnotation > AGGannotProp
Property to annotate vertices with generic values.
boost::property< edge_sannot_t, AGSannotProp, AGEIannotProperty > AGESannotProperty
vertex_sannot_t
@ vertex_sannot
std::map< uint64_t, Lima::LimaString > AGSannotProp
Property to annotate vertices with string values.
edge_gannot_t
@ edge_gannot
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, AGVertexProperties, AGEdgeProperties > AnnotationGraph
The graph class.
boost::property< vertex_gannot_t, AGGannotProp, AGVSannotProperty > AGVGannotProperty
vertex_iannot_t
@ vertex_iannot
boost::property< edge_gannot_t, AGGannotProp, AGESannotProperty > AGEGannotProperty
boost::property< edge_iannot_t, AGIannotProp > AGEIannotProperty
edge_iannot_t
@ edge_iannot
std::map< uint64_t, uint64_t > AGIannotProp
Property to annotate vertices with integer values.
boost::property< vertex_iannot_t, AGIannotProp, AGVertexColorProperty > AGVIannotProperty
AGVGannotProperty AGVertexProperties
Final declaration of the vertices properties.
#define LIMA_ANNOTATIONGRAPH_EXPORT
boost::property_map< AnnotationGraph, edge_gannot_t >::type EdgeAGGannotPropertyMap
boost::property_map< AnnotationGraph, edge_iannot_t >::type EdgeAGIannotPropertyMap
boost::property_map< AnnotationGraph, vertex_iannot_t >::const_type CVertexAGIannotPropertyMap
boost::property_map< AnnotationGraph, edge_iannot_t >::const_type CEdgeAGIannotPropertyMap
boost::property_map< AnnotationGraph, edge_sannot_t >::type EdgeAGSannotPropertyMap
boost::property_map< AnnotationGraph, boost::vertex_color_t >::type AGVertexColorPropertyMap
AnnotationGraph::vertex_iterator AnnotationGraphVertexIt
boost::property_map< AnnotationGraph, vertex_iannot_t >::type VertexAGIannotPropertyMap
AnnotationGraph::edge_descriptor AnnotationGraphEdge
AnnotationGraph::edge_iterator AnnotationGraphEdgeIt
AnnotationGraph::vertex_descriptor AnnotationGraphVertex
AnnotationGraph::adjacency_iterator AnnotationGraphAdjacencyIt
boost::property_map< AnnotationGraph, edge_gannot_t >::const_type CEdgeAGGannotPropertyMap
AnnotationGraph::in_edge_iterator AnnotationGraphInEdgeIt
boost::property_map< AnnotationGraph, edge_sannot_t >::const_type CEdgeAGSannotPropertyMap
boost::property_map< AnnotationGraph, vertex_sannot_t >::const_type CVertexAGSannotPropertyMap
boost::property_map< AnnotationGraph, vertex_gannot_t >::const_type CVertexAGGannotPropertyMap
AnnotationGraph::out_edge_iterator AnnotationGraphOutEdgeIt
boost::property_map< AnnotationGraph, vertex_sannot_t >::type VertexAGSannotPropertyMap
boost::property_map< AnnotationGraph, vertex_gannot_t >::type VertexAGGannotPropertyMap
LIMA_ANNOTATIONGRAPH_EXPORT QDebug & operator<<(QDebug &os, const AnnotationGraphEdge &e)
NAUTITIA.
BOOST_INSTALL_PROPERTY(vertex, text)