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

A class to handle the registration of utility programs. More...

#include <utility_registry.h>

Public Types

using PLUGIN_MAP = std::map< std::string, KI_TEST::UTILITY_PROGRAM >
 

Static Public Member Functions

static bool Register (const KI_TEST::UTILITY_PROGRAM &aProgInfo)
 Register a utility program factory function against an ID string.
 
static PLUGIN_MAPGetInfoMap ()
 Accessor for the static registry map.
 

Detailed Description

A class to handle the registration of utility programs.

Definition at line 15 of file utility_registry.h.

Member Typedef Documentation

◆ PLUGIN_MAP

Definition at line 18 of file utility_registry.h.

Member Function Documentation

◆ GetInfoMap()

static PLUGIN_MAP & UTILITY_REGISTRY::GetInfoMap ( )
inlinestatic

Accessor for the static registry map.

This is needed to prevent the Static Init Order Fiasco that might occur if we just accessed a static class member.

Definition at line 48 of file utility_registry.h.

Referenced by KI_TEST::COMBINED_UTILITY::findSubUtility(), Register(), and KI_TEST::COMBINED_UTILITY::showSubUtilityList().

◆ Register()

static bool UTILITY_REGISTRY::Register ( const KI_TEST::UTILITY_PROGRAM aProgInfo)
inlinestatic

Register a utility program factory function against an ID string.

This will be used to create the required utility program if needed.

Parameters
aNamethe name of the utility program
aFactorythe factory function that will construct the plugin
Returns
true if registered OK

Definition at line 29 of file utility_registry.h.

References GetInfoMap(), and KI_TEST::UTILITY_PROGRAM::m_name.


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