Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Structure for BFSvisitor is in header file (visitor & property confusion)??
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2009-03-04 08:20:22


>
> to pass my properties from the graph to the visitor ... there has to be a
> better
> way to do this. How can I put the visitor definition into the .cpp, and
> only
> declare it in the .hpp?
>

If the only place you're using the visitor is within the cpp file, then you
just put it where it's being used. If you're going to be using the same
visitor in multiple sources, it has to be in an hpp - unless you want to
#include a cpp file, but that's not done very often.

As for the rest... it looks okay, but I only really gave a cursory glance.
Property maps are (almost) always passed by value, so you don't need to
worry about keeping references to them.

Andrew Sutton
andrew.n.sutton_at_[hidden]



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