stuff-from-scratch/src/core/CommandLineArgs.h
2021-10-31 13:04:48 +00:00

31 lines
620 B
C++

#pragma once
#include <memory>
#include <vector>
#include <string>
#include <filesystem>
class CommandLineArgs
{
std::vector<std::string> mArugments;
std::filesystem::path mLaunchPath;
public:
CommandLineArgs();
static std::unique_ptr<CommandLineArgs> CreateUnique();
void RecordLaunchPath();
std::filesystem::path GetLaunchPath();
void Process(int argc, char *argv[]);
void Process(const std::vector<std::string>& args);
std::size_t GetNumberOfArgs() const;
std::string GetArg(std::size_t index) const;
};
using CommandLineArgsUPtr = std::unique_ptr<CommandLineArgs>;