- Add operator== methods to dynamic schedulables, and in their interfaces too
- Write class ReadyQueue git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@688 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
9da0ef3137
commit
fa06e2f4f1
16 changed files with 112 additions and 12 deletions
|
@ -22,17 +22,29 @@
|
|||
#define READY_QUEUE_HH 1
|
||||
|
||||
#include "config.h"
|
||||
#include "glibmm/ustring.h"
|
||||
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
namespace sgpem
|
||||
{
|
||||
|
||||
class ReadyQueue;
|
||||
class Schedulable;
|
||||
|
||||
class SG_DLLEXPORT ReadyQueue
|
||||
{
|
||||
public:
|
||||
virtual
|
||||
~ReadyQueue();
|
||||
typedef unsigned int position;
|
||||
typedef unsigned int size_t;
|
||||
|
||||
void swap(position a, position b) throw (std::out_of_range);
|
||||
inline size_t size() const;
|
||||
Schedulable& get_item_at(position index) throw (std::out_of_range);
|
||||
inline void append(Schedulable& schedulable);
|
||||
|
||||
private:
|
||||
typedef std::vector<Schedulable*> Schedulables;
|
||||
Schedulables _scheds;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue