Persistent document range markers?

From: Ben Martin <monkeyiq_at_users.sourceforge.net>
Date: Sun Jul 31 2011 - 08:15:42 CEST

Hi,
  I'd like to have "begin" and "end" PT_DocPosition like markers which
can mutate with the document and which can call a notification function
when text inside that range changes. By mutate I mean if you insert a
character in the range then the "end" marker is incremented.

  This seems to be similar to what the various Listener classes are
doing. In particular pt_PieceTable::tellListenerSubset() seems to be the
code to run the show. Though my listener use case is persistent range
markers. Of course the notification function might also invalidate a
cache if something "significant" changes.

  My use case is for RDF, having a section of the document watched by a
listener and if new xml:id or RDF links are put in then the
RDFRangeListener will know it needs to update its RDF iterators to
possibly include new RDF in results. The RDFRange would also have to
keep an eye on the raw RDF to see if any new results link in that way.

  Any recommendations of code that monitors a persistent range in the
doc would be greatly appreciated. Otherwise at least I know I'm not
duplicating wheels when I write it ;)

Received on Sun Jul 31 08:15:59 2011

This archive was generated by hypermail 2.1.8 : Sun Jul 31 2011 - 08:16:00 CEST