twa_run: keep a pointer to the automaton

This simplify all laters invocations, because we do not have to pass
the automaton the run was generated on.

This fixes #113 by allowing the __str__ function to be implemented on
runs.

* src/twaalgos/emptiness.cc, src/twaalgos/emptiness.hh (twa_run):
Store the automaton.
(prin_twa_run): Rewrite as an overloaded <<.
* src/twaalgos/reducerun.cc, src/twaalgos/reducerun.hh (reduce_run):
Do not like the automaton as a parameter.
* src/twaalgos/replayrun.cc, src/twaalgos/replayrun.hh (replay_twa_run):
Likewise.
* src/bin/common_aoutput.hh, src/bin/ltlcross.cc,
src/tests/complementation.cc, src/tests/ikwiad.cc,
src/tests/randtgba.cc, src/twaalgos/gtec/ce.cc, src/twaalgos/gv04.cc,
src/twaalgos/magic.cc, src/twaalgos/ndfs_result.hxx,
src/twaalgos/se05.cc, src/twaalgos/projrun.cc: Adjust.
* wrap/python/ajax/spotcgi.in: Add a __str__ function to twa_run_ptr.
* wrap/python/spot_impl.i: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2015-10-25 11:58:14 +01:00
parent e7cc89264a
commit 63917def2d
19 changed files with 85 additions and 97 deletions

View file

@ -383,6 +383,15 @@ namespace std {
}
}
%extend spot::twa_run_ptr {
std::string __str__()
{
std::ostringstream os;
os << *self;
return os.str();
}
}
%nodefaultctor std::ostream;
namespace std {
class ostream {};