KiCad PCB EDA Suite
Loading...
Searching...
No Matches
GENERATORS_MGR Class Reference

A factory which returns an instance of a PCB_GENERATOR. More...

#include <generators_mgr.h>

Classes

struct  ENTRY
 
struct  REGISTER
 Static helper to register a generator. More...
 

Public Member Functions

void Register (const wxString &aTypeStr, const wxString &aName, std::function< PCB_GENERATOR *(void)> aCreateFunc)
 Associate a type string to display name and create function.
 
PCB_GENERATORCreateFromType (const wxString &aTypeStr)
 

Static Public Member Functions

static GENERATORS_MGRInstance ()
 

Private Attributes

std::map< wxString, ENTRYm_registry
 

Detailed Description

A factory which returns an instance of a PCB_GENERATOR.

Definition at line 44 of file generators_mgr.h.

Member Function Documentation

◆ CreateFromType()

PCB_GENERATOR * GENERATORS_MGR::CreateFromType ( const wxString &  aTypeStr)

◆ Instance()

◆ Register()

void GENERATORS_MGR::Register ( const wxString &  aTypeStr,
const wxString &  aName,
std::function< PCB_GENERATOR *(void)>  aCreateFunc 
)

Associate a type string to display name and create function.

Parameters
aTypeStris the type identifier string.
aNameis the display name.
aCreateFuncis the create function.

Definition at line 35 of file generators_mgr.cpp.

References GENERATORS_MGR::ENTRY::m_createFunc, GENERATORS_MGR::ENTRY::m_displayName, m_registry, and GENERATORS_MGR::ENTRY::m_type.

Referenced by GENERATORS_MGR::REGISTER< T >::REGISTER(), and REGISTER_LEGACY_TUNING_PATTERN< T >::REGISTER_LEGACY_TUNING_PATTERN().

Member Data Documentation

◆ m_registry

std::map<wxString, ENTRY> GENERATORS_MGR::m_registry
private

Definition at line 86 of file generators_mgr.h.

Referenced by CreateFromType(), and Register().


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