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.