Project
Public Member Functions | Static Public Member Functions | List of all members
App Class Reference

App container of the fastpl project. More...

#include <app.h>

Public Member Functions

 App ()
 
 App (Config &config)
 
Config getConf () const
 
int run ()
 
void initializeLogger (YAML::Node &yml_conf)
 
void extractConfig (YAML::Node &yml_conf)
 
int parseArgs (int argc, char *argv[])
 

Static Public Member Functions

static void showUsage (std::string name)
 

Detailed Description

App container of the fastpl project.

App is responsible of setting up the right environment of execution given by the config and launch the fastpl pipeline to solve the problem. It is also responsible for error handling to avoid crashing the whole application and terminating everything properly.

Constructor & Destructor Documentation

◆ App() [1/2]

App::App ( )

App Base constructor

◆ App() [2/2]

App::App ( Config config)

App Base constructor, stores the given config.

Parameters
configapp config to start and run the application.

Member Function Documentation

◆ extractConfig()

void App::extractConfig ( YAML::Node &  yml_conf)

extractConfig get the config from the yaml file and store it into the config datastructure of the app

Parameters
yml_conf
Returns
config

◆ getConf()

Config App::getConf ( ) const

getConf config getter

Returns
config

◆ initializeLogger()

void App::initializeLogger ( YAML::Node &  yml_conf)

initializeLogger initialize the logger based on the yaml config and store it into the app config

Parameters
yml_conf

◆ parseArgs()

int App::parseArgs ( int  argc,
char *  argv[] 
)

parseArgs parse the args given in the CLI command and store them into the app config

Parameters
argcfrom main
argvfrom main
app_config

◆ run()

int App::run ( )

Run start the application and run all subsequent processes

Returns
status_code

◆ showUsage()

static void App::showUsage ( std::string  name)
static

showUsage print in the stderr the help information from the CLI command


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