|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
The Pokemon database – all 151 species, keyed by name. More...
#include <pokemon.h>
Public Member Functions | |
| const QVector< PokemonDBEntry * > | getStore () const |
| All species. | |
| const QHash< QString, PokemonDBEntry * > | getInd () const |
| Name->species index. | |
| int | getStoreSize () const |
| Species count. | |
| PokemonDBEntry * | getStoreAt (int idx) const |
| Species by store index (for QML). | |
| PokemonDBEntry * | getIndAt (const QString &key) const |
| Species by name key (for QML). | |
| void | load () |
| Load species from JSON. | |
| void | index () |
| Build the name->species index. | |
| void | deepLink () |
| Resolve every species' cross-reference web. | |
| void | qmlProtect (const QQmlEngine *const engine) const |
| Pin to C++ ownership. | |
Static Public Member Functions | |
| static PokemonDB * | inst () |
| < Number of species. | |
The Pokemon database – all 151 species, keyed by name.
Standard DB-singleton with a name index and the (heaviest) deepLink() pass. See CreditsDB / db.md.
| void PokemonDB::deepLink | ( | ) |
Resolve every species' cross-reference web.
Definition at line 228 of file pokemon.cpp.
|
nodiscard |
Name->species index.
Definition at line 190 of file pokemon.cpp.
| PokemonDBEntry * PokemonDB::getIndAt | ( | const QString & | key | ) | const |
Species by name key (for QML).
Definition at line 199 of file pokemon.cpp.
Referenced by PokedexModel::data(), EventPokemonDBEntry::deepLink(), GameCornerDBEntry::deepLink(), MapDBEntrySpritePokemon::deepLink(), MapDBEntryWildMon::deepLink(), PokemonDBEntryEvolution::deepLink(), StarterPokemonDB::deepLink(), TradeDBEntry::deepLink(), PokemonStartersModel::getMon(), PokemonBox::isValid(), PokemonBox::newPokemon(), AreaPokemonWild::randomize(), HoFPokemon::randomize(), Rival::randomize(), PlayerBasics::randomizeStarter(), PokemonBox::toData(), HoFPokemon::toSpecies(), PlayerBasics::toStarter(), and PokemonStartersModel::valToIndex().
|
nodiscard |
All species.
Definition at line 189 of file pokemon.cpp.
| PokemonDBEntry * PokemonDB::getStoreAt | ( | int | idx | ) | const |
Species by store index (for QML).
Definition at line 193 of file pokemon.cpp.
Referenced by PokemonBox::newPokemon().
|
nodiscard |
| void PokemonDB::index | ( | ) |
Build the name->species index.
Definition at line 214 of file pokemon.cpp.
|
static |
< Number of species.
The process-wide PokemonDB singleton.
Definition at line 183 of file pokemon.cpp.
Referenced by PokedexModel::data(), EventPokemonDBEntry::deepLink(), GameCornerDBEntry::deepLink(), MapDBEntrySpritePokemon::deepLink(), MapDBEntryWildMon::deepLink(), PokemonDBEntryEvolution::deepLink(), StarterPokemonDB::deepLink(), TradeDBEntry::deepLink(), PokemonStartersModel::getMon(), PokemonBox::isValid(), PokemonBox::newPokemon(), PokedexModel::PokedexModel(), DB::pokemon(), DB::qmlProtect(), AreaPokemonWild::randomize(), HoFPokemon::randomize(), Rival::randomize(), PlayerBasics::randomizeStarter(), SpeciesSelectModel::SpeciesSelectModel(), PokemonBox::toData(), HoFPokemon::toSpecies(), PlayerBasics::toStarter(), and PokemonStartersModel::valToIndex().
| void PokemonDB::load | ( | ) |
Load species from JSON.
Definition at line 204 of file pokemon.cpp.
References GameData::inst(), and GameData::json().
| void PokemonDB::qmlProtect | ( | const QQmlEngine *const | engine | ) | const |
Pin to C++ ownership.
Definition at line 237 of file pokemon.cpp.
References Utility::qmlProtectUtil().
Referenced by DB::qmlProtect().