You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#pragma once
|
|
|
|
#include "actionlist.h"
|
|
|
|
#include "varhelpers.h"
|
|
|
|
|
|
|
|
using ActionVariants = std::variant<ACTLIST>;
|
|
|
|
|
|
|
|
class Action: public ActionVariants
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Action() = default;
|
|
|
|
Action(ActionVariants&& d): ActionVariants(std::move(d)) {}
|
|
|
|
MString Init(const CLArgs& args)
|
|
|
|
{
|
|
|
|
MString act = args.contains("action") ? args.at("action") : "info";
|
|
|
|
bool res = internal::InitV(*this, act);
|
|
|
|
if(!res) return "Unknown action: " + act;
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
};
|