aboutsummaryrefslogtreecommitdiff
path: root/TileBehavior.h
blob: 33cd795eddac12675336c9adc90b435cc179991b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include <map>
#include <string>

#include "TileBehavior.h"

class TileBehaviorFactory {
	typedef std::map<std::string, TileBehavior *> 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;
	}
};