- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmsgQue.cpp
More file actions
Latest commit
executable file
·24 lines (16 loc) · 439 Bytes
/
Copy pathmsgQue.cpp
File metadata and controls
executable file
·24 lines (16 loc) · 439 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include"msgQue.h"
msgQue::msgQue()
{
buffer = new std::vector<RsJsonItem>;
}
voidmsgQue::storeMsg(RsJsonItem * item){
//should be doing a mutex lock here?
buffer->push_back(*item);
}
//std::list<std::string>
std::vector<RsJsonItem> *msgQue::getMsgList(){
//should also be doing a mutex lock here?
std::vector<RsJsonItem> *oldbuffer = buffer;
buffer = new std::vector<RsJsonItem>;
return oldbuffer;
}