Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This is the primary architectural change in this proposed refactoring. A sequence parser, for example, is a loop that drives a number of sequence child parsers, some of which are for scalars (elements or model groups that are not repeating/optional), others are for array/optional elements.

Array/Optional elements no longer have their own Parsers/Unparsers independent of the sequences that contain them. Rather, the OrderedSequenceParserBase class orchestrates the child parsing for all kinds of children, be they scalars, or occurrences of array/optional elements. That way they can deal with separators without special cases around array boundaries. So the iteration of recurring array/optional elements is driven from the OrderedSequenceParserBase's parse method. Each kind of sequence child provides a parseOne method designed to parse exactly one occurrence, driven by the framework.

.

draw.io Diagram
bordertrue
viewerToolbartrue
fitWindowfalse
diagramNameSequenceChild
simpleViewerfalse
width
diagramWidth1161
revision3

...