47 std::string exePath =
"netgenerate.exe";
49 std::string exePath =
"netgenerate";
51 const char* sumoHomeEnv = getenv(
"SUMO_HOME");
52 std::string sumoHome =
"";
53 if (sumoHomeEnv !=
nullptr && sumoHomeEnv != std::string(
"")) {
54 sumoHome = std::string(sumoHomeEnv);
56 if (sumoHome.back() ==
'\\') {
57 sumoHome = sumoHome.substr(0, sumoHome.size() - 1);
60 if (sumoHome.front() ==
'"') {
61 sumoHome.erase(sumoHome.begin());
63 if (sumoHome.size() > 0 && sumoHome.back() ==
'"') {
73 for (
const auto& topic : netgenerateOptions->
getSubTopics()) {
75 if (topic !=
"Configuration") {
77 for (
const auto& entry : entries) {
78 if (!netgenerateOptions->
isDefault(entry)) {
122 for (
int i = 0; i < 128; i++) {
148 while (fgets(buffer,
sizeof buffer,
myPipe) != NULL) {
@ MESSAGE_OCCURRED
send when a message occured
@ ERROR_OCCURRED
send when a error occured
@ OUTPUT_OCCURRED
send when a tool produces output
@ TOOL_ENDED
send when a tool finishes
Abstract dialog for tools.
FXEX::MFXThreadEvent & myEventThrow
event throw
bool myErrorOccurred
flag for check if during execution an error was Occurred
bool errorOccurred() const
check if during execution an error was Occurred
void abort()
abort netgenerate running
bool myRunning
flag for check if netgenerate is running
~GNERunNetgenerate()
destructor
FXint run()
starts the thread. The thread ends after the netgenerate is finished
MFXSynchQue< GUIEvent * > & myEventQueue
event Queue
GNERunNetgenerate(GNERunNetgenerateDialog *runDialog, MFXSynchQue< GUIEvent * > &eq, FXEX::MFXThreadEvent &ev)
Constructor.
bool isRunning() const
check if netgenerate is running
std::string myNetgenerateCommand
netgenerate command
A storage for options typed value containers)
const std::vector< std::string > & getSubTopics() const
return the list of subtopics
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
std::string getValueString(const std::string &name) const
Returns the string-value of the named option (all options)
std::vector< std::string > getSubTopicsEntries(const std::string &subtopic) const
return the list of entries for the given subtopic
static std::string transcodeToLocal(const std::string &utf8String)
convert a string from UTF-8 to the local codepage