quic/qbox
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
ArgParser Class Reference

#include <argparser.h>

Public Member Functions

 ArgParser (cci::cci_broker_handle a_broker, const int argc, char *const argv[], bool enforce_config_file=false)
 

Protected Member Functions

std::pair< std::string, std::string > get_key_val_args (const std::string &arg)
 convert "foo=bar" kind of command line arg to std::pair<std::string, std::string>
 
void parseCommandLineWithGetOpt (cci::cci_broker_handle a_broker, const int argc, const char *const *argv, bool enforce_config_file)
 Parses the command line with getopt and extracts the luafile option.
 

Detailed Description

This is an example VP command line arguments parser to call the proper APIs of the LuaFile_Tool class to configure a platform and populate CCI parameters.

Member Function Documentation

◆ get_key_val_args()

std::pair< std::string, std::string > ArgParser::get_key_val_args ( const std::string &  arg)
inlineprotected

convert "foo=bar" kind of command line arg to std::pair<std::string, std::string>

Parameters
argThe "foo=bar" cmd line argument.
Returns
std::pair<std::string, std::string> key-value pair of the cmd line argument.

◆ parseCommandLineWithGetOpt()

void ArgParser::parseCommandLineWithGetOpt ( cci::cci_broker_handle  a_broker,
const int  argc,
const char *const argv,
bool  enforce_config_file 
)
inlineprotected

Parses the command line with getopt and extracts the luafile option.

Parameters
argcThe argc of main(...).
argvThe argv of main(...).

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