53 oc.
addCallExample(
"-c <CONFIGURATION>",
"generate net with options read from file");
54 oc.
addCallExample(
"-n ./nodes.xml -e ./edges.xml -v -t ./owntypes.xml",
55 "generate net with given nodes, edges, and edge types doing verbose output");
96main(
int argc,
char** argv) {
99 oc.
setApplicationName(
"netconvert",
"Eclipse SUMO netconvert Version " VERSION_STRING);
110 if (oc.
isSet(
"edge-files") && !oc.
isSet(
"type-files") && oc.
isDefault(
"ignore-errors.edge-type")) {
111 oc.
setDefault(
"ignore-errors.edge-type",
"true");
114 if (oc.
isDefault(
"aggregate-warnings")) {
148 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
154 }
catch (
const std::exception& e) {
157 if (std::string(e.what()) != std::string(
"")) {
173 std::cout <<
"Success." << std::endl;
static void clear()
delete all stored distributions
static void addProjectionOptions(OptionsCont &oc)
Adds projection options to the given container.
static bool init(OptionsCont &oc)
Initialises the processing and the final instance using the given options.
static MsgHandler * getErrorInstance()
Returns the instance to add errors to.
virtual void inform(std::string msg, bool addType=true)
adds a new error to the list
static void initOutputOptions()
init output options
static MsgHandler * getWarningInstance()
Returns the instance to add warnings to.
virtual void clear(bool resetInformed=true)
Clears information whether an error occurred previously and print aggregated message summary.
static void fillOptions(OptionsCont &oc, bool forNetgen)
Inserts options used by the network converter.
static bool checkOptions(OptionsCont &oc)
Checks set options from the OptionsCont-singleton for being valid.
Instance responsible for building networks.
NBNodeCont & getNodeCont()
Returns a reference to the node container.
void applyOptions(OptionsCont &oc)
Initialises the storage by applying given options.
void compute(OptionsCont &oc, const std::set< std::string > &explicitTurnarounds=std::set< std::string >(), bool mayAddOrRemove=true)
Performs the network building steps.
void printBuiltNodesStatistics() const
Prints statistics about built nodes.
static bool checkOptions(OptionsCont &oc)
Checks set options for being valid.
static void fillOptions(OptionsCont &oc, bool forNetedit=false)
Inserts options used by the network importer and network building modules.
void load(OptionsCont &oc)
static void fillOptions(OptionsCont &oc, bool forNetgen)
Inserts options used by the network writer.
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network stored in the given net builder.
static bool checkOptions(OptionsCont &oc)
Checks set options for being valid.
A storage for options typed value containers)
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.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
bool setDefault(const std::string &name, const std::string &value)
Sets the given value for the named option as new default value.
void setApplicationDescription(const std::string &appDesc)
Sets the application description.
void addOptionSubTopic(const std::string &topic)
Adds an option subtopic.
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.
bool processMetaOptions(bool missingOptions)
Checks for help and configuration output, returns whether we should exit.
void addCallExample(const std::string &example, const std::string &desc)
Add a call example.
static void setArgs(int argc, char **argv)
Stores the command line arguments for later parsing.
static void getOptions(const bool commandLineOnly=false)
Parses the command line arguments and loads the configuration.
static void insertRandOptions(OptionsCont &oc)
Initialises the given options container with random number options.
static void initRandGlobal(SumoRNG *which=nullptr)
Reads the given random number options and initialises the random number generator in accordance.
static void close()
Closes all of an applications subsystems.
static bool checkOptions(OptionsCont &oc)
checks shared options and sets StdDefs
static void addConfigurationOptions(OptionsCont &oc)
Adds configuration options to the given container.
static void setValidation(const std::string &validationScheme, const std::string &netValidationScheme, const std::string &routeValidationScheme)
Enables or disables validation.
static void init()
Initialises the xml-subsystem.
int main(int argc, char **argv)