I want to intialize a certain type of element (a class called *TMMap) that I have in my main class TWorld. There are a lot of these elements and they all have different names. I need all of them to be created and initisalized and to a certain value. This is done in a function NewMap(0).
Can I find all members of a class of a certain type?
something like:
Qt Code:
  1. for (i = 0; i < nr of members in class TWorld; i++)
  2. if (member is of type TMMap)
  3. TMMap *T = (typecasting TMMap) member(i);
  4. T = NewMap(0);
To copy to clipboard, switch view to plain text mode