Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
osl
record
opening
bookInMemory.h
Go to the documentation of this file.
1
/* bookInMemory.h
2
*/
3
#ifndef OSL_BOOKINMEMORY_H
4
#define OSL_BOOKINMEMORY_H
5
#include "
osl/hash/hashKey.h
"
6
#include "
osl/container/moveVector.h
"
7
#include "
osl/stl/hash_map.h
"
8
namespace
osl
9
{
10
namespace
record
11
{
12
namespace
opening
13
{
14
class
WeightedBook;
15
class
BookInMemory
16
{
17
typedef
CArray<Move,8>
moves_t
;
18
typedef
hash_map<HashKey,moves_t>
table_t
;
19
table_t
table
;
20
public
:
21
~BookInMemory
();
22
23
void
find
(
const
HashKey& key, MoveVector&
out
)
const
;
24
size_t
size
()
const
{
return
table
.size(); }
25
static
const
BookInMemory
&
instance
(
const
std::string& filename=
""
);
26
private
:
27
explicit
BookInMemory
(
const
std::string& filename);
28
void
readAll
(
const
std::string& filename);
29
int
readRecursive
(
const
HashKey& key,
int
index,
WeightedBook
&
book
,
int
,
int
);
30
};
31
}
32
}
33
using
record::opening::BookInMemory;
34
}
35
36
#endif
/* OSL_BOOKINMEMORY_H */
37
// ;;; Local Variables:
38
// ;;; mode:c++
39
// ;;; c-basic-offset:2
40
// ;;; End:
Generated on Sun Jul 21 2013 13:37:23 by
1.8.4