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

Function ACE_TMAIN

tests/DCPS/DcpsIntegration/topic.cpp:54–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53
54int ACE_TMAIN(int argc, ACE_TCHAR *argv[])
55{
56 if (parse_args (argc, argv) != 0)
57 {
58 ACE_ERROR_RETURN((LM_ERROR,
59 ACE_TEXT("(%P|%t) Failed to parse the arguments!\n")),
60 1);
61 }
62
63 try
64 {
65
66 ::DDS::DomainParticipantFactory_var dpFactory =
67 TheParticipantFactoryWithArgs(argc, argv);
68 if ( CORBA::is_nil (dpFactory.in()) )
69 {
70 ACE_ERROR_RETURN((LM_ERROR,
71 ACE_TEXT("(%P|%t) Nil DomainParticipantFactory returned!\n")),
72 2);
73 }
74
75 ::DDS::DomainParticipantListener_var dpListener (new OPENDDS_DCPS_DomainParticipantListener_i);
76 if ( CORBA::is_nil (dpListener.in()) )
77 {
78 ACE_ERROR_RETURN((LM_ERROR,
79 ACE_TEXT("(%P|%t) Nil DomainParticipantListener returned!\n")),
80 3);
81 }
82
83
84 ::DDS::DomainParticipant_var participant;
85 participant =
86 dpFactory->create_participant(TEST_DOMAIN_NUMBER,
87 PARTICIPANT_QOS_DEFAULT,
88 dpListener.in(),
89 ::OpenDDS::DCPS::DEFAULT_STATUS_MASK);
90 if ( CORBA::is_nil (participant.in ()) )
91 {
92 ACE_ERROR_RETURN((LM_ERROR,
93 ACE_TEXT("(%P|%t) Nil DomainParticipant returned in DomainParticipant test!\n")),
94 3);
95 }
96
97 // Intialize the type support
98 FooTypeSupport_var fts (new FooTypeSupportImpl);
99
100 if (::DDS::RETCODE_OK != fts->register_type(participant.in (), TEST_TYPE_NAME))
101 {
102 ACE_ERROR_RETURN ((LM_ERROR,
103 ACE_TEXT ("Failed to register the FooTypeSupport!\n")),
104 3);
105 }
106
107
108 // --
109 // Check the DomainParticipant
110 // --
111

Callers

nothing calls this directly

Calls 15

get_default_topic_qosMethod · 0.80
set_default_topic_qosMethod · 0.80
delete_topicMethod · 0.80
delete_participantMethod · 0.80
_tao_print_exceptionMethod · 0.80
parse_argsFunction · 0.70
inMethod · 0.45
create_participantMethod · 0.45
register_typeMethod · 0.45
find_topicMethod · 0.45
create_topicMethod · 0.45

Tested by

no test coverage detected