rgheck wrote:
On 01/05/2010 08:44 AM, Abdelrazak Younes wrote:
Tommaso Cucinotta wrote:
Abdelrazak Younes wrote:
You can use the paragraph id and the position in that paragraph.
Else there is the StableDocIterator IIRC.
I can see operator<<() but not operator>>(), both for
StableDocIterator and for CursorSlice. I guess the operator<<()s are
there just for debugging purposes, not really for serializing and
deserializing back those values. Also, this serialize/deserialize
burden only arises because, in order to use an LFUN, I have to
provide all arguments as a string as the LFUN argument.
Hum, as I said, you are not forced to use an LFUN for everything. I
am personally fine with a multi document searching function that do
not use an LFUN.
IOW, LFUN_FINDADV may stay in BufferView which will call
Buffer::findAndReplace(option, cursor()). OK, optionally, this LFUN
could also contain a list of
file name in order to continue the search. If next item is found in
another Buffer, then calling LFUN_BUFFER_SWITCH will do.
The multiple buffer search in one go can rely elsewhere and be based
on an LFUN or not.
I think I'm about to agree with you, but let me just check: There
ought to be an interface for the ONE Buffer search that is based upon
an LFUN.
Correct.
The multi-file search need not be, but could call that LFUN repeatedly.
Or rather call the Buffer method. Because we don't want to create a
BufferView for that search. Or we could also duplicate LFUN_FINDADV in
Buffer in addtion to BufferView for the command-line version (such as
with export). Then this multi-file version could call buffer::dispatch()
instead. But quite frankly calling the relevant Buffer method is my
preferred choice.
Abdel.