Boost logo

Boost Users :

Subject: [Boost-users] activating Boost Graph Library finish_edge
From: Michael Behrns-Miller (m_at_[hidden])
Date: 2013-11-25 11:47:27


Hello boost users.

I'm using BGL, and was happy to see the addition of the finish_edge()
visitor to DFS.
I had previously added code to finish_vertex() to emulate this visitor,
had to track vertices, not ideal.

But when I add the template function to my Visitor class, the code is
never hit. Specifically, I'm using Visual Studio 2013 and the compiler
is telling me my debug breakpoint will never get hit in the function as
the code did not make it into the executable.

The visitor class is below, any thoughts on what I'm doing wrong?
I took a look at undirected_dfs.hpp and it includes call_finish_edge()
in the DFS algorithm in undir_dfv_impl().

Thanks,
Michael

class BaseVisitor : public boost::dfs_visitor<>
{
public:

    template <class E, class G>
    void examine_edge(E e, const G& g)
    {
        // gets hit...
    }
   
    template <class V, class G>
    void discover_vertex(V v, const G& g)
    {
        // gets hit...
    }

    template <class V, class G>
    void finish_vertex(V v, const G& g)
    {
        // gets hit...
    }

    template <class E, class G>
    void finish_edge(const E& e, const G& g)
    {
        // NOT built or hit...
        // Tried using [E e] param as well...
    }
};


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net