tcl::unique_tree<GameObj*>::pre_order_iterator io = _objects.pre_order_begin();
while ( io != _objects.pre_order_end() ) {
//pseudo start
GameObj *o = (*io);
if ( o->doUpdate() ) {
//if the game object needs to be updated, update and continue to iterate down the tree
o->Update();
} else {
//Otherwise, skip the update for this and it's childen
io = _objects.next_iterator_of_level(io?);
continue;
}
//pseudo end
io++;
}
[C++, TCL] - Iterator Q
Hey all,
Anyone know how to nicely perform this logic, with Tree Container Library and STL?
Thanks!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement