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

Function ACE_TMAIN

tools/dcpsinfo_dump/dump.cpp:53–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53int ACE_TMAIN(int argc, ACE_TCHAR *argv[])
54{
55 if (parse_args(argc, argv) != 0)
56 return 1;
57
58 try
59 {
60 ACE_Argv_Type_Converter converter(argc, argv);
61
62 CORBA::ORB_var orb =
63 CORBA::ORB_init(converter.get_argc(), converter.get_ASCII_argv(), "");
64
65 CORBA::Object_var tmp =
66 orb->string_to_object (ACE_TEXT_ALWAYS_CHAR(ior));
67 OpenDDS::DCPS::DCPSInfo_var info =
68 OpenDDS::DCPS::DCPSInfo::_narrow (tmp.in ());
69
70 if (CORBA::is_nil(info.in()) )
71 {
72 ACE_ERROR_RETURN ((LM_ERROR,
73 "(%P|%t) ERROR: Nil OpenDDS::DCPS::DCPSInfo reference <%s>\n",
74 ior),
75 1);
76 }
77
78 OPENDDS_STRING state = info->dump_to_string();
79
80 std::cout << state.c_str() << std::endl;
81
82 // clean up the orb
83 orb->destroy ();
84 }
85 catch (const CORBA::Exception& ex)
86 {
87 ex._tao_print_exception ("Exception caught in publisher.cpp:");
88 return 1;
89 }
90
91 return 0;
92}

Callers

nothing calls this directly

Calls 6

string_to_objectMethod · 0.80
_tao_print_exceptionMethod · 0.80
parse_argsFunction · 0.70
inMethod · 0.45
dump_to_stringMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected