Fix tgta_explicit not to inherit from ta_explicit to please clang++.

* src/ta/tgtaexplicit.cc, src/ta/tgtaexplicit.hh: Use a ta_explicit
attribute instead of inheriting from it.
(get_ta): New method.
* src/taalgos/minimize.cc, src/taalgos/minimize.hh,
src/taalgos/tgba2ta.cc, src/tgbatest/ltl2tgba.cc: Adjust usage.
* wrap/python/spot.i (as_ta): Remove, now that we have get_ta.
* wrap/python/ajax/spot.in: Use get_ta instead of as_ta.
This commit is contained in:
Alexandre Duret-Lutz 2012-06-28 16:55:36 +02:00
parent d4130f15bf
commit 941cb0b57b
8 changed files with 59 additions and 69 deletions

View file

@ -289,8 +289,8 @@ def render_automaton(automaton, dont_run_dot, issba, deco = None):
dotsrc = spot.ostringstream()
if isinstance(automaton, spot.ta): # TA/GTA
spot.dotty_reachable(dotsrc, automaton)
elif hasattr(automaton, 'as_ta'): # TGTA
spot.dotty_reachable(dotsrc, automaton.as_ta())
elif hasattr(automaton, 'get_ta'): # TGTA
spot.dotty_reachable(dotsrc, automaton.get_ta())
else: # TGBA
spot.dotty_reachable(dotsrc, automaton, issba, deco)
render_dot_maybe(dotsrc.str(), dont_run_dot)

View file

@ -317,14 +317,6 @@ using namespace spot;
}
%extend spot::tgta_explicit {
const spot::ta*
as_ta(const spot::tgta_explicit* t)
{
return dynamic_cast<const spot::ta*>(t);
}
}
%nodefaultctor std::ostream;
namespace std {
class ostream {};