//Editor-Info: -*- C++ -*-
//
//Subject: Scheduler Framework
//
//File: scheduler.h
//
//Version: $Revision: 1.5 $
//
//State: $State: Exp $
//
//Date: $Date: 1998/07/13 09:13:57 $
//
//Organisation:
//      Helsinki University of Technology
//      Laboratory of Telecommunications Software and Multimedia
//
//Author:
//      Juhana Räsänen
//
//Description:
//      A base class for object schedulers.
//
//Copyright:
//      Copyright 1999 Helsinki University of Technology
//      ALL RIGHTS RESERVED BETWEEN JANUARY 1996 AND JUNE 1999.
//
//Licence:
//
//
//History: 
//

#ifndef __SF_SCHEDULER_H__
#define __SF_SCHEDULER_H__

class sfSchedulerHandle;
class sfTask;

#include <typeinfo>
#include "exception.h"

//
// Class: sfScheduler
//
// Description:
//     Abstract scheduler base class. Tasks use the scheduler through
//     handle instances that are provided by the scheduler makeHandle
//     method. Handles implement Bridge pattern by separating scheduler
//     interface (the handle) from its implementation (the concrete
//     scheduler class).
//     The scheduler can be run forever with the run() method or one
//     step at a time with the step() method.
//

class sfScheduler
{
    public:
        sfScheduler(void);
        virtual ~sfScheduler(void);

        virtual void run(void);
        virtual void step(void) = 0;
        virtual sfSchedulerHandle *makeHandle(sfTask *task_) = 0;
};

#endif // __SF_SCHEDULER_H__

