property mapping -- from vertex to complex structure

Hi, In my project, every vertex represents a self-defined structure as as basic block. It seems property(e.g., vertex_name_t) can only map a vertex to enum, i.e, integer. Is it possible to map a vertex to a pointer or struct? Even if I define a new vertex_xxx_t, it can also only map to enum. I appreciate your reply. regards, Ice

On Sun, 25 Sep 2011, Ice Frog wrote:
Hi,
In my project, every vertex represents a self-defined structure as as basic block. It seems property(e.g., vertex_name_t) can only map a vertex to enum, i.e, integer. Is it possible to map a vertex to a pointer or struct? Even if I define a new vertex_xxx_t, it can also only map to enum.
Vertices can map to anything you want -- they normally map to things like doubles or strings. Use the second parameter to boost::property (for a graph) or the value template parameter of an external property map to set the type of values mapped to. -- Jeremiah Willcock

Thanks, I fix it! :)
2011/9/26 Jeremiah Willcock
On Sun, 25 Sep 2011, Ice Frog wrote:
Hi,
In my project, every vertex represents a self-defined structure as as
basic block. It seems property(e.g., vertex_name_t) can only map a vertex to enum, i.e, integer. Is it possible to map a vertex to a pointer or struct? Even if I define a new vertex_xxx_t, it can also only map to enum.
Vertices can map to anything you want -- they normally map to things like doubles or strings. Use the second parameter to boost::property (for a graph) or the value template parameter of an external property map to set the type of values mapped to.
-- Jeremiah Willcock _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Ice Frog
-
Jeremiah Willcock