#pragma once
#include <Exp/IEffect.h>

namespace planning
{
  class InvalidEffect : public IEffect
  {
  public:
    static const InvalidEffect* getInstance() { return &s_instance; }

    virtual void update(const IClosedWorld*, 
                        IDurativeClosedWorld*, 
                        const Bindings*, 
                        const ActionContext*) const
    {
      throw std::runtime_error("InvalidEffect::update() was called");
    }

  protected:
    virtual void _output(std::ostream& out) const
    {
      out << "InvalidEffect";
    }

    virtual size_t _calculateHashCode() const
    {
      return 63003841;
    }

    virtual const IExp* _internalApply(const Bindings* bindings) const
    {
      unused(bindings);

      throw std::runtime_error("InvalidEffect::_internalApply() was called");
    }

    virtual int _internalCompareTo(const IExp& other) const
    {
      unused(other);

      throw std::runtime_error("InvalidEffect::_internalCompareTo() was called");
    }

  private:
    static InvalidEffect s_instance;
    InvalidEffect();
  };
}