All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes | Static Public Attributes
osl::ntesuki::NtesukiTable::Table Class Reference

#include <ntesukiTable.h>

Inheritance diagram for osl::ntesuki::NtesukiTable::Table:
Inheritance graph
[legend]
Collaboration diagram for osl::ntesuki::NtesukiTable::Table:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Table (unsigned int capacity, unsigned int default_gc_size, bool verbose)
 ~Table ()
NtesukiRecordallocate (const HashKey &key, const PieceStand &white_stand, signed short distance)
 key に対応する Record を Table から探す.
NtesukiRecordfind (const HashKey &key)
 表を探す.新たに登録する事はない
void erase (const HashKey key)
 表に登録された要素を削除する.
template<class F >
void forEachRecord (F &f)
 テーブルに登録された各 record を F で処理する.
template<class F >
void forEachRecordFrom (F &, NumEffectState &, NtesukiRecord *)
template<class F >
void forEachRecordFromRoot (F &f)
void collectGarbage (unsigned int gc_size)
 Collect garbage, until the size of the table reduces to gc_size.

Public Attributes

unsigned int capacity
unsigned int default_gc_size
bool verbose
bool no_gc
bool gc_request
unsigned int numEntry
unsigned int numCacheHit
unsigned int gcCount
NtesukiRecordroot
boost::scoped_ptr< NumEffectState > rootState

Static Public Attributes

static int largeGCCount = 0

Detailed Description

Definition at line 58 of file ntesukiTable.h.


Constructor & Destructor Documentation

osl::ntesuki::NtesukiTable::Table::Table ( unsigned int  capacity,
unsigned int  default_gc_size,
bool  verbose 
)

Definition at line 22 of file ntesukiTable.cc.

Definition at line 32 of file ntesukiTable.cc.


Member Function Documentation

osl::ntesuki::NtesukiRecord * osl::ntesuki::NtesukiTable::Table::allocate ( const HashKey &  key,
const PieceStand white_stand,
signed short  distance 
)

key に対応する Record を Table から探す.

もし登録されていなかったら新たに登録する.

Parameters:
key局面の Hash値
Returns:
対応する NtesukiRecord へのポインタ. (外部から delete 等してはならない)

Definition at line 38 of file ntesukiTable.cc.

References osl::ntesuki::NtesukiTable::capacity(), osl::ntesuki::NtesukiTable::collectGarbage(), osl::ntesuki::NtesukiTable::find(), and result.

void osl::ntesuki::NtesukiTable::Table::collectGarbage ( unsigned int  gc_size)
void osl::ntesuki::NtesukiTable::Table::erase ( const HashKey  key)

表に登録された要素を削除する.

Definition at line 557 of file ntesukiTable.cc.

References osl::ntesuki::NtesukiTable::find().

Referenced by MarkAndSweep::~MarkAndSweep().

表を探す.新たに登録する事はない

Returns:
存在しなければ0 そうでなければ内部で確保した場所へのポインタ (間違っても delete しないこと)

Definition at line 535 of file ntesukiTable.cc.

References osl::ntesuki::NtesukiTable::find().

template<class F >
void osl::ntesuki::NtesukiTable::Table::forEachRecord ( F &  f)

テーブルに登録された各 record を F で処理する.

Definition at line 37 of file ntesukiTable.tcc.

template<class F >
void osl::ntesuki::NtesukiTable::Table::forEachRecordFrom ( F &  func,
NumEffectState &  state,
NtesukiRecord record 
)

Definition at line 92 of file ntesukiTable.tcc.


Member Data Documentation

Definition at line 61 of file ntesukiTable.h.

Definition at line 61 of file ntesukiTable.h.

Definition at line 62 of file ntesukiTable.h.

Definition at line 63 of file ntesukiTable.h.

Definition at line 66 of file ntesukiTable.h.

Definition at line 62 of file ntesukiTable.h.

Definition at line 63 of file ntesukiTable.h.

Definition at line 63 of file ntesukiTable.h.

Definition at line 64 of file ntesukiTable.h.

boost::scoped_ptr<NumEffectState> osl::ntesuki::NtesukiTable::Table::rootState

Definition at line 65 of file ntesukiTable.h.

Definition at line 62 of file ntesukiTable.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines