-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObjectPart.cpp
59 lines (40 loc) · 1.02 KB
/
ObjectPart.cpp
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include "ObjectPart.h"
using namespace VirtualRobot;
namespace SimoxCGAL {
ObjectPart::ObjectPart()
{
}
ObjectPart::~ObjectPart()
{
}
void ObjectPart::addParameterDouble(const std::string &key, double value)
{
parametersDouble[key] = value;
}
bool ObjectPart::hasParamterDouble(const std::string &key)
{
return parametersDouble.find(key) != parametersDouble.end();
}
bool ObjectPart::getParameterDouble(const std::string &key, double &storeValue)
{
if (!hasParamterDouble(key))
return false;
storeValue = parametersDouble[key];
return true;
}
void ObjectPart::addParameterString(const std::string &key, const std::string &value)
{
parametersString[key] = value;
}
bool ObjectPart::hasParamterString(const std::string &key)
{
return parametersString.find(key) != parametersString.end();
}
bool ObjectPart::getParameterString(const std::string &key, std::string &storeValue)
{
if (!hasParamterString(key))
return false;
storeValue = parametersString[key];
return true;
}
}