The Composite
Composes arcane components into tree structures to represent part-whole hierarchies.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Composite
ARCANUM SCHOOL: Transmutation // Weaving
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// TCL PATTERN //
oo::class create GlyphNode {
method activate {} { error "Not implemented" }
}
oo::class create SimpleGlyph {
superclass GlyphNode
variable name
constructor {n} { set name $n }
method activate {} { puts "Activating glyph: $name" }
}
oo::class create GlyphCluster {
superclass GlyphNode
variable children
constructor {} { set children {} }
method add {child} { lappend children $child }
method activate {} {
puts "Activating cluster..."
foreach child $children {
$child activate
}
}
}
set root [GlyphCluster new]
set nodeA [SimpleGlyph new "Alpha"]
set sub [GlyphCluster new]
$sub add [SimpleGlyph new "Beta"]
$sub add [SimpleGlyph new "Gamma"]
$root add $nodeA
$root add $sub
$root activate
The Composite
A single glyph is weak, but a fractal lattice of interconnected runes can bypass the most formidable ICE. The Composite pattern treats individual sigils and immense clusters of logic as identical constructs, allowing recursive detonation of magical force down the entire system tree.
Runic Tags:
#structural
#composite
#weaving
#hierarchies