LibreOffice Module sd (master) 1
|
Public class of page enumerations that delegates its calls to an implementation object that can filter pages by using a given predicate. More...
#include <SlsPageEnumeration.hxx>
Public Types | |
typedef ::std::function< bool(const SharedPageDescriptor &)> | PagePredicate |
Create a new page enumeration that enumerates a subset of the pages of the given model. More... | |
Public Member Functions | |
PageEnumeration (const PageEnumeration &rEnumeration) | |
This copy constructor creates a copy of the given enumeration. More... | |
virtual | ~PageEnumeration () override |
virtual ::std::unique_ptr< Enumeration< SharedPageDescriptor > > | Clone () override |
Create and return an exact copy of the called object. More... | |
PageEnumeration & | operator= (const PageEnumeration &rEnumeration) |
virtual bool | HasMoreElements () const override |
Return <TRUE> when the enumeration has more elements, i.e. More... | |
virtual SharedPageDescriptor | GetNextElement () override |
Return the next element of the enumeration. More... | |
virtual void | Rewind () override |
Rewind the enumeration so that the next call to GetNextElement() will return its first element. More... | |
Public Member Functions inherited from sd::slidesorter::model::Enumeration< SharedPageDescriptor > | |
virtual | ~Enumeration () |
virtual bool | HasMoreElements () const=0 |
virtual SharedPageDescriptor | GetNextElement ()=0 |
Returns T instead of T& so that it can handle shared pointers. More... | |
virtual void | Rewind ()=0 |
virtual ::std::unique_ptr< Enumeration< SharedPageDescriptor > > | Clone ()=0 |
Static Public Member Functions | |
static PageEnumeration | Create (const SlideSorterModel &rModel, const PagePredicate &rPredicate) |
Private Member Functions | |
PageEnumeration (::std::unique_ptr< Enumeration< SharedPageDescriptor > > &&pImpl) | |
This constructor expects an implementation object that holds the predicate that filters the pages. More... | |
Private Attributes | |
::std::unique_ptr< Enumeration< SharedPageDescriptor > > | mpImpl |
Implementation object. More... | |
Public class of page enumerations that delegates its calls to an implementation object that can filter pages by using a given predicate.
Definition at line 39 of file SlsPageEnumeration.hxx.
typedef ::std::function<bool(const SharedPageDescriptor&)> sd::slidesorter::model::PageEnumeration::PagePredicate |
Create a new page enumeration that enumerates a subset of the pages of the given model.
rModel | The new page enumeration enumerates the pages of this model. |
rPredicate | This predicate determines which pages to include in the enumeration. Pages for which rPredicate returns <FALSE> are exclude. |
Definition at line 51 of file SlsPageEnumeration.hxx.
sd::slidesorter::model::PageEnumeration::PageEnumeration | ( | const PageEnumeration & | rEnumeration | ) |
This copy constructor creates a copy of the given enumeration.
Definition at line 88 of file SlsPageEnumeration.cxx.
References mpImpl.
|
overridevirtual |
Definition at line 94 of file SlsPageEnumeration.cxx.
|
private |
This constructor expects an implementation object that holds the predicate that filters the pages.
Definition at line 82 of file SlsPageEnumeration.cxx.
|
overridevirtual |
Create and return an exact copy of the called object.
Implements sd::slidesorter::model::Enumeration< SharedPageDescriptor >.
Definition at line 105 of file SlsPageEnumeration.cxx.
References PageEnumeration().
|
static |
Definition at line 74 of file SlsPageEnumeration.cxx.
References PageEnumeration().
Referenced by sd::slidesorter::model::PageEnumerationProvider::CreateAllPagesEnumeration(), sd::slidesorter::model::PageEnumerationProvider::CreateSelectedPagesEnumeration(), and sd::slidesorter::model::PageEnumerationProvider::CreateVisiblePagesEnumeration().
|
overridevirtual |
Return the next element of the enumeration.
Call the HasMoreElements() before to make sure that there exists at least one more element. Calling this method with HasMoreElements() returning <FALSE> is an error.
Implements sd::slidesorter::model::Enumeration< SharedPageDescriptor >.
Definition at line 116 of file SlsPageEnumeration.cxx.
References mpImpl.
Referenced by sd::slidesorter::controller::SlotManager::ChangeSlideExclusionState(), sd::slidesorter::controller::SlideSorterController::Command(), sd::slidesorter::controller::PageSelector::CountSelectedPages(), sd::slidesorter::controller::Clipboard::CreateSlideTransferable(), sd::slidesorter::controller::SelectionManager::DeleteSelectedPages(), sd::DrawViewShell::DuplicateSelectedSlides(), sd::slidesorter::controller::SlotManager::DuplicateSelectedSlides(), sd::slidesorter::controller::SlotManager::GetClipboardState(), sd::slidesorter::controller::PageSelector::GetCoreSelection(), sd::slidesorter::controller::SelectionManager::GetInsertionPosition(), sd::slidesorter::controller::SlotManager::GetMenuState(), sd::framework::ViewShellWrapper::getSelection(), sd::SdUnoSlideView::getSelection(), sd::slidesorter::controller::SlotManager::GetStatusBarState(), sd::slidesorter::controller::InsertionIndicatorHandler::IsInsertionTrivial(), sd::slidesorter::view::SlideSorterView::Layout(), sd::slidesorter::controller::SelectionFunction::MoveFocus(), sd::slidesorter::controller::SlotManager::RenameSlide(), sd::slidesorter::model::SlideSorterModel::RestoreSelection(), sd::slidesorter::model::SlideSorterModel::SaveCurrentSelection(), sd::slidesorter::controller::PageSelector::SetCoreSelection(), sd::slidesorter::model::SlideSorterModel::SetDocumentSlides(), sd::slidesorter::model::SlideSorterModel::SynchronizeDocumentSelection(), and sd::slidesorter::model::SlideSorterModel::SynchronizeModelSelection().
|
overridevirtual |
Return <TRUE> when the enumeration has more elements, i.e.
it is save to call GetNextElement() at least one more time.
Implements sd::slidesorter::model::Enumeration< SharedPageDescriptor >.
Definition at line 111 of file SlsPageEnumeration.cxx.
References mpImpl.
Referenced by sd::slidesorter::controller::SlotManager::ChangeSlideExclusionState(), sd::slidesorter::controller::SlideSorterController::Command(), sd::slidesorter::controller::PageSelector::CountSelectedPages(), sd::slidesorter::controller::Clipboard::CreateSlideTransferable(), sd::slidesorter::controller::SelectionManager::DeleteSelectedPages(), sd::DrawViewShell::DuplicateSelectedSlides(), sd::slidesorter::controller::SlotManager::DuplicateSelectedSlides(), sd::slidesorter::controller::SlotManager::GetClipboardState(), sd::slidesorter::controller::PageSelector::GetCoreSelection(), sd::slidesorter::controller::SelectionManager::GetInsertionPosition(), sd::slidesorter::controller::SlotManager::GetMenuState(), sd::framework::ViewShellWrapper::getSelection(), sd::SdUnoSlideView::getSelection(), sd::slidesorter::controller::InsertionIndicatorHandler::IsInsertionTrivial(), sd::slidesorter::view::SlideSorterView::Layout(), sd::slidesorter::controller::SelectionFunction::MoveFocus(), sd::slidesorter::controller::SlotManager::RenameSlide(), sd::slidesorter::model::SlideSorterModel::RestoreSelection(), sd::slidesorter::model::SlideSorterModel::SaveCurrentSelection(), sd::slidesorter::controller::PageSelector::SetCoreSelection(), sd::slidesorter::model::SlideSorterModel::SetDocumentSlides(), sd::slidesorter::model::SlideSorterModel::SynchronizeDocumentSelection(), and sd::slidesorter::model::SlideSorterModel::SynchronizeModelSelection().
PageEnumeration & sd::slidesorter::model::PageEnumeration::operator= | ( | const PageEnumeration & | rEnumeration | ) |
Definition at line 98 of file SlsPageEnumeration.cxx.
References mpImpl.
|
overridevirtual |
Rewind the enumeration so that the next call to GetNextElement() will return its first element.
Implements sd::slidesorter::model::Enumeration< SharedPageDescriptor >.
Definition at line 121 of file SlsPageEnumeration.cxx.
References mpImpl.
Referenced by sd::slidesorter::controller::Clipboard::CreateSlideTransferable().
|
private |
Implementation object.
Definition at line 85 of file SlsPageEnumeration.hxx.
Referenced by GetNextElement(), HasMoreElements(), operator=(), PageEnumeration(), and Rewind().