15namespace AnnotationGraphs
21 std::string::const_iterator it, it_end;
22 it = str.begin(); it_end = str.end();
23 for (; it != it_end; it++)
32 case '\n' : xml +=
"\n";
break;
85 m_language(a.m_language),
86 m_propertyCodeManager(a.m_propertyCodeManager)
100 out <<
"[label=\"" << v <<
": ";
102 AGIannotProp::const_iterator iit, iit_end;
103 iit = vimap[v].begin(); iit_end = vimap[v].end();
109 for (; iit != iit_end; iit++)
116 AGSannotProp::const_iterator sit, sit_end;
117 sit = vsmap[v].begin(); sit_end = vsmap[v].end();
124 for (; sit != sit_end; sit++)
132 AGGannotProp::const_iterator git, git_end;
133 git = vgmap[v].begin(); git_end = vgmap[v].end();
138 std::ostringstream oss;
139 const_cast<AnnotationData*
>(&m_data)->dumpFunction((*git).first)->dump(
146 for (; git != git_end; git++)
149 out <<
"," << annot <<
"=";
150 std::ostringstream oss;
151 const_cast<AnnotationData*
>(&m_data)->dumpFunction((*git).first)->dump(
172 m_propertyCodeManager(a.m_propertyCodeManager)
183 AGIannotProp::const_iterator iit, iit_end;
184 iit = eimap[e].begin(); iit_end = eimap[e].end();
190 for (; iit != iit_end; iit++)
196 AGSannotProp::const_iterator sit, sit_end;
197 sit = esmap[e].begin(); sit_end = esmap[e].end();
204 for (; sit != sit_end; sit++)
212 AGGannotProp::const_iterator git, git_end;
213 git = egmap[e].begin(); git_end = egmap[e].end();
218 std::ostringstream oss;
219 const_cast<AnnotationData*
>(&m_data)->dumpFunction((*git).first)->dump(
226 for (; git != git_end; git++)
229 out <<
"," << annot <<
"=";
230 std::ostringstream oss;
231 const_cast<AnnotationData*
>(&m_data)->dumpFunction((*git).first)->dump(
244 if (dotFileName !=
"")
246 std::ofstream ofs(dotFileName.c_str(), std::ofstream::binary);
247 boost::write_graphviz(
Holds an annotation graph and gives an API to manipulate it.
const LimaString & annotationName(uint64_t annotationId) const
Gives the name of an annotation id.
AnnotationGraphEdgeWriter(MediaId language, const AnnotationData &data)
void operator()(std::ostream &out, const AnnotationGraphEdge &e) const
AnnotationGraphVertexWriter(MediaId language, const AnnotationData &data)
void operator()(std::ostream &out, const AnnotationGraphVertex &v) const
void writeToDotFile(const std::string &dotFileName)
This class allows to convert any object into an annotation by inheritance.
Provide tools to parse a property file, and deal with the property coding system.
static const MediaticData & single()
const singleton accessor
AnnotationGraph & getGraph()
boost::property_map< AnnotationGraph, vertex_iannot_t >::const_type CVertexAGIannotPropertyMap
boost::property_map< AnnotationGraph, edge_iannot_t >::const_type CEdgeAGIannotPropertyMap
AnnotationGraph::edge_descriptor AnnotationGraphEdge
AnnotationGraph::vertex_descriptor AnnotationGraphVertex
boost::property_map< AnnotationGraph, edge_gannot_t >::const_type CEdgeAGGannotPropertyMap
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
std::string transcodeToXmlEntities(const std::string &str)
std::string limastring2utf8stdstring(const Lima::LimaString &phrase, uint32_t size0)
Convert a wide string to a string , in dest up to size bytes.