> There's no real control over ordering... I believe init() is called on > objects in the same order that they were constructed, but you don't have a > lot of control over the construction order (short of the fact that if B is a > parameter to A then B will be constructed first) and it's probably best not > to rely on that anyway. Yes, init() should be called in the same order as construction. Also, if we're not going to allow cycles, I see no reason not to allow dependencies to dictate order. Even with cycles, this could be done using an added mechanism (that didn't have cycles).
> If the dependencies are more general (e.g., there are a bunch of As that all > have to be fully initialized before any of a bunch of Bs) then we can look > at other solutions; if that's the case, please provide some more details on > just what the constraints are. It's also possible that perhaps it's the > partitioning of concepts into SimObjects that needs to be tweaked. For > example, off the top of my head it's not clear why "topology" would be a > SimObject, since SimObjects are generally fairly concrete things you could > point to on a block diagram. I've had issues with this for a while. I've been using SimObjects for non-block diagram things for quite a while now (e.g. a statistics aggregator class in my network that collects stats from all switches that have been instantiated.) There's also the disk image class that isn't exactly a real entity. SimObjects though now have the ability to schedule events and I'd like to add some notion of each SimObject having a clock. Perhaps there can be some base class with the more fundamental stuff and one designed for more concrete things derived from it. Nate _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
