Let's say I have a Light class, and also SpotLight, PointLight and DirectionalLight which inherits from Light.
I have a map of Lights like this : std::map<std::string, Light*> LightMap;
I'd like to iterate this map for each type like this:
for ( /* each SpotLight* in LightMap */ ) { ... }
for ( /* each PointLight* in LightMap */) { ... }
etc...
How can I do that ?