Hi, Im looking for a template resource list that, anyhow.
My problem is that I want the list to recognize if an item already already exist in it, and i was thinking that i might to this with a wstring name.
And rest of my program will access its resource by index in the list (and not name) thought that would be the fastest of "none pointer" solutions.
For
GenericList<Shader> shaderlist;
position = shaderlist.add(pShader, "Shader")
So I have two questions,
I need a dynamic container that can grantee the indexes of all the resource when an object is remove from the list, as I understands it std::vector does not do this, and array is not std::dynamic.
Secondly, Should I store the resource and name as a pair in that container or should I do it in two containers one resource and one for name, where the indexes are matching all the time. Not sure what will be most efficent?
thx