Made Predicate a proper class.
This commit is contained in:
@@ -16,18 +16,27 @@ namespace sas
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct Predicate
|
||||
class Predicate
|
||||
{
|
||||
std::string name;
|
||||
std::vector<std::string> arguments;
|
||||
public:
|
||||
static Predicate fromSAS(std::istream &istream);
|
||||
|
||||
using Arguments = std::vector<std::string>;
|
||||
|
||||
public:
|
||||
void printAsSAS(std::ostream &ostream) const;
|
||||
void printAsASP(std::ostream &ostream) const;
|
||||
|
||||
const std::string &name() const;
|
||||
const Arguments &arguments() const;
|
||||
|
||||
private:
|
||||
std::string m_name;
|
||||
std::vector<std::string> m_arguments;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
std::ostream &operator <<(std::ostream &ostream, const Predicate &predicate);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user