|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
The credits/attribution database – and the canonical example of the "DB singleton" pattern every database in this layer follows. More...
#include <creditsdb.h>
Public Member Functions | |
| const QVector< CreditDBEntry * > | getStore () const |
| The full entry vector. | |
| int | getStoreSize () const |
Entry count (backs getStoreSize). | |
| CreditDBEntry * | getStoreAt (const int ind) const |
Entry at ind (for QML). | |
| void | load () |
| Load entries from the JSON assets. | |
| void | qmlProtect (const QQmlEngine *const engine) const |
| Pin to C++ ownership (anti-GC). | |
Static Public Member Functions | |
| static CreditsDB * | inst () |
| < Number of credit entries. | |
Friends | |
| struct | CreditDBEntry |
| Lets entries populate the store during load. | |
The credits/attribution database – and the canonical example of the "DB singleton" pattern every database in this layer follows.
Read this one, and the other databases (PokemonDB, MovesDB, ItemsDB, ...) read the same way – they just carry richer entries and lookup indexes.
Definition at line 48 of file creditsdb.h.
| const QVector< CreditDBEntry * > CreditsDB::getStore | ( | ) | const |
The full entry vector.
Definition at line 39 of file creditsdb.cpp.
| CreditDBEntry * CreditsDB::getStoreAt | ( | const int | ind | ) | const |
| int CreditsDB::getStoreSize | ( | ) | const |
Entry count (backs getStoreSize).
Definition at line 44 of file creditsdb.cpp.
|
static |
< Number of credit entries.
Returns the process-wide CreditsDB singleton.
Definition at line 33 of file creditsdb.cpp.
Referenced by DB::credits(), CreditDBEntry::process(), and DB::qmlProtect().
| void CreditsDB::load | ( | ) |
Load entries from the JSON assets.
Definition at line 60 of file creditsdb.cpp.
References GameData::inst(), GameData::json(), and CreditDBEntry::process().
| void CreditsDB::qmlProtect | ( | const QQmlEngine *const | engine | ) | const |
Pin to C++ ownership (anti-GC).
Definition at line 78 of file creditsdb.cpp.
References Utility::qmlProtectUtil().
Referenced by DB::qmlProtect().
|
friend |
Lets entries populate the store during load.
Definition at line 80 of file creditsdb.h.
References CreditDBEntry.
Referenced by CreditDBEntry, and getStoreAt().