This topic covers the implementation details of TPhysicalSectionsBlobItem.
Scope: cpPhysicalSections.pas; class derived from TBlobItem. Prepared from the curated implementation supplied for this review on 2 October 2026.
Each Section holds display/file names, Enabled, UseOutputFilename, default dimension switches, dimensions, AllOtherPages and Rules. Rule IDs 1–16 map to internal slots 0–15; a missing indexed rule stops the read.
RuleType 1 reads range endpoints and direction; 2 reads FrontPages; 3 reads BackPages; 4 reads Signature and its direction. The Rules wrapper is dereferenced directly. Rule combination semantics require the page-selection consumer.
Notation and shared helper rules: Reading this reference.
Literal rec_type values emitted within these routines: TPhysicalPagesRule, TPhysicalPagesRules. Nested values may belong to child wrappers rather than this owner itself; the attribute entries below give their exact locations.
Exact XML fields and attributes
The paths below start at this record or property node. A slash identifies a child element; @ identifies an attribute. Curly braces mark a variable index or expression, not literal XML text. Initial values describe initialization; they do not establish what an omitted individual element does. The Implementation toggle below contains the supplied routines for exact branch order and conversions.
DisplayName
XML representation: The text of the DisplayName element.
Initial value: “A Physical Section” (TPhysicalSectionsBlobItem.Create).
Reading: Reads node.text into DisplayName when the record node exists.
Writing: Stores DisplayName whenever the writer reaches this field.
FileName
XML representation: The text of the FileName element.
Initial value: an empty string (TPhysicalSectionsBlobItem.Create).
Reading: Reads node.text into FileName when the record node exists.
Writing: Stores FileName whenever the writer reaches this field.
Enabled
XML representation: The text of the Enabled element.
Initial value: true (TPhysicalSectionsBlobItem.Create).
Reading: Converts the stored text to a boolean and assigns it to Enabled when the record node exists.
Writing: Stores true or false according to Enabled whenever the writer reaches this field.
UseOutputFilename
XML representation: The text of the UseOutputFilename element.
Initial value: true (TPhysicalSectionsBlobItem.Create).
Reading: Converts the stored text to a boolean and assigns it to UseOutputFilename when the record node exists.
Writing: Stores true or false according to UseOutputFilename whenever the writer reaches this field.
DefaultHeight
XML representation: The text of the DefaultHeight element.
Initial value: true (TPhysicalSectionsBlobItem.Create).
Reading: Converts the stored text to a boolean and assigns it to DefaultHeight when the record node exists.
Writing: Stores true or false according to DefaultHeight whenever the writer reaches this field.
DefaultWidth
XML representation: The text of the DefaultWidth element.
Initial value: true (TPhysicalSectionsBlobItem.Create).
Reading: Converts the stored text to a boolean and assigns it to DefaultWidth when the record node exists.
Writing: Stores true or false according to DefaultWidth whenever the writer reaches this field.
Height
XML representation: The text of the Height element.
Initial value: 0 (TPhysicalSectionsBlobItem.Create).
Reading: Converts the stored text to a number and assigns it to Height when the record node exists.
Writing: Stores the text representation of Height whenever the writer reaches this field.
Width
XML representation: The text of the Width element.
Initial value: 0 (TPhysicalSectionsBlobItem.Create).
Reading: Converts the stored text to a number and assigns it to Width when the record node exists.
Writing: Stores the text representation of Width whenever the writer reaches this field.
AllOtherPages
XML representation: The text of the AllOtherPages element.
Initial value: false (TPhysicalSectionsBlobItem.Create).
Reading: Converts the stored text to a boolean and assigns it to AllOtherPages when the record node exists.
Writing: Stores true or false according to AllOtherPages whenever the writer reaches this field.
Rules/Rule[@id={(i + 1).toString}]/RuleType
XML representation: The text of the RuleType element.
Reading: Converts the stored text to a number and assigns it to Rules[i].RuleType when while node2 exists; node3 exists.
Writing: Stores the text representation of Rules[i].RuleType when for each i from low (TPhysicalPagesRules) through high (TPhysicalPagesRules); Rules[i].RuleType is one of [1..4].
Rules/Rule[@id={(i + 1).toString}]/RangeStart
XML representation: The text of the RangeStart element.
Reading: Converts the stored text to a number and assigns it to Rules[i].RangeStart when while node2 exists; Rules[i].RuleType is 1; node3 exists.
Writing: Stores the text representation of Rules[i].RangeStart when for each i from low (TPhysicalPagesRules) through high (TPhysicalPagesRules); Rules[i].RuleType is one of [1..4]; Rules[i].RuleType is 1.
Rules/Rule[@id={(i + 1).toString}]/RangeEnd
XML representation: The text of the RangeEnd element.
Reading: Converts the stored text to a number and assigns it to Rules[i].RangeEnd when while node2 exists; Rules[i].RuleType is 1; node3 exists.
Writing: Stores the text representation of Rules[i].RangeEnd when for each i from low (TPhysicalPagesRules) through high (TPhysicalPagesRules); Rules[i].RuleType is one of [1..4]; Rules[i].RuleType is 1.
Rules/Rule[@id={(i + 1).toString}]/RangeBackwards
XML representation: The text of the RangeBackwards element.
Reading: Converts the stored text to a boolean and assigns it to Rules[i].RangeBackwards when while node2 exists; Rules[i].RuleType is 1; node3 exists.
Writing: Stores true or false according to Rules[i].RangeBackwards when for each i from low (TPhysicalPagesRules) through high (TPhysicalPagesRules); Rules[i].RuleType is one of [1..4]; Rules[i].RuleType is 1.
Rules/Rule[@id={(i + 1).toString}]/FrontPages
XML representation: The text of the FrontPages element.
Reading: Converts the stored text to a number and assigns it to Rules[i].FrontPages when while node2 exists; Rules[i].RuleType is 2; node3 exists.
Writing: Stores the text representation of Rules[i].FrontPages when for each i from low (TPhysicalPagesRules) through high (TPhysicalPagesRules); Rules[i].RuleType is one of [1..4]; Rules[i].RuleType is 2.
Rules/Rule[@id={(i + 1).toString}]/BackPages
XML representation: The text of the BackPages element.
Reading: Converts the stored text to a number and assigns it to Rules[i].BackPages when while node2 exists; Rules[i].RuleType is 3; node3 exists.
Writing: Stores the text representation of Rules[i].BackPages when for each i from low (TPhysicalPagesRules) through high (TPhysicalPagesRules); Rules[i].RuleType is one of [1..4]; Rules[i].RuleType is 3.
Rules/Rule[@id={(i + 1).toString}]/Signature
XML representation: The text of the Signature element.
Reading: Converts the stored text to a number and assigns it to Rules[i].Signature when while node2 exists; Rules[i].RuleType is 4; node3 exists.
Writing: Stores the text representation of Rules[i].Signature when for each i from low (TPhysicalPagesRules) through high (TPhysicalPagesRules); Rules[i].RuleType is one of [1..4]; Rules[i].RuleType is 4.
Rules/Rule[@id={(i + 1).toString}]/SignatureBackwards
XML representation: The text of the SignatureBackwards element.
Reading: Converts the stored text to a boolean and assigns it to Rules[i].SignatureBackwards when while node2 exists; Rules[i].RuleType is 4; node3 exists.
Writing: Stores true or false according to Rules[i].SignatureBackwards when for each i from low (TPhysicalPagesRules) through high (TPhysicalPagesRules); Rules[i].RuleType is one of [1..4]; Rules[i].RuleType is 4.
Rules/@rec_type
XML representation: The rec_type attribute.
Writing: Stores the literal text “TPhysicalPagesRules” whenever the writer reaches this field.
Rules/Rule/@id
XML representation: The id attribute.
Writing: Stores the text representation of (i + 1) when for each i from low (TPhysicalPagesRules) through high (TPhysicalPagesRules); Rules[i].RuleType is one of [1..4].
Rules/Rule[@id={(i + 1).toString}]/@rec_type
XML representation: The rec_type attribute.
Writing: Stores the literal text “TPhysicalPagesRule” when for each i from low (TPhysicalPagesRules) through high (TPhysicalPagesRules); Rules[i].RuleType is one of [1..4].
Initialization and reset values
TPhysicalSectionsBlobItem.Create
Setting or temporary variable |
Initial value |
When it is assigned |
DisplayName |
“A Physical Section” |
Always |
Enabled |
true |
Always |
UseOutputFilename |
true |
Always |
FileName |
an empty string |
Always |
DefaultHeight |
true |
Always |
DefaultWidth |
true |
Always |
Height |
0 |
Always |
Width |
0 |
Always |
AllOtherPages |
false |
Always |
Rules |
Default (TPhysicalPagesRules) |
Always |
This routine also calls inherited Create. See Implementation for their order and any conditional calls.
Storage declarations relevant to interpretation
These are in-memory member and property types, not a list of mandatory XML children. They retain array bounds, fixed buffers and selector types. The field reference above defines what is actually serialized.
Name |
Declared type / bounds |
Kind |
Enabled |
Boolean |
member |
UseOutputFilename |
Boolean |
member |
FileName |
string |
member |
DefaultHeight |
Boolean |
member |
DefaultWidth |
Boolean |
member |
Height |
integer |
member |
Width |
integer |
member |
AllOtherPages |
Boolean |
member |
Rules |
TPhysicalPagesRules |
member |
The Implementation toggle contains only TPhysicalSectionsBlobItem methods. Initializers and helpers belonging to other types are identified separately below. Shared XML-helper limitations are explained in Reading this reference.