The Abstract Factory
Conjuring distinct families of necrotic medical equipment through shared incantations.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Abstract Factory
ARCANUM SCHOOL: Conjuration // Necro-Artifice
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
ABSTRACTFACTORY ; Abstract Factory Pattern in MUMPS
; Hospital Database Necromancy: Conjuring wards.
;
CREATE(WARDTYPE) ; Create a family of objects
N BED,MONITOR
I WARDTYPE="NECROTIC" D
. S BED=$$NECROBED()
. S MONITOR=$$SOULMONITOR()
I WARDTYPE="MORTAL" D
. S BED=$$MORTALBED()
. S MONITOR=$$VITALS()
W "Ward Conjured: ",BED," with ",MONITOR,!
Q
NECROBED() Q "Coffin-Bed of the Damned"
SOULMONITOR() Q "Ectoplasmic Fluctuation Tracker"
MORTALBED() Q "Standard Hospital Bed"
VITALS() Q "EKG Machine"
Runic Tags:
#creational
#abstract-factory
#mumps
#necromancy