patrick
/
plasp
Archived
1
0
Fork 0
This repository has been archived on 2023-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
plasp/include/plasp/sas/Value.h

66 lines
1.2 KiB
C++

#ifndef __SAS__VALUE_H
#define __SAS__VALUE_H
#include <iosfwd>
#include <string>
#include <vector>
namespace plasp
{
namespace sas
{
// Forward declarations
class Variable;
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Value
//
////////////////////////////////////////////////////////////////////////////////////////////////////
struct Value;
using Values = std::vector<Value>;
////////////////////////////////////////////////////////////////////////////////////////////////////
struct Value
{
public:
enum class Sign
{
Positive,
Negative
};
static const Value Any;
static Value fromSAS(std::istream &istream);
static const Value &referenceFromSAS(std::istream &istream, const Variable &variable);
public:
void printAsSAS(std::ostream &ostream) const;
void printAsASP(std::ostream &ostream) const;
void printAsASPPredicateBody(std::ostream &ostream) const;
Sign sign() const;
const std::string &name() const;
private:
static const Value any();
private:
Value();
Sign m_sign;
std::string m_name;
bool m_hasArguments;
};
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}
#endif