//
// Copyright (c) 2009 Froduald Kabanza and the Université de Sherbrooke.
// Use of this software is permitted for non-commercial research purposes, and
// it may be copied or applied only for that use. All copies must include this
// copyright message.
// 
// This is a research prototype that has not gone through intensive tests and
// is delivered as is. It may still contain bugs. Froduald Kabanza and the
// Université de Sherbrooke disclaim any responsibility for damage that may be
// caused by using it.
//
// Please note that this file was inspired in part by the PDDL4J library:
// http://www.math-info.univ-paris5.fr/~pellier/software/software.php 
//
// Implementation: Daniel Castonguay
// Project Manager: Froduald Kabanza
//
#ifndef _NO_EFFECT_H
#define _NO_EFFECT_H

#include "../IEffect.h"

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

    virtual void update(const IClosedWorld*, 
                        IDurativeClosedWorld*, 
                        const Bindings*, 
                        const ActionContext*) const;

  protected:
    virtual void _output(std::ostream& out) const;

    virtual size_t _calculateHashCode() const
    {
      return 938856655;
    }

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

    virtual int _internalCompareTo(const IExp& other) const;

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

#endif