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

Random Pokemon-nickname source (an AbstractRandomString of names). More...

#include <namespokemon.h>

Inheritance diagram for NamesPokemon:
Collaboration diagram for NamesPokemon:

Static Public Member Functions

static NamesPokemoninst ()
 The process-wide NamesPokemon singleton.

Protected Member Functions

 NamesPokemon ()
 Private – use inst(); loads the pokemon-names asset.
virtual void qmlRegister () const
 Register NamesPokemon with QML.
Protected Member Functions inherited from AbstractRandomString
 AbstractRandomString (const QString fileName)

Additional Inherited Members

Public Member Functions inherited from AbstractRandomString
const QVector< QString > getStore () const
 All strings.
int getStoreSize () const
 String count.
const QString getStoreAt (const int ind) const
 String at ind (for QML).
QString randomExample ()
 A random string from the list.
void load ()
 Load the strings from fileName.
void qmlProtect (const QQmlEngine *const engine) const
 Pin to C++ ownership.
Protected Attributes inherited from AbstractRandomString
 : void listChanged()
 < Number of strings.
QVector< QString > store
 The loaded strings.
const QString fileName
 Asset path (set by the subclass).

Detailed Description

Random Pokemon-nickname source (an AbstractRandomString of names).

All behaviour is inherited; this just provides the singleton + QML registration. Backs db.names.pokemon and the nickname randomizer.

See also
AbstractRandomString, Names.

Definition at line 33 of file namespokemon.h.

Constructor & Destructor Documentation

◆ NamesPokemon()

NamesPokemon::NamesPokemon ( )
protected

Private – use inst(); loads the pokemon-names asset.

Definition at line 42 of file namespokemon.cpp.

References AbstractRandomString::AbstractRandomString(), and qmlRegister().

Referenced by inst().

Member Function Documentation

◆ inst()

NamesPokemon * NamesPokemon::inst ( )
static

The process-wide NamesPokemon singleton.

Definition at line 48 of file namespokemon.cpp.

References NamesPokemon().

Referenced by Names::pokemon(), and Names::qmlProtect().

◆ qmlRegister()

void NamesPokemon::qmlRegister ( ) const
protectedvirtual

Register NamesPokemon with QML.

Implements AbstractRandomString.

Definition at line 32 of file namespokemon.cpp.

Referenced by NamesPokemon().


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