Boost logo

Boost Users :

From: Martin Jynge (jyngem_at_[hidden])
Date: 2005-04-10 09:30:54


Hi.
I'm trying to develop a (bidirectional) graph whose edges contain a
property Value, which is a baseclass with different inherited classes
dependent upon the type of vertex they are connected to. I attach a
pointer to a base class Node to each vertex - the node containing only
a virtual method called from a designated parsing algorithm. This
method needs to access the Value leafclasses of the vertex's outedges.
For example, a particular vertex receives a double from one outedge and
a struct xy {double x,y; } from another, does some operation and stores,
say, a complex number in a relevant inedge. In essense it's kind of like
genetic programming with multiple parents and multiple value types.

I would really like to avoid using dynamic_cast in dispatching edge
Value descendants. Any thoughts on this?


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