|
Boost Users : |
Subject: Re: [Boost-users] Boost Graph: determining type of bundled property
From: Trevor Harmon (Trevor.W.Harmon_at_[hidden])
Date: 2010-04-09 14:50:36
On Apr 9, 2010, at 3:59 AM, Dmitry Bufistov wrote:
> I feel that I'm missing something, but what if you store the type of
> the
> vertex in the base class: ?
> class BaseVertex { int m_type; public: BaseVertex() : m_type(0) {} };
> struct EntryVertex : public BaseVertex { EtntryVertex() : m_type(1)
> {} };
> Then, you can determine the type of the vertex at run time )
I don't see how this is any better than using the built-in typeid.
(Assuming of course that enabling RTTI is not a problem.)
Trevor
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