OdbDesign
OdbDesign ODB++ Parser - C++ library, gRPC/REST server, CLI, tests
 
Loading...
Searching...
No Matches
Utils::CommandLineArgs Class Referenceabstract

#include <CommandLineArgs.h>

Inheritance diagram for Utils::CommandLineArgs:
[legend]
Collaboration diagram for Utils::CommandLineArgs:
[legend]

Public Member Functions

 CommandLineArgs (int argc, char *argv[])
 
 CommandLineArgs (const std::vector< std::string > &vecArgv)
 
bool boolArg (const std::string &name, bool defaultValue) const
 
std::string stringArg (const std::string &name, const std::string &defaultValue) const
 
int intArg (const std::string &name, int defaultValue) const
 
double doubleArg (const std::string &name, double defaultValue) const
 
std::filesystem::path executable () const
 
std::filesystem::path executableDirectory () const
 
std::string executableName () const
 
bool isWindows () const
 
bool isLinux () const
 
void printUsage () const
 

Protected Member Functions

std::string getArgValue (const std::string &name) const
 
void parse ()
 
virtual std::string getUsageString () const =0
 

Protected Attributes

std::vector< std::string > m_vecArguments
 
std::map< std::string, std::string > m_mapArguments
 
const char * EXECUTABLE_ARG_NAME = "executable"
 
const char * EXE_EXTENSION = ".exe"
 

Detailed Description

Definition at line 13 of file CommandLineArgs.h.

Constructor & Destructor Documentation

◆ CommandLineArgs() [1/2]

Utils::CommandLineArgs::CommandLineArgs ( int  argc,
char *  argv[] 
)

Definition at line 22 of file CommandLineArgs.cpp.

Here is the call graph for this function:

◆ CommandLineArgs() [2/2]

Utils::CommandLineArgs::CommandLineArgs ( const std::vector< std::string > &  vecArgv)

Definition at line 29 of file CommandLineArgs.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ boolArg()

bool Utils::CommandLineArgs::boolArg ( const std::string &  name,
bool  defaultValue 
) const

Definition at line 35 of file CommandLineArgs.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ doubleArg()

double Utils::CommandLineArgs::doubleArg ( const std::string &  name,
double  defaultValue 
) const

Definition at line 68 of file CommandLineArgs.cpp.

Here is the call graph for this function:

◆ executable()

std::filesystem::path Utils::CommandLineArgs::executable ( ) const

Definition at line 77 of file CommandLineArgs.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ executableDirectory()

std::filesystem::path Utils::CommandLineArgs::executableDirectory ( ) const

Definition at line 82 of file CommandLineArgs.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ executableName()

std::string Utils::CommandLineArgs::executableName ( ) const

Definition at line 87 of file CommandLineArgs.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getArgValue()

std::string Utils::CommandLineArgs::getArgValue ( const std::string &  name) const
protected

Definition at line 104 of file CommandLineArgs.cpp.

Here is the caller graph for this function:

◆ getUsageString()

virtual std::string Utils::CommandLineArgs::getUsageString ( ) const
protectedpure virtual

◆ intArg()

int Utils::CommandLineArgs::intArg ( const std::string &  name,
int  defaultValue 
) const

Definition at line 58 of file CommandLineArgs.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isLinux()

bool Utils::CommandLineArgs::isLinux ( ) const

Definition at line 99 of file CommandLineArgs.cpp.

Here is the call graph for this function:

◆ isWindows()

bool Utils::CommandLineArgs::isWindows ( ) const

Definition at line 92 of file CommandLineArgs.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse()

void Utils::CommandLineArgs::parse ( )
protected

Definition at line 111 of file CommandLineArgs.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printUsage()

void Utils::CommandLineArgs::printUsage ( ) const

Definition at line 160 of file CommandLineArgs.cpp.

Here is the caller graph for this function:

◆ stringArg()

std::string Utils::CommandLineArgs::stringArg ( const std::string &  name,
const std::string &  defaultValue 
) const

Definition at line 48 of file CommandLineArgs.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ EXE_EXTENSION

const char* Utils::CommandLineArgs::EXE_EXTENSION = ".exe"
protected

Definition at line 44 of file CommandLineArgs.h.

◆ EXECUTABLE_ARG_NAME

const char* Utils::CommandLineArgs::EXECUTABLE_ARG_NAME = "executable"
protected

Definition at line 43 of file CommandLineArgs.h.

◆ m_mapArguments

std::map<std::string, std::string> Utils::CommandLineArgs::m_mapArguments
protected

Definition at line 35 of file CommandLineArgs.h.

◆ m_vecArguments

std::vector<std::string> Utils::CommandLineArgs::m_vecArguments
protected

Definition at line 34 of file CommandLineArgs.h.


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