Boost logo

Geometry :

Subject: [geometry] specializing traits::tag for io operations and html code documentation
From: Tomislav Maric (tomislav.maric_at_[hidden])
Date: 2013-05-23 07:21:53


Hi,

I have a question about the tag dispatching engine. In the code I wrote
for vtk, I defined vtk_writer tags and simple dispatching, but now I
noticed in "tag.hpp" that each geometry needs to specialize traits::tag.

Reading again wkt.hpp, I found in the wkt_manipulator:

    template <typename Char, typename Traits>
    inline friend std::basic_ostream<Char, Traits>& operator<<(
            std::basic_ostream<Char, Traits>& os,
            wkt_manipulator const& m)
    {
        dispatch::wkt
            <
                typename tag<Geometry>::type,
                Geometry
>::apply(os, m.m_geometry);
        os.flush();
        return os;
    }

And above it, there are structs that specialize the apply function for
different geometries. If I understood it right the geometries that are
streamed in wkt are wrapped in wkt_*geometry* (e.g. wkt_box).

I will need more time to wrap (pun intended :) ) my head around how
formatting works if I want to make the vtk IO have the same design as
the wkt.

Is there a way I can generate Doxygen-like documentation of
boost.geometry that shows all possible information about how the code is
organized with cross-links? Searching through source helps, but having
20 tabs opened in a web browser might be more informative.

Best regards,
Tomislav


Geometry list run by mateusz at loskot.net