✨ ARCANUM RUNE DIFFICULTY: Adept Structural

The Composite Partitioned Dataset

Treat individual PDS members and whole Datasets uniformly.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Composite
ARCANUM SCHOOL: Conjuration // Aggregation
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
/* ooRexx Composite */
::class DatasetComponent abstract
::method getSize abstract

::class PDSMember subclass DatasetComponent
::attribute size
::method init
  use arg size
  self~size = size
::method getSize
  return self~size

::class PartitionedDataset subclass DatasetComponent
::attribute members
::method init
  self~members = .array~new()
::method add
  use arg member
  self~members~append(member)
::method getSize
  total = 0
  do member over self~members
    total = total + member~getSize()
  end
  return total

By utilizing the Composite pattern, the orchestrator manipulates directories and simple files with the same arcane gestures, simplifying massive operations.

Runic Tags: #composite #pds #rexx