2017-10-13 17:12:33 +02:00
|
|
|
#ifndef __PLASP_APP__OPTION_GROUPS_H
|
|
|
|
#define __PLASP_APP__OPTION_GROUPS_H
|
2017-09-08 21:26:38 +02:00
|
|
|
|
2017-10-12 17:18:00 +02:00
|
|
|
#include <cxxopts.hpp>
|
2017-09-08 21:26:38 +02:00
|
|
|
|
|
|
|
#include <colorlog/ColorStream.h>
|
|
|
|
#include <colorlog/Priority.h>
|
|
|
|
|
|
|
|
#include <pddl/Exception.h>
|
|
|
|
#include <pddl/Mode.h>
|
|
|
|
|
|
|
|
#include <plasp/Language.h>
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2017-10-13 17:12:33 +02:00
|
|
|
// Option Groups
|
2017-09-08 21:26:38 +02:00
|
|
|
//
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
class OptionException : public pddl::Exception
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
using Exception::Exception;
|
|
|
|
};
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2017-10-13 17:12:33 +02:00
|
|
|
struct OptionGroupBasic
|
2017-09-08 21:26:38 +02:00
|
|
|
{
|
2017-10-13 18:09:15 +02:00
|
|
|
static constexpr const auto Name = "basic";
|
|
|
|
|
2017-10-13 17:12:33 +02:00
|
|
|
void addTo(cxxopts::Options &options);
|
|
|
|
void parse(cxxopts::Options &options);
|
|
|
|
|
2017-09-08 21:26:38 +02:00
|
|
|
bool help = false;
|
|
|
|
bool version = false;
|
|
|
|
bool warningsAsErrors = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2017-10-13 17:12:33 +02:00
|
|
|
struct OptionGroupOutput
|
2017-09-08 21:26:38 +02:00
|
|
|
{
|
2017-10-13 18:09:15 +02:00
|
|
|
static constexpr const auto Name = "output";
|
|
|
|
|
2017-10-13 17:12:33 +02:00
|
|
|
void addTo(cxxopts::Options &options);
|
|
|
|
void parse(cxxopts::Options &options);
|
|
|
|
|
2017-09-08 21:26:38 +02:00
|
|
|
colorlog::ColorStream::ColorPolicy colorPolicy = colorlog::ColorStream::ColorPolicy::Auto;
|
|
|
|
colorlog::Priority logPriority = colorlog::Priority::Info;
|
|
|
|
};
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2017-10-13 17:12:33 +02:00
|
|
|
struct OptionGroupParser
|
2017-09-08 21:26:38 +02:00
|
|
|
{
|
2017-10-13 18:09:15 +02:00
|
|
|
static constexpr const auto Name = "parser";
|
|
|
|
|
2017-10-13 17:12:33 +02:00
|
|
|
void addTo(cxxopts::Options &options);
|
|
|
|
void parse(cxxopts::Options &options);
|
|
|
|
|
2017-09-08 21:26:38 +02:00
|
|
|
std::vector<std::string> inputFiles;
|
|
|
|
pddl::Mode parsingMode = pddl::Mode::Strict;
|
|
|
|
plasp::Language::Type language = plasp::Language::Type::Automatic;
|
|
|
|
};
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#endif
|