|
errorT | open (const char *filename, fileModeT fMode) |
| Opens/creates a database encoded in a non-native format. More...
|
|
errorT | parseNext (Game &) |
| Reads the next game. More...
|
|
std::pair< size_t, size_t > | parseProgress () |
| Returns info about the parsing progress. More...
|
|
const char * | parseErrors () |
| Returns the list of errors produced by parseNext() calls. More...
|
|
errorT | gameAdd (Game *) |
| Adds a game into the database. More...
|
|
errorT | gameSave (Game *, gamenumT) |
| Replaces a game in the database. More...
|
|
Codec | getType () const override |
| Returns the Codec type. More...
|
|
std::vector< std::string > | getFilenames () const override |
| Returns the full path of the files used by the database. More...
|
|
std::vector< std::pair< const char *, std::string > > | getExtraInfo () const override |
| Returns a vector of tag pairs containing extra information about the database (type, description, autoload, etc..) More...
|
|
const byte * | getGameData (uint64_t offset, uint32_t length) override |
| Fetches the data of a game (excluding index info), encoded in native format. More...
|
|
errorT | flush () override |
| Writes all pending output to the files. More...
|
|
std::pair< errorT, uint64_t > | dyn_addGameData (const byte *src, size_t length) |
| Stores the data of a game into memory. More...
|
|
std::pair< errorT, idNumberT > | dyn_addName (nameT nt, const char *name) |
| Given a name (string), retrieve the corresponding ID. More...
|
|
errorT | dyn_addIndexEntry (const IndexEntry &ie) |
| Add an IndexEntry to idx_. More...
|
|
errorT | dyn_saveIndexEntry (const IndexEntry &ie, gamenumT replaced) |
| Replace an IndexEntry. More...
|
|
errorT | addGame (const IndexEntry *srcIe, const NameBase *srcNb, const byte *srcData, size_t dataLen) override |
| Add a game to the database. More...
|
|
errorT | addGame (Game *game) override |
| Add a game to the database. More...
|
|
errorT | saveGame (Game *game, gamenumT replaced) override |
| Replaces a game in the database. More...
|
|
errorT | saveIndexEntry (const IndexEntry &ie, gamenumT replaced) override |
| Replaces a game's IndexEntry (which contains the header data of a game). More...
|
|
std::pair< errorT, idNumberT > | addName (nameT nt, const char *name) override |
| Adds a name (player, event, site or round) to the database. More...
|
|
virtual | ~ICodecDatabase () |
|
template<typename Derived>
class CodecProxy< Derived >
Base class for non-native databases.
Every class derived from ICodecDatabase must keep an Index object and the corresponding NameBase object fully updated in memory. This implies that the virtual function dyn_open() must load in memory the header's data of all the games; however a dependency between the codecs and the Index class is not desirable. This class provides an interface that encapsulates the codecs, requiring only the ability to exchange Game objects.
Definition at line 48 of file codec_proxy.h.