- Renamed Schedulable to StaticSchedulable

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@626 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
elvez 2006-06-13 13:55:47 +00:00
parent c381ee8875
commit 1f7972c308
9 changed files with 33 additions and 33 deletions

View File

@ -148,7 +148,7 @@ src_backend_libbackend_la_SOURCES = \
src/backend/policy_manager.cc \
src/backend/policy_parameters.cc \
src/backend/process.cc \
src/backend/schedulable.cc \
src/backend/static_schedulable.cc \
src/backend/schedulable_queue.cc \
src/backend/schedulable_status.cc \
src/backend/scheduler.cc \
@ -167,7 +167,7 @@ pkginclude_HEADERS = \
src/backend/policy_manager.hh \
src/backend/policy_parameters.hh \
src/backend/process.hh \
src/backend/schedulable.hh \
src/backend/static_schedulable.hh \
src/backend/schedulable_queue.hh \
src/backend/schedulable_status.hh \
src/backend/scheduler.hh \

View File

@ -2,7 +2,7 @@
%{
#include "policy.hh"
#include "policy_parameters.hh"
#include "schedulable.hh"
#include "static_schedulable.hh"
#include "schedulable_queue.hh"
#include "schedulable_status.hh"
#include "scheduler.hh"
@ -130,21 +130,21 @@ namespace sgpem {
}; //~ class PolicyParameters
// --------------------------------------------
class Schedulable
class StaticSchedulable
{
public:
virtual ~Schedulable() = 0;
virtual ~StaticSchedulable() = 0;
virtual unsigned int get_arrival_time() const;
int get_priority() const;
unsigned int get_total_cpu_time() const;
%ignore Schedulable::get_name() const;
%ignore StaticSchedulable::get_name() const;
%extend {
const char* get_name() const
{ return self->get_name().c_str(); }
}
}; //~ class Schedulable
}; //~ class StaticSchedulable
// --------------------------------------------
@ -181,7 +181,7 @@ namespace sgpem {
int get_cpu_time_left() const;
int get_last_scheduled() const;
state get_state() const;
const sgpem::Schedulable* get_schedulable() const;
const sgpem::StaticSchedulable* get_schedulable() const;
};
// ---------------------------------------------

View File

@ -23,7 +23,7 @@ using namespace sgpem;
Process::Process(const Glib::ustring& name, const unsigned int& arrival, const unsigned int& total, const int& priority)
: Schedulable(name, arrival, total, priority)
: StaticSchedulable(name, arrival, total, priority)
{
}

View File

@ -25,7 +25,7 @@
#include "gettext.h"
#include "glibmm/ustring.h"
#include "schedulable.hh"
#include "static_schedulable.hh"
namespace sgpem
{
@ -35,7 +35,7 @@ namespace sgpem
It IS a Schedulable object.
*/
class SG_DLLEXPORT Process : public Schedulable
class SG_DLLEXPORT Process : public StaticSchedulable
{
public:
/** \brief Creates a new object with the given parameters. */

View File

@ -23,7 +23,7 @@
using namespace sgpem;
using namespace std;
SchedulableStatus::SchedulableStatus(const Schedulable& obj) :
SchedulableStatus::SchedulableStatus(const StaticSchedulable& obj) :
_ref(&obj), _last(-1), _time_left(obj.get_total_cpu_time()),
_my_state(state_future)
{
@ -73,7 +73,7 @@ SchedulableStatus::set_state(state s)
_my_state = s;
}
const Schedulable*
const StaticSchedulable*
SchedulableStatus::get_schedulable() const
{
return _ref;

View File

@ -22,7 +22,7 @@
#define SCHEDULABLESTATUS_HH 1
#include "config.h"
#include "schedulable.hh"
#include "static_schedulable.hh"
namespace sgpem
{
@ -57,7 +57,7 @@ namespace sgpem
};
/** \brief Object constructor */
SchedulableStatus(const Schedulable& obj);
SchedulableStatus(const StaticSchedulable& obj);
//SchedulableStatus(const SchedulableStatus& obj); //copy constructor
@ -94,10 +94,10 @@ namespace sgpem
* This function returns a pointer to the actual schedable object
* represented, along with its status, by this instance.
*/
const Schedulable* get_schedulable() const;
const StaticSchedulable* get_schedulable() const;
private:
const Schedulable* _ref;
const StaticSchedulable* _ref;
int _last;
int _time_left;
state _my_state;

View File

@ -1,4 +1,4 @@
// src/backend/schedulable.cc - Copyright 2005, 2006, University
// src/backend/static_schedulable.cc - Copyright 2005, 2006, University
// of Padova, dept. of Pure and Applied
// Mathematics
//
@ -18,11 +18,11 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "schedulable.hh"
#include "static_schedulable.hh"
using namespace sgpem;
Schedulable::Schedulable(const Glib::ustring& name,
StaticSchedulable::StaticSchedulable(const Glib::ustring& name,
const unsigned int& arrival,
const unsigned int& total,
const int& priority) :
@ -30,32 +30,32 @@ Schedulable::Schedulable(const Glib::ustring& name,
{
}
Schedulable::~Schedulable()
StaticSchedulable::~StaticSchedulable()
{
}
unsigned int
Schedulable::get_arrival_time() const
StaticSchedulable::get_arrival_time() const
{
return _arrival_time;
}
unsigned int
Schedulable::get_total_cpu_time() const
StaticSchedulable::get_total_cpu_time() const
{
return _total_time;
}
int
Schedulable::get_priority() const
StaticSchedulable::get_priority() const
{
return _priority;
}
Glib::ustring
Schedulable::get_name() const
StaticSchedulable::get_name() const
{
return _name;
}

View File

@ -1,4 +1,4 @@
// src/backend/schedulable.hh - Copyright 2005, 2006, University
// src/backend/static_schedulable.hh - Copyright 2005, 2006, University
// of Padova, dept. of Pure and Applied
// Mathematics
//
@ -18,15 +18,15 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef SCHEDULABLE_HH
#define SCHEDULABLE_HH 1
#ifndef STATIC_SCHEDULABLE_HH
#define STATIC_SCHEDULABLE_HH 1
#include "config.h"
#include "glibmm/ustring.h"
namespace sgpem
{
class Schedulable;
class StaticSchedulable;
/** \brief An entity that can use the processor
*
@ -38,13 +38,13 @@ namespace sgpem
*
* \see SchedulableStatus
*/
class SG_DLLEXPORT Schedulable
class SG_DLLEXPORT StaticSchedulable
{
public:
/** \brief Create a new object with the given parameters */
Schedulable(const Glib::ustring& name, const unsigned int& arrival,
StaticSchedulable(const Glib::ustring& name, const unsigned int& arrival,
const unsigned int& total, const int& priority);
virtual ~Schedulable();
virtual ~StaticSchedulable();
/** \brief Returns the arrival time for this process
*

View File

@ -27,7 +27,7 @@
#include "templates/smartp.hh"
#include "backend/history.hh"
#include "backend/schedulable.hh"
#include "backend/static_schedulable.hh"
#include "backend/schedulable_queue.hh"
#include "backend/schedulable_status.hh"
#include "backend/slice.hh"