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");
95 main(
int argc,
char** argv) {
99 oc.
setApplicationName(
"netconvert",
"Eclipse SUMO netconvert Version " VERSION_STRING);
111 if (oc.
isDefault(
"aggregate-warnings")) {
112 oc.
set(
"aggregate-warnings",
"5");
142 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
148 }
catch (
const std::exception& e) {
150 if (std::string(e.what()) != std::string(
"")) {
165 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
virtual void clear(bool resetInformed=true)
Clears information whether an error occurred previously and print aggregated message summary.
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
static void fillOptions(bool forNetgen)
Inserts options used by the network converter.
Instance responsible for building networks.
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.
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
static void fillOptions(bool forNetedit=false)
Inserts options used by the network importer and network building modules.
void load(OptionsCont &oc)
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network stored in the given net builder.
static void fillOptions(bool forNetgen)
Inserts options used by the network writer.
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
A storage for options typed value containers)
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
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.
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 initRandGlobal(std::mt19937 *which=nullptr)
Reads the given random number options and initialises the random number generator in accordance.
static void insertRandOptions()
Initialises the given options container with random number options.
static void close()
Closes all of an applications subsystems.
static void addConfigurationOptions(OptionsCont &oc)
Adds configuration options to the given container.
static bool checkOptions()
checks shared options and sets StdDefs
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)