119 netBuilder->applyOptions(oc);
123 net =
new GNENet(netBuilder);
132 netBuilder->compute(oc);
139 if (oc.
getBool(
"ignore-errors")) {
147 net =
new GNENet(netBuilder);
155 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
162 }
catch (std::exception& e) {
196 oc.
addCallExample(
"-c <CONFIGURATION>",
"edit net with options read from file");
214 oc.
addDescription(
"sumo-additionals-file",
"Input",
"file in which additionals are loaded");
217 oc.
addDescription(
"additionals-output",
"Input",
"file in which additionals must be saved");
220 oc.
addDescription(
"disable-laneIcons",
"Visualisation",
"Disable icons of special lanes");
226 oc.
addDescription(
"gui-settings-file",
"Visualisation",
"Load visualisation settings from FILE");
229 oc.
addDescription(
"registry-viewport",
"Visualisation",
"Load current viewport from registry");
232 oc.
addDescription(
"window-size",
"Visualisation",
"Create initial window with the given x,y size");
235 oc.
addDescription(
"window-pos",
"Visualisation",
"Create initial window at the given x,y position");
238 oc.
addDescription(
"gui-testing",
"Visualisation",
"Enable ovelay for screen recognition");
251 oc.
set(
"offset.disable-normalization",
"true");
252 oc.
set(
"no-turnarounds",
"true");
270 if (!oc.
isSet(
"output-file")) {
275 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
288 if (
myFile !=
"" && !useStartupOptions) {
static MsgHandler * getWarningInstance()
Returns the instance to add warnings to.
void computeAndUpdate(OptionsCont &oc)
recompute the network and update lane geometries
The message is only something to show.
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
FXEX::FXThreadEvent & myEventThrow
event throw
static MsgHandler * getErrorInstance()
Returns the instance to add errors to.
static void insertRandOptions()
Initialises the given options container with random number options.
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
OutputDevice * myWarningRetriever
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
static void getOptions(const bool commandLineOnly=false)
Parses the command line arguments and loads the configuration.
static void addReportOptions(OptionsCont &oc)
Adds reporting options to the given container.
static void setValidation(const std::string &validationScheme, const std::string &netValidationScheme)
Enables or disables validation.
void loadConfigOrNet(const std::string &file, bool isNet, bool useStartupOptions, bool newNet=false)
begins the loading of a netconvert configuration or a a network
static void computeFinal(bool lefthand=false)
compute the location attributes which will be used for output based on the loaded location data...
void addCallExample(const std::string &example, const std::string &desc)
Add a call example.
bool initOptions()
init options
OutputDevice * myErrorRetriever
The instances of message retriever encapsulations Needed to be deleted from the handler later on...
static void fillOptions()
Inserts options used by the network importer and network building modules.
A NBNetBuilder extended by visualisation and editing capabilities.
void addRetriever(OutputDevice *retriever)
Adds a further retriever to the instance responsible for a certain msg type.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static void addConfigurationOptions(OptionsCont &oc)
Adds configuration options to the given container.
static void setArgs(int argc, char **argv)
Stores the command line arguments for later parsing.
static OptionsCont & getOptions()
Retrieves the options.
static void initRandGlobal(MTRand *which=0)
Reads the given random number options and initialises the random number generator in accordance...
static void setDefaultOptions(OptionsCont &oc)
sets required options for proper functioning
bool myNewNet
if true, a new net is created
bool myLoadNet
Information whether only the network shall be loaded.
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
void clear()
Removes all information from the container.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
static bool init(OptionsCont &oc)
Initialises the processing and the final instance using the given options.
void removeRetriever(OutputDevice *retriever)
Removes the retriever from the handler.
static MsgHandler * getMessageInstance()
Returns the instance to add normal messages to.
void load(OptionsCont &oc)
void addOptionSubTopic(const std::string &topic)
Adds an option subtopic.
static bool checkOptions()
checks shared options and sets StdDefs
GNELoadThread(FXApp *app, MFXInterThreadEventClient *mw, MFXEventQue< GUIEvent *> &eq, FXEX::FXThreadEvent &ev)
constructor
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
static void addProjectionOptions(OptionsCont &oc)
Adds projection options to the given container.
FXint run()
starts the thread. The thread ends after the net has been loaded
The message is a warning.
Encapsulates an object's method for using it as a message retriever.
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
MFXEventQue< GUIEvent * > & myEventQue
event Queue
Instance responsible for building networks.
OutputDevice * myMessageRetriever
A storage for options typed value containers)
std::string myFile
the path to load the simulation from
static void fillOptions(bool forNetgen)
Inserts options used by the network converter.
void submitEndAndCleanup(GNENet *net, const std::string &guiSettingsFile="", const bool viewportFromRegistry=false)
Closes the loading process.
void retrieveMessage(const MsgHandler::MsgType type, const std::string &msg)
Retrieves messages from the loading module.
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
static void fillOptions(bool forNetgen)
Inserts options used by the network writer.
void clear()
Clears information whether an error occured previously.
#define WRITE_MESSAGE(msg)
static void initOutputOptions()
static void fillOptions(OptionsCont &oc)
clears and initializes the OptionsCont
virtual ~GNELoadThread()
destructor