python: add wrapper on twa_graph::edges()
* spot/twa/twagraph.hh (edges): Do not hide from SWIG. * spot/graph/graph.hh: Hide stuff that SWIG do not understand. * python/spot/impl.i: Add some typemaps and fragment to iterate over the result of twa_graph::edges().
This commit is contained in:
parent
cd661801df
commit
1eee12b8b4
3 changed files with 31 additions and 4 deletions
|
|
@ -527,11 +527,13 @@ namespace spot
|
|||
template <typename Graph>
|
||||
class SPOT_API all_trans
|
||||
{
|
||||
public:
|
||||
typedef typename std::conditional<std::is_const<Graph>::value,
|
||||
const typename Graph::edge_vector_t,
|
||||
typename Graph::edge_vector_t>::type
|
||||
tv_t;
|
||||
typedef all_edge_iterator<Graph> iter_t;
|
||||
private:
|
||||
tv_t& tv_;
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -408,11 +408,20 @@ namespace spot
|
|||
auto states()
|
||||
SPOT_RETURN(g_.states());
|
||||
|
||||
auto edges() const
|
||||
SPOT_RETURN(g_.edges());
|
||||
auto edges()
|
||||
SPOT_RETURN(g_.edges());
|
||||
internal::all_trans<const graph_t>
|
||||
edges() const
|
||||
{
|
||||
return g_.edges();
|
||||
}
|
||||
#endif
|
||||
|
||||
internal::all_trans<graph_t>
|
||||
edges()
|
||||
{
|
||||
return g_.edges();
|
||||
}
|
||||
|
||||
#ifndef SWIG
|
||||
auto edge_vector() const
|
||||
SPOT_RETURN(g_.edge_vector());
|
||||
auto edge_vector()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue