9 Apr
2010
9 Apr
'10
6:50 p.m.
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