dEngine
Simple 2D C++ game engine
Public Member Functions | List of all members
packer::CLIArg Class Reference

Helper class to assist in dealing with CLI arguments. More...

#include <CLIArg.h>

Public Member Functions

 CLIArg ()
 
int GetIndexOfArgument (char *argv[], std::string argument)
 Gets the position of a specific argument in argv. More...
 
bool ArgumentExists (char *argv[], std::string argument)
 Checks if an argument exists in argv. More...
 

Detailed Description

Helper class to assist in dealing with CLI arguments.

Constructor & Destructor Documentation

◆ CLIArg()

CLIArg::CLIArg ( )

Member Function Documentation

◆ ArgumentExists()

bool CLIArg::ArgumentExists ( char *  argv[],
std::string  argument 
)

Checks if an argument exists in argv.

Parameters
argumentArgument to look for
argvArgv from the main function
Returns
If an argument exists in argv

Referenced by main().

◆ GetIndexOfArgument()

int CLIArg::GetIndexOfArgument ( char *  argv[],
std::string  argument 
)

Gets the position of a specific argument in argv.

Parameters
argumentArgument to look for
argvArgv from the main function
Returns
The index in argv of the argument

Referenced by main().