2016-05-24 16:03:08 +02:00
|
|
|
#ifndef __PLASP__SAS__PREDICATE_H
|
|
|
|
#define __PLASP__SAS__PREDICATE_H
|
2016-05-21 02:03:45 +02:00
|
|
|
|
|
|
|
#include <iosfwd>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2016-11-29 06:03:05 +01:00
|
|
|
#include <plasp/output/ColorStream.h>
|
2016-05-27 03:58:59 +02:00
|
|
|
|
2017-05-09 15:05:59 +02:00
|
|
|
#include <parsebase/Parser.h>
|
|
|
|
|
2016-05-21 02:03:45 +02:00
|
|
|
namespace plasp
|
|
|
|
{
|
|
|
|
namespace sas
|
|
|
|
{
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Predicate
|
|
|
|
//
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2016-05-22 16:00:58 +02:00
|
|
|
class Predicate
|
2016-05-21 02:03:45 +02:00
|
|
|
{
|
2016-05-22 16:00:58 +02:00
|
|
|
public:
|
2017-05-09 15:05:59 +02:00
|
|
|
static Predicate fromSAS(parsebase::Parser<> &parser);
|
2016-05-21 02:03:45 +02:00
|
|
|
|
2016-05-22 16:00:58 +02:00
|
|
|
using Arguments = std::vector<std::string>;
|
|
|
|
|
|
|
|
public:
|
2016-11-29 06:03:05 +01:00
|
|
|
void printAsSAS(output::ColorStream &stream) const;
|
|
|
|
void printAsASP(output::ColorStream &stream) const;
|
2016-05-21 02:03:45 +02:00
|
|
|
|
2016-05-22 16:00:58 +02:00
|
|
|
const std::string &name() const;
|
|
|
|
const Arguments &arguments() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::string m_name;
|
|
|
|
std::vector<std::string> m_arguments;
|
|
|
|
};
|
2016-05-21 02:03:45 +02:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|