Hello,
I have some problems with graph properties. For a project I created a layer
above the boost graph library. So i have:
template GraphNode : public N {}
template GraphEdge : public E {}
template Graph {}
with BGL properties like:
typedef GraphNode tNode;
typedef property NodeProperty;
As internal graph properties i use pointers to GraphNode and GraphEdge with
property tags defined in N and E, e.g.
class LogicState {
public:
enum vertex_state_t {vertex_state=123;}
static const vertex_state_t PropertyTag;
}
const LogicState::vertex_state_t LogicState::PropertyTag=vertex_state;
and template specialization for property_kind:
template <> struct property_kind > {
typedef vertex_property_tg type;
};
with using put(tNode::PropertyTag, graph, somestate); i get the following
compile error:
error C2679: binary '=' : no operator found which takes a right-hand operand
of type 'GraphEdge ' (or there is no acceptable conversion)
with
[
N=LogicState,
E=LogicConstraint,
G=Graph::tGraphTraits
]
in line 316 in property_map.hpp: "static_cast(pa)[k] =
v;"
I'm using the current cvs version of boost and vc++7.1. Any ideas what can
cause this problem ? Why there exist no "=" operator ? Where should it be
defined/generated in normal cases ? Without my layer, with pure BGL and
BOOST_INSTALL_PROPERTY I had it already working.
Shouldn't it also be of type GraphEdge* ? I've checked my code and
everywhere I used pointers (in the property definition and with the put).
Then another questions: The online docs for the BGL weren't very helpfull
for me. Is the BGL book better, or is it only an enhanced version of the
online docs ?
best regards,
Vasco Lohrenscheit