MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / parse_args

Function parse_args

tests/DCPS/WriteDataContainer/WriteDataContainerTest.cpp:314–335  ·  view source on GitHub ↗

parse the command line arguments

Source from the content-addressed store, hash-verified

312
313/// parse the command line arguments
314int parse_args(int argc, ACE_TCHAR *argv[])
315{
316 u_long mask = ACE_LOG_MSG->priority_mask(ACE_Log_Msg::PROCESS);
317 ACE_LOG_MSG->priority_mask(mask | LM_TRACE | LM_DEBUG, ACE_Log_Msg::PROCESS);
318 ACE_Arg_Shifter arg_shifter(argc, argv);
319
320 while (arg_shifter.is_anything_left()) {
321 // options:
322 // -n max_samples_per_instance defaults to INFINITE
323 // -d history.depth defaults to 1
324 // -z verbose transport debug
325
326 if (arg_shifter.cur_arg_strncasecmp(ACE_TEXT("-z")) == 0) {
327 TURN_ON_VERBOSE_DEBUG;
328 arg_shifter.consume_arg();
329 } else {
330 arg_shifter.ignore_arg();
331 }
332 }
333 // Indicates successful parsing of the command line
334 return 0;
335}
336
337int run_test(int argc, ACE_TCHAR *argv[])
338{

Callers 1

run_testFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected