Labyrinth
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
hindrancemap.hpp
1 //////////////////////////////
2 //
3 // File: swrs/hindrancemap.hpp
4 // Author: Maciej Kaminski
5 // E-mail: maciej.a.kaminski@gmail.com
6 // Website: maciejkaminski.pl
7 //
8 // File creation date: Feb 6 2013
9 // This file is part of Project Labyrinth
10 // This file is going to be released under terms of GNU GPL in near future
11 //
12 //////////////////////////////
13 
14 #ifndef __SW_HINDRANCE_MAP_H_
15 #define __SW_HINDRANCE_MAP_H_
16 #include <utility>
17 #include <vector>
18 #include <string>
19 #include <unordered_map>
20 #include "swrs/hindrance.hpp"
21 #include "swrs/featuremap.hpp"
22 #include "swrs/character.hpp"
23 #include <map>
24 namespace SWRS
25 {
26  class FeatureImpl;
27  //! map of all hindrance possible in setting
28  class HindranceMap : public FeatureMap
29  {
30  friend class RulesSystem;
31  void ReadHindranceMap(const char * filename);
32  void PrintSummary();
33  public:
34  //! generate hindrance object for given hindrance name
35  Hindrance * GenerateHindrance(const std::string & hindrance_name)const ;
36  //!return map of all possible hindrances
37  const FeaturesMap & GetHindranceMap() const
38  {
39  return GetFeatureMap();
40  }
41  };
42 }
43 #endif