Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEOptionsEditorRow.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// Row used in GNEOptionsEditor to edit options
19/****************************************************************************/
20#include <config.h>
21
28
29#include "GNEOptionsEditorRow.h"
30#include "GNEOptionsEditor.h"
31
32// ===========================================================================
33// Defines
34// ===========================================================================
35
36#define MARGIN 4
37#define MINNAMEWIDTH 200
38
39// ===========================================================================
40// FOX callback mapping
41// ===========================================================================
42
47
51
52// Object implementation
53FXIMPLEMENT_ABSTRACT(GNEOptionsEditorRow::OptionRow, FXHorizontalFrame, OptionRowMap, ARRAYNUMBER(OptionRowMap))
54FXIMPLEMENT_ABSTRACT(GNEOptionsEditorRow::OptionFilename, GNEOptionsEditorRow::OptionRow, OptionFilenameMap, ARRAYNUMBER(OptionFilenameMap))
55
56// ===========================================================================
57// method definitions
58// ===========================================================================
59
60// ---------------------------------------------------------------------------
61// GNEOptionsEditorRow::OptionRow - methods
62// ---------------------------------------------------------------------------
63
64GNEOptionsEditorRow::OptionRow::OptionRow(GNEOptionsEditor* optionsEditor, FXComposite* parent, const std::string& topic,
65 const std::string& name, const std::string& description, const std::string& defaultValue) :
66 FXHorizontalFrame(parent, GUIDesignAuxiliarHorizontalFrame),
67 myOptionsEditor(optionsEditor),
68 myTopic(topic),
69 myName(name),
70 myDescription(description),
71 myDefaultValue(defaultValue) {
72 // build label with name (default width 150)
73 myNameLabel = new MFXLabelTooltip(this, myOptionsEditor->myDialog->getApplicationWindow()->getStaticTooltipMenu(),
74 name.c_str(), nullptr, GUIDesignLabelThickedFixed(MINNAMEWIDTH));
75 // set description as tooltip
76 myNameLabel->setTipText(description.c_str());
77 // create content frame
78 myContentFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
79 // Create reset button
80 myResetButton = GUIDesigns::buildFXButton(this, "", "", TL("Reset value"), GUIIconSubSys::getIcon(GUIIcon::RESET), this, MID_GNE_RESET, GUIDesignButtonIcon);
81}
82
83
84void
86 const int nameWidth = myNameLabel->getFont()->getTextWidth(myNameLabel->getText().text(), myNameLabel->getText().length() + MARGIN);
87 if (nameWidth > MINNAMEWIDTH) {
88 myNameLabel->setWidth(nameWidth);
89 }
90}
91
92
93const std::string&
95 return myTopic;
96}
97
98
99const std::string
103
104
105const std::string
109
110
111void
113 if (getValue() != myDefaultValue) {
114 myResetButton->enable();
115 } else {
116 myResetButton->disable();
117 }
118}
119
120// ---------------------------------------------------------------------------
121// GNEOptionsEditorRow::OptionString - methods
122// ---------------------------------------------------------------------------
123
125 const std::string& topic, const std::string& name, const std::string& description, const std::string& defaultValue) :
126 OptionRow(optionsEditor, parent, topic, name, description, defaultValue) {
129 updateOption();
130}
131
132
133void
135 myStringTextField->setText(myOptionsEditor->myOptionsContainer.getString(myName).c_str());
136 updateResetButton();
137}
138
139
140void
142 myStringTextField->setText(myOptionsEditor->myOriginalOptionsContainer.getString(myName).c_str());
143 onCmdSetOption(nullptr, 0, nullptr);
144}
145
146
147long
149 myOptionsEditor->myOptionsContainer.resetWritable();
150 myOptionsEditor->myOptionsContainer.set(myName, myStringTextField->getText().text());
151 myOptionsEditor->myOptionsModified = true;
152 updateResetButton();
153 return 1;
154}
155
156
157long
159 myStringTextField->setText(myDefaultValue.c_str());
160 updateResetButton();
161 return 1;
162}
163
164
165std::string
167 return myStringTextField->getText().text();
168}
169
170
172 const std::string& topic, const std::string& name, const std::string& description, const std::string& defaultValue) :
173 OptionRow(optionsEditor, parent, topic, name, description, defaultValue) {
175 updateOption();
176}
177
178
179void
181 myStringVectorTextField->setText(toString(myOptionsEditor->myOptionsContainer.getStringVector(myName)).c_str());
182 updateResetButton();
183}
184
185
186void
188 myStringVectorTextField->setText(toString(myOptionsEditor->myOriginalOptionsContainer.getStringVector(myName)).c_str());
189 onCmdSetOption(nullptr, 0, nullptr);
190}
191
192
193long
195 myOptionsEditor->myOptionsContainer.resetWritable();
196 myOptionsEditor->myOptionsContainer.set(myName, myStringVectorTextField->getText().text());
197 myOptionsEditor->myOptionsModified = true;
198 updateResetButton();
199 return 1;
200}
201
202
203long
205 myStringVectorTextField->setText(myDefaultValue.c_str());
206 updateResetButton();
207 return 1;
208}
209
210
211std::string
213 return myStringVectorTextField->getText().text();
214}
215
216// ---------------------------------------------------------------------------
217// GNEOptionsEditorRow::OptionBool - methods
218// ---------------------------------------------------------------------------
219
221 const std::string& topic, const std::string& name, const std::string& description, const std::string& defaultValue) :
222 OptionRow(optionsEditor, parent, topic, name, description, defaultValue) {
224 updateOption();
225}
226
227
228void
230 if (myOptionsEditor->myOptionsContainer.getBool(myName)) {
231 myCheckButton->setCheck(TRUE);
232 myCheckButton->setText(TL("true"));
233 } else {
234 myCheckButton->setCheck(FALSE);
235 myCheckButton->setText(TL("false"));
236 }
237 updateResetButton();
238}
239
240
241void
243 if (myOptionsEditor->myOriginalOptionsContainer.getBool(myName)) {
244 myCheckButton->setCheck(TRUE);
245 myCheckButton->setText(TL("true"));
246 } else {
247 myCheckButton->setCheck(FALSE);
248 myCheckButton->setText(TL("false"));
249 }
250 onCmdSetOption(nullptr, 0, nullptr);
251}
252
253
254long
256 myOptionsEditor->myOptionsContainer.resetWritable();
257 if (myCheckButton->getCheck()) {
258 myOptionsEditor->myOptionsContainer.set(myName, "true");
259 myCheckButton->setText(TL("true"));
260 } else {
261 myOptionsEditor->myOptionsContainer.set(myName, "false");
262 myCheckButton->setText(TL("false"));
263 }
264 myOptionsEditor->myOptionsModified = true;
265 // special checks for Debug flags
266 if ((myName == "gui-testing-debug") && myOptionsEditor->myOptionsContainer.isSet("gui-testing-debug")) {
267 MsgHandler::enableDebugMessages(myOptionsEditor->myOptionsContainer.getBool("gui-testing-debug"));
268 }
269 if ((myName == "gui-testing-debug-gl") && myOptionsEditor->myOptionsContainer.isSet("gui-testing-debug-gl")) {
270 MsgHandler::enableDebugGLMessages(myOptionsEditor->myOptionsContainer.getBool("gui-testing-debug-gl"));
271 }
272 updateResetButton();
273 return 1;
274}
275
276
277long
279 if (myDefaultValue.empty()) {
280 myCheckButton->setCheck(FALSE);
281 myCheckButton->setText(TL("false"));
282 } else if (StringUtils::toBool(myDefaultValue)) {
283 myCheckButton->setCheck(TRUE);
284 myCheckButton->setText(TL("true"));
285 } else {
286 myCheckButton->setCheck(FALSE);
287 myCheckButton->setText(TL("false"));
288 }
289 updateResetButton();
290 return 1;
291}
292
293
294std::string
296 return myCheckButton->getCheck() ? "true" : "false";
297}
298
299// ---------------------------------------------------------------------------
300// GNEOptionsEditorRow::OptionInt - methods
301// ---------------------------------------------------------------------------
302
304 const std::string& topic, const std::string& name, const std::string& description, const std::string& defaultValue) :
305 OptionRow(optionsEditor, parent, topic, name, description, defaultValue) {
307 updateOption();
308}
309
310
311void
313 myIntTextField->setText(toString(myOptionsEditor->myOptionsContainer.getInt(myName)).c_str());
314 updateResetButton();
315}
316
317
318void
320 myIntTextField->setText(toString(myOptionsEditor->myOriginalOptionsContainer.getInt(myName)).c_str());
321 onCmdSetOption(nullptr, 0, nullptr);
322}
323
324
325long
327 if (myIntTextField->getText().empty()) {
328 myIntTextField->setText(myDefaultValue.c_str());
329 } else {
330 myOptionsEditor->myOptionsContainer.resetWritable();
331 myOptionsEditor->myOptionsContainer.set(myName, myIntTextField->getText().text());
332 myOptionsEditor->myOptionsModified = true;
333 }
334 updateResetButton();
335 return 1;
336}
337
338
339long
341 myIntTextField->setText(myDefaultValue.c_str());
342 updateResetButton();
343 return 1;
344}
345
346
347std::string
349 return myIntTextField->getText().text();
350}
351
352// ---------------------------------------------------------------------------
353// GNEOptionsEditorRow::OptionIntVector - methods
354// ---------------------------------------------------------------------------
355
357 const std::string& topic, const std::string& name, const std::string& description, const std::string& defaultValue) :
358 OptionRow(optionsEditor, parent, topic, name, description, defaultValue) {
361 updateOption();
362}
363
364
365void
367 myIntVectorTextField->setText(toString(myOptionsEditor->myOptionsContainer.getIntVector(myName)).c_str());
368 updateResetButton();
369}
370
371
372void
374 myIntVectorTextField->setText(toString(myOptionsEditor->myOriginalOptionsContainer.getIntVector(myName)).c_str());
375 onCmdSetOption(nullptr, 0, nullptr);
376}
377
378
379long
381 try {
382 // check that int vector can be parsed
383 const auto intVector = StringTokenizer(myIntVectorTextField->getText().text()).getVector();
384 for (const auto& intValue : intVector) {
385 StringUtils::toInt(intValue);
386 }
387 myOptionsEditor->myOptionsContainer.resetWritable();
388 myOptionsEditor->myOptionsContainer.set(myName, myIntVectorTextField->getText().text());
389 myIntVectorTextField->setTextColor(GUIDesignTextColorBlack);
390 myOptionsEditor->myOptionsModified = true;
391 } catch (...) {
392 myIntVectorTextField->setTextColor(GUIDesignTextColorRed);
393 }
394 updateResetButton();
395 return 1;
396}
397
398
399long
401 myIntVectorTextField->setText(myDefaultValue.c_str());
402 updateResetButton();
403 return 1;
404}
405
406
407std::string
409 return myIntVectorTextField->getText().text();
410}
411
412// ---------------------------------------------------------------------------
413// GNEOptionsEditorRow::OptionFloat - methods
414// ---------------------------------------------------------------------------
415
416GNEOptionsEditorRow::OptionFloat::OptionFloat(GNEOptionsEditor* optionsEditor, FXComposite* parent, const std::string& topic,
417 const std::string& name, const std::string& description, const std::string& defaultValue) :
418 OptionRow(optionsEditor, parent, topic, name, description, parseFloat(defaultValue)) {
421 updateOption();
422}
423
424
425void
427 myFloatTextField->setText(toString(myOptionsEditor->myOptionsContainer.getFloat(myName)).c_str());
428 updateResetButton();
429}
430
431
432void
434 myFloatTextField->setText(toString(myOptionsEditor->myOriginalOptionsContainer.getFloat(myName)).c_str());
435 onCmdSetOption(nullptr, 0, nullptr);
436}
437
438
439long
441 // avoid empty values
442 if (myFloatTextField->getText().empty()) {
443 myFloatTextField->setText(myDefaultValue.c_str());
444 } else {
445 myOptionsEditor->myOptionsContainer.resetWritable();
446 myOptionsEditor->myOptionsContainer.set(myName, myFloatTextField->getText().text());
447 myOptionsEditor->myOptionsModified = true;
448 }
449 updateResetButton();
450 return 1;
451}
452
453
454long
456 myFloatTextField->setText(myDefaultValue.c_str());
457 updateResetButton();
458 return 1;
459}
460
461
462std::string
464 return myFloatTextField->getText().text();
465}
466
467
468std::string
469GNEOptionsEditorRow::OptionFloat::parseFloat(const std::string& value) const {
470 try {
471 return toString(StringUtils::toDouble(value));
472 } catch (...) {
473 return value;
474 }
475}
476
477// ---------------------------------------------------------------------------
478// GNEOptionsEditorRow::OptionTime - methods
479// ---------------------------------------------------------------------------
480
481GNEOptionsEditorRow::OptionTime::OptionTime(GNEOptionsEditor* optionsEditor, FXComposite* parent, const std::string& topic,
482 const std::string& name, const std::string& description, const std::string& defaultValue) :
483 OptionRow(optionsEditor, parent, topic, name, description, parseTime(defaultValue)) {
486 updateOption();
487}
488
489
490void
492 myTimeTextField->setText(toString(myOptionsEditor->myOptionsContainer.getString(myName)).c_str());
493 updateResetButton();
494}
495
496
497void
499 myTimeTextField->setText(toString(myOptionsEditor->myOriginalOptionsContainer.getString(myName)).c_str());
500 onCmdSetOption(nullptr, 0, nullptr);
501}
502
503
504long
506 // avoid empty values
507 if (myTimeTextField->getText().empty()) {
508 myTimeTextField->setText(myDefaultValue.c_str());
509 } else {
510 myOptionsEditor->myOptionsContainer.resetWritable();
511 myOptionsEditor->myOptionsContainer.set(myName, myTimeTextField->getText().text());
512 myOptionsEditor->myOptionsModified = true;
513 }
514 updateResetButton();
515 return 1;
516}
517
518
519long
521 myTimeTextField->setText(myDefaultValue.c_str());
522 updateResetButton();
523 return 1;
524}
525
526
527std::string
529 return myTimeTextField->getText().text();
530}
531
532
533std::string
534GNEOptionsEditorRow::OptionTime::parseTime(const std::string& value) const {
535 try {
536 return time2string(string2time(value));
537 } catch (...) {
538 return value;
539 }
540}
541
542// ---------------------------------------------------------------------------
543// GNEOptionsEditorRow::OptionFilename - methods
544// ---------------------------------------------------------------------------
545
546GNEOptionsEditorRow::OptionFilename::OptionFilename(GNEOptionsEditor* optionsEditor, FXComposite* parent, const std::string& topic,
547 const std::string& name, const std::string& description, const std::string& defaultValue) :
548 OptionRow(optionsEditor, parent, topic, name, description, defaultValue) {
552 updateOption();
553}
554
555
556void
558 myFilenameTextField->setText(myOptionsEditor->myOptionsContainer.getString(myName).c_str());
559 updateResetButton();
560}
561
562
563void
565 myFilenameTextField->setText(myOptionsEditor->myOriginalOptionsContainer.getString(myName).c_str());
566 onCmdSetOption(nullptr, 0, nullptr);
567}
568
569
570long
572 // get open mode
573 GNEFileDialog::OpenMode openMode = (myName.find("output") != std::string::npos) ? GNEFileDialog::OpenMode::SAVE : GNEFileDialog::OpenMode::LOAD_SINGLE;
574 // open dialog
575 const auto XMLFileDialog = GNEFileDialog(myOptionsEditor->myDialog->getApplicationWindow(), TL("XML file"),
576 SUMOXMLDefinitions::XMLFileExtensions.getStrings(), openMode,
578 // check that file is valid
579 if (XMLFileDialog.getResult() == GNEDialog::Result::ACCEPT) {
580 myFilenameTextField->setText(XMLFileDialog.getFilename().c_str(), TRUE);
581 }
582 updateResetButton();
583 return 1;
584}
585
586
587long
589 if (SUMOXMLDefinitions::isValidFilename(myFilenameTextField->getText().text())) {
590 myOptionsEditor->myOptionsContainer.resetWritable();
591 myOptionsEditor->myOptionsContainer.set(myName, myFilenameTextField->getText().text());
592 myFilenameTextField->setTextColor(GUIDesignTextColorBlack);
593 myOptionsEditor->myOptionsModified = true;
594 } else {
595 myFilenameTextField->setTextColor(GUIDesignTextColorRed);
596 }
597 updateResetButton();
598 return 1;
599}
600
601
602long
604 myFilenameTextField->setText(myDefaultValue.c_str());
605 updateResetButton();
606 return 1;
607}
608
609
611
612
613std::string
615 return myFilenameTextField->getText().text();
616}
617
618/****************************************************************************/
FXDEFMAP(GNEOptionsEditorRow::OptionRow) OptionRowMap[]
#define MINNAMEWIDTH
#define MARGIN
@ MID_GNE_SET_ATTRIBUTE
attribute edited
Definition GUIAppEnum.h:993
@ MID_GNE_SET_ATTRIBUTE_DIALOG
attribute edited trough dialog
@ MID_GNE_RESET
reset element
#define GUIDesignTextColorRed
red color (for invalid text)
Definition GUIDesigns.h:44
#define GUIDesignButtonIcon
button only with icon
Definition GUIDesigns.h:109
#define GUIDesignTextField
Definition GUIDesigns.h:74
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition GUIDesigns.h:430
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition GUIDesigns.h:92
#define GUIDesignTextColorBlack
black color (for correct text)
Definition GUIDesigns.h:38
#define GUIDesignCheckButton
checkButton placed in left position
Definition GUIDesigns.h:194
#define GUIDesignTextFieldRestricted(type)
text field extended over Frame with thick frame (int)
Definition GUIDesigns.h:77
#define GUIDesignLabelThickedFixed(width)
label thicked, icon before text, text centered and custom width
Definition GUIDesigns.h:254
@ OPEN
open icons
#define TL(string)
Definition MsgHandler.h:304
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
Definition SUMOTime.cpp:46
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
Definition SUMOTime.cpp:91
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
OpenMode
file open mode
OptionsCont & myOptionsContainer
reference to edited Option container
std::string getValue() const
get value
long onCmdSetOption(FXObject *, FXSelector, void *)
called when user set value in textField/button/checkBox
long onCmdResetOption(FXObject *, FXSelector, void *)
called when user press reset button
FXCheckButton * myCheckButton
menu check
OptionBool(GNEOptionsEditor *optionsEditor, FXComposite *parent, const std::string &topic, const std::string &name, const std::string &description, const std::string &defaultValue)
constructor
FXButton * myOpenFilenameButton
open filename button
long onCmdSetOption(FXObject *, FXSelector, void *)
called when user set value in textField/button/checkBox
long onCmdResetOption(FXObject *, FXSelector, void *)
called when user press reset button
std::string getValue() const
get value
long onCmdOpenDialog(FXObject *, FXSelector, void *)
called when user press open dialog button
FXTextField * myFilenameTextField
text field
long onCmdSetOption(FXObject *, FXSelector, void *)
called when user set value in textField/button/checkBox
std::string parseFloat(const std::string &value) const
parse float xx to xx.00
std::string getValue() const
get value
long onCmdResetOption(FXObject *, FXSelector, void *)
called when user press reset button
FXTextField * myFloatTextField
text field
OptionFloat(GNEOptionsEditor *optionsEditor, FXComposite *parent, const std::string &topic, const std::string &name, const std::string &description, const std::string &defaultValue)
constructor
FXTextField * myIntTextField
text field
long onCmdResetOption(FXObject *, FXSelector, void *)
called when user press reset button
OptionInt(GNEOptionsEditor *optionsEditor, FXComposite *parent, const std::string &topic, const std::string &name, const std::string &description, const std::string &defaultValue)
long onCmdSetOption(FXObject *, FXSelector, void *)
called when user set value in textField/button/checkBox
std::string getValue() const
get value
OptionIntVector(GNEOptionsEditor *optionsEditor, FXComposite *parent, const std::string &topic, const std::string &name, const std::string &description, const std::string &defaultValue)
long onCmdSetOption(FXObject *, FXSelector, void *)
called when user set value in textField/button/checkBox
long onCmdResetOption(FXObject *, FXSelector, void *)
called when user press reset button
GNEOptionsEditor * myOptionsEditor
FOX needs this.
MFXLabelTooltip * myNameLabel
tooltip label for name
const std::string getDescriptionLower() const
get description (Lower)
const std::string & getTopic() const
get topic
void updateResetButton()
update reset button
virtual long onCmdSetOption(FXObject *, FXSelector, void *)=0
called when user set value in textField/button/checkBox
const std::string getNameLower() const
get name (Lower)
FXHorizontalFrame * myContentFrame
content frame
void adjustNameSize()
adjust input name size
virtual long onCmdResetOption(FXObject *, FXSelector, void *)=0
called when user press reset button
long onCmdSetOption(FXObject *, FXSelector, void *)
called when user set value in textField/button/checkBox
long onCmdResetOption(FXObject *, FXSelector, void *)
called when user press reset button
std::string getValue() const
get value
OptionString(GNEOptionsEditor *optionsEditor, FXComposite *parent, const std::string &topic, const std::string &name, const std::string &description, const std::string &defaultValue)
constructor
FXTextField * myStringTextField
text field
long onCmdResetOption(FXObject *, FXSelector, void *)
called when user press reset button
OptionStringVector(GNEOptionsEditor *optionsEditor, FXComposite *parent, const std::string &topic, const std::string &name, const std::string &description, const std::string &defaultValue)
constructor
long onCmdSetOption(FXObject *, FXSelector, void *)
called when user set value in textField/button/checkBox
FXTextField * myTimeTextField
text field
long onCmdSetOption(FXObject *, FXSelector, void *)
called when user set value in textField/button/checkBox
std::string getValue() const
get value
std::string parseTime(const std::string &value) const
parse float xx to xx.00
long onCmdResetOption(FXObject *, FXSelector, void *)
called when user press reset button
OptionTime(GNEOptionsEditor *optionsEditor, FXComposite *parent, const std::string &topic, const std::string &name, const std::string &description, const std::string &defaultValue)
constructor
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static void enableDebugGLMessages(bool enable)
enable/disable gl-debug messages
static void enableDebugMessages(bool enable)
enable/disable debug messages
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
const IntVector & getIntVector(const std::string &name) const
Returns the list of integer-value of the named option (only for Option_IntVector)
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
static StringBijection< XMLFileExtension > XMLFileExtensions
XML file Extensions.
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name)
std::vector< std::string > getVector()
return vector of strings
static std::string to_lower_case(const std::string &str)
Transfers the content to lower case.
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
static bool toBool(const std::string &sData)
converts a string into the bool value described by it by calling the char-type converter
Definition json.hpp:4471