From d8289105193707daede1a5b59137f18e20f20aeb Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 18 Oct 2024 15:48:14 +0200 Subject: (2/2) rename --- TileBehaviorFactory.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 TileBehaviorFactory.h (limited to 'TileBehaviorFactory.h') diff --git a/TileBehaviorFactory.h b/TileBehaviorFactory.h new file mode 100644 index 0000000..33cd795 --- /dev/null +++ b/TileBehaviorFactory.h @@ -0,0 +1,21 @@ +#pragma once + +#include +#include + +#include "TileBehavior.h" + +class TileBehaviorFactory { + typedef std::map TileBehaviorCollection; + +public: + static TileBehavior & get_strategy(std::string); + static void register_strategy(std::string, TileBehavior *); + +private: + static TileBehaviorCollection & get_collection() { + static TileBehaviorCollection c = {}; + return c; + } +}; + -- cgit v1.2.3