#include "CommandLineArgs.h"

CommandLineArgs::CommandLineArgs()
    : mArugments(),
      mLaunchPath()
{

}

std::unique_ptr<CommandLineArgs> CommandLineArgs::CreateUnique()
{
    return std::make_unique<CommandLineArgs>();
}

std::filesystem::path CommandLineArgs::GetLaunchPath()
{
    return mLaunchPath;
}

void CommandLineArgs::RecordLaunchPath()
{
    mLaunchPath = std::filesystem::current_path();
}

void CommandLineArgs::Process(int argc, char *argv[])
{
    for(int idx=0; idx<argc; idx++)
    {
        mArugments.push_back(std::string(argv[idx]));
    }
}

void CommandLineArgs::Process(const std::vector<std::string>& args)
{
    mArugments = args;
}

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 "";
}
