- Implement a couple of helper methods into Dynamic(Sub)Request to
make life easier to Scheduler - Go on implementing a bit more of Scheduler::step_forward() - Remove "places" from SubRequest git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@778 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
53073295d5
commit
14b5b66b3c
13 changed files with 163 additions and 89 deletions
|
@ -22,6 +22,8 @@
|
|||
#define DYNAMIC_SUB_REQUEST_HH 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "request.hh"
|
||||
#include "sub_request.hh"
|
||||
#include "dynamic_request.hh"
|
||||
#include "dynamic_resource.hh"
|
||||
|
@ -38,7 +40,7 @@ namespace sgpem
|
|||
|
||||
class SG_DLLLOCAL DynamicSubRequest : public SubRequest
|
||||
{
|
||||
public:
|
||||
public:
|
||||
DynamicSubRequest(StaticSubRequest* core,
|
||||
DynamicRequest* owner);
|
||||
DynamicSubRequest(const DynamicSubRequest& other, DynamicRequest* owner);
|
||||
|
@ -49,8 +51,6 @@ namespace sgpem
|
|||
|
||||
resource_key_t get_resource_key() const;
|
||||
|
||||
unsigned int get_places() const;
|
||||
|
||||
unsigned int get_length() const;
|
||||
|
||||
int get_queue_position() const;
|
||||
|
@ -58,6 +58,12 @@ namespace sgpem
|
|||
|
||||
virtual DynamicRequest& get_request();
|
||||
|
||||
state get_state() const;
|
||||
state set_state(state new_state);
|
||||
|
||||
unsigned int get_remaining_time() const;
|
||||
unsigned int decrease_remaining_time();
|
||||
|
||||
void serialize(SerializeVisitor& translator) const;
|
||||
|
||||
StaticSubRequest& get_core();
|
||||
|
@ -70,6 +76,8 @@ namespace sgpem
|
|||
memory::smart_ptr<StaticSubRequest> _static_subrequest;
|
||||
DynamicRequest* _owner;
|
||||
int _queue_position;
|
||||
unsigned int _ran_for;
|
||||
state _state;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue