⚙️ C++ SPELL DIFFICULTY: Adept Behavioral

The Template Method

Defining the skeleton of a ritual, deferring some steps to specific sects.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Template Method
ARCANUM SCHOOL: Necromancy // Ritualism
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// EXECUTABLE C++ PATTERN //
class Ritual {
protected:
    virtual void Prepare() = 0;
    virtual void Execute() = 0;
public:
    void Perform() {
        Prepare();
        Execute();
    }
};
class DarkRitual : public Ritual {
protected:
    void Prepare() override {}
    void Execute() override {}
};
Runic Tags: #behavioral #template-method #cpp