Apology's up front if this turns out to be a stupid question: I'm getting my head in a right old tangle with the template functions...
I'm trying to design a reconfigurable flowgraph framework: whereby the actual makeup of the flowgraph can be dynamically created at runtime (from a configuration file). The flowgraph would consist of:
- join_node (working in conjunction with a function_node).
There is only a single datatype flowing through all of these nodes, lets call it CDataClass*.
In order to support the dynamic creation of these different types of nodes, I was hoping to have a single array (or vector) of a base class type, then instantiate the specific node types as common-interface descendants of the base class. However (and this is where I'm getting in a tangle with the templates), it looks like every different type of node has a different interface - both in the constructor and operator(), making the thought of having a common base type almost impossible.
Can anyone suggest a means to achieving this 'dynamic' behaviour, or advise if I'm missing something here?