2. The tree of BreakPoss

Each LM contains a list of BPs belonging to and returned to it by the childLMs during the getNextBreakPoss stack. These are the BPs that end an area of the childLM. The BP contains an index position.iLeafPos, which connects it to the BP with that index in the list of BPs of its own LM (the childLM).

For example, BlockLM's list childBreaks contains the BPs that end a line (if the childLM is a LineLM). LineLM's list vecInlineBreaks contains the BPs that were returned to it as possible linebreaks by TextLM (if the childLM is a TextLM). TextLM's list vecAreaInfo contains AreaInfo objects. A BP in BlockLM's list childBreaks belongs e.g. to a LineLM. Its index position.iLeafPos points to the BP with that index in vecInlineBreaks in ListLM. That BP belongs e.g. to a TextLM, and its index position.iLeafPos points to the AreaInfo object with that index in vecAreaInfo in TextLM.

                        +-----------------+
                     LM | bp0 bp1 bp2 bp3 |
                        +-++--++--++--++--+
   .......................:|..:|  :|  :|
   :            +----------+   |  :|  :|
   :            |   +----------+  :|  :+----------------------+
   :            |   |     ........:|  :.......                |
   :            |   |     :        |         :                |
   : +----------+---+--+  : +------+------+  : +--------------+------+
  LM | bp0 bp1 bp2 bp3 | LM | bp0 bp1 bp2 | LM | bp0 bp1 bp2 bp3 bp4 |
     +-----------------+    +-------------+    +---------------------+

The BPs are held in a list by the LM shown in front of them. They are associated with one of the childLMs, which is shown by the dotted lines. Their member position.iLeafPos connects them with the BP in their LM's list with that index, as shown by the dashed lines.