12 #include <boost/algorithm/string.hpp>
14 #include "KeySymbols.h"
30 bool fail =
str.fail();
52 if (boost::iequals(
value,
"true")) {
54 }
else if (boost::iequals(
value,
"false")) {
57 fwLog(
fwlog::kError) <<
"Invalid value. Possible values are true/false case insensitive." << std::endl;
78 std::stringstream iss(
value);
83 while (getline(iss, vitem,
',')) {
84 fst = vitem.find(
'[');
85 lst = vitem.find(
']');
87 if (fst != std::string::npos)
89 if (
lst != std::string::npos)
93 size_t nwords = tokens.size();
104 it_label = tokens[0];
106 it_instance = tokens[1];
108 it_process = tokens[2];
126 size_t nwords = tokens.size();
138 it_label = tokens[0];
140 it_instance = tokens[1];
142 it_process = tokens[2];
159 size_t nwords = tokens.size();
170 it_module = tokens[0];
186 template <
typename T>
188 std::vector<T> valueVector;
190 std::stringstream iss(
value);
195 while (getline(iss, vitem,
',')) {
196 fst = vitem.find(
'[');
197 lst = vitem.find(
']');
199 if (fst != std::string::npos)
201 if (
lst != std::string::npos)
204 std::stringstream oss(vitem);
208 valueVector.push_back(on);
222 editNumericParameter<int32_t>(*
parent.pset,
data.tracked,
data.label, GetText());
228 editNumericParameter<uint32_t>(*
parent.pset,
data.tracked,
data.label, GetText());
231 editNumericParameter<double>(*
parent.pset,
data.tracked,
data.label, GetText());
234 editNumericParameter<long long>(*
parent.pset,
data.tracked,
data.label, GetText());
237 editNumericParameter<unsigned long long>(*
parent.pset,
data.tracked,
data.label, GetText());
243 editVectorParameter<int32_t>(*
parent.pset,
data.tracked,
data.label, GetText());
246 editVectorParameter<uint32_t>(*
parent.pset,
data.tracked,
data.label, GetText());
249 editVectorParameter<long long>(*
parent.pset,
data.tracked,
data.label, GetText());
252 editVectorParameter<unsigned long long>(*
parent.pset,
data.tracked,
data.label, GetText());
255 editVectorParameter<double>(*
parent.pset,
data.tracked,
data.label, GetText());
258 editVectorParameter<std::string>(*
parent.pset,
data.tracked,
data.label, GetText());
283 UInt_t keysym =
event->fCode;
285 if (keysym == (UInt_t)gVirtualX->KeysymToKeycode(kKey_Escape)) {
286 TGFrame *
p = dynamic_cast<TGFrame *>(const_cast<TGWindow *>(GetParent()));
288 TGMainFrame *mp = dynamic_cast<TGMainFrame *>(
p);
291 return mp->HandleKey(
event);
293 p = dynamic_cast<TGFrame *>(const_cast<TGWindow *>(
p->GetParent()));
297 return TGTextEntry::HandleKey(
event);