highlight: improve support for highlighted edges

* spot/twa/twa.cc, spot/twa/twa.hh: Add a way to
remove named properties.
* spot/twa/twagraph.cc: Clear highlight-edges on operations
that reorder the edge vector.
* spot/twaalgos/randomize.cc, spot/twaalgos/randomize.hh:
Preserve highlighted state, but not highlighted edges.
* spot/twaalgos/hoa.cc: Adjust output of highlight-edge
when the edges are not stored in order.
* tests/core/readsave.test, tests/core/tgbagraph.test,
tests/core/twagraph.cc: More test cases.
This commit is contained in:
Alexandre Duret-Lutz 2016-07-18 12:01:40 +02:00
parent e17a617bc2
commit 39332fb118
9 changed files with 128 additions and 23 deletions

View file

@ -69,6 +69,17 @@ namespace spot
return !couvreur99(a)->check();
}
void
twa::set_named_prop(std::string s, std::nullptr_t)
{
auto p = named_prop_.find(s);
if (p == named_prop_.end())
return;
p->second.second(p->second.first);
named_prop_.erase(p);
return;
}
void
twa::set_named_prop(std::string s,
void* val, std::function<void(void*)> destructor)