Proxy
Control access to a potent, dangerous demonic entity, deferring its invocation until absolutely necessary.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Proxy
ARCANUM SCHOOL: Abjuration // Demonic Containment
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// D PATTERN //
interface IDemon { void unleash(); }
class PitFiend : IDemon {
this() { /* Costly summoning */ }
override void unleash() {}
}
class BoundDemonProxy : IDemon {
private PitFiend realDemon;
override void unleash() {
if (realDemon is null) realDemon = new PitFiend();
realDemon.unleash();
}
}
A magical contract that postpones the instantiation of forbidden rituals.
Runic Tags:
#structural
#proxy
#dlang
#lazy-evaluation