Scid
4.7.0
|
Functions | |
void | init () |
init() - initialize the pool of databases. More... | |
void | closeAll () |
closeAll() - close all the databases in the pool. More... | |
int | find (const char *filename) |
find() - search for a database. More... | |
scidBaseT * | getBase (int baseHandle) |
getBase() - get a database from the pool. More... | |
int | getClipBase () |
getClipBase() - return the handle of the clipbase More... | |
scidBaseT * | getFreeSlot () |
getFreeSlot() - search for a free database slot. More... | |
std::vector< int > | getHandles () |
getHandles() - get the handles of opened databases. More... | |
int | switchCurrent (scidBaseT *dbase=0) |
switchCurrent() - DEPRECATED. More... | |
void DBasePool::closeAll | ( | ) |
closeAll() - close all the databases in the pool.
Call this function just once before ending the program. This function close all the managed databases ensuring that resources are released and changes are flushed to disks.
Definition at line 46 of file dbasepool.cpp.
int DBasePool::find | ( | const char * | filename | ) |
find() - search for a database.
filename | the filename of the wanted database. Database in native Scid format do not use extension ("example"). Other databases require file extension ("example.pgn"). |
Definition at line 51 of file dbasepool.cpp.
scidBaseT * DBasePool::getBase | ( | int | baseHandle | ) |
getBase() - get a database from the pool.
baseHandle | the handle of the wanted database. |
Definition at line 59 of file dbasepool.cpp.
int DBasePool::getClipBase | ( | ) |
getClipBase() - return the handle of the clipbase
The clipbase is a special memory database that is always open and valid.
Definition at line 65 of file dbasepool.cpp.
scidBaseT * DBasePool::getFreeSlot | ( | ) |
getFreeSlot() - search for a free database slot.
Definition at line 69 of file dbasepool.cpp.
std::vector< int > DBasePool::getHandles | ( | ) |
getHandles() - get the handles of opened databases.
Definition at line 76 of file dbasepool.cpp.
void DBasePool::init | ( | ) |
init() - initialize the pool of databases.
Call this function just once at the beginning of the program.
Definition at line 37 of file dbasepool.cpp.
int DBasePool::switchCurrent | ( | scidBaseT * | dbase = 0 | ) |
switchCurrent() - DEPRECATED.
dbase | a pointer to the new "current" database. If 0 the function just return the "current" database handle. |
Some legacy code assume that exist only one database. The hack to use that code is to make a database the "current" one.
Definition at line 84 of file dbasepool.cpp.