81 string aliases = "-"; // all aliases |
81 string aliases = "-"; // all aliases |
82 string domains = "-"; // all domains |
82 string domains = "-"; // all domains |
83 string dataTypeStr; |
83 string dataTypeStr; |
84 Command::Verbosity verbosity = Command::Normal; |
84 Command::Verbosity verbosity = Command::Normal; |
85 bool force = false; |
85 bool force = false; |
|
86 bool emergency = false; |
86 bool helpRequested = false; |
87 bool helpRequested = false; |
87 string outputFile; |
88 string outputFile; |
88 string skin; |
89 string skin; |
89 |
90 |
90 /*****************************************************************************/ |
91 /*****************************************************************************/ |
147 {"position", required_argument, NULL, 'p'}, |
148 {"position", required_argument, NULL, 'p'}, |
148 {"domain", required_argument, NULL, 'd'}, |
149 {"domain", required_argument, NULL, 'd'}, |
149 {"type", required_argument, NULL, 't'}, |
150 {"type", required_argument, NULL, 't'}, |
150 {"output-file", required_argument, NULL, 'o'}, |
151 {"output-file", required_argument, NULL, 'o'}, |
151 {"skin", required_argument, NULL, 's'}, |
152 {"skin", required_argument, NULL, 's'}, |
|
153 {"emergency", no_argument, NULL, 'e'}, |
152 {"force", no_argument, NULL, 'f'}, |
154 {"force", no_argument, NULL, 'f'}, |
153 {"quiet", no_argument, NULL, 'q'}, |
155 {"quiet", no_argument, NULL, 'q'}, |
154 {"verbose", no_argument, NULL, 'v'}, |
156 {"verbose", no_argument, NULL, 'v'}, |
155 {"help", no_argument, NULL, 'h'}, |
157 {"help", no_argument, NULL, 'h'}, |
156 {} |
158 {} |
157 }; |
159 }; |
158 |
160 |
159 do { |
161 do { |
160 c = getopt_long(argc, argv, "m:a:p:d:t:o:s:fqvh", longOptions, NULL); |
162 c = getopt_long(argc, argv, "m:a:p:d:t:o:s:efqvh", longOptions, NULL); |
161 |
163 |
162 switch (c) { |
164 switch (c) { |
163 case 'm': |
165 case 'm': |
164 masters = optarg; |
166 masters = optarg; |
165 break; |
167 break; |
313 cmd->setPositions(positions); |
319 cmd->setPositions(positions); |
314 cmd->setDomains(domains); |
320 cmd->setDomains(domains); |
315 cmd->setDataType(dataTypeStr); |
321 cmd->setDataType(dataTypeStr); |
316 cmd->setOutputFile(outputFile); |
322 cmd->setOutputFile(outputFile); |
317 cmd->setSkin(skin); |
323 cmd->setSkin(skin); |
|
324 cmd->setEmergency(emergency); |
318 cmd->setForce(force); |
325 cmd->setForce(force); |
319 cmd->execute(commandArgs); |
326 cmd->execute(commandArgs); |
320 } catch (InvalidUsageException &e) { |
327 } catch (InvalidUsageException &e) { |
321 cerr << e.what() << endl << endl; |
328 cerr << e.what() << endl << endl; |
322 cerr << cmd->helpString(binaryBaseName); |
329 cerr << cmd->helpString(binaryBaseName); |