#ifndef PAUSE_STAGE_H
#define PAUSE_STAGE_H

#ifndef PROTOCOL_STAGE_FRAME_H
#include "Protocol_stage_frame.h"
#endif

#ifndef FLAW_H
#include "Flaw.h"
class Monitor;
#endif

#ifndef MONITOR_H
#include "Monitor.h"
#endif

#ifndef CREATE_H
#include "Create.h"
#endif

namespace MM
{

class Pause_stage : public Protocol_stage_frame
{
    bool                    stop_flag_;
    Own <Command>           iteration_finished_;

public:        
    explicit                Pause_stage (Protocol &protocol, Text const & init);

    void                    execute     ();
    void                    stop        ();
    bool                    was_stopped () ;

    void                    at_every_iteration (Command *adoptee)               {iteration_finished_.adopt(adoptee);}

    Text                    option     (Text const& key) const;
    void                    set_option (Text const & key, Text const & value);
    void                    get_option (int i, Text & key, Text & value) const;
    int                     option_count () const           {return 2;}

//    Monitor &               monitor (int i)         {return nil <Monitor>();}
//    Monitor const &         monitor (int i)  const  {return nil <Monitor>();}
    Monitor &               monitor (int )         {return nil <Monitor>();}
    Monitor const &         monitor (int )  const  {return nil <Monitor>();}
    int                     monitor_count () const  {return 0;}

    void                    update (){;}
    void                    edit () {;}
};

}//MM

#endif //PAUSE_STAGE_H
