11#include <unordered_map>
24 std::unordered_map<std::string, FlagInfo>
flags;
32 FlagHandler(
const std::unordered_map<std::string, FlagInfo>& _flags);
47 std::string
getFlagValue(
const std::string& flagName)
const;
Definition flagHandler.h:22
float getFloatValue(const std::string &name) const
Get given float option by user.
Definition flagHandler.cpp:109
float getBooleanValue(const std::string &name) const
Get given boolean option by user.
Definition flagHandler.cpp:91
FlagHandler(const std::unordered_map< std::string, FlagInfo > &_flags)
Constructor for FlagHandler.
Definition flagHandler.cpp:17
std::vector< std::string > getFileArrayValue(const std::string &name) const
Get list of files.
Definition flagHandler.cpp:123
std::unordered_map< std::string, FlagInfo > flags
Definition flagHandler.h:24
void checkRequiredFlags() const
Checks if all required flags have values.
Definition flagHandler.cpp:77
int getNonZeroIntValue(const std::string &name) const
Get given non-zero int option by user.
Definition flagHandler.cpp:195
std::string getFlagValue(const std::string &flagName) const
Retrieves the value of a flag.
Definition flagHandler.cpp:63
void processFlags(const std::vector< std::string > &args)
Processes the command-line arguments and updates the flag values.
Definition flagHandler.cpp:20
std::vector< int > getIntArrayValue(const std::string &name) const
Get given int option by user.
Definition flagHandler.cpp:151
int getIntValue(const std::string &name) const
Get given int option by user.
Definition flagHandler.cpp:173
Definition flagHandler.h:16
std::string value
Definition flagHandler.h:18
bool required
Definition flagHandler.h:17