/** Return a collection of all referenced workspaces on demand. */ SetPeaksWorkspaces CompositePeaksPresenter::presentedWorkspaces() const { SetPeaksWorkspaces allWorkspaces; for (auto it = m_subjects.begin(); it != m_subjects.end(); ++it) { auto workspacesToAppend = (*it)->presentedWorkspaces(); allWorkspaces.insert(workspacesToAppend.begin(), workspacesToAppend.end()); } return allWorkspaces; }
/** @return a reference to the held peaks workspace. */ SetPeaksWorkspaces ConcretePeaksPresenter::presentedWorkspaces() const { // There is only one workspace to return. SetPeaksWorkspaces workspaces; workspaces.insert(m_peaksWS); return workspaces; }