I'm trying to implement something along the lines of:
Class EntityManager
{
AddEntity(Entity e);
RemoveEntity(Entity e);
std::vector<Entity> entities;
}
Class Entity
{
// Need a mechanism here to add and remove entities on the constructor and destructor of Entity
}
Hope this makes sense. Eventually Entity will contain a number of pure virtuals, when I inherit from Entity I want it to automatically add the entity to the vector, the EntityManager will then call the pure virtual functions on each entity.
Thanks for your time.