58 #ifdef CHECK_MEMORY_LEAKS 60 #endif // CHECK_MEMORY_LEAKS 122 netBuilder->applyOptions(oc);
126 net =
new GNENet(netBuilder);
135 netBuilder->compute(oc);
142 if (oc.
getBool(
"ignore-errors")) {
150 net =
new GNENet(netBuilder);
163 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
170 }
catch (std::exception& e) {
204 oc.
addCallExample(
"-c <CONFIGURATION>",
"edit net with options read from file");
222 oc.
addDescription(
"sumo-additionals-file",
"Input",
"load additionals");
225 oc.
addDescription(
"disable-laneIcons",
"Visualisation",
"Disable icons of special lanes");
231 oc.
addDescription(
"gui-settings-file",
"Visualisation",
"Load visualisation settings from FILE");
234 oc.
addDescription(
"registry-viewport",
"Visualisation",
"Load current viewport from registry");
237 oc.
addDescription(
"window-size",
"Visualisation",
"Create initial window with the given x,y size");
240 oc.
addDescription(
"additionals-output",
"Output",
"default value for additionals output file");
253 oc.
set(
"offset.disable-normalization",
"true");
254 oc.
set(
"no-turnarounds",
"true");
272 if (!oc.
isSet(
"output-file")) {
277 if (std::string(e.what()) != std::string(
"Process Error") && std::string(e.what()) != std::string(
"")) {
292 if (OC.
isSet(
"sumo-additionals-file")) {
295 if (OC.
isSet(
"additionals-output")) {
299 if (
myFile !=
"" && !useStartupOptions) {
static MsgHandler * getWarningInstance()
Returns the instance to add warnings to.
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.
std::string myAdditionalOutputFile
filename for the additionals output
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.
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
void setAdditionalsOutputFile(const std::string &additionalOutputFile)
set additionals File
void setAdditionalsFile(const std::string &additionalFile)
set additionals File
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
std::string myAdditionalFile
filename with additionals input
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