In a component based system I have solid objects (which can collide) and gameplay type objects (which have various stats like damage...) which are combined (inherited).
I'm not 100% sure about the actual definition, but I doubt that even counts still as a component system. Composition, thats what its all about, as the name suggest. So to solve all your problems, simply don't inherit from your components, but compositie them into a generic entity object. Then one option was to use systems to manage this:
class CollisionSystem
{
void Update(EntityManager& entityManager, MessageManager& messageManager)
{
EntityManager::entityVector vEntities;
entityManager.EntitiesWithComponents<BoundingVolume>(vEntities);
for(Entity* pLeftEntity : vEntities)
{
for(Entity* pRightEntity : vEntities)
{
// ...
if(collision)
messageManager.Send<CollidedEntities>(pLeftEntity, pRightEntity);
}
}
}
};
Systems just act upon entities with specific components, bounding volume it is in that case. It doesn' matter what else is attached - it got a bounding volume, it can collide (of course this can be extended). Note how I'm using a messaging system to notify about the collision - each system registered to this specifiy message will recieve it, so for example the damage-system, which can then look if the entities have the needed components (stats, weapon ...) and then performance damage calculation.
For a good libary for C++11, just google EntityX. Free to use, appearently easy to implement (preferred my own variation though), should be more what you are looking for.
Note that collision detection shouldn't be even part of the entity/components at all eigther. It will do for small uses, but really you should rather put that into a special physics module, with the component approach you finally use just taking care of registering and dispatching collisons, and so on.