- "You got another thing comin'" -- Judas Priest

- Add get_request() method to (Dynamic)SubRequest.
- Implement most of ConcreteHistory. It is a fairly complex class,
with some real evilness in it. It should be thouroughly documented 
ASAP.


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@699 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-07-03 18:52:50 +00:00
parent 68b92db976
commit cb8e8dabc7
13 changed files with 212 additions and 104 deletions

View file

@ -29,9 +29,8 @@
using namespace sgpem;
DynamicSubRequest::DynamicSubRequest(StaticSubRequest* core,
DynamicRequest* owner,
resource_key_t key) :
_static_subrequest(core), _owner(owner), _resource_key(key),
DynamicRequest* owner) :
_static_subrequest(core), _owner(owner),
_queue_position(-1)
{
assert(core != NULL);
@ -41,9 +40,6 @@ DynamicSubRequest::DynamicSubRequest(StaticSubRequest* core,
DynamicSubRequest::~DynamicSubRequest()
{
typedef std::vector<DynamicSubRequest*> SubRequests;
SubRequests& siblings = _owner->get_dynamic_subrequests();
siblings.erase(find(siblings.begin(), siblings.end(), this));
}
@ -58,7 +54,7 @@ DynamicSubRequest::operator==(const SubRequest& op2) const
SubRequest::resource_key_t
DynamicSubRequest::get_resource_key() const
{
return _resource_key;
return _static_subrequest->get_resource_key();
}
unsigned int
@ -85,6 +81,14 @@ DynamicSubRequest::set_queue_position(int position)
_queue_position = position;
}
DynamicRequest&
DynamicSubRequest::get_request()
{
return *_owner;
}
void
DynamicSubRequest::serialize(SerializeVisitor& translator) const
{