Boost logo

Boost Users :

From: tonyaim83 (abhishek.v_at_[hidden])
Date: 2007-12-19 02:05:15


Hi..

My Sample Previous code look like

#include "src-graphml.hpp"
using namespace std;
using namespace boost;

int main(int argc, char** argv)
{
    typedef adjacency_list<vecS,vecS,directedS,
                           property<vertex_name_t,string>,
                           property<edge_weight_t,double> > graph_t;
    graph_t g;
    dynamic_properties dp;
    dp.property("color",get(vertex_name_t(),g));
    dp.property("weight",get(edge_weight_t(),g));
    return 0;
}

Now i have added one more property to the vertex and i m using bundled
property for declaration.So now
my code look like..

#include "src-graphml.hpp"

using namespace std;
using namespace boost;

struct node
{
  string name;
  string path;
};

int main(int argc, char** argv)
{
    typedef adjacency_list<vecS,vecS,directedS,
node,property<edge_weight_t,double> > graph_t;
    graph_t g;
    dynamic_properties dp;
    
    dp.property("name",g().name);
    dp.property("file",g[*node].path);

    dp.property("weight",get(edge_weight, g));
    return 0;
}

I have quoted with bold tag the one in which i m getting compilation error
just let me know how to use it correctly..
Thanks in advance..

 

-- 
View this message in context: http://www.nabble.com/Problem-in-accessing-bundled-properties-with-Dynamic-Properties-tp14412241p14412241.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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