forked from alfchen/SimplePACO
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontext.cpp
More file actions
40 lines (31 loc) · 670 Bytes
/
context.cpp
File metadata and controls
40 lines (31 loc) · 670 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* framework/context.cpp
* PACO
*
* Created by: Qi Alfred Chen, 12/09/2013
*
*/
#include "context.h"
Context::Context() {
ETHER_HDR_LEN = -1;
}
void Context::setEtherLen(int etherlen){
ETHER_HDR_LEN = etherlen;
}
int Context::getEtherLen(){
return ETHER_HDR_LEN;
}
vector<string> Context::getAppNameMap(){
return appNameMap;
}
void Context::addAppName(string appname){
appNameMap.push_back(appname);
}
void Context::clearAppNameMap(){
appNameMap.clear();
}
string Context::getAppNameByIndex(int index){
//empty if the index is not valid
if (index <0 || index>=appNameMap.size()) return "";
return appNameMap.at(index);
}