35 lines
725 B
C++
35 lines
725 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();
|
|
|
|
std::vector<std::string> getUserArgs() const;
|
|
|
|
static void initialize(CommandLineArgs* args);
|
|
private:
|
|
std::vector<std::string> mArugments;
|
|
std::filesystem::path mLaunchPath;
|
|
};
|
|
|
|
using CommandLineArgsUPtr = std::unique_ptr<CommandLineArgs>;
|