stuff-from-scratch/src/core/CommandLineArgs.h
2022-10-03 07:45:10 +01:00

32 lines
623 B
C++

#pragma once
#include <memory>
#include <vector>
#include <string>
#include <filesystem>
class CommandLineArgs
{
public:
CommandLineArgs();
static std::unique_ptr<CommandLineArgs> Create();
std::filesystem::path getLaunchPath();
std::size_t getNumberOfArgs() const;
std::string getArg(std::size_t index) const;
void process(int argc, char *argv[]);
void process(const std::vector<std::string>& args);
void recordLaunchPath();
private:
std::vector<std::string> mArugments;
std::filesystem::path mLaunchPath;
};
using CommandLineArgsUPtr = std::unique_ptr<CommandLineArgs>;