All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
checkDuplicate.h
Go to the documentation of this file.
1 #ifndef _OSL_RECORD_CHECK_DUPLICATE_H
2 #define _OSL_RECORD_CHECK_DUPLICATE_H
3 
4 #include "osl/move.h"
5 #include "osl/ptype.h"
6 #include "osl/hash/hashKey.h"
7 #include "osl/stl/vector.h"
8 #include "osl/stl/hash_map.h"
9 #include "osl/pathEncoding.h"
10 
11 #include <deque>
12 
13 namespace osl
14 {
15  namespace record
16  {
21  {
22  typedef hash_map<HashKey, vector<PathEncoding> > keymap_t;
31 
32  public:
33  static std::pair<HashKey,PathEncoding> getLastState(const vector<Move>& moves);
34 
39  {
43  };
44 
49  : regist_counter(0),
52  {}
53 
63  DUPLICATE_RESULT regist(const vector<Move>& moves);
64 
68  void print(std::ostream& out) const;
69 
73  size_t getRegists() const
74  { return regist_counter; }
75 
80  size_t getDuplicatedHash() const
81  { return duplicated_hash_counter; }
82 
86  size_t getDuplicatedMoves() const
87  { return duplicated_moves_counter; }
88 
89  private:
99  DUPLICATE_RESULT regist(const HashKey& key,
100  const PathEncoding& moves);
101  };
102 
103  } // namespace record
104 } // namespace osl
105 
106 
107 #endif /* _OSL_RECORD_CHECK_DUPLICATE_H */
108 
109 // ;;; Local Variables:
110 // ;;; mode:c++
111 // ;;; c-basic-offset:2
112 // ;;; End: