osl::record::opening::BookInMemory Class Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
osl::record::opening::BookInMemory Class Reference

`#include <bookInMemory.h>`

Collaboration diagram for osl::record::opening::BookInMemory:
[legend]

## Public Member Functions
| ~BookInMemory ()
void | find (const HashKey &key, MoveVector &out) const
size_t | size () const

## Static Public Member Functions
static const BookInMemory & | instance (const std::string &filename="")

## Private Types
typedef CArray< Move, 8 > | moves_t
typedef hash_map< HashKey, moves_t > | table_t

## Private Member Functions
| BookInMemory (const std::string &filename)
void | readAll (const std::string &filename)
int | readRecursive (const HashKey &key, int index, WeightedBook &book, int, int)

## Private Attributes
table_t | table

## Detailed Description

Definition at line 15 of file bookInMemory.h.

## Member Typedef Documentation

typedef CArray<Move,8> osl::record::opening::BookInMemory::moves_t
| private

Definition at line 17 of file bookInMemory.h.

typedef hash_map<HashKey,moves_t> osl::record::opening::BookInMemory::table_t
| private

Definition at line 18 of file bookInMemory.h.

## Constructor & Destructor Documentation

osl::record::opening::BookInMemory::~BookInMemory | ( | ) |  |

Definition at line 17 of file bookInMemory.cc.

osl::record::opening::BookInMemory::BookInMemory | ( | const std::string & | filename) |  |
| explicitprivate

Definition at line 11 of file bookInMemory.cc.

## Member Function Documentation

void osl::record::opening::BookInMemory::find | ( | const HashKey & | key,
|  | MoveVector & | out
| ) |  | const

Definition at line 65 of file bookInMemory.cc.

References osl::Move::isNormal().

const osl::record::opening::BookInMemory & osl::record::opening::BookInMemory::instance | ( | const std::string & | filename = `""`) |  |
| static

Definition at line 77 of file bookInMemory.cc.

References book().

void osl::record::opening::BookInMemory::readAll | ( | const std::string & | filename) |  |
| private

Definition at line 56 of file bookInMemory.cc.

References book(), and osl::record::opening::WeightedBook::getStartState().

int osl::record::opening::BookInMemory::readRecursive | ( | const HashKey & | key,
|  | int | index,
|  | WeightedBook & | book,
|  | int | depth,
|  | int |
| ) |  |
| private

Definition at line 22 of file bookInMemory.cc.

References book(), osl::record::opening::WeightedBook::getBlackWinCount(), osl::record::opening::WMove::getMove(), osl::record::opening::WeightedBook::getMoves(), osl::record::opening::WMove::getStateIndex(), osl::record::opening::WMove::getWeight(), osl::record::opening::WeightedBook::getWhiteWinCount(), moves, and store().

size_t osl::record::opening::BookInMemory::size | ( | ) |  | const
| inline

Definition at line 24 of file bookInMemory.h.

References table.

## Member Data Documentation

table_t osl::record::opening::BookInMemory::table
| private

Definition at line 19 of file bookInMemory.h.

Referenced by size().

The documentation for this class was generated from the following files:

- bookInMemory.h
- bookInMemory.cc