Made progress
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#ifndef ACTIONMANAGER_H_
|
||||
#define ACTIONMANAGER_H_
|
||||
|
||||
#include<algorithm>
|
||||
#include<string>
|
||||
#include<string_view>
|
||||
#include<array>
|
||||
@@ -18,11 +19,24 @@ namespace Managers
|
||||
|
||||
Models::IcarusAction retrieveIcarusAction() const;
|
||||
private:
|
||||
constexpr std::array<const char*, 12> supportedFlags() noexcept;
|
||||
constexpr std::array<const char*, 15> supportedFlags() noexcept
|
||||
{
|
||||
constexpr std::array<const char*, 15> allFlags{"-u", "-p", "-t", "-h", "-s",
|
||||
"-sd", "-sr", "-d", "-D", "-b", "-rt", "-nc",
|
||||
"-m", "-ca", "-smca"};
|
||||
|
||||
return allFlags;
|
||||
}
|
||||
constexpr std::array<const char*, 4> supportedActions() noexcept;
|
||||
|
||||
bool isNumber(const std::string_view) noexcept;
|
||||
|
||||
bool isNumber(const std::string_view val) noexcept
|
||||
{
|
||||
return !val.empty() && std::find_if(val.begin(),
|
||||
val.end(), [](char c)
|
||||
{
|
||||
return !std::isdigit(c);
|
||||
}) == val.end();
|
||||
}
|
||||
void initialize();
|
||||
void validateFlags();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user