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

The in-game trades database. More...

#include <trades.h>

Inheritance diagram for TradesDB:
Collaboration diagram for TradesDB:

Public Member Functions

const QVector< TradeDBEntry * > getStore () const
 All trades.
int getStoreSize () const
 Trade count.
TradeDBEntrygetStoreAt (int idx) const
 Trade by store index (for QML).
void load ()
 Load trades from JSON.
void deepLink ()
 Resolve each trade's species links.
void qmlProtect (const QQmlEngine *const engine) const
 Pin to C++ ownership.

Static Public Member Functions

static TradesDBinst ()
 < Number of trades.

Detailed Description

The in-game trades database.

Standard DB-singleton (no key index; trades are accessed by store index). See db.md.

See also
TradeDBEntry, DB.

Definition at line 60 of file trades.h.

Member Function Documentation

◆ deepLink()

void TradesDB::deepLink ( )

Resolve each trade's species links.

Definition at line 81 of file trades.cpp.

◆ getStore()

const QVector< TradeDBEntry * > TradesDB::getStore ( ) const
nodiscard

All trades.

Definition at line 62 of file trades.cpp.

◆ getStoreAt()

TradeDBEntry * TradesDB::getStoreAt ( int idx) const

Trade by store index (for QML).

Definition at line 65 of file trades.cpp.

◆ getStoreSize()

int TradesDB::getStoreSize ( ) const
nodiscard

Trade count.

Definition at line 63 of file trades.cpp.

◆ inst()

TradesDB * TradesDB::inst ( )
static

< Number of trades.

The process-wide TradesDB singleton.

Definition at line 56 of file trades.cpp.

Referenced by DB::qmlProtect(), and DB::trades().

◆ load()

void TradesDB::load ( )

Load trades from JSON.

Definition at line 71 of file trades.cpp.

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

◆ qmlProtect()

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

Pin to C++ ownership.

Definition at line 90 of file trades.cpp.

References Utility::qmlProtectUtil().

Referenced by DB::qmlProtect().


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