Fawkes API  Fawkes Development Version
fawkes::stn::Predicate Class Reference

#include "predicate.h"

Public Member Functions

 Predicate (const std::string &name, bool condition, const std::vector< std::string > &attrs)
 Constructor. More...
 
bool operator== (const Predicate &rhs)
 Compare two Predicates. More...
 
std::string name () const
 Get the name of the predicate. More...
 
bool condition () const
 Get the condition of the predicate. More...
 
const std::vector< std::string > & attrs () const
 Get the attributes of the predicate. More...
 

Friends

std::ostream & operator<< (std::ostream &, const Predicate &)
 Print a Predicate. More...
 

Detailed Description

A representation of a Predicate in the STN.

Definition at line 42 of file predicate.h.

Constructor & Destructor Documentation

◆ Predicate()

fawkes::stn::Predicate::Predicate ( const std::string &  name,
bool  condition,
const std::vector< std::string > &  attrs 
)

Constructor.

Parameters
nameThe name of the predicate.
conditionFalse iff this predicate is negated.
attrsParameters of the predicate.

Definition at line 46 of file predicate.cpp.

Member Function Documentation

◆ attrs()

const std::vector< std::string > & fawkes::stn::Predicate::attrs ( ) const

Get the attributes of the predicate.

Returns
A vector of attributes as strings.

Definition at line 100 of file predicate.cpp.

◆ condition()

bool fawkes::stn::Predicate::condition ( ) const

Get the condition of the predicate.

Returns
True iff the predicate's condition is true.

Definition at line 91 of file predicate.cpp.

Referenced by fawkes::stn::StnAction::genGraphNodeName().

◆ name()

std::string fawkes::stn::Predicate::name ( ) const

Get the name of the predicate.

Returns
The name of the predicate.

Definition at line 82 of file predicate.cpp.

◆ operator==()

bool fawkes::stn::Predicate::operator== ( const Predicate rhs)

Compare two Predicates.

Parameters
rhsThe other predicatge.
Returns
True iff the two predicates have the same properties.

Definition at line 73 of file predicate.cpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  strm,
const Predicate a 
)
friend

Print a Predicate.

This prints all relevant information about the predicate.

Parameters
strmThe stream to pass the information to.
aThe predicate to show.

Definition at line 57 of file predicate.cpp.


The documentation for this class was generated from the following files: