Re: Compile time container, run-time execution.
shar3ub@googlemail.com wrote:
[..] I thought about registering them with a container
and then calling them later, but the problem is, all code paths where
these objects are created will have to be executed. And that is what I
am trying to avoid.
No, that's by definition is not correct. If the code where your object
isn't executed, then that object does not exist.
There are virtually hundreds of objects, some need quite an elaborate
testing scneario from our QA engineers to execute, and all I am trying
to do is somehow round them up in a container and invoke them later
all at once.
OK, let me ask you, if your object registers itself with some container
at the time of creation, and then removes itself upon destruction, what
is it you don't like in that approach? The container will have, say,
the addresses of all objects that are "alive and well" at the time of
calling (invoking) something for all of them. Isn't that what you're
trying to accomplish? If the container holds onto the information about
the objects that don't exist any more or somehow has the information on
the objects which haven't been created yet, what kind of invocation are
you considering for those? It's like asking dead people to dance you
the jig or asking unborn children to smile. Not gonna happen, right?
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask