next up previous contents
Next: Nodes input Up: Street network data and Previous: Node class   Contents

SimWorld class

It is useful to have a SimWorld class that defines our simulation world:

{}
class SimWorld {
public:
    typedef map<Id,Node*> Nodes ;
    Nodes nodes ;
    ...
    readNodes() ;
    ...
}
In this case, we will not make Nodes private, i.e. we will not encapsulate it. The result of this is that we can directly use the access functions of the STL. It is possible to use the STL functions even when Nodes is private, but we find the above solution easier for non-experts.



2004-02-02