https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Fix pretty printing of graph vicinity piters.
* mln/core/internal/graph_vicinity_piter.hh
(operator<<(std::ostream&, const graph_vicinity_piter_<P, E>&)):
New.
* mln/core/internal/line_graph_vicinity_piter.hh,
* mln/core/p_graph.hh, mln/core/p_line_graph.hh:
Aesthetic changes.
internal/graph_vicinity_piter.hh | 18 ++++++++++++++++++
internal/line_graph_vicinity_piter.hh | 1 +
p_line_graph.hh | 0
3 files changed, 19 insertions(+)
Index: mln/core/internal/graph_vicinity_piter.hh
--- mln/core/internal/graph_vicinity_piter.hh (revision 1915)
+++ mln/core/internal/graph_vicinity_piter.hh (working copy)
@@ -132,6 +132,15 @@
point p_;
};
+ /* FIXME: This hand-made delegation is painful. We should rely on
+ the general mechanism provided by Point_Site. But then again, we
+ need to refine/adjust the interface of Point_Site w.r.t. the
+ mandatory conversions to points. */
+ template <typename P, typename E>
+ inline
+ std::ostream&
+ operator<<(std::ostream& ostr, const graph_vicinity_piter_<P, E>&
p);
+
# ifndef MLN_INCLUDE_ONLY
@@ -204,6 +213,15 @@
return p_[i];
}
+
+ template <typename P, typename E>
+ inline
+ std::ostream&
+ operator<<(std::ostream& ostr, const graph_vicinity_piter_<P, E>&
p)
+ {
+ return ostr << p.to_psite();
+ }
+
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::internal
Index: mln/core/internal/line_graph_vicinity_piter.hh
--- mln/core/internal/line_graph_vicinity_piter.hh (revision 1915)
+++ mln/core/internal/line_graph_vicinity_piter.hh (working copy)
@@ -203,6 +203,7 @@
return p_[i];
}
+
template <typename P, typename E>
inline
std::ostream&
Index: mln/core/p_graph.hh
Index: mln/core/p_line_graph.hh