tgba_succ_iterator: have first() and next() return a bool
The returned Boolean indicates whether there is a successor or not.
This way
| for (i->first(); !i->done(); i->next())
| {
| ...
| }
can be replaced by
| if (i->first()) do
| {
| ...
| }
| while (i->next());
avoiding all the virtual calls to done().
* iface/dve2/dve2.cc, src/kripke/kripkeexplicit.cc,
src/kripke/kripkeexplicit.hh, src/ta/ta.hh, src/ta/taexplicit.cc,
src/ta/taexplicit.hh, src/ta/taproduct.cc, src/ta/taproduct.hh,
src/ta/tgtaproduct.cc, src/ta/tgtaproduct.hh, src/tgba/succiter.hh,
src/tgba/succiterconcrete.cc, src/tgba/succiterconcrete.hh,
src/tgba/taatgba.cc, src/tgba/taatgba.hh, src/tgba/tgba.hh,
src/tgba/tgbaexplicit.hh, src/tgba/tgbakvcomplement.cc,
src/tgba/tgbamask.cc, src/tgba/tgbaproduct.cc,
src/tgba/tgbasafracomplement.cc, src/tgba/tgbasgba.cc,
src/tgba/tgbatba.cc, src/tgba/tgbaunion.cc, src/tgba/tgbaunion.hh,
src/tgba/wdbacomp.cc: Implement and adjust to this new interface.
This commit is contained in:
parent
06c69f88ff
commit
1a5c0cb1f3
26 changed files with 256 additions and 206 deletions
11
src/ta/ta.hh
11
src/ta/ta.hh
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2010, 2012, 2013 Laboratoire de Recherche et
|
||||
// Copyright (C) 2010, 2012, 2013, 2014 Laboratoire de Recherche et
|
||||
// Developpement de l Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -191,12 +191,9 @@ namespace spot
|
|||
{
|
||||
}
|
||||
|
||||
virtual void
|
||||
first() = 0;
|
||||
virtual void
|
||||
next() = 0;
|
||||
virtual bool
|
||||
done() const = 0;
|
||||
virtual bool first() = 0;
|
||||
virtual bool next() = 0;
|
||||
virtual bool done() const = 0;
|
||||
|
||||
virtual state*
|
||||
current_state() const = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue