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

Small aggregate of the two random-name sources (player and Pokemon). More...

#include <names.h>

Inheritance diagram for Names:
Collaboration diagram for Names:

Public Member Functions

NamesPlayerplayer () const
 The player-name source (backs player).
NamesPokemonpokemon () const
 The Pokemon-name source (backs pokemon).
void qmlProtect (const QQmlEngine *const engine) const
 Pin to C++ ownership.

Static Public Member Functions

static Namesinst ()
 < Random player-name source.

Detailed Description

Small aggregate of the two random-name sources (player and Pokemon).

Just groups player (NamesPlayer) and pokemon (NamesPokemon) under one singleton so QML and the name randomizers reach them via db.names. Each source supplies a random in-character name. See db.md.

See also
NamesPlayer, NamesPokemon.

Definition at line 34 of file names.h.

Member Function Documentation

◆ inst()

Names * Names::inst ( )
static

< Random player-name source.

Random Pokemon-name source. The process-wide Names singleton.

Definition at line 29 of file names.cpp.

Referenced by PokemonBox::changeName(), PokemonBox::changeOtData(), DB::names(), DB::qmlProtect(), HoFPokemon::randomize(), PlayerBasics::randomize(), and Rival::randomize().

◆ player()

NamesPlayer * Names::player ( ) const

The player-name source (backs player).

Definition at line 35 of file names.cpp.

References NamesPlayer::inst().

Referenced by PokemonBox::changeOtData(), HoFPokemon::randomize(), PlayerBasics::randomize(), and Rival::randomize().

◆ pokemon()

NamesPokemon * Names::pokemon ( ) const

The Pokemon-name source (backs pokemon).

Definition at line 40 of file names.cpp.

References NamesPokemon::inst().

Referenced by PokemonBox::changeName().

◆ qmlProtect()

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

Pin to C++ ownership.

Definition at line 45 of file names.cpp.

References NamesPlayer::inst(), NamesPokemon::inst(), AbstractRandomString::qmlProtect(), and Utility::qmlProtectUtil().

Referenced by DB::qmlProtect().


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