static Frame *find_frame_with_sbody(Frame *f, const SystemBody *b) { if (f->GetSystemBody() == b) return f; else { for (Frame::ChildIterator it = f->BeginChildren(); it != f->EndChildren(); ++it) { Frame *found = find_frame_with_sbody(*it, b); if (found) return found; } } return 0; }
static Frame *find_frame_with_sbody(Frame *f, const SystemBody *b) { if (f->GetSystemBody() == b) return f; else { for (Frame* kid : f->GetChildren()) { Frame *found = find_frame_with_sbody(kid, b); if (found) return found; } } return 0; }
static Frame *find_frame_with_sbody(Frame *f, const SystemBody *b) { if (f->m_sbody == b) return f; else { for (std::list<Frame*>::iterator i = f->m_children.begin(); i != f->m_children.end(); ++i) { Frame *found = find_frame_with_sbody(*i, b); if (found) return found; } } return 0; }
Frame *Space::GetFrameWithSystemBody(const SystemBody *b) const { return find_frame_with_sbody(m_rootFrame.Get(), b); }