#include "storage.h" #include "definitions.h" #include std::vector> Storage::view(int base, int lines) { base = (base / LINE_SIZE) * LINE_SIZE; std::vector> ret(lines + 1); std::copy( this->data->begin() + base, this->data->begin() + base + lines, ret.begin()); return ret; } void Storage::resolve() { if (this->wait_time == 0) { this->requester = IDLE; this->wait_time = delay; } else if (this->requester != IDLE && !this->is_blocked) { --this->wait_time; } }