71 lines
1.5 KiB
C++
71 lines
1.5 KiB
C++
#include <plasp/pddl/expressions/At.h>
|
|
|
|
#include <plasp/output/TranslatorException.h>
|
|
|
|
namespace plasp
|
|
{
|
|
namespace pddl
|
|
{
|
|
namespace expressions
|
|
{
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// At
|
|
//
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
At::At()
|
|
: m_argument{nullptr}
|
|
{
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void At::setArgument(ExpressionPointer argument)
|
|
{
|
|
m_argument = argument;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
ExpressionPointer At::argument() const
|
|
{
|
|
return m_argument;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
ExpressionPointer At::reduced()
|
|
{
|
|
throw output::TranslatorException("reducing “at” predicates currently not supported");
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
ExpressionPointer At::negationNormalized()
|
|
{
|
|
BOOST_ASSERT(m_argument);
|
|
|
|
m_argument = m_argument->negationNormalized();
|
|
|
|
return this;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
void At::print(std::ostream &ostream) const
|
|
{
|
|
ostream << "(at " << m_timePoint << " ";
|
|
|
|
m_argument->print(ostream);
|
|
|
|
ostream << ")";
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
}
|
|
}
|
|
}
|