| 29 | } |
| 30 | |
| 31 | DDS::Topic_var |
| 32 | createTopic(DDS::DomainParticipant_var participant) |
| 33 | { |
| 34 | // Register TypeSupport (Messenger::Message) |
| 35 | Messenger::MessageTypeSupport_var ts = |
| 36 | new Messenger::MessageTypeSupportImpl; |
| 37 | |
| 38 | if (ts->register_type(participant, "") != DDS::RETCODE_OK) { |
| 39 | throw std::string("failed to register type support"); |
| 40 | } |
| 41 | |
| 42 | // Create Topic (Movie Discussion List) |
| 43 | CORBA::String_var type_name = ts->get_type_name(); |
| 44 | DDS::Topic_var topic = |
| 45 | participant->create_topic("Movie Discussion List", |
| 46 | type_name, |
| 47 | TOPIC_QOS_DEFAULT, |
| 48 | 0, |
| 49 | OpenDDS::DCPS::DEFAULT_STATUS_MASK); |
| 50 | |
| 51 | // Check for failure |
| 52 | if (!topic) { |
| 53 | throw std::string("failed to create topic"); |
| 54 | } |
| 55 | return topic; |
| 56 | } |
| 57 | |
| 58 | DDS::Publisher_var |
| 59 | createPublisher(DDS::DomainParticipant_var participant) |
no test coverage detected