Hi all,
I've found very few references to the use of bundled properties for graph properties, as opposed to edge and vertex properties. Are these supported? I find that I can supply a bundled property type name for the adjacency_list constructor, but cannot use "get_property" to access individual field values. This type of syntax works:
adjlist.m_property.fieldname = whatever;
but this does not:
get_property(adjlist, &graphproptype::fieldname) = whatever;
although it seems like the second form would be proper (for data hiding, and also the documentation suggests this is right - at least for old-style internal properties).
To be specific, the following code does not compile:
// test case for bundled graph properties
#include <boost/graph/adjacency_list.hpp>
#include <iostream>
using namespace std;
using namespace boost;
/// circuit graph vertex properties
struct
VertexProps {
};
/// circuit graph edge props
struct EdgeProps {
};
/// graph properties
struct GraphProps {
int blah;
};
typedef adjacency_list<vecS, // storage for vertices
vecS, // storage for edges
directedS, // edges are directed
VertexProps,
EdgeProps,
GraphProps> TestGraph;
int main(int argc, char **argv) {
TestGraph mygraph;
set_property(mygraph, &GraphProps::blah, 1);
}
/usr/include/boost/graph/adjacency_list.hpp: In function ‘void boost::set_property(boost::adjacency_list<OutEdgeListS, VertexListS, DirectedS, VertexProperty, EdgeProperty, GraphProperty, EdgeListS>&, Tag, const Value&) [with OEL = boost::vecS, VL = boost::vecS, DirS = boost::directedS, VP = VertexProps, EP = EdgeProps, GP = GraphProps, EL = boost::listS, Tag = int GraphProps::*, Value = int]’:
test_graphprops.cpp:29: instantiated from here
/usr/include/boost/graph/adjacency_list.hpp:433: error: no matching function for call to ‘get_property_value(GraphProps&, int GraphProps::*)’
Any suggestions?
Thanks
and Regards,
Jeff Trull