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, const bool editable) :
66 FXHorizontalFrame(parent, GUIDesignAuxiliarHorizontalFrame),
67 myOptionsEditor(optionsEditor),
68 myTopic(topic),
69 myName(name),
70 myDescription(description),
71 myDefaultValue(defaultValue),
72 myEditable(editable) {
73 // build label with name (default width 150)
74 myNameLabel = new MFXLabelTooltip(this, myOptionsEditor->myDialog->getApplicationWindow()->getStaticTooltipMenu(),
75 name.c_str(), nullptr, GUIDesignLabelThickedFixed(MINNAMEWIDTH));
76 // set description as tooltip
77 myNameLabel->setTipText(description.c_str());
78 // create content frame
79 myContentFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
80 // Create reset button
81 myResetButton = GUIDesigns::buildFXButton(this, "", "", TL("Reset value"), GUIIconSubSys::getIcon(GUIIcon::RESET), this, MID_GNE_RESET, GUIDesignButtonIcon);
82}
83
84
85void
87 const int nameWidth = myNameLabel->getFont()->getTextWidth(myNameLabel->getText().text(), myNameLabel->getText().length() + MARGIN);
88 if (nameWidth > MINNAMEWIDTH) {
89 myNameLabel->setWidth(nameWidth);
90 }
91}
92
93
94const std::string&
96 return myTopic;
97}
98
99
100const std::string
104
105
106const std::string
110
111
112void
114 if (getValue() != myDefaultValue) {
115 myResetButton->enable();
116 } else {
117 myResetButton->disable();
118 }
119}
120
121// ---------------------------------------------------------------------------
122// GNEOptionsEditorRow::OptionString - methods
123// ---------------------------------------------------------------------------
124
126 const std::string& topic, const std::string& name, const std::string& description,
127 const std::string& defaultValue, const bool editable) :
128 OptionRow(optionsEditor, parent, topic, name, description, defaultValue, editable) {
131 if (!editable) {
132 myStringTextField->disable();
133 }
134 updateOption();
135}
136
137
138void
140 myStringTextField->setText(myOptionsEditor->myOptionsContainer.getString(myName).c_str());
141 updateResetButton();
142}
143
144
145void
147 myStringTextField->setText(myOptionsEditor->myOriginalOptionsContainer.getString(myName).c_str());
148 onCmdSetOption(nullptr, 0, nullptr);
149}
150
151
152long
154 myOptionsEditor->myOptionsContainer.resetWritable();
155 myOptionsEditor->myOptionsContainer.set(myName, myStringTextField->getText().text());
156 myOptionsEditor->myOptionsModified = true;
157 updateResetButton();
158 return 1;
159}
160
161
162long
164 myStringTextField->setText(myDefaultValue.c_str());
165 updateResetButton();
166 return 1;
167}
168
169
170std::string
172 return myStringTextField->getText().text();
173}
174
175
177 const std::string& topic, const std::string& name, const std::string& description,
178 const std::string& defaultValue, const bool editable) :
179 OptionRow(optionsEditor, parent, topic, name, description, defaultValue, editable) {
181 if (!editable) {
182 myStringVectorTextField->disable();
183 }
184 updateOption();
185}
186
187
188void
190 myStringVectorTextField->setText(toString(myOptionsEditor->myOptionsContainer.getStringVector(myName)).c_str());
191 updateResetButton();
192}
193
194
195void
197 myStringVectorTextField->setText(toString(myOptionsEditor->myOriginalOptionsContainer.getStringVector(myName)).c_str());
198 onCmdSetOption(nullptr, 0, nullptr);
199}
200
201
202long
204 myOptionsEditor->myOptionsContainer.resetWritable();
205 myOptionsEditor->myOptionsContainer.set(myName, myStringVectorTextField->getText().text());
206 myOptionsEditor->myOptionsModified = true;
207 updateResetButton();
208 return 1;
209}
210
211
212long
214 myStringVectorTextField->setText(myDefaultValue.c_str());
215 updateResetButton();
216 return 1;
217}
218
219
220std::string
222 return myStringVectorTextField->getText().text();
223}
224
225// ---------------------------------------------------------------------------
226// GNEOptionsEditorRow::OptionBool - methods
227// ---------------------------------------------------------------------------
228
230 const std::string& topic, const std::string& name, const std::string& description,
231 const std::string& defaultValue, const bool editable) :
232 OptionRow(optionsEditor, parent, topic, name, description, defaultValue, editable) {
234 if (!editable) {
235 myCheckButton->disable();
236 }
237 updateOption();
238}
239
240
241void
243 if (myOptionsEditor->myOptionsContainer.getBool(myName)) {
244 myCheckButton->setCheck(TRUE);
245 myCheckButton->setText(TL("true"));
246 } else {
247 myCheckButton->setCheck(FALSE);
248 myCheckButton->setText(TL("false"));
249 }
250 updateResetButton();
251}
252
253
254void
256 if (myOptionsEditor->myOriginalOptionsContainer.getBool(myName)) {
257 myCheckButton->setCheck(TRUE);
258 myCheckButton->setText(TL("true"));
259 } else {
260 myCheckButton->setCheck(FALSE);
261 myCheckButton->setText(TL("false"));
262 }
263 onCmdSetOption(nullptr, 0, nullptr);
264}
265
266
267long
269 myOptionsEditor->myOptionsContainer.resetWritable();
270 if (myCheckButton->getCheck()) {
271 myOptionsEditor->myOptionsContainer.set(myName, "true");
272 myCheckButton->setText(TL("true"));
273 } else {
274 myOptionsEditor->myOptionsContainer.set(myName, "false");
275 myCheckButton->setText(TL("false"));
276 }
277 myOptionsEditor->myOptionsModified = true;
278 // special checks for Debug flags
279 if ((myName == "gui-testing-debug") && myOptionsEditor->myOptionsContainer.isSet("gui-testing-debug")) {
280 MsgHandler::enableDebugMessages(myOptionsEditor->myOptionsContainer.getBool("gui-testing-debug"));
281 }
282 if ((myName == "gui-testing-debug-gl") && myOptionsEditor->myOptionsContainer.isSet("gui-testing-debug-gl")) {
283 MsgHandler::enableDebugGLMessages(myOptionsEditor->myOptionsContainer.getBool("gui-testing-debug-gl"));
284 }
285 updateResetButton();
286 return 1;
287}
288
289
290long
292 if (myDefaultValue.empty()) {
293 myCheckButton->setCheck(FALSE);
294 myCheckButton->setText(TL("false"));
295 } else if (StringUtils::toBool(myDefaultValue)) {
296 myCheckButton->setCheck(TRUE);
297 myCheckButton->setText(TL("true"));
298 } else {
299 myCheckButton->setCheck(FALSE);
300 myCheckButton->setText(TL("false"));
301 }
302 updateResetButton();
303 return 1;
304}
305
306
307std::string
309 return myCheckButton->getCheck() ? "true" : "false";
310}
311
312// ---------------------------------------------------------------------------
313// GNEOptionsEditorRow::OptionInt - methods
314// ---------------------------------------------------------------------------
315
317 const std::string& topic, const std::string& name, const std::string& description,
318 const std::string& defaultValue, const bool editable) :
319 OptionRow(optionsEditor, parent, topic, name, description, defaultValue, editable) {
321 if (!editable) {
322 myIntTextField->disable();
323 }
324 updateOption();
325}
326
327
328void
330 myIntTextField->setText(toString(myOptionsEditor->myOptionsContainer.getInt(myName)).c_str());
331 updateResetButton();
332}
333
334
335void
337 myIntTextField->setText(toString(myOptionsEditor->myOriginalOptionsContainer.getInt(myName)).c_str());
338 onCmdSetOption(nullptr, 0, nullptr);
339}
340
341
342long
344 if (myIntTextField->getText().empty()) {
345 myIntTextField->setText(myDefaultValue.c_str());
346 } else {
347 myOptionsEditor->myOptionsContainer.resetWritable();
348 myOptionsEditor->myOptionsContainer.set(myName, myIntTextField->getText().text());
349 myOptionsEditor->myOptionsModified = true;
350 }
351 updateResetButton();
352 return 1;
353}
354
355
356long
358 myIntTextField->setText(myDefaultValue.c_str());
359 updateResetButton();
360 return 1;
361}
362
363
364std::string
366 return myIntTextField->getText().text();
367}
368
369// ---------------------------------------------------------------------------
370// GNEOptionsEditorRow::OptionIntVector - methods
371// ---------------------------------------------------------------------------
372
374 const std::string& topic, const std::string& name, const std::string& description,
375 const std::string& defaultValue, const bool editable) :
376 OptionRow(optionsEditor, parent, topic, name, description, defaultValue, editable) {
379 if (!editable) {
380 myIntVectorTextField->disable();
381 }
382 updateOption();
383}
384
385
386void
388 myIntVectorTextField->setText(toString(myOptionsEditor->myOptionsContainer.getIntVector(myName)).c_str());
389 updateResetButton();
390}
391
392
393void
395 myIntVectorTextField->setText(toString(myOptionsEditor->myOriginalOptionsContainer.getIntVector(myName)).c_str());
396 onCmdSetOption(nullptr, 0, nullptr);
397}
398
399
400long
402 try {
403 // check that int vector can be parsed
404 const auto intVector = StringTokenizer(myIntVectorTextField->getText().text()).getVector();
405 for (const auto& intValue : intVector) {
406 StringUtils::toInt(intValue);
407 }
408 myOptionsEditor->myOptionsContainer.resetWritable();
409 myOptionsEditor->myOptionsContainer.set(myName, myIntVectorTextField->getText().text());
410 myIntVectorTextField->setTextColor(GUIDesignTextColorBlack);
411 myOptionsEditor->myOptionsModified = true;
412 } catch (...) {
413 myIntVectorTextField->setTextColor(GUIDesignTextColorRed);
414 }
415 updateResetButton();
416 return 1;
417}
418
419
420long
422 myIntVectorTextField->setText(myDefaultValue.c_str());
423 updateResetButton();
424 return 1;
425}
426
427
428std::string
430 return myIntVectorTextField->getText().text();
431}
432
433// ---------------------------------------------------------------------------
434// GNEOptionsEditorRow::OptionFloat - methods
435// ---------------------------------------------------------------------------
436
438 const std::string& topic, const std::string& name, const std::string& description,
439 const std::string& defaultValue, const bool editable) :
440 OptionRow(optionsEditor, parent, topic, name, description, parseFloat(defaultValue), editable) {
443 if (!editable) {
444 myFloatTextField->disable();
445 }
446 updateOption();
447}
448
449
450void
452 myFloatTextField->setText(toString(myOptionsEditor->myOptionsContainer.getFloat(myName)).c_str());
453 updateResetButton();
454}
455
456
457void
459 myFloatTextField->setText(toString(myOptionsEditor->myOriginalOptionsContainer.getFloat(myName)).c_str());
460 onCmdSetOption(nullptr, 0, nullptr);
461}
462
463
464long
466 // avoid empty values
467 if (myFloatTextField->getText().empty()) {
468 myFloatTextField->setText(myDefaultValue.c_str());
469 } else {
470 myOptionsEditor->myOptionsContainer.resetWritable();
471 myOptionsEditor->myOptionsContainer.set(myName, myFloatTextField->getText().text());
472 myOptionsEditor->myOptionsModified = true;
473 }
474 updateResetButton();
475 return 1;
476}
477
478
479long
481 myFloatTextField->setText(myDefaultValue.c_str());
482 updateResetButton();
483 return 1;
484}
485
486
487std::string
489 return myFloatTextField->getText().text();
490}
491
492
493std::string
494GNEOptionsEditorRow::OptionFloat::parseFloat(const std::string& value) const {
495 try {
496 return toString(StringUtils::toDouble(value));
497 } catch (...) {
498 return value;
499 }
500}
501
502// ---------------------------------------------------------------------------
503// GNEOptionsEditorRow::OptionTime - methods
504// ---------------------------------------------------------------------------
505
507 const std::string& topic, const std::string& name, const std::string& description,
508 const std::string& defaultValue, const bool editable) :
509 OptionRow(optionsEditor, parent, topic, name, description, parseTime(defaultValue), editable) {
512 if (!editable) {
513 myTimeTextField->disable();
514 }
515 updateOption();
516}
517
518
519void
521 myTimeTextField->setText(toString(myOptionsEditor->myOptionsContainer.getString(myName)).c_str());
522 updateResetButton();
523}
524
525
526void
528 myTimeTextField->setText(toString(myOptionsEditor->myOriginalOptionsContainer.getString(myName)).c_str());
529 onCmdSetOption(nullptr, 0, nullptr);
530}
531
532
533long
535 // avoid empty values
536 if (myTimeTextField->getText().empty()) {
537 myTimeTextField->setText(myDefaultValue.c_str());
538 } else {
539 myOptionsEditor->myOptionsContainer.resetWritable();
540 myOptionsEditor->myOptionsContainer.set(myName, myTimeTextField->getText().text());
541 myOptionsEditor->myOptionsModified = true;
542 }
543 updateResetButton();
544 return 1;
545}
546
547
548long
550 myTimeTextField->setText(myDefaultValue.c_str());
551 updateResetButton();
552 return 1;
553}
554
555
556std::string
558 return myTimeTextField->getText().text();
559}
560
561
562std::string
563GNEOptionsEditorRow::OptionTime::parseTime(const std::string& value) const {
564 try {
565 return time2string(string2time(value));
566 } catch (...) {
567 return value;
568 }
569}
570
571// ---------------------------------------------------------------------------
572// GNEOptionsEditorRow::OptionFilename - methods
573// ---------------------------------------------------------------------------
574
575GNEOptionsEditorRow::OptionFilename::OptionFilename(GNEOptionsEditor* optionsEditor, FXComposite* parent, const std::string& topic,
576 const std::string& name, const std::string& description, const std::string& defaultValue, const bool editable) :
577 OptionRow(optionsEditor, parent, topic, name, description, defaultValue, editable) {
581 if (!editable) {
582 myOpenFilenameButton->disable();
583 myFilenameTextField->disable();
584 }
585 updateOption();
586}
587
588
589void
591 myFilenameTextField->setText(myOptionsEditor->myOptionsContainer.getString(myName).c_str());
592 updateResetButton();
593}
594
595
596void
598 myFilenameTextField->setText(myOptionsEditor->myOriginalOptionsContainer.getString(myName).c_str());
599 onCmdSetOption(nullptr, 0, nullptr);
600}
601
602
603long
605 // get open mode
606 GNEFileDialog::OpenMode openMode = (myName.find("output") != std::string::npos) ? GNEFileDialog::OpenMode::SAVE : GNEFileDialog::OpenMode::LOAD_SINGLE;
607 // open dialog
608 const GNEFileDialog XMLFileDialog(myOptionsEditor->myDialog->getApplicationWindow(), myOptionsEditor->myDialog,
609 TL("XML file"),
610 SUMOXMLDefinitions::XMLFileExtensions.getStrings(), openMode,
612 // check that file is valid
613 if (XMLFileDialog.getResult() == GNEDialog::Result::ACCEPT) {
614 myFilenameTextField->setText(XMLFileDialog.getFilename().c_str(), TRUE);
615 }
616 updateResetButton();
617 return 1;
618}
619
620
621long
623 if (SUMOXMLDefinitions::isValidFilename(myFilenameTextField->getText().text())) {
624 myOptionsEditor->myOptionsContainer.resetWritable();
625 myOptionsEditor->myOptionsContainer.set(myName, myFilenameTextField->getText().text());
626 myFilenameTextField->setTextColor(GUIDesignTextColorBlack);
627 myOptionsEditor->myOptionsModified = true;
628 } else {
629 myFilenameTextField->setTextColor(GUIDesignTextColorRed);
630 }
631 updateResetButton();
632 return 1;
633}
634
635
636long
638 myFilenameTextField->setText(myDefaultValue.c_str());
639 updateResetButton();
640 return 1;
641}
642
643
645
646
647std::string
649 return myFilenameTextField->getText().text();
650}
651
652/****************************************************************************/
FXDEFMAP(GNEOptionsEditorRow::OptionRow) OptionRowMap[]
#define MINNAMEWIDTH
#define MARGIN
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ 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
Result getResult() const
get result to indicate if this dialog was closed accepting or rejecting changes
OpenMode
file open mode
std::string getFilename() const
Return file name, if any.
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
OptionBool(GNEOptionsEditor *optionsEditor, FXComposite *parent, const std::string &topic, const std::string &name, const std::string &description, const std::string &defaultValue, const bool editable)
constructor
long onCmdResetOption(FXObject *, FXSelector, void *)
called when user press reset button
FXCheckButton * myCheckButton
menu check
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
OptionFloat(GNEOptionsEditor *optionsEditor, FXComposite *parent, const std::string &topic, const std::string &name, const std::string &description, const std::string &defaultValue, const bool editable)
constructor
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
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, const bool editable)
long onCmdSetOption(FXObject *, FXSelector, void *)
called when user set value in textField/button/checkBox
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
OptionIntVector(GNEOptionsEditor *optionsEditor, FXComposite *parent, const std::string &topic, const std::string &name, const std::string &description, const std::string &defaultValue, const bool editable)
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
OptionString(GNEOptionsEditor *optionsEditor, FXComposite *parent, const std::string &topic, const std::string &name, const std::string &description, const std::string &defaultValue, const bool editable)
constructor
long onCmdResetOption(FXObject *, FXSelector, void *)
called when user press reset button
std::string getValue() const
get value
FXTextField * myStringTextField
text field
long onCmdResetOption(FXObject *, FXSelector, void *)
called when user press reset button
long onCmdSetOption(FXObject *, FXSelector, void *)
called when user set value in textField/button/checkBox
OptionStringVector(GNEOptionsEditor *optionsEditor, FXComposite *parent, const std::string &topic, const std::string &name, const std::string &description, const std::string &defaultValue, const bool editable)
constructor
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
OptionTime(GNEOptionsEditor *optionsEditor, FXComposite *parent, const std::string &topic, const std::string &name, const std::string &description, const std::string &defaultValue, const bool editable)
constructor
long onCmdResetOption(FXObject *, FXSelector, void *)
called when user press reset button
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