My Project
osl::book::BookInMemory Class Reference

#include <bookInMemory.h>

Public Member Functions

 ~BookInMemory ()
void find (const HashKey &key, MoveVector &out) const
size_t size () const

Static Public Member Functions

static const BookInMemoryinstance (const std::string &filename="")

Private Types

typedef CArray< Move, 8 > moves_t
typedef std::unordered_map< HashKey, moves_t, std::hash< HashKey > > 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 14 of file bookInMemory.h.

Member Typedef Documentation

◆ moves_t

Definition at line 16 of file bookInMemory.h.

◆ table_t

typedef std::unordered_map<HashKey,moves_t,std::hash<HashKey> > osl::book::BookInMemory::table_t
private

Definition at line 17 of file bookInMemory.h.

Constructor & Destructor Documentation

◆ ~BookInMemory()

osl::book::BookInMemory::~BookInMemory ( )

Definition at line 16 of file bookInMemory.cc.

◆ BookInMemory()

osl::book::BookInMemory::BookInMemory ( const std::string & filename)
explicitprivate

Definition at line 10 of file bookInMemory.cc.

References readAll().

Referenced by instance().

Member Function Documentation

◆ find()

void osl::book::BookInMemory::find ( const HashKey & key,
MoveVector & out ) const

◆ instance()

const osl::book::BookInMemory & osl::book::BookInMemory::instance ( const std::string & filename = "")
static

Definition at line 76 of file bookInMemory.cc.

References BookInMemory(), and table.

◆ readAll()

void osl::book::BookInMemory::readAll ( const std::string & filename)
private

Definition at line 55 of file bookInMemory.cc.

References osl::OslConfig::openingBook(), and readRecursive().

Referenced by BookInMemory().

◆ readRecursive()

◆ size()

size_t osl::book::BookInMemory::size ( ) const
inline

Definition at line 23 of file bookInMemory.h.

References table.

Member Data Documentation

◆ table

Definition at line 18 of file bookInMemory.h.

Referenced by find(), instance(), readRecursive(), and size().


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