mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-07-14 15:47:39 +00:00
Improve database game import
This commit is contained in:
parent
3b6e7d39cf
commit
e0a1894928
15 changed files with 547 additions and 155 deletions
|
@ -14,5 +14,10 @@ public:
|
|||
virtual bool NextGame() = 0;
|
||||
virtual std::string GetTag(std::string tag) = 0;
|
||||
virtual void Reset() = 0;
|
||||
virtual void Save(GameBase *base) = 0;
|
||||
/**
|
||||
* @brief Save the given base into current base format (export)
|
||||
*
|
||||
* @param base
|
||||
*/
|
||||
virtual void Export(GameBase *base) = 0;
|
||||
};
|
|
@ -98,7 +98,7 @@ void PGNGameBase::Save(std::vector<std::uint32_t> to_ignore,
|
|||
wxRemoveFile(tmp);
|
||||
}
|
||||
|
||||
void PGNGameBase::Save(GameBase *base) {
|
||||
void PGNGameBase::Export(GameBase *base) {
|
||||
wxFile new_pgn(file, wxFile::write);
|
||||
|
||||
base->Reset();
|
||||
|
|
|
@ -16,5 +16,5 @@ public:
|
|||
std::vector<GameBase *> new_games_bases,
|
||||
std::vector<Game *> new_games);
|
||||
void Reset();
|
||||
void Save(GameBase *base);
|
||||
void Export(GameBase *base);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue