Files
FEX-Emu--FEX/Source/Common/ArgumentLoader.h
T
Ryan Houdek 7273041314 FEXInterpreter: Remove FEXLoader
Doesn't /quite/ remove the ArgumentLoader because it is intertwined with
LinuxEmulation in an annoying way that will take another step to remove.
2025-09-12 10:24:58 -07:00

38 lines
820 B
C++

// SPDX-License-Identifier: MIT
#pragma once
#include <FEXCore/Config/Config.h>
#include <FEXCore/fextl/string.h>
#include <FEXCore/fextl/vector.h>
namespace FEX::ArgLoader {
class ArgLoader final : public FEXCore::Config::Layer {
public:
explicit ArgLoader(int argc, char** argv)
: FEXCore::Config::Layer(FEXCore::Config::LayerType::LAYER_ARGUMENTS)
, argc {argc}
, argv {argv} {
PreLoad();
}
void Load() override {
// Intentional no-op.
}
void PreLoad();
fextl::vector<fextl::string> Get() {
return RemainingArgs;
}
fextl::vector<fextl::string> GetParsedArgs() {
return ProgramArguments;
}
private:
int argc {};
char** argv {};
fextl::vector<fextl::string> RemainingArgs {};
fextl::vector<fextl::string> ProgramArguments {};
};
} // namespace FEX::ArgLoader