aboutsummaryrefslogtreecommitdiffstats
path: root/src/allocate_queue.cpp
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-05-18 19:49:26 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-05-18 19:49:56 +0900
commit807c2bc45bf19059021eb3d94e2c1693a9c940b6 (patch)
tree8d463795e262f976016ebc2fc44b77bb5c259a86 /src/allocate_queue.cpp
parent5529ff5051d8da4acb6157c6c6fa0043de2e685b (diff)
[Local]:4th step for blocking sequence
Change-Id: If4f01a177f4947780d448aaa214f863af2124b0f Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/allocate_queue.cpp')
-rw-r--r--src/allocate_queue.cpp31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/allocate_queue.cpp b/src/allocate_queue.cpp
index 0d7a646..14bf6f5 100644
--- a/src/allocate_queue.cpp
+++ b/src/allocate_queue.cpp
@@ -17,8 +17,11 @@
#include "allocate_queue.hpp"
#include <algorithm>
+using std::string;
+
namespace wm {
+
AllocateRequestList::AllocateRequestList(){}
AllocateRequestList::~AllocateRequestList(){}
@@ -26,22 +29,19 @@ bool AllocateRequestList::addClient(WMClient* client){
return true;
}
-void AllocateRequestList::removeClient(const char* appid){
- return true;
+void AllocateRequestList::removeClient(const string &appid){
}
-const WMClient* AllocateRequestList::lookUpClient(const char appid){
- std::string key = std::string(appid);
- auto itr = client_list.find(appid);
- return (itr != client_list.end()) ? itr.second() : nullptr;
+WMClient* AllocateRequestList::lookUpClient(const string &appid){
+ return nullptr;
}
-unsigned AllocateRequestList::getSequenceNumber(appid, role, area){
+unsigned AllocateRequestList::getSequenceNumber(const string &appid, const string &role, const string &area){
return 0;
}
-bool AllocateRequestList::addAllocateRequest(WMClient &client, unsigned seq_num, std::string &task){
- return true;
+unsigned AllocateRequestList::addAllocateRequest(WMRequest req){
+ return 1;
}
bool AllocateRequestList::requestFinished(){
@@ -52,8 +52,12 @@ unsigned AllocateRequestList::lookUpAllocatingApp(const char *appid){
return 1;
}
-unsigned AllocateRequestList::currentSequnce(const char *appid){
- return 1;
+void AllocateRequestList::setEndDrawFinished(unsigned request_seq, const string &role){
+
+}
+
+bool AllocateRequestList::endDrawFullfilled(unsigned request_seq){
+ return false;
}
void AllocateRequestList::removeRequest(unsigned req_seq){
@@ -61,7 +65,10 @@ void AllocateRequestList::removeRequest(unsigned req_seq){
}
void AllocateRequestList::setCurrentSequence(unsigned req_seq){
-
+ this->seq_num = req_seq;
+ if(0 == this->seq_num){
+ this->seq_num = 1;
+ }
}
bool AllocateRequestList::haveRequest(){