LibreOffice Module sd (master) 1
|
Base class for the polymorphic implementation class of the <type>Iterator</type> class. More...
#include <OutlinerIteratorImpl.hxx>
Public Member Functions | |
IteratorImplBase (SdDrawDocument *pDocument, const std::weak_ptr< ViewShell > &rpViewShellWeak, bool bDirectionIsForward) | |
The constructor stores the given arguments to be used by the derived classes. More... | |
IteratorImplBase (SdDrawDocument *pDocument, std::weak_ptr< ViewShell > pViewShellWeak, bool bDirectionIsForward, PageKind ePageKind, EditMode eEditMode) | |
virtual | ~IteratorImplBase () |
virtual void | GotoNextText ()=0 |
Advance to the next text of the current object or to the next object. More... | |
virtual const IteratorPosition & | GetPosition () |
Return an object that describes the current object. More... | |
virtual IteratorImplBase * | Clone (IteratorImplBase *pObject=nullptr) const |
Create an exact copy of this object. More... | |
virtual bool | operator== (const IteratorImplBase &rIterator) const |
Test the equality of the this object and the given iterator. More... | |
virtual bool | IsEqualSelection (const IteratorImplBase &rIterator) const |
This method is used by the equality operator. More... | |
virtual void | Reverse () |
Reverse the direction of iteration. More... | |
Protected Attributes | |
IteratorPosition | maPosition |
The current position as returned by <member>GetPosition()</member>. More... | |
SdDrawDocument * | mpDocument |
The document on whose data the iterator operates. More... | |
std::weak_ptr< ViewShell > | mpViewShellWeak |
Necessary secondary source of information. More... | |
bool | mbDirectionIsForward |
Specifies the search direction. More... | |
Base class for the polymorphic implementation class of the <type>Iterator</type> class.
The iterators based on this class are basically uni directional iterators. Their direction can, however, be reversed at any point of their life time.
Definition at line 40 of file OutlinerIteratorImpl.hxx.
sd::outliner::IteratorImplBase::IteratorImplBase | ( | SdDrawDocument * | pDocument, |
const std::weak_ptr< ViewShell > & | rpViewShellWeak, | ||
bool | bDirectionIsForward | ||
) |
The constructor stores the given arguments to be used by the derived classes.
pDocument | The document provides the information to be iterated on. |
pViewShellWeak | Some information has to be taken from the view shell. |
bDirectionIsForward | This flag defines the iteration direction. When <TRUE> then the direction is forwards otherwise it is backwards. |
Definition at line 339 of file OutlinerIterator.cxx.
References maPosition, sd::outliner::IteratorPosition::meEditMode, sd::outliner::IteratorPosition::mePageKind, mpViewShellWeak, Page, and Standard.
sd::outliner::IteratorImplBase::IteratorImplBase | ( | SdDrawDocument * | pDocument, |
std::weak_ptr< ViewShell > | pViewShellWeak, | ||
bool | bDirectionIsForward, | ||
PageKind | ePageKind, | ||
EditMode | eEditMode | ||
) |
Definition at line 362 of file OutlinerIterator.cxx.
References maPosition, sd::outliner::IteratorPosition::meEditMode, and sd::outliner::IteratorPosition::mePageKind.
|
virtual |
Definition at line 373 of file OutlinerIterator.cxx.
|
virtual |
Create an exact copy of this object.
No argument should be specified when called from the outside. It then creates an object first and passes that to the inherited <member>Clone()</member> methods to fill in class specific information.
Reimplemented in sd::outliner::SelectionIteratorImpl, sd::outliner::ViewIteratorImpl, and sd::outliner::DocumentIteratorImpl.
Definition at line 394 of file OutlinerIterator.cxx.
References maPosition, mbDirectionIsForward, mpDocument, mpViewShellWeak, and pObject.
Referenced by sd::outliner::ViewIteratorImpl::Clone().
|
virtual |
Return an object that describes the current object.
Reimplemented in sd::outliner::SelectionIteratorImpl.
Definition at line 389 of file OutlinerIterator.cxx.
References maPosition.
|
pure virtual |
Advance to the next text of the current object or to the next object.
This takes the iteration direction into account. The new object pointed to can be retrieved (among other information) by calling the <member>GetPosition</member> method.
Implemented in sd::outliner::SelectionIteratorImpl, sd::outliner::ViewIteratorImpl, and sd::outliner::DocumentIteratorImpl.
|
virtual |
This method is used by the equality operator.
It is part of a "multimethod" pattern.
rIterator | The iterator to compare to. |
Reimplemented in sd::outliner::SelectionIteratorImpl.
Definition at line 381 of file OutlinerIterator.cxx.
References maPosition.
Referenced by sd::outliner::SelectionIteratorImpl::operator==().
|
virtual |
Test the equality of the this object and the given iterator.
Two iterators are taken to be equal when they point to the same object. Iteration direction is not taken into account.
rIterator | The iterator to compare to. |
Reimplemented in sd::outliner::SelectionIteratorImpl.
Definition at line 376 of file OutlinerIterator.cxx.
References maPosition.
|
virtual |
Reverse the direction of iteration.
The current object stays the same.
Reimplemented in sd::outliner::ViewIteratorImpl.
Definition at line 406 of file OutlinerIterator.cxx.
References mbDirectionIsForward.
Referenced by sd::outliner::ViewIteratorImpl::Reverse().
|
protected |
The current position as returned by <member>GetPosition()</member>.
Definition at line 106 of file OutlinerIteratorImpl.hxx.
Referenced by Clone(), sd::outliner::ViewIteratorImpl::Clone(), sd::outliner::DocumentIteratorImpl::Clone(), GetPosition(), sd::outliner::SelectionIteratorImpl::GetPosition(), sd::outliner::SelectionIteratorImpl::GotoNextText(), sd::outliner::ViewIteratorImpl::GotoNextText(), sd::outliner::DocumentIteratorImpl::GotoNextText(), IsEqualSelection(), IteratorImplBase(), operator==(), sd::outliner::ViewIteratorImpl::Reverse(), and sd::outliner::ViewIteratorImpl::SetPage().
|
protected |
Specifies the search direction.
Definition at line 112 of file OutlinerIteratorImpl.hxx.
Referenced by Clone(), sd::outliner::SelectionIteratorImpl::Clone(), sd::outliner::ViewIteratorImpl::Clone(), sd::outliner::DocumentIteratorImpl::Clone(), sd::outliner::SelectionIteratorImpl::GotoNextText(), sd::outliner::ViewIteratorImpl::GotoNextText(), sd::outliner::DocumentIteratorImpl::GotoNextText(), Reverse(), sd::outliner::ViewIteratorImpl::Reverse(), and sd::outliner::ViewIteratorImpl::SetPage().
|
protected |
The document on whose data the iterator operates.
Definition at line 108 of file OutlinerIteratorImpl.hxx.
Referenced by Clone(), sd::outliner::SelectionIteratorImpl::Clone(), sd::outliner::ViewIteratorImpl::Clone(), sd::outliner::DocumentIteratorImpl::Clone(), sd::outliner::DocumentIteratorImpl::GotoNextText(), sd::outliner::SelectionIteratorImpl::IsEqualSelection(), and sd::outliner::ViewIteratorImpl::SetPage().
|
protected |
Necessary secondary source of information.
Definition at line 110 of file OutlinerIteratorImpl.hxx.
Referenced by Clone(), sd::outliner::SelectionIteratorImpl::Clone(), sd::outliner::ViewIteratorImpl::Clone(), sd::outliner::DocumentIteratorImpl::Clone(), and IteratorImplBase().