Re: proper way to check inclusion among DocIterator ?

2017-04-24 Thread Tommaso Cucinotta

On 24/04/2017 21:54, Jean-Marc Lasgouttes wrote:

Le 21/04/17 à 01:15, Tommaso Cucinotta a écrit :

Hi,

is there an easy way to check whether a DocIterator d is positioned
within two others a and b ?
(that is, going through the document using forwardPos(), one encounters
a, then d, then b).

AFAIU, DocIterator::operator() just compares nesting levels, but no
pos() nor pit() etc.


Do you mean DocIterator::operator<() ? It seems to me that it does what you 
need, doesn't it?


yes it does, along with CursorSlice::operator<() :-), let me see what I can do 
with #8381 now!

Thanks!

T.



Re: proper way to check inclusion among DocIterator ?

2017-04-24 Thread Jean-Marc Lasgouttes

Le 21/04/17 à 01:15, Tommaso Cucinotta a écrit :

Hi,

is there an easy way to check whether a DocIterator d is positioned
within two others a and b ?
(that is, going through the document using forwardPos(), one encounters
a, then d, then b).

AFAIU, DocIterator::operator() just compares nesting levels, but no
pos() nor pit() etc.


Do you mean DocIterator::operator<() ? It seems to me that it does what 
you need, doesn't it?


JMarc



proper way to check inclusion among DocIterator ?

2017-04-20 Thread Tommaso Cucinotta

Hi,

is there an easy way to check whether a DocIterator d is positioned within two 
others a and b ?
(that is, going through the document using forwardPos(), one encounters a, then 
d, then b).

AFAIU, DocIterator::operator() just compares nesting levels, but no pos() nor 
pit() etc.

Thanks,

T.