next up previous contents
Next: Route planner Up: Modularization, inheritance, templates, and Previous: Templates   Contents

What belongs into the base class?

It is never simple to decide what belongs at what level of the hierarchy in inheritance. A possibility is to have only the basic things for graph construction in the base class and everything else in the derived class. This would mean to have ID, toNode, fromNode, and possibly inLinks and outLinks in the base class and everything else in the derived classes.

We do however think that it makes more sense to have everything that is in the nodes and links data files in the base class. In that way, the programs for reading the network data can be used by all modules without any changes, and the memory overhead is still not too bad.



2004-02-02