KiCad PCB EDA Suite
|
Description of a "utility program", which is a program that takes some command line and does "something". More...
#include <utility_program.h>
Public Types | |
using | FUNC = std::function< int(int argc, char **argv)> |
A function that provides the program for a given command line. | |
Public Member Functions | |
UTILITY_PROGRAM (const std::string &aName, const std::string &aDesc, FUNC aMainFunc) | |
UTILITY_PROGRAM () | |
Public Attributes | |
std::string | m_name |
The name of the program (this is used to select one) | |
std::string | m_desc |
Description of the program. | |
FUNC | m_func |
The function to call to run the program. | |
Description of a "utility program", which is a program that takes some command line and does "something".
Likely uses of this are:
This structure allows a single executable to select a program from many registered programs to avoid having to maintain "N" similar CMake scripts and perform "N" linkages.
Definition at line 68 of file utility_program.h.
using KI_TEST::UTILITY_PROGRAM::FUNC = std::function<int( int argc, char** argv )> |
A function that provides the program for a given command line.
Definition at line 71 of file utility_program.h.
|
inline |
Definition at line 73 of file utility_program.h.
|
inline |
Definition at line 78 of file utility_program.h.
std::string KI_TEST::UTILITY_PROGRAM::m_desc |
Description of the program.
Definition at line 86 of file utility_program.h.
Referenced by KI_TEST::COMBINED_UTILITY::showSubUtilityList().
FUNC KI_TEST::UTILITY_PROGRAM::m_func |
The function to call to run the program.
Definition at line 89 of file utility_program.h.
Referenced by KI_TEST::COMBINED_UTILITY::findSubUtility().
std::string KI_TEST::UTILITY_PROGRAM::m_name |
The name of the program (this is used to select one)
Definition at line 83 of file utility_program.h.
Referenced by UTILITY_REGISTRY::Register(), and KI_TEST::COMBINED_UTILITY::showSubUtilityList().