MySQL 9.1.0
Source Code Documentation
PluginInfoFrontend Class Referencefinal

#include <plugin_info_app.h>

Classes

struct  Config
 

Public Types

enum class  Cmd { INFO , SHOW_HELP , SHOW_VERSION }
 

Public Member Functions

 PluginInfoFrontend (const std::string &exe_name, const std::vector< std::string > &arguments, std::ostream &out)
 Constructor. More...
 
std::string get_version () const noexcept
 
std::string get_help (const size_t screen_width=80) const
 
int run ()
 Executes the action requested from the application with the parameters passed to the constructor. More...
 

Private Member Functions

void prepare_command_options ()
 

Private Attributes

std::string program_name_
 
CmdArgHandler arg_handler_ {true}
 
std::ostream & cout_
 
Config config_
 

Member Enumeration Documentation

◆ Cmd

enum class PluginInfoFrontend::Cmd
strong
Enumerator
INFO 
SHOW_HELP 
SHOW_VERSION 

Constructor & Destructor Documentation

◆ PluginInfoFrontend()

PluginInfoFrontend::PluginInfoFrontend ( const std::string &  exe_name,
const std::vector< std::string > &  arguments,
std::ostream &  out 
)

Constructor.

Normal application operation exepcts 3 parameters: {exe_name} {path_to_plugin_file} {plugin_name} This retrieves the data read from the plugin file to the output stream.

    Other supported options are:
    {exe_name} --help     outputs application usage to the error stream
    {exe_name} --version  outputs application version to the error

stream

Parameters
exe_namename of the started executable
argumentscommand line arguments (without exe_name)
outOutput stream for the data printed by the application

Member Function Documentation

◆ get_help()

std::string PluginInfoFrontend::get_help ( const size_t  screen_width = 80) const

◆ get_version()

std::string PluginInfoFrontend::get_version ( ) const
noexcept

◆ prepare_command_options()

void PluginInfoFrontend::prepare_command_options ( )
private

◆ run()

int PluginInfoFrontend::run ( )

Executes the action requested from the application with the parameters passed to the constructor.

Note: Redirects the output to the streams provided to the constructor.

Returns
exit-code
Return values
EXIT_SUCESSon success
EXIT_FAILUREif an error occurred.

Member Data Documentation

◆ arg_handler_

CmdArgHandler PluginInfoFrontend::arg_handler_ {true}
private

◆ config_

Config PluginInfoFrontend::config_
private

◆ cout_

std::ostream& PluginInfoFrontend::cout_
private

◆ program_name_

std::string PluginInfoFrontend::program_name_
private

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