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

Method parse_args

performance-tests/DCPS/Sync/SyncServer.cpp:33–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31};
32
33bool
34SyncServer::parse_args (int argc, ACE_TCHAR *argv[])
35{
36 ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("p:s:"));
37 int c;
38 std::string usage =
39 " -p <publisher count>\n"
40 " -s <subscriber count>\n";
41
42 while ((c = get_opts ()) != -1)
43 {
44 switch (c)
45 {
46 case 'p':
47 pub_count_ = static_cast<size_t>(ACE_OS::atoi(get_opts.opt_arg()));
48 break;
49 case 's':
50 sub_count_ = static_cast<size_t>(ACE_OS::atoi(get_opts.opt_arg()));
51 break;
52 case '?':
53 default:
54 ACE_ERROR_RETURN ((LM_ERROR,
55 "usage> %s\n",
56 usage.c_str()),
57 false);
58 }
59 }
60
61
62 return true;
63}
64
65SyncServer::SyncServer (int argc, ACE_TCHAR* argv[])
66 : pub_count_ (1), sub_count_ (1)

Callers 1

SyncServerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected