Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
Loading...
Searching...
No Matches
SpriteSetDB Class Reference

The sprite-sets database, keyed by name. More...

#include <spriteSet.h>

Inheritance diagram for SpriteSetDB:
Collaboration diagram for SpriteSetDB:

Public Member Functions

const QVector< SpriteSetDBEntry * > getStore () const
 All sprite-sets.
const QHash< QString, SpriteSetDBEntry * > getInd () const
 Name->entry index.
int getStoreSize () const
 Set count.
SpriteSetDBEntrygetStoreAt (int idx) const
 Set by store index (for QML).
SpriteSetDBEntrygetIndAt (const QString &key) const
 Set by name key (for QML).
void load ()
 Load sprite-sets from JSON.
void index ()
 Build the name->entry index.
void deepLink ()
 Resolve sprites, split neighbours, and maps.
void qmlProtect (const QQmlEngine *const engine) const
 Pin to C++ ownership.

Static Public Member Functions

static SpriteSetDBinst ()
 < Number of sprite-sets.

Detailed Description

The sprite-sets database, keyed by name.

Standard DB-singleton with a name index and a deepLink() pass. See db.md.

See also
SpriteSetDBEntry, DB.

Definition at line 78 of file spriteSet.h.

Member Function Documentation

◆ deepLink()

void SpriteSetDB::deepLink ( )

Resolve sprites, split neighbours, and maps.

Definition at line 129 of file spriteSet.cpp.

◆ getInd()

const QHash< QString, SpriteSetDBEntry * > SpriteSetDB::getInd ( ) const
nodiscard

Name->entry index.

Definition at line 96 of file spriteSet.cpp.

◆ getIndAt()

SpriteSetDBEntry * SpriteSetDB::getIndAt ( const QString & key) const

Set by name key (for QML).

Definition at line 105 of file spriteSet.cpp.

Referenced by MapDBEntry::deepLink(), and SpriteSetDBEntry::deepLink().

◆ getStore()

const QVector< SpriteSetDBEntry * > SpriteSetDB::getStore ( ) const
nodiscard

All sprite-sets.

Definition at line 95 of file spriteSet.cpp.

Referenced by AreaLoadedSprites::randomize().

◆ getStoreAt()

SpriteSetDBEntry * SpriteSetDB::getStoreAt ( int idx) const

Set by store index (for QML).

Definition at line 99 of file spriteSet.cpp.

◆ getStoreSize()

int SpriteSetDB::getStoreSize ( ) const
nodiscard

Set count.

Definition at line 97 of file spriteSet.cpp.

◆ index()

void SpriteSetDB::index ( )

Build the name->entry index.

Definition at line 120 of file spriteSet.cpp.

◆ inst()

SpriteSetDB * SpriteSetDB::inst ( )
static

< Number of sprite-sets.

The process-wide SpriteSetDB singleton.

Definition at line 89 of file spriteSet.cpp.

Referenced by MapDBEntry::deepLink(), SpriteSetDBEntry::deepLink(), DB::qmlProtect(), AreaLoadedSprites::randomize(), and DB::spriteSets().

◆ load()

void SpriteSetDB::load ( )

Load sprite-sets from JSON.

Definition at line 110 of file spriteSet.cpp.

References GameData::inst(), and GameData::json().

◆ qmlProtect()

void SpriteSetDB::qmlProtect ( const QQmlEngine *const engine) const

Pin to C++ ownership.

Definition at line 138 of file spriteSet.cpp.

References Utility::qmlProtectUtil().

Referenced by DB::qmlProtect().


The documentation for this class was generated from the following files: