commit (HEAD): document iterator (pd_Iterator.h/cpp)

From: Tomas Frydrych (tomasfrydrych_at_yahoo.co.uk)
Date: Sun Nov 09 2003 - 12:45:06 EST

  • Next message: BAM: "Re: gtk 2.3"

    this is work in progress; pd_Iterator.h/cpp contains a class that
    will allow us to iterate sequentially and in an efficient manner over
    the contents of document's piece table; the idea is something like
    this:

        pd_Iterator text(doc, docPos); //docPos is the postion to start from

        while(...)
         {
            ucs4 c = text.getChar();
              // do something with c ...

              // move onto next char
              text++;
          }

          // or something like this:
          ucs4 c = text[docpos];

    My plan is to use this to get rid of the many messy loops using
    getSpanPtr; this will make cleaner, and at places also more efficient
    code.

    Tomas



    This archive was generated by hypermail 2.1.4 : Sun Nov 09 2003 - 12:45:41 EST