Implement an scc_info class that should eventually replace scc_map.

* src/graph/graph.hh (trans_iterator): Add operator->() and operator
bool().
* src/tgbaalgos/sccinfo.cc, src/tgbaalgos/sccinfo.hh: New files.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgbatest/ltl2tgba.cc: Use the new dump_scc_info_dot() function.
This commit is contained in:
Alexandre Duret-Lutz 2014-04-28 21:03:31 +02:00
parent 1c0a93cc0f
commit 9903ae2fa8
5 changed files with 460 additions and 4 deletions

View file

@ -215,6 +215,12 @@ namespace spot
return g_->trans_storage(t_);
}
typename super::pointer
operator->()
{
return &g_->trans_storage(t_);
}
trans_iterator operator++()
{
t_ = operator*().next_succ;
@ -228,6 +234,11 @@ namespace spot
return ti;
}
operator bool() const
{
return t_;
}
protected:
Graph* g_;
transition t_;
@ -278,7 +289,11 @@ namespace spot
{
friend class internal::trans_iterator<digraph>;
friend class internal::trans_iterator<const digraph>;
public:
typedef internal::trans_iterator<digraph> iterator;
typedef internal::trans_iterator<const digraph> const_iterator;
static constexpr bool alternating()
{
return Alternating;