29 #pragma warning(disable: 4786)
30 #pragma warning(disable: 4503)
146 void addCallExample(
const std::string& example,
const std::string& desc);
197 bool complete,
bool addComments)
const;
208 void writeSchema(std::ostream& os,
bool addComments);
264 void addSynonyme(
const std::string& name1,
const std::string& name2,
bool isDeprecated =
false);
280 void addDescription(
const std::string& name,
const std::string& subtopic,
281 const std::string& description);
293 bool exists(
const std::string& name)
const;
311 bool isSet(
const std::string& name,
bool failOnNonExistant =
true)
const;
318 void unSet(
const std::string& name,
bool failOnNonExistant =
true)
const;
334 bool isDefault(
const std::string& name)
const;
346 bool isBool(
const std::string& name)
const;
401 std::vector<std::string>
getSynonymes(
const std::string& name)
const;
434 std::string
getString(
const std::string& name)
const;
460 int getInt(
const std::string& name)
const;
473 bool getBool(
const std::string& name)
const;
505 std::vector<std::string>
getStringVector(
const std::string& name)
const;
526 const std::string& itemName);
554 bool set(
const std::string& name,
const std::string& value);
611 return std::vector<std::string>();
668 void splitLines(std::ostream& os, std::string what,
669 size_t offset,
size_t nextOffset);
723 return s.length() == 1;
std::string myAppName
some information on the application
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
std::vector< std::string > getStringVector(const std::string &name) const
Returns the list of string-vector-value of the named option (only for Option_String) ...
std::vector< std::string > getSynonymes(const std::string &name) const
Returns the synonymes of an option name.
std::vector< std::string > mySubTopics
lists of option subtopics and copyright notices
const std::vector< std::string > & getSubTopics() const
return the list of subtopics
void resetWritable()
Resets all options to be writeable.
void addCopyrightNotice(const std::string ©rightLine)
Adds a copyright notice to the help output.
bool isInStringVector(const std::string &optionName, const std::string &itemName)
Returns the named option is a list of string values containing the specified item.
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. ...
void addCallExample(const std::string &example, const std::string &desc)
Add a call example.
void unSet(const std::string &name, bool failOnNonExistant=true) const
Marks the option as unset.
std::vector< Option * > ItemAddressContType
void reportDoubleSetting(const std::string &arg) const
Reports an error that the option has already been set.
void setApplicationDescription(const std::string &appDesc)
Sets the application description.
void clearCopyrightNotices()
Removes all copyright information.
void printHelp(std::ostream &os)
Prints the help.
const IntVector & getIntVector(const std::string &name) const
Returns the list of integer-value of the named option (only for Option_IntVector) ...
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
bool myHaveInformedAboutDeprecatedDivider
Information whether a warning a deprecated divider.
std::string convertChar(char abbr) const
Converts an abbreviation into a name.
virtual const std::string & getTypeName() const
Returns the mml-type name of this option.
static OptionsCont myOptions
The static options container used.
SUMOReal getFloat(const std::string &name) const
Returns the SUMOReal-value of the named option (only for Option_Float)
const std::string & getFullName() const
static OptionsCont & getOptions()
Retrieves the options.
std::string getTypeName(const std::string name)
return the type name for the given option
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
std::string myAppDescription
ItemAddressContType myAddresses
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
std::map< std::string, bool > myDeprecatedSynonymes
A map from deprecated options to a bool indicating whether we warned about deprecation.
void clear()
Removes all information from the container.
void writeXMLHeader(std::ostream &os)
Writes a standard XML header, including the configuration.
bool isBool(const std::string &name) const
Returns the information whether the option is a boolean option.
std::string myAdditionalMessage
std::vector< int > IntVector
Definition of a vector of unsigned ints.
void setAdditionalHelpMessage(const std::string &add)
Sets an additional message to be printed at the begin of the help screen.
bool isUsableFileList(const std::string &name) const
Checks whether the named option is usable as a file list (with at least a single file) ...
bool processMetaOptions(bool missingOptions)
Checks for help and configuration output, returns whether we should exit.
~OptionsCont()
Destructor.
bool isWriteable(const std::string &name)
Returns the information whether the named option may be set.
void addOptionSubTopic(const std::string &topic)
Adds an option subtopic.
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, size_t offset, size_t nextOffset)
Writes the given string 'formatted'.
void writeSchema(std::ostream &os, bool addComments)
Writes the xml schema for the configuration.
A class to find abbreviated option names (length=1)
A class representing a single program option.
void relocateFiles(const std::string &configuration) const
Modifies file name options according to the configuration path.
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
std::map< std::string, std::vector< std::string > > mySubTopicEntries
A map from subtopic to option.
friend std::ostream & operator<<(std::ostream &os, const OptionsCont &oc)
Output operator.
A storage for options typed value containers)
Option * getSecure(const std::string &name) const
Returns the named option.
std::vector< std::string > myCopyrightNotices
void writeConfiguration(std::ostream &os, bool filled, bool complete, bool addComments) const
Writes the configuration.
OptionsCont & operator=(const OptionsCont &s)
bool operator()(const std::string &s)
The comparing function.
std::vector< std::string > getSubTopicsEntries(const std::string &subtopic) const
return the list of entries for the given subtopic
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
std::map< std::string, Option * > KnownContType
OptionsCont()
Constructor.
std::vector< std::pair< std::string, std::string > > myCallExamples
list of call examples
bool exists(const std::string &name) const
Returns the information whether the named option is known.
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
void setApplicationName(const std::string &appName, const std::string &fullName)
Sets the application name.