| 13 | namespace examples { namespace boilerplate { |
| 14 | |
| 15 | DDS::DomainParticipant_var |
| 16 | createParticipant(DDS::DomainParticipantFactory_var dpf) |
| 17 | { |
| 18 | // Create DomainParticipant |
| 19 | DDS::DomainParticipant_var participant = |
| 20 | dpf->create_participant(42, // made-up domain ID |
| 21 | PARTICIPANT_QOS_DEFAULT, |
| 22 | 0, // no listener |
| 23 | OpenDDS::DCPS::DEFAULT_STATUS_MASK); |
| 24 | |
| 25 | // Check for failure |
| 26 | if (!participant) { |
| 27 | throw std::string("failed to create domain participant"); |
| 28 | } |
| 29 | return participant; |
| 30 | } |
| 31 | |
| 32 | DDS::Topic_var |
| 33 | createTopic(DDS::DomainParticipant_var participant) |
no test coverage detected