68{
69 bool found = false;
70 std::vector<std::string> tokens;
71 const std::string delimiters=" ";
72 unsigned int indexConf = -1;
73
74 for (
unsigned int i = 0; i <
_setup.
configs.at(index).length; i++)
75 {
76 tokens.clear();
77
78
79
80 std::string::size_type lastPos =
_setup.
configs.at(index).keys.at(i).name.find_first_not_of(delimiters, 0);
81
82 std::string::size_type pos =
_setup.
configs.at(index).keys.at(i).name.find_first_of(delimiters, lastPos);
83
84 while (std::string::npos != pos || std::string::npos != lastPos)
85 {
86
87 tokens.push_back(
_setup.
configs.at(index).keys.at(i).name.substr(lastPos, pos - lastPos));
88
89 lastPos =
_setup.
configs.at(index).keys.at(i).name.find_first_not_of(delimiters, pos);
90
91 pos =
_setup.
configs.at(index).keys.at(i).name.find_first_of(delimiters, lastPos);
92 }
93
94 for (int j = 0; j < static_cast<int>(tokens.size()); j++)
95 {
96 if (tokens.at(j) == value)
97 {
98 found = true;
99 indexConf = i;
100 break;
101 }
102 }
103 if (found)
104 break;
105 }
106
108 std::string retValue =
_setup.
configs.at(index).keys.at(indexConf).value;
109
110
111
112 return retValue;
113}