openfoam/applications/test/OTstream
Mark Olesen 9fd696e1ae ENH: add ITstream append and seek methods.
- ITstream append() would previously have used the append from the
  underlying tokenList, which leaves the tokenIndex untouched and
  renders the freshly appended tokens effectively invisible if
  interspersed with primitiveEntry::read() that itself uses tokenIndex
  when building the list.

  The new append() method makes this hidden ITstream bi-directionality
  easier to manage. For efficiency, we only append lists
  (not individual tokens) and support a 'lazy' resizing that allows
  the final resizing to occur later when all tokens have been appended.

- The new ITstream seek() method provides a conveniently means to move
  to the end of the list or reposition to the middle.
  Using rewind() and using seek(0) are identical.

ENH: added OTstream to output directly to a list of tokens

---

BUG: List::newElem resized incorrectly

- had a simple doubling of the List size without checking that this
  would indeed be sufficient for the requested index.

  Bug was not triggered since primitiveEntry was the only class using
  this call, and it added the tokens sequentially.
2019-12-06 17:23:59 +01:00
..
Make ENH: add ITstream append and seek methods. 2019-12-06 17:23:59 +01:00
Test-OTstream.C ENH: add ITstream append and seek methods. 2019-12-06 17:23:59 +01:00