MemoryAccessor 1
A command-line front-end for exploring virtual memory of a linux process by accessing /proc/PID/mem file.
Loading...
Searching...
No Matches
ArgvParser Class Reference

A class to parse arguments from the command line. More...

#include <argvparser.h>

Public Member Functions

 ArgvParser (Console &console) noexcept
 Constructor.
 
void ParseArgv (const int &argc, char **argv) noexcept
 Parse program arguments.
 

Detailed Description

A class to parse arguments from the command line.

This class is used to parse arguments given from the command line. It uses argc and argv variables that should be got as the arguments from the function main.

Constructor & Destructor Documentation

◆ ArgvParser()

ArgvParser::ArgvParser ( Console & console)
inlineexplicitnoexcept

Constructor.

Parameters
[in,out]consoleAn reference to an instance of Console class.

Initializes Console class reference by value got as a parameter.

Member Function Documentation

◆ ParseArgv()

void ArgvParser::ParseArgv ( const int & argc,
char ** argv )
noexcept

Parse program arguments.

Parameters
[in]argcArguments count given to the program.
[in]argvArray of C strings representing arguments given to the program.

Return if there were 1 argument (program executable), call a key function if a key is recognized and handle error otherwise.


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