2020-05-02 07:31:03 +00:00
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
2020-05-09 14:29:45 +00:00
|
|
|
#include <filesystem>
|
2020-05-02 07:31:03 +00:00
|
|
|
|
|
|
|
class CommandLineArgs
|
|
|
|
{
|
2020-05-09 14:29:45 +00:00
|
|
|
std::vector<std::string> mArugments;
|
|
|
|
std::filesystem::path mLaunchPath;
|
2020-05-02 07:31:03 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2020-05-09 14:29:45 +00:00
|
|
|
CommandLineArgs();
|
2020-05-02 07:31:03 +00:00
|
|
|
|
2020-05-09 14:29:45 +00:00
|
|
|
static std::unique_ptr<CommandLineArgs> CreateUnique();
|
2020-05-02 07:31:03 +00:00
|
|
|
|
2020-05-09 14:29:45 +00:00
|
|
|
void RecordLaunchPath();
|
2020-05-02 07:31:03 +00:00
|
|
|
|
2020-05-09 14:29:45 +00:00
|
|
|
std::filesystem::path GetLaunchPath();
|
|
|
|
|
|
|
|
void Process(int argc, char *argv[]);
|
|
|
|
|
2021-10-31 13:04:48 +00:00
|
|
|
void Process(const std::vector<std::string>& args);
|
|
|
|
|
2020-05-09 14:29:45 +00:00
|
|
|
std::size_t GetNumberOfArgs() const;
|
|
|
|
|
|
|
|
std::string GetArg(std::size_t index) const;
|
2020-05-02 07:31:03 +00:00
|
|
|
};
|
2020-05-09 14:29:45 +00:00
|
|
|
|
|
|
|
using CommandLineArgsUPtr = std::unique_ptr<CommandLineArgs>;
|