virtual bool parseCommandLineOptions(ArgvIterator &iter) { if (iter.done()) { usage(); return false; } for (; !iter.done(); iter.next()) { const char *arg = iter.query(); if (*arg!='-') { optFileName.set(arg); return true; } if (iter.matchOption(optQuerySet, ECLOPT_QUERYSET)) continue; if (iter.matchFlag(optActivate, ECLOPT_ACTIVATE)) continue; if (iter.matchFlag(optOverWrite, ECLOPT_OVERWRITE)) continue; if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch) return false; } return true; }
bool EclCMDShell::parseCommandLineOptions(ArgvIterator &iter) { if (iter.done()) { usage(); return false; } bool boolValue; for (; !iter.done(); iter.next()) { const char * arg = iter.query(); if (iter.matchFlag(optHelp, "help")) continue; else if (*arg!='-') { cmd.set(arg); iter.next(); break; } else if (iter.matchFlag(boolValue, "--version")) { fprintf(stdout, "%s\n", BUILD_TAG); return false; } } return true; }
eclCmdOptionMatchIndicator EclCmdCommon::matchCommandLineOption(ArgvIterator &iter, bool finalAttempt) { bool boolValue; if (iter.matchFlag(boolValue, ECLOPT_VERSION)) { fprintf(stdout, "%s\n", BUILD_TAG); return EclCmdOptionCompletion; } if (iter.matchOption(optServer, ECLOPT_SERVER)||iter.matchOption(optServer, ECLOPT_SERVER_S)) return EclCmdOptionMatch; if (iter.matchOption(optPort, ECLOPT_PORT)) return EclCmdOptionMatch; if (iter.matchOption(optUsername, ECLOPT_USERNAME)||iter.matchOption(optUsername, ECLOPT_USERNAME_S)) return EclCmdOptionMatch; if (iter.matchOption(optPassword, ECLOPT_PASSWORD)||iter.matchOption(optPassword, ECLOPT_PASSWORD_S)) return EclCmdOptionMatch; if (iter.matchFlag(optVerbose, ECLOPT_VERBOSE) || iter.matchFlag(optVerbose, ECLOPT_VERBOSE_S)) return EclCmdOptionMatch; StringAttr tempArg; if (iter.matchOption(tempArg, "-brk")) { #if defined(_WIN32) && defined(_DEBUG) unsigned id = atoi(tempArg.sget()); if (id == 0) DebugBreak(); else _CrtSetBreakAlloc(id); #endif return EclCmdOptionMatch; } if (finalAttempt) fprintf(stderr, "\n%s option not recognized\n", iter.query()); return EclCmdOptionNoMatch; }
bool parseCommandLineOption(ArgvIterator &iter) { if (iter.matchFlag(optTargetAddress, ESDL_OPTION_TARGET_ESP_ADDRESS)) return true; if (iter.matchFlag(optTargetPort, ESDL_OPTION_TARGET_ESP_PORT) ) return true; if (EsdlPublishCmdCommon::parseCommandLineOption(iter)) return true; return false; }
virtual bool parseCommandLineOptions(ArgvIterator &iter) { if (iter.done()) { usage(); return false; } for (; !iter.done(); iter.next()) { const char *arg = iter.query(); if (*arg!='-') { optFileName.set(arg); return true; } if (iter.matchOption(optProcess, ECLOPT_PROCESS)) continue; if (iter.matchOption(optDaliIp, ECLOPT_DALIIP)) continue; if (iter.matchFlag(optOverWrite, ECLOPT_OVERWRITE)) continue; if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch) return false; } return true; }
virtual bool parseCommandLineOptions(ArgvIterator &iter) { if (iter.done()) { usage(); return false; } for (; !iter.done(); iter.next()) { const char *arg = iter.query(); if (*arg!='-') { if (optTarget.isEmpty()) optTarget.set(arg); else if (optQueryId.isEmpty()) optQueryId.set(arg); else { fprintf(stderr, "\nunrecognized argument %s\n", arg); return false; } continue; } if (iter.matchOption(optPMID, ECLOPT_PMID) || iter.matchOption(optPMID, ECLOPT_PMID_S)) continue; if (iter.matchFlag(optGlobalScope, ECLOPT_GLOBAL_SCOPE)) continue; if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch) return false; } return true; }
bool parseCommandLineOption(ArgvIterator &iter) { if (iter.matchFlag(optInput, ESDL_OPTION_CONFIG) ) return true; if (EsdlPublishCmdCommon::parseCommandLineOption(iter)) return true; return false; }
virtual bool parseCommandLineOptions(ArgvIterator &iter) { if (iter.done()) { usage(); return false; } for (; !iter.done(); iter.next()) { const char *arg = iter.query(); if (*arg!='-') { if (optTarget.isEmpty()) optTarget.set(arg); else if (optFileName.isEmpty()) optFileName.set(arg); else { fprintf(stderr, "\nunrecognized argument %s\n", arg); return false; } continue; } if (iter.matchFlag(optValidateActive, ECLOPT_ACTIVE)) continue; if (iter.matchFlag(optCheckDFS, ECLOPT_CHECK_DFS)) continue; if (iter.matchOption(optPMID, ECLOPT_PMID) || iter.matchOption(optPMID, ECLOPT_PMID_S)) continue; if (iter.matchFlag(optGlobalScope, ECLOPT_GLOBAL_SCOPE)) continue; StringAttr queryIds; if (iter.matchOption(queryIds, ECLOPT_QUERYID)) { optQueryIds.appendList(queryIds.get(), ","); continue; } if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch) return false; } return true; }
virtual bool parseCommandLineOptions(ArgvIterator &iter) { if (iter.done()) { usage(); return false; } for (; !iter.done(); iter.next()) { const char *arg = iter.query(); if (*arg!='-') { if (optTarget.isEmpty()) optTarget.set(arg); else if (optFileName.isEmpty()) optFileName.set(arg); else { fprintf(stderr, "\nunrecognized argument %s\n", arg); return false; } continue; } if (iter.matchOption(optPackageMapId, ECLOPT_PMID)) continue; if (iter.matchOption(optDaliIP, ECLOPT_DALIIP)) continue; if (iter.matchOption(optSourceProcess, ECLOPT_SOURCE_PROCESS)) continue; if (iter.matchFlag(optActivate, ECLOPT_ACTIVATE)||iter.matchFlag(optActivate, ECLOPT_ACTIVATE_S)) continue; if (iter.matchFlag(optOverWrite, ECLOPT_OVERWRITE)||iter.matchFlag(optOverWrite, ECLOPT_OVERWRITE_S)) continue; if (iter.matchFlag(optGlobalScope, ECLOPT_GLOBAL_SCOPE)) continue; if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch) return false; } return true; }
bool EclCMDShell::parseCommandLineOptions(ArgvIterator &iter) { if (iter.done()) { usage(); return false; } bool boolValue; for (; !iter.done(); iter.next()) { const char * arg = iter.query(); if (iter.matchFlag(optHelp, "help")) continue; if (*arg!='-') { cmd.set(arg); iter.next(); break; } if (iter.matchFlag(boolValue, "--version")) { fprintf(stdout, "%s\n", BUILD_TAG); return false; } StringAttr tempArg; if (iter.matchOption(tempArg, "-brk")) { #if defined(_WIN32) && defined(_DEBUG) unsigned id = atoi(tempArg.sget()); if (id == 0) DebugBreak(); else _CrtSetBreakAlloc(id); #endif } } return true; }
esdlCmdOptionMatchIndicator EsdlCmdCommon::matchCommandLineOption(ArgvIterator &iter, bool finalAttempt) { bool boolValue; if (iter.matchFlag(boolValue, ESDLOPT_HELP)) { usage(); return EsdlCmdOptionCompletion; } if (iter.matchFlag(boolValue, ESDLOPT_VERSION)) { fprintf(stdout, "%s\n", BUILD_TAG); return EsdlCmdOptionCompletion; } if (iter.matchFlag(optVerbose, ESDL_OPTION_VERBOSE) || iter.matchFlag(optVerbose, ESDL_OPT_VERBOSE)) { return EsdlCmdOptionMatch; } StringAttr tempArg; if (iter.matchOption(tempArg, "-brk")) { #if defined(_WIN32) && defined(_DEBUG) unsigned id = atoi(tempArg.str()); if (id == 0) DebugBreak(); else _CrtSetBreakAlloc(id); #endif return EsdlCmdOptionMatch; } if (finalAttempt) { fprintf(stderr, "\n%s option not recognized\n", iter.query()); usage(); } return EsdlCmdOptionNoMatch; }
virtual bool parseCommandLineOptions(ArgvIterator &iter) { if (iter.done()) { usage(); return false; } for (; !iter.done(); iter.next()) { const char *arg = iter.query(); if (streq(arg, "-")) { optObj.set("stdin"); continue; } if (*arg!='-') { if (optObj.value.length()) { fprintf(stderr, "\nmultiple targets (%s and %s) not currently supported\n", optObj.value.sget(), arg); return false; } optObj.set(arg); continue; } if (iter.matchOption(optObj.value, ECLOPT_WUID)) continue; if (iter.matchOption(optName, ECLOPT_NAME)) continue; if (iter.matchOption(optCluster, ECLOPT_CLUSTER)) continue; if (iter.matchFlag(optActivate, ECLOPT_ACTIVATE)) { activateSet=true; continue; } if (EclCmdCommon::matchCommandLineOption(iter, true)!=EclCmdOptionMatch) return false; } return true; }
virtual bool parseCommandLineOption(ArgvIterator &iter) { if (iter.matchFlag(optSource, ESDL_CONVERT_SOURCE)) return true; if (iter.matchFlag(optService, ESDLOPT_SERVICE)) return true; if (iter.matchFlag(optWSProcAddress, ESDL_OPT_SERVICE_SERVER) || iter.matchFlag(optWSProcAddress, ESDL_OPTION_SERVICE_SERVER)) return true; if (iter.matchFlag(optWSProcPort, ESDL_OPTION_SERVICE_PORT) || iter.matchFlag(optWSProcPort, ESDL_OPT_SERVICE_PORT)) return true; if (iter.matchFlag(optVersionStr, ESDLOPT_VERSION)) return true; if (iter.matchFlag(optUser, ESDL_OPT_SERVICE_USER) || iter.matchFlag(optUser, ESDL_OPTION_SERVICE_USER)) return true; if (iter.matchFlag(optPass, ESDL_OPT_SERVICE_PASS) || iter.matchFlag(optPass, ESDL_OPTION_SERVICE_PASS)) return true; if (iter.matchFlag(optOverWrite, ESDL_OPTION_OVERWRITE) ) return true; return false; }