// The public inheritance should go in favour of a suitable data member
// (or maybe private inheritance) at some point of time.
// The public inheritance should go in favour of a suitable data member
// (or maybe private inheritance) at some point of time.
{
public:
/// type for cell number in inset
typedef CursorSlice::idx_type idx_type;
/// type for paragraph numbers positions within a cell
{
public:
/// type for cell number in inset
typedef CursorSlice::idx_type idx_type;
/// type for paragraph numbers positions within a cell
- explicit DocumentIterator(InsetBase & inset);
+ explicit DocIterator(InsetBase & inset);
+
+ /// is the iterator valid?
+ operator const void*() const { return empty() ? 0 : this; }
+ /// is this iterator invalid?
+ bool operator!() const { return empty(); }
CursorSlice & bottom() { return front(); }
/// access to outermost slicetip
CursorSlice const & bottom() const { return front(); }
CursorSlice & bottom() { return front(); }
/// access to outermost slicetip
CursorSlice const & bottom() const { return front(); }
/// return the last possible cell in this inset
idx_type lastidx() const;
/// return the paragraph this cursor is in
/// return the last possible cell in this inset
idx_type lastidx() const;
/// return the paragraph this cursor is in
/// return the position within the paragraph
pos_type pos() const { return back().pos(); }
/// return the position within the paragraph
pos_type & pos() { return back().pos(); }
/// return the last position within the paragraph
pos_type lastpos() const;
/// return the position within the paragraph
pos_type pos() const { return back().pos(); }
/// return the position within the paragraph
pos_type & pos() { return back().pos(); }
/// return the last position within the paragraph
pos_type lastpos() const;
-// The difference to a ('non stable') DocumentIterator is the removed
+DocIterator doc_iterator_begin(InsetBase & inset);
+DocIterator doc_iterator_end(InsetBase & inset);
+
+
+// The difference to a ('non stable') DocIterator is the removed
// (overwritte by 0...) part of the CursorSlice data items. So this thing
// is suitable for external storage, but not for iteration as such.
// (overwritte by 0...) part of the CursorSlice data items. So this thing
// is suitable for external storage, but not for iteration as such.