//
// 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 some files were inspired in part by the PDDL4J library:
// http://www.math-info.univ-paris5.fr/~pellier/software/software.php 
//
// Implementation: Simon Chamberland
// Project Manager: Froduald Kabanza
//

#ifndef _I_DURATIVE_CLOSED_WORLD
#define _I_DURATIVE_CLOSED_WORLD

#include "IClosedWorld.h"

namespace planning
{
  /// <summary>
  /// Updatable durative open world supporting timed effects.
  /// </summary>
  class IDurativeClosedWorld : public IClosedWorld
  {
  public:
    virtual double getTime() const = 0;

    virtual void setTime(double time) = 0;

    virtual IDurativeClosedWorld* copy() const = 0;

    ///////////////////////////////////////////////

    virtual size_t getHashCode() const = 0;

    ///// <summary>
    ///// Add an effect which will take place after a fixed duration.
    ///// </summary>
    ///// <param name="timeOffset">The relative time offset at which the effect takes place.</param>
    ///// <param name="effect">The delayed effect.</param>
    //void AddEndEffect(double timeOffset, IEffect effect);

    ///// <summary>
    ///// Returns the total time it took to reach the current world.
    ///// </summary>
    ///// <returns>The total time of the plan up to this point.</returns>
    //double GetTotalTime();

    ///// <summary>
    ///// Returns whether the world is an idle goal world (whether it satisfies a goal
    ///// and has been idled).
    ///// </summary>
    ///// <returns>True if the world is an idle goal world, false otherwise.</returns>
    //bool IsIdleGoalWorld();

    //bool IsConstraintPreferenceViolated(int nrConstraintPreference);

    //void SignalConstraintPreferenceViolated(int nrConstraintPreference);
  };
}

#endif