gui::QSPdfOperatorIterator Class Reference

QObject wrapper around PdfOperator::Iterator. More...

#include <qspdfoperatoriterator.h>

Inheritance diagram for gui::QSPdfOperatorIterator:
gui::QSCObject

List of all members.

Public Slots

QSPdfOperatorcurrent ()
QSPdfOperatorIteratorcopy ()
QSPdfOperatorIteratornext ()
QSPdfOperatorIteratorprev ()
QSContentStreamstream ()
bool isEnd ()
bool isBegin ()
bool valid ()

Public Member Functions

 QSPdfOperatorIterator (PdfOperator::Iterator *op, boost::shared_ptr< CContentStream > cs, BaseCore *_base)
 QSPdfOperatorIterator (boost::shared_ptr< PdfOperator > op, BaseCore *_base)
 QSPdfOperatorIterator (boost::shared_ptr< PdfOperator > op, boost::shared_ptr< CContentStream > cs, BaseCore *_base)
virtual ~QSPdfOperatorIterator ()
PdfOperator::Iteratorget ()
boost::shared_ptr< PdfOperatorgetCurrent ()

Protected Member Functions

PdfOperator::IteratorcopyIterator (PdfOperator::Iterator *src)
void csCheck ()

Private Attributes

PdfOperator::Iteratorobj
boost::shared_ptr< CContentStreamcsRef

Detailed Description

QObject wrapper around PdfOperator::Iterator.


Constructor & Destructor Documentation

gui::QSPdfOperatorIterator::QSPdfOperatorIterator ( PdfOperator::Iterator op,
boost::shared_ptr< CContentStream cs,
BaseCore _base 
)

Construct wrapper around new Iterator and with reference to content stream in which the iterator resides This class takes ownership of the iterator (and will free it once it is destroyed)

Parameters:
op PDF Operator iterator
cs CContentstream in which this PdfOperator is contained
_base scripting base

References csRef, and obj.

Referenced by copy(), next(), and prev().

gui::QSPdfOperatorIterator::QSPdfOperatorIterator ( boost::shared_ptr< PdfOperator op,
BaseCore _base 
)

Construct wrapper around new Iterator with given Pdf Operator used as initial item

Parameters:
op PDF Operator
_base scripting base

References pdfobjects::PdfOperator::getIterator(), and obj.

gui::QSPdfOperatorIterator::QSPdfOperatorIterator ( boost::shared_ptr< PdfOperator op,
boost::shared_ptr< CContentStream cs,
BaseCore _base 
)

Construct wrapper around new Iterator with given Pdf Operator used as initial item and with reference to content stream in which the operator resides

Parameters:
op PDF Operator
cs CContentstream in which this PdfOperator is contained
_base scripting base

References csCheck(), csRef, pdfobjects::PdfOperator::getIterator(), and obj.

gui::QSPdfOperatorIterator::~QSPdfOperatorIterator (  )  [virtual]

destructor

References obj.


Member Function Documentation

QSPdfOperatorIterator * gui::QSPdfOperatorIterator::copy (  )  [slot]

Copy this iterator and return new iterator pointing initially to same PDF Operator

Returns:
New iterator pointing to same item.

References gui::QSCObject::base, copyIterator(), csCheck(), csRef, obj, and QSPdfOperatorIterator().

PdfOperator::Iterator * gui::QSPdfOperatorIterator::copyIterator ( PdfOperator::Iterator src  )  [protected]

Duplicate the operator iterator, while trying to preserve its type

Parameters:
src source iterator
Returns:
new iterator of same type aas source iterator, initially pointing at the same element

Referenced by copy(), next(), and prev().

void gui::QSPdfOperatorIterator::csCheck (  )  [protected]

Check if the csRef point to the same contentstream, as the content stream operator thinks it is in
Reset the csRef if these two do not match

References csRef, iterator::DoubleListIterator< Item >::getCurrent(), obj, and iterator::DoubleListIterator< Item >::valid().

Referenced by copy(), current(), next(), prev(), QSPdfOperatorIterator(), and stream().

QSPdfOperator * gui::QSPdfOperatorIterator::current (  )  [slot]

Return current operator from the iterator

Returns:
Current operator

References gui::QSCObject::base, csCheck(), csRef, iterator::DoubleListIterator< Item >::getCurrent(), obj, and iterator::DoubleListIterator< Item >::valid().

PdfOperator::Iterator * gui::QSPdfOperatorIterator::get (  ) 

Get Pdf Operator iterator held inside this class. Not exposed to scripting

Returns:
PDF Operator Iterator

References obj.

boost::shared_ptr< PdfOperator > gui::QSPdfOperatorIterator::getCurrent (  ) 

Get Pdf Operator shared pointer - the current item from iterator held inside this class. Not exposed to scripting

Returns:
PDF Operator - current item

References debug::DBG_ERR, iterator::DoubleListIterator< Item >::getCurrent(), guiPrintDbg, obj, and iterator::DoubleListIterator< Item >::valid().

bool gui::QSPdfOperatorIterator::isBegin (  )  [slot]

Call PdfOperator::Iterator::isBegin() Are we at beginning of the list?

References iterator::DoubleListIterator< Item >::isBegin(), and obj.

bool gui::QSPdfOperatorIterator::isEnd (  )  [slot]

Call PdfOperator::Iterator::isEnd() Are we at end of the list?

References iterator::DoubleListIterator< Item >::isEnd(), and obj.

QSPdfOperatorIterator * gui::QSPdfOperatorIterator::next (  )  [slot]

Call PdfOperator::Iterator::next() Move iterator to next operator

Returns:
Operator at new position, or NULL if the new position is already invalid

a.k.a. false ...

References gui::QSCObject::base, copyIterator(), csCheck(), csRef, iterator::DoubleListIterator< Item >::isEnd(), iterator::DoubleListIterator< Item >::next(), obj, and QSPdfOperatorIterator().

QSPdfOperatorIterator * gui::QSPdfOperatorIterator::prev (  )  [slot]

Call PdfOperator::Iterator::prev() Move iterator to previous operator

Returns:
Operator at new position, or NULL if the new position is already invalid

a.k.a. false ...

References gui::QSCObject::base, copyIterator(), csCheck(), csRef, iterator::DoubleListIterator< Item >::isBegin(), obj, iterator::DoubleListIterator< Item >::prev(), and QSPdfOperatorIterator().

QSContentStream * gui::QSPdfOperatorIterator::stream (  )  [slot]

Return content stream in which the initial operator used to construct the iterator was contained. May return NULL (if operator is not contained in any content stream or if content stream is not known at time of creation)

Returns:
QObject wrapper around this operator's content stream

References gui::QSCObject::base, csCheck(), and csRef.

bool gui::QSPdfOperatorIterator::valid (  )  [slot]

Call PdfOperator::Iterator::isBegin() Is current position valid?

References obj, and iterator::DoubleListIterator< Item >::valid().


Member Data Documentation

boost::shared_ptr<CContentStream> gui::QSPdfOperatorIterator::csRef [private]

Reference to content stream that is holding the original operator used to construct the iterator. It may be NULL (empty shared_ptr) if unknown or empty

Referenced by copy(), csCheck(), current(), next(), prev(), QSPdfOperatorIterator(), and stream().


The documentation for this class was generated from the following files: