|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
The moves database – every move, keyed by name. More...
#include <moves.h>
Public Member Functions | |
| const QVector< MoveDBEntry * > | getStore () const |
| All moves, in load order. | |
| const QHash< QString, MoveDBEntry * > | getInd () const |
| Name->entry index. | |
| int | getStoreSize () const |
| Move count. | |
| MoveDBEntry * | getStoreAt (int idx) const |
| Move by store index (for QML). | |
| MoveDBEntry * | getIndAt (const QString &key) const |
| Move by name key (for QML). | |
| void | load () |
| Load moves from JSON. | |
| void | index () |
| Build the name->entry index. | |
| void | deepLink () |
| Resolve every move's cross-DB links. | |
| void | qmlProtect (const QQmlEngine *const engine) const |
| Pin to C++ ownership. | |
Static Public Member Functions | |
| static MovesDB * | inst () |
| < Number of moves. | |
The moves database – every move, keyed by name.
Standard DB-singleton (see CreditsDB) plus a key index: index() builds a name->entry hash so getIndAt("tackle") works, and deepLink() resolves each move's cross-references. See db.md.
| void MovesDB::deepLink | ( | ) |
|
nodiscard |
| MoveDBEntry * MovesDB::getIndAt | ( | const QString & | key | ) | const |
Move by name key (for QML).
Definition at line 88 of file moves.cpp.
Referenced by ItemDBEntry::deepLink(), PokemonDBEntry::deepLink(), PokemonDBEntryMove::deepLink(), TmHmsDB::deepLink(), PokemonMove::randomize(), and PokemonMove::toMove().
|
nodiscard |
| MoveDBEntry * MovesDB::getStoreAt | ( | int | idx | ) | const |
|
nodiscard |
|
static |
< Number of moves.
The process-wide MovesDB singleton.
Definition at line 72 of file moves.cpp.
Referenced by ItemDBEntry::deepLink(), PokemonDBEntry::deepLink(), PokemonDBEntryMove::deepLink(), TmHmsDB::deepLink(), DB::moves(), DB::qmlProtect(), PlayerPokemon::randomize(), PokemonMove::randomize(), MoveSelectModel::rebuildListGeneral(), MoveSelectModel::rebuildListSpecific(), and PokemonMove::toMove().
| void MovesDB::load | ( | ) |
Load moves from JSON.
Definition at line 93 of file moves.cpp.
References GameData::inst(), and GameData::json().
| void MovesDB::qmlProtect | ( | const QQmlEngine *const | engine | ) | const |
Pin to C++ ownership.
Definition at line 126 of file moves.cpp.
References Utility::qmlProtectUtil().
Referenced by DB::qmlProtect().