#pragma once

#include "Transition.hpp"

/*
   Class: Delay

     Implements a delay that behaves like a regular atomic transition. Atomic transitions can then be ordered temporally by creating delay-transition sequences.
     The delay time in milliseconds is converted into steps according to <UPDATE_RATE_IN_MS>.

     *Inherits* from <Transition>.
*/
class Delay: public Transition {
  public:
    /*
       Constructor: Delay

         Initializes the object.

       Parameters:

         iDelayInMs - Specifies the idle time in milliseconds.
    */
    Delay(int iDelayInMs);

    /*
       Destructor: ~Delay

         Releases all allocated resources.
    */
    ~Delay();


    /*
       Function: Update

         Updates the transition by idling in this step. *Inherited* from <Transition>.
    */
    void Update();

    /*
       Function: Complete

         Checks if the transition is completed. *Inherited* from <Transition>.

       Returns:

         A boolean value indicating if the transition is completed.
    */
    bool Complete();

  private:
    int iDelayInMs;
    QTime oEndTime;
};