 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
127 void addCallExample(
const std::string& example,
const std::string& desc);
171 void printHelpOnTopic(
const std::string& topic,
int tooLarge,
int maxSize, std::ostream& os);
185 const bool complete,
const bool addComments,
186 const bool inComment =
false)
const;
207 void writeXMLHeader(std::ostream& os,
const bool includeConfig =
true)
const;
252 void addSynonyme(
const std::string& name1,
const std::string& name2,
bool isDeprecated =
false);
260 void addXMLDefault(
const std::string& name,
const std::string& xmlRoot =
"");
276 void addDescription(
const std::string& name,
const std::string& subtopic,
277 const std::string& description);
289 bool exists(
const std::string& name)
const;
307 bool isSet(
const std::string& name,
bool failOnNonExistant =
true)
const;
314 void unSet(
const std::string& name,
bool failOnNonExistant =
true)
const;
330 bool isDefault(
const std::string& name)
const;
342 bool isBool(
const std::string& name)
const;
397 std::vector<std::string>
getSynonymes(
const std::string& name)
const;
438 std::string
getString(
const std::string& name)
const;
451 double getFloat(
const std::string& name)
const;
464 int getInt(
const std::string& name)
const;
477 bool getBool(
const std::string& name)
const;
527 const std::string& itemName)
const;
555 bool set(
const std::string& name,
const std::string& value);
576 bool setDefault(
const std::string& name,
const std::string& value);
647 return std::vector<std::string>();
704 void splitLines(std::ostream& os, std::string what,
705 int offset,
int nextOffset);
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
std::vector< std::string > myCopyrightNotices
std::map< std::string, bool > myDeprecatedSynonymes
A map from deprecated options to a bool indicating whether we warned about deprecation.
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
bool processMetaOptions(bool missingOptions)
Checks for help and configuration output, returns whether we should exit.
const IntVector & getIntVector(const std::string &name) const
Returns the list of integer-value of the named option (only for Option_IntVector)
bool checkDependingSuboptions(const std::string &name, const std::string &prefix) const
Checks whether an option is set, which has options with a prefix depending on it.
bool setByRootElement(const std::string &name, const std::string &value)
Sets the given value for the option which can handle the given XML root.
void writeXMLHeader(std::ostream &os, const bool includeConfig=true) const
Writes a standard XML header, including the configuration.
A class representing a single program option.
std::vector< std::string > getSynonymes(const std::string &name) const
Returns the synonymes of an option name.
void reportDoubleSetting(const std::string &arg) const
Reports an error that the option has already been set.
void relocateFiles(const std::string &configuration) const
Modifies file name options according to the configuration path.
void resetWritable()
Resets all options to be writeable.
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
std::vector< std::string > mySubTopics
lists of option subtopics and copyright notices
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
bool exists(const std::string &name) const
Returns the information whether the named option is known.
const std::vector< std::string > & getSubTopics() const
return the list of subtopics
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
std::string myAdditionalMessage
void unSet(const std::string &name, bool failOnNonExistant=true) const
Marks the option as unset.
const std::string & getDescription(const std::string &name) const
Returns the option description.
void printHelp(std::ostream &os)
Prints the help.
void addCopyrightNotice(const std::string ©rightLine)
Adds a copyright notice to the help output.
std::map< std::string, Option * > KnownContType
std::map< std::string, std::vector< std::string > > mySubTopicEntries
A map from subtopic to option.
ItemAddressContType myAddresses
friend std::ostream & operator<<(std::ostream &os, const OptionsCont &oc)
Output operator.
const std::string & getFullName() const
std::vector< int > IntVector
Definition of a vector of ints.
const StringVector & getStringVector(const std::string &name) const
Returns the list of string-value of the named option (only for Option_StringVector)
virtual const std::string & getTypeName() const
Returns the mml-type name of this option.
std::string convertChar(char abbr) const
Converts an abbreviation into a name.
std::vector< std::pair< std::string, std::string > > myCallExamples
list of call examples
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
bool isUsableFileList(const std::string &name) const
Checks whether the named option is usable as a file list (with at least a single file)
std::vector< std::string > StringVector
Definition of a vector of strings.
void setApplicationName(const std::string &appName, const std::string &fullName)
Sets the application name.
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
bool myWriteLicense
Information whether we should always include license information in file headers.
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
bool isInStringVector(const std::string &optionName, const std::string &itemName) const
Returns the named option is a list of string values containing the specified item.
void setAdditionalHelpMessage(const std::string &add)
Sets an additional message to be printed at the begin of the help screen.
A storage for options typed value containers)
std::vector< Option * > ItemAddressContType
void addXMLDefault(const std::string &name, const std::string &xmlRoot="")
Adds an XML root element to handle by default. The special root "" denotes the default handler.
bool isBool(const std::string &name) const
Returns the information whether the option is a boolean option.
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
void splitLines(std::ostream &os, std::string what, int offset, int nextOffset)
Writes the given string 'formatted'.
void addOptionSubTopic(const std::string &topic)
Adds an option subtopic.
void setApplicationDescription(const std::string &appDesc)
Sets the application description.
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
std::string myAppName
some information on the application
static OptionsCont myOptions
The static options container used.
void writeSchema(std::ostream &os)
Writes the xml schema for the configuration.
void addCallExample(const std::string &example, const std::string &desc)
Add a call example.
Option * getSecure(const std::string &name) const
Returns the named option.
void printHelpOnTopic(const std::string &topic, int tooLarge, int maxSize, std::ostream &os)
Prints help on the given topic.
std::string getTypeName(const std::string name)
return the type name for the given option
~OptionsCont()
Destructor.
void clearCopyrightNotices()
Removes all copyright information.
OptionsCont & operator=(const OptionsCont &s)
std::vector< std::string > getSubTopicsEntries(const std::string &subtopic) const
return the list of entries for the given subtopic
OptionsCont()
Constructor.
void writeConfiguration(std::ostream &os, const bool filled, const bool complete, const bool addComments, const bool inComment=false) const
Writes the configuration.
bool isWriteable(const std::string &name)
Returns the information whether the named option may be set.
std::map< std::string, std::string > myXMLDefaults
A map from XML root element to option.
void clear()
Removes all information from the container.
OptionsCont(const OptionsCont &s)
bool setDefault(const std::string &name, const std::string &value)
Sets the given value for the named option as new default value.
std::string myAppDescription