9 Apr
2010
9 Apr
'10
10:59 a.m.
Jeremiah Willcock wrote:
On Wed, 7 Apr 2010, Trevor Harmon wrote:
Hi,
[snip].
My goal is to be able to iterate through the vertices and perform different actions depending on the type of vertex. (e.g., if vertex type is EntryVertex do this, if vertex type is ExitVertex do that, etc.) However, I don't know how to determine a vertex's type. The bundles document mentions something about 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 )
[snip] Dmitry