wavelength 1.0.0
Loading...
Searching...
No Matches
Factory< Base > Class Template Reference

Registry of the classes derived from a base that a stream can rebuild, by identifier. More...

#include <factory.h>

Classes

class  FactoryUnitBase
 Builder of one class. More...
class  FactoryUnit
 Builder of the class T. More...

Static Public Member Functions

static std::map< int, FactoryUnitBase * > & GetUnits ()
 Report the builders by identifier, constructing the registry on first use.
template<typename T>
static void Register (int nId)
 Register a builder of the class T under an identifier.

Detailed Description

template<typename Base>
class Factory< Base >

Registry of the classes derived from a base that a stream can rebuild, by identifier.

The RTTI includes the template with the argument Command, and the nested FactoryUnitBase and FactoryUnit. Every member is inline.

Template Parameters
BaseThe base of the classes.

Member Function Documentation

◆ GetUnits()

template<typename Base>
std::map< int, FactoryUnitBase * > & Factory< Base >::GetUnits ( )
inlinestatic

Report the builders by identifier, constructing the registry on first use.

The registry is destroyed at exit.

Returns
The builders.
Ghidra address:
NTSC-U/C: 0x00344f68
Ghidra address:
PAL: 0x003b24a0

◆ Register()

template<typename Base>
template<typename T>
void Factory< Base >::Register ( int nId)
inlinestatic

Register a builder of the class T under an identifier.

Template Parameters
TThe class.
Parameters
nIdThe identifier.

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