30 lines
458 B
C++
30 lines
458 B
C++
|
#include "CommandLineArgs.h"
|
||
|
|
||
|
CommandLineArgs::CommandLineArgs()
|
||
|
: mArugments()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
void CommandLineArgs::Process(int argc, char *argv[])
|
||
|
{
|
||
|
for(int idx=0; idx<argc; idx++)
|
||
|
{
|
||
|
mArugments.push_back(std::string(argv[idx]));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
std::size_t CommandLineArgs::GetNumberOfArgs() const
|
||
|
{
|
||
|
return mArugments.size();
|
||
|
}
|
||
|
|
||
|
std::string CommandLineArgs::GetArg(std::size_t index) const
|
||
|
{
|
||
|
if(index<mArugments.size())
|
||
|
{
|
||
|
return mArugments[index];
|
||
|
}
|
||
|
return "";
|
||
|
}
|