mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-07-17 00:57:40 +00:00
Improve user experience
This commit is contained in:
parent
4eeb110f80
commit
214d46b8e2
6 changed files with 61 additions and 41 deletions
|
@ -11,4 +11,9 @@ std::shared_ptr<GameBase> OpenDatabase(const std::string &dbpath, bool createIfN
|
|||
return std::shared_ptr<GameBase>(new PGNGameBase(dbpath));
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<Game> OpenGameX(const std::string &dbpath, long id){
|
||||
std::shared_ptr<GameBase> base=OpenDatabase(dbpath);
|
||||
return base->GetGame(id);
|
||||
}
|
|
@ -35,4 +35,12 @@ public:
|
|||
* @param dbpath
|
||||
* @return std::shared_ptr<GameBase>
|
||||
*/
|
||||
std::shared_ptr<GameBase> OpenDatabase(const std::string &dbpath, bool createIfNotExist=true);
|
||||
std::shared_ptr<GameBase> OpenDatabase(const std::string &dbpath, bool createIfNotExist=true);
|
||||
/**
|
||||
* @brief Single game open
|
||||
*
|
||||
* @param dbpath
|
||||
* @param id
|
||||
* @return std::shared_ptr<Game>
|
||||
*/
|
||||
std::shared_ptr<Game> OpenGameX(const std::string &dbpath, long id);
|
Loading…
Add table
Add a link
Reference in a new issue