I understood how entityManager can add the components to their right systems but can you please give more details for the latter. I am going to start with initialization through the entity Manager then it would be easier for me to port it to the systems.
If you look at the Artemis framework (https://code.google.com/p/artemis-framework/source/browse/), you'll see they have the notion of Aspect to handle this.
In my case, the constructor for my EntitySystem base class has some bitflag parameters that describe the types of components it's interested in (This of course limits me to 64 types of components, but you could do something more open ended, like an array of component types). So system implementations need to supply this to the base class. Then this information is exposed as a public property on EntitySystem, so EntityManager can just check against that.
From a quick glance, it looks like Artemis keeps all this info in the system itself, and weeds out entities as the system enumerates through all of them. In my case, entities are added/removed from the system (only by the EntityManager), so the system only needs to enumerate through the entities that apply to it.
And one more question, how would you deal with the cloning? Cloning copies everything from an existing entity to a newly created instance. If i remove initialize function, I would only be able to do modify the object after it is added to the scene and is used; or at least I don't see how i should be able to do that. Can you give me a hint on how to deal with this problem?
I'm not clear on the problem here. What modifications are you making, like position or something? So, some calling code would ask the entity manager to clone a particular entity. Then that entity would be returned to the caller, so it could ask for the components it's interested in and make the corresponding modifications. Before returning, the entity manager could add the entity to the appropriate systems (if they're robust against entities being added at any time), or delay adding the entity until the end of the update cycle (e.g. keep a "todo list" of entities to add).