Boost logo

Boost Users :

Subject: Re: [Boost-users] issues with setting properties on reverse graph
From: Mangal (mangalmanish_at_[hidden])
Date: 2009-11-24 16:17:05


in the first example that i posted i made the following change to the
definition of reverse_graph

typedef reverse_graph<graph_t, graph_t&> reverse_graph_t;
and now setting the name property on reverse graph works. accessing it using
the original graph also works.

However in my app which uses a new property defined by me the new typedef
still throws at runtime
I will work with it a little more and if I can't figure it out will let you
know

Thanks for the help

Jeremiah Willcock wrote:
>
> On Tue, 24 Nov 2009, Mangal wrote:
>
>>
>> yes it works when I set it on the original graph.
>> setting it in the original graph and reading in reverse_graph works.
>> (which
>> is what I do in my application)
>>
>> I had a function
>> template<Graph>
>> void myfun( Graph & g)
>> {
>> //some code
>> get_property(g, graph_MyProperty) = propertyValue
>> }
>>
>> and wanted to use it like
>> myfun(originalGraph)
>> myfun(reverseGraph)
>>
>> setting property on the reverse_graph does not seem to be doing anything,
>> infact when trying to access the property somewhere else throws a null
>> reference exception
>
> Could you please try building your reverse_graph as:
>
> reverse_graph<Graph, Graph&>
>
> and see if that changes the behavior?
>
> -- Jeremiah Willcock
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>

-- 
View this message in context: http://old.nabble.com/issues-with-setting-properties-on-reverse-graph-tp26384490p26503414.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