Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/utils/options/Option.h
193674 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2001-2026 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
/****************************************************************************/
14
/// @file Option.h
15
/// @author Daniel Krajzewicz
16
/// @author Michael Behrisch
17
/// @author Jakob Erdmann
18
/// @date Mon, 17 Dec 2001
19
///
20
// Classes representing a single program option (with different types)
21
/****************************************************************************/
22
#pragma once
23
#include <config.h>
24
25
#include <string>
26
#include <vector>
27
#include <exception>
28
#include <utils/common/UtilExceptions.h>
29
30
// ===========================================================================
31
// class definitions
32
// ===========================================================================
33
34
/**@typedef IntVector
35
* @brief Definition of a vector of ints
36
*/
37
typedef std::vector<int> IntVector;
38
39
/**@typedef StringVector
40
* @brief Definition of a vector of strings
41
*/
42
typedef std::vector<std::string> StringVector;
43
44
#define CLONEABLE(Type) virtual Type* clone() const { return new Type(*this); }
45
46
/* -------------------------------------------------------------------------
47
* Option
48
* ----------------------------------------------------------------------- */
49
/**
50
* @class Option
51
* @brief A class representing a single program option
52
*
53
* The base class for a single program option. All options which hold values
54
* are derived from this class as the type of stored values may differ.
55
*
56
* Most of the getter-methods throw exceptions because this base class is not meant
57
* to hold any values by itself. Instead, the derived classes implement the
58
* appropriate method (Option_Integer implements getInt, f.e.). So, when one
59
* tries to retrieve a value which is not of the type of the option, an
60
* exception will be thrown. This behaviour is meant to be valid, because
61
* errors like this one only occur when building and testing the application.
62
*
63
* Due to described behaviour, this class has no public constructors. Only
64
* construction of derived, value and type holding, classes is allowed.
65
*
66
* At the begin (after being constructed) an Option either has a default value or not.
67
* In dependence to this, myHaveTheDefaultValue is set. Also, myAmSet is set to
68
* true if a default value was supported. myAmWritable is set to true,
69
* indicating that a new value may be set.
70
*
71
* Each option may have a description about its purpose stored. Furthermore, it
72
* stores a man-readable type name for this option.
73
*/
74
class Option {
75
76
public:
77
/// @brief destructor
78
virtual ~Option();
79
80
/** @brief returns the information whether this options holds a valid value
81
* @return Whether a value has been set
82
*/
83
bool isSet() const;
84
85
/** @brief Returns the stored double value
86
*
87
* Option_Float returns the stored real number in this method's reimplementation.
88
* All other option classes do not override this method which throws an InvalidArgument-exception.
89
*
90
* @return Returns the stored real number if being an instance of Option_Float
91
* @exception InvalidArgument If the class is not an instance of Option_Float
92
*/
93
virtual double getFloat() const;
94
95
/** @brief Returns the stored integer value
96
*
97
* Option_Integer returns the stored integer number in this method's reimplementation.
98
* All other option classesdo not override this method which throws an InvalidArgument-exception.
99
*
100
* @return Returns the stored integer number if being an instance of Option_Integer
101
* @exception InvalidArgument If the class is not an instance of Option_Integer
102
*/
103
virtual int getInt() const;
104
105
/** @brief Returns the stored string value
106
*
107
* Option_String returns the stored string in this method's reimplementation.
108
* Option_FileName's reimplementation is only to be used for single filename string-vector options.
109
* All other option classes do not override this method which throws an InvalidArgument-exception.
110
*
111
* @return Returns the stored string if being an instance of Option_String or Option_FileName
112
* @exception InvalidArgument If the class is not an instance of Option_String or Option_FileName
113
*/
114
virtual std::string getString() const;
115
116
/** @brief Returns the stored boolean value
117
*
118
* Option_Bool returns the stored boolean in this method's reimplementation.
119
* All other option classes do not override this method which throws an InvalidArgument-exception.
120
*
121
* @return Returns the stored boolean if being an instance of Option_Bool
122
* @exception InvalidArgument If the class is not an instance of Option_Bool
123
*/
124
virtual bool getBool() const;
125
126
/** @brief Returns the stored integer vector
127
*
128
* Option_IntVector returns the stored integer vector in this method's reimplementation.
129
* All other option classes do not override this method which throws an InvalidArgument-exception.
130
*
131
* @return Returns the stored integer vector if being an instance of Option_IntVector
132
* @exception InvalidArgument If the class is not an instance of Option_IntVector
133
*/
134
virtual const IntVector& getIntVector() const;
135
136
/** @brief Returns the stored string vector
137
*
138
* Option_StringVector returns the stored string vector in this method's reimplementation.
139
* All other option classes do not override this method which throws an InvalidArgument-exception.
140
*
141
* @return Returns the stored string vector if being an instance of Option_StringVector
142
* @exception InvalidArgument If the class is not an instance of Option_StringVector
143
*/
144
virtual const StringVector& getStringVector() const;
145
146
/** @brief Stores the given value
147
*
148
* This method is overriden by all option classes.
149
* The value is converted into the proper type and stored in "myValue".
150
* Then, "markSet" is called in order to know that a value has been set.
151
*
152
* The method returns whether the value could be set (the return value from
153
* "markSet").
154
*
155
* If the string could not be converted into the type, an InvalidArgument
156
* is thrown.
157
*
158
* @return Whether the new value could be set
159
* @exception InvalidArgument If the value could not be converted
160
*/
161
virtual bool set(const std::string& v, const std::string& orig, const bool append) = 0;
162
163
/** @brief Returns the string-representation of the value
164
*
165
* The stored value is encoded into a string and returned.
166
*
167
* @return The stored value encoded into a string-
168
*/
169
const std::string& getValueString() const;
170
171
/** @brief Returns the information whether the option holds the default value
172
*
173
* @return true if the option was not set from command line / configuration, false otherwise
174
*/
175
virtual bool isDefault() const;
176
177
/** @brief Returns the information whether the option is a int option
178
*
179
* Returns false. Only Option_Integer overrides this method returning true.
180
*
181
* @return true if the Option is an Option_Integer, false otherwise
182
*/
183
virtual bool isInteger() const;
184
185
/** @brief Returns the information whether the option is a float option
186
*
187
* Returns false. Only Option_Float overrides this method returning true.
188
*
189
* @return true if the Option is an Option_Float, false otherwise
190
*/
191
virtual bool isFloat() const;
192
193
/** @brief Returns the information whether the option is a bool option
194
*
195
* Returns false. Only Option_Bool overrides this method returning true.
196
*
197
* @return true if the Option is an Option_Bool, false otherwise
198
*/
199
virtual bool isBool() const;
200
201
/** @brief Returns the information whether this option is a file name
202
*
203
* Returns false. Only Option_FileName overrides this method returning true.
204
*
205
* @return true if the Option is an Option_FileName, false otherwise
206
*/
207
virtual bool isFileName() const;
208
209
/** @brief Returns the information whether this option is a network file
210
*
211
* Returns false. Only Option_Network overrides this method returning true.
212
*
213
* @return true if the Option is an Option_Network, false otherwise
214
*/
215
virtual bool isNetwork() const;
216
217
/** @brief Returns the information whether this option is an additional file
218
*
219
* Returns false. Only Option_Additional overrides this method returning true.
220
*
221
* @return true if the Option is an Option_Additional, false otherwise
222
*/
223
virtual bool isAdditional() const;
224
225
/** @brief Returns the information whether this option is a route file
226
*
227
* Returns false. Only Option_Route overrides this method returning true.
228
*
229
* @return true if the Option is an Option_Route, false otherwise
230
*/
231
virtual bool isRoute() const;
232
233
/** @brief Returns the information whether this option is a data file
234
*
235
* Returns false. Only Option_Data overrides this method returning true.
236
*
237
* @return true if the Option is an Option_Data, false otherwise
238
*/
239
virtual bool isData() const;
240
241
/** @brief Returns the information whether this option is a sumo config file
242
*
243
* Returns false. Only Option_SumoConfig overrides this method returning true.
244
*
245
* @return true if the Option is an Option_SumoConfig, false otherwise
246
*/
247
virtual bool isSumoConfig() const;
248
249
/** @brief Returns the information whether this option is an edge
250
*
251
* Returns false. Only Option_Edge overrides this method returning true.
252
*
253
* @return true if the Option is an Option_Edge, false otherwise
254
*/
255
virtual bool isEdge() const;
256
257
/** @brief Returns the information whether this option is a vector of edges
258
*
259
* Returns false. Only Option_EdgeVector overrides this method returning true.
260
*
261
* @return true if the Option is an Option_EdgeVector, false otherwise
262
*/
263
virtual bool isEdgeVector() const;
264
265
/** @brief Returns the information whether the option may be set a further time
266
*
267
* This method returns whether the option was not already set using command line
268
* options / configuration. This is done by returning the value of myAmWritable.
269
*
270
* @return Whether the option may be set from the command line / configuration
271
*/
272
bool isWriteable() const;
273
274
/** @brief Resets the option to be writeable
275
*
276
* An option is writable after initialisation, but as soon as it gets set,
277
* it is no longer writeable. This method resets the writable-flag.
278
*/
279
void resetWritable();
280
281
/** @brief Resets the option to be on its default value
282
*
283
* An option is on its default after initialisation with a value, but as soon as it gets set,
284
* it is no longer. This method resets the default-flag.
285
*/
286
void resetDefault();
287
288
/** @brief Returns the description of what this option does
289
*
290
* The description stored in myDescription is returned.
291
*
292
* @return The description of this option's purpose
293
*/
294
const std::string& getDescription() const;
295
296
/** @brief Sets the description of what this option does
297
*
298
* The description stored in myDescription is returned.
299
*
300
* @return The description of this option's purpose
301
*/
302
void setDescription(const std::string& desc);
303
304
/// @brief check if option is required
305
bool isRequired() const;
306
307
/// @brief mark option as required
308
void setRequired();
309
310
/// @brief check if option is positional
311
bool isPositional() const;
312
313
/// @brief mark option as positional
314
void setPositional();
315
316
/// @brief check if this option is editable
317
bool isEditable() const;
318
319
/// @brief set editable
320
void setEditable(const bool value);
321
322
/// @brief retrieve list separator
323
const std::string& getListSeparator() const;
324
325
/// @brief set list separator
326
void setListSeparator(const std::string& listSep);
327
328
/// @brief Returns the subtopic to which this option belongs
329
const std::string& getSubTopic() const;
330
331
/// @brief Sets the subtopic to which this option belongs
332
void setSubtopic(const std::string& subtopic);
333
334
/** @brief Returns the mml-type name of this option
335
*
336
* The type name stored in myTypeName is returned.
337
*
338
* @return The man-readable type name
339
*/
340
virtual const std::string& getTypeName() const;
341
342
/** @brief Returns a copy of this option
343
*
344
* @return The option copy
345
*/
346
virtual Option* clone() const = 0;
347
348
protected:
349
/** @brief Marks the information as set
350
*
351
* Sets the "myAmSet" - information. Returns whether the option was writeable before.
352
*
353
* @return Whether the option was not set before.
354
*/
355
bool markSet(const std::string& orig);
356
357
/** @brief Constructor
358
*
359
* This constructor should be used by derived classes.
360
* The boolean value indicates whether a default value was supplied or not.
361
*
362
* @param[in] set A default value was supplied
363
*/
364
Option(bool set = false);
365
366
/// @brief A type name for this option (has presets, but may be overwritten)
367
std::string myTypeName;
368
369
/// @brief The original set string
370
std::string myValueString;
371
372
private:
373
/// @brief information whether the value is set
374
bool myAmSet;
375
376
/// @brief information whether the value is the default value (is then set)
377
bool myHaveTheDefaultValue = true;
378
379
/// @brief information whether the value may be changed
380
bool myAmWritable = true;
381
382
/// @brief The description what this option does
383
std::string myDescription;
384
385
/// @brief this option is required (needed for python tools)
386
bool myRequired = false;
387
388
/// @brief this option is positional (needed for python tools)
389
bool myPositional = false;
390
391
/// @brief this option can be edited using option dialog
392
bool myEditable = true;
393
394
/// @brief the list separator for this option (needed for python tools)
395
std::string myListSeparator = "";
396
397
/// @brief The subtopic to which this option belongs
398
std::string mySubTopic;
399
};
400
401
// -------------------------------------------------------------------------
402
// Option_Integer
403
// -------------------------------------------------------------------------
404
405
class Option_Integer : public Option {
406
407
public:
408
/** @brief Constructor for an option with a default value
409
*
410
* Calls Option(true)
411
*
412
* @param[in] value This option's default value
413
*/
414
Option_Integer(int value);
415
416
/** @brief Returns the stored integer value
417
* @see Option::getInt()
418
* @return Returns the stored integer number
419
*/
420
int getInt() const;
421
422
/** @brief Stores the given value after parsing it into an integer
423
*
424
* The value is converted into an integer and stored in "myValue".
425
* Then, "markSet" is called in order to know that a value has been set.
426
*
427
* The method returns whether the value could be set (the return value from
428
* "markSet").
429
*
430
* If the string could not be converted into an integer, an InvalidArgument
431
* is thrown.
432
*
433
* @see bool Option::set(std::string v)
434
* @return Whether the new value could be set
435
* @exception InvalidArgument If the value could not be converted into an integer
436
*/
437
bool set(const std::string& v, const std::string& orig, const bool append);
438
439
/** @brief Returns the information whether the option is a int option
440
*
441
* Returns false. Only Option_Integer overrides this method returning true.
442
*
443
* @return true if the Option is an Option_Integer, false otherwise
444
*/
445
bool isInteger() const;
446
447
CLONEABLE(Option_Integer)
448
449
private:
450
/// @brief the value, valid only when the base-classes "myAmSet"-member is true
451
int myValue;
452
};
453
454
// -------------------------------------------------------------------------
455
// Option_String
456
// -------------------------------------------------------------------------
457
458
class Option_String : public Option {
459
460
public:
461
/** @brief Constructor for an option with no default value
462
*
463
* Calls Option(false)
464
*/
465
Option_String();
466
467
/** @brief Constructor for an option with a default value
468
*
469
* Calls Option(true)
470
*
471
* @param[in] value This option's default value
472
*/
473
Option_String(const std::string& value, std::string typeName = "STR");
474
475
/** @brief Returns the stored string value
476
* @see std::string Option::getString()
477
* @return Returns the stored string
478
*/
479
std::string getString() const;
480
481
/** @brief Stores the given value
482
*
483
* The value is stored in "myValue".
484
* Then, "markSet" is called in order to know that a value has been set.
485
*
486
* The method returns whether the value could be set (the return value from
487
* "markSet").
488
*
489
* @see bool Option::set(std::string v)
490
* @return Whether the new value could be set
491
*/
492
bool set(const std::string& v, const std::string& orig, const bool append);
493
494
CLONEABLE(Option_String)
495
496
protected:
497
/// @brief the value, valid only when the base-classes "myAmSet"-member is true
498
std::string myValue;
499
};
500
501
// -------------------------------------------------------------------------
502
// Option_Float
503
// -------------------------------------------------------------------------
504
505
class Option_Float : public Option {
506
507
public:
508
/** @brief Constructor for an option with a default value
509
*
510
* Calls Option(true)
511
*
512
* @param[in] value This option's default value
513
*/
514
Option_Float(double value);
515
516
/** @brief Returns the stored double value
517
* @see double Option::getFloat()
518
* @return Returns the stored real number
519
*/
520
double getFloat() const;
521
522
/** @brief Stores the given value after parsing it into a double
523
*
524
* The value is converted into a double and stored in "myValue".
525
* Then, "markSet" is called in order to know that a value has been set.
526
*
527
* The method returns whether the value could be set (the return value from
528
* "markSet").
529
*
530
* If the string could not be converted into a double, an InvalidArgument
531
* is thrown.
532
*
533
* @see bool Option::set(std::string v)
534
* @return Whether the new value could be set
535
* @exception InvalidArgument If the value could not be converted into a double
536
*/
537
bool set(const std::string& v, const std::string& orig, const bool append);
538
539
/** @brief Returns the information whether the option is a float option
540
*
541
* Returns false. Only Option_Float overrides this method returning true.
542
*
543
* @return true if the Option is an Option_Float, false otherwise
544
*/
545
bool isFloat() const;
546
547
CLONEABLE(Option_Float)
548
549
private:
550
/// @brief the value, valid only when the base-classes "myAmSet"-member is true
551
double myValue;
552
};
553
554
// -------------------------------------------------------------------------
555
// Option_Bool
556
// -------------------------------------------------------------------------
557
558
class Option_Bool : public Option {
559
560
public:
561
/** @brief Constructor for an option with a default value
562
*
563
* Calls Option(true)
564
*
565
* @param[in] value This option's default value
566
*/
567
Option_Bool(bool value);
568
569
/** @brief Returns the stored boolean value
570
* @see bool Option::getBool()
571
* @return Returns the stored boolean
572
*/
573
bool getBool() const;
574
575
/// @brief sets the given value (converts it to bool)
576
bool set(const std::string& v, const std::string& orig, const bool append);
577
578
/** @brief Returns true, the information whether the option is a bool option
579
*
580
* Returns true.
581
*
582
* @see bool Option::isBool()
583
* @return true
584
*/
585
bool isBool() const;
586
587
CLONEABLE(Option_Bool)
588
589
protected:
590
/// @brief the value, valid only when the base-classes "myAmSet"-member is true
591
bool myValue;
592
};
593
594
// -------------------------------------------------------------------------
595
// Option_BoolExtended
596
// -------------------------------------------------------------------------
597
598
class Option_BoolExtended : public Option_Bool {
599
600
public:
601
/** @brief Constructor for an option that can be used without an argument
602
* like Option_BoolExtended but which also handles value strings
603
*
604
* Calls Option(true)
605
*
606
* @param[in] value This option's default value
607
*/
608
Option_BoolExtended(bool value);
609
610
/// @brief sets the given value (converts it to bool)
611
bool set(const std::string& v, const std::string& orig, const bool append);
612
613
CLONEABLE(Option_BoolExtended)
614
};
615
616
// -------------------------------------------------------------------------
617
// Option_IntVector
618
// -------------------------------------------------------------------------
619
620
class Option_IntVector : public Option {
621
622
public:
623
/// @brief Constructor for an option with no default value
624
Option_IntVector();
625
626
/** @brief Constructor for an option with a default value
627
*
628
* @param[in] value This option's default value
629
*/
630
Option_IntVector(const IntVector& value);
631
632
/** @brief Returns the stored integer vector
633
* @see const IntVector &Option::getIntVector()
634
* @return Returns the stored integer vector
635
*/
636
const IntVector& getIntVector() const;
637
638
/** @brief Stores the given value after parsing it into a vector of integers
639
*
640
* The value is converted into a vector of integers and stored in "myValue".
641
* Then, "markSet" is called in order to know that a value has been set.
642
*
643
* The method returns whether the value could be set (the return value from
644
* "markSet").
645
*
646
* If the string could not be converted into a vector of integers, an InvalidArgument
647
* is thrown.
648
*
649
* @see bool Option::set(std::string v)
650
* @return Whether the new value could be set
651
* @exception InvalidArgument If the value could not be converted into a vector of integers
652
*/
653
bool set(const std::string& v, const std::string& orig, const bool append);
654
655
CLONEABLE(Option_IntVector)
656
657
private:
658
/// @brief the value, valid only when the base-classes "myAmSet"-member is true
659
IntVector myValue;
660
};
661
662
// -------------------------------------------------------------------------
663
// Option_StringVector
664
// -------------------------------------------------------------------------
665
666
class Option_StringVector : public Option {
667
668
public:
669
/// @brief Constructor for an option with no default value
670
Option_StringVector();
671
672
/** @brief Constructor for an option with a default value
673
*
674
* @param[in] value This option's default value
675
*/
676
Option_StringVector(const StringVector& value);
677
678
/** @brief Returns the stored string vector
679
* @see const StringVector &Option::getStringVector()
680
* @return Returns the stored string vector
681
*/
682
const StringVector& getStringVector() const;
683
684
/** @brief Stores the given value after parsing it into a vector of strings
685
*
686
* The value is converted into a vector of strings and stored in "myValue".
687
* Then, "markSet" is called in order to know that a value has been set.
688
*
689
* The method returns whether the value could be set (the return value from
690
* "markSet").
691
*
692
* If the string could not be converted into a vector of strings, an
693
* InvalidArgument is thrown.
694
*
695
* @see bool Option::set(std::string v)
696
* @return Whether the new value could be set
697
* @exception InvalidArgument If the value could not be converted into a
698
* vector of strings
699
*/
700
bool set(const std::string& v, const std::string& orig, const bool append);
701
702
CLONEABLE(Option_StringVector)
703
704
private:
705
/// @brief the value, valid only when the base-classes "myAmSet"-member is true
706
StringVector myValue;
707
};
708
709
// -------------------------------------------------------------------------
710
// Option_FileName
711
// -------------------------------------------------------------------------
712
713
class Option_FileName : public Option_StringVector {
714
715
public:
716
/// @brief Constructor for an option with no default value
717
Option_FileName();
718
719
/** @brief Constructor for an option with a default value
720
*
721
* @param[in] value This option's default value
722
*/
723
Option_FileName(const StringVector& value);
724
725
/** @brief Returns true, the information whether this option is a file name
726
*
727
* Returns true.
728
*
729
* @return true
730
*/
731
bool isFileName() const;
732
733
/** @brief Legacy method that returns the stored filenames as a comma-separated string.
734
*
735
* @see std::string Option::getString()
736
* @see std::string StringVector::getValueString()
737
* @return Returns comma-separated string of the stored filenames
738
* @deprecated Legacy method used when Option_FileName was still derived from Option_String;
739
* not in line with code style of the Options sub-system.
740
*/
741
std::string getString() const;
742
743
CLONEABLE(Option_FileName)
744
};
745
746
// -------------------------------------------------------------------------
747
// Option_Network
748
// -------------------------------------------------------------------------
749
750
class Option_Network : public Option_String {
751
752
public:
753
/** @brief Constructor for an option with a default value
754
*
755
* @param[in] value This option's default value
756
*/
757
Option_Network(const std::string& value);
758
759
/** @brief Returns true, the information whether this option is a file name
760
*
761
* Returns true.
762
*
763
* @return true
764
*/
765
bool isNetwork() const;
766
767
CLONEABLE(Option_Network)
768
};
769
770
// -------------------------------------------------------------------------
771
// Option_Additional
772
// -------------------------------------------------------------------------
773
774
class Option_Additional : public Option_String {
775
776
public:
777
/** @brief Constructor for an option with a default value
778
*
779
* @param[in] value This option's default value
780
*/
781
Option_Additional(const std::string& value);
782
783
/** @brief Returns true, the information whether this option is a file name
784
*
785
* Returns true.
786
*
787
* @return true
788
*/
789
bool isAdditional() const;
790
791
CLONEABLE(Option_Additional)
792
};
793
794
// -------------------------------------------------------------------------
795
// Option_Route
796
// -------------------------------------------------------------------------
797
798
class Option_Route : public Option_String {
799
800
public:
801
/** @brief Constructor for an option with a default value
802
*
803
* @param[in] value This option's default value
804
*/
805
Option_Route(const std::string& value);
806
807
/** @brief Returns true, the information whether this option is a file name
808
*
809
* Returns true.
810
*
811
* @return true
812
*/
813
bool isRoute() const;
814
815
CLONEABLE(Option_Route)
816
};
817
818
// -------------------------------------------------------------------------
819
// Option_Data
820
// -------------------------------------------------------------------------
821
822
class Option_Data : public Option_String {
823
824
public:
825
/** @brief Constructor for an option with a default value
826
*
827
* @param[in] value This option's default value
828
*/
829
Option_Data(const std::string& value);
830
831
/** @brief Returns true, the information whether this option is a data file
832
*
833
* Returns true.
834
*
835
* @return true
836
*/
837
bool isData() const;
838
839
CLONEABLE(Option_Data)
840
};
841
842
// -------------------------------------------------------------------------
843
// Option_SumoConfig
844
// -------------------------------------------------------------------------
845
846
class Option_SumoConfig : public Option_String {
847
848
public:
849
/** @brief Constructor for an option with a default value
850
*
851
* @param[in] value This option's default value
852
*/
853
Option_SumoConfig(const std::string& value);
854
855
/** @brief Returns true, the information whether this option is a sumo config name
856
*
857
* Returns true.
858
*
859
* @return true
860
*/
861
bool isSumoConfig() const;
862
863
CLONEABLE(Option_SumoConfig)
864
};
865
866
// -------------------------------------------------------------------------
867
// Option_Edge
868
// -------------------------------------------------------------------------
869
870
class Option_Edge : public Option_String {
871
872
public:
873
/** @brief Constructor for an option with a default value
874
*
875
* @param[in] value This option's default value
876
*/
877
Option_Edge(const std::string& value);
878
879
/** @brief Returns true, the information whether this option is a list of edges
880
*
881
* Returns true.
882
*
883
* @return true
884
*/
885
bool isEdge() const;
886
887
CLONEABLE(Option_Edge)
888
};
889
890
// -------------------------------------------------------------------------
891
// Option_EdgeVector
892
// -------------------------------------------------------------------------
893
894
class Option_EdgeVector : public Option_String {
895
896
public:
897
/** @brief Constructor for an option with a default value
898
*
899
* @param[in] value This option's default value
900
*/
901
Option_EdgeVector(const std::string& value);
902
903
/** @brief Returns true, the information whether this option is a list of edges
904
*
905
* Returns true.
906
*
907
* @return true
908
*/
909
bool isEdgeVector() const;
910
911
CLONEABLE(Option_EdgeVector)
912
};
913
914