| 103 | } |
| 104 | |
| 105 | int ACE_TMAIN(int argc, ACE_TCHAR** argv) |
| 106 | { |
| 107 | int result; |
| 108 | ACE_ARGV argv_copy(argc, argv); |
| 109 | ACE_ARGV argv_copy2(argc, argv); |
| 110 | try { |
| 111 | OpenDDS::Model::Application application(argc, argv); |
| 112 | { |
| 113 | std::cout << "Creating primary subscriber instance" << std::endl; |
| 114 | MultiInstance::PrimaryMultiInstanceType primary_model(application, |
| 115 | argc, |
| 116 | argv_copy.argv()); |
| 117 | std::cout << "Running primary subscriber instance" << std::endl; |
| 118 | result = run_instance(primary_model); |
| 119 | std::cout << "Primary subscriber instance complete" << std::endl; |
| 120 | } |
| 121 | if (!result) { |
| 122 | int argc_copy = argv_copy.argc(); |
| 123 | std::cout << "Creating secondary subscriber instance" << std::endl; |
| 124 | MultiInstance::SecondaryMultiInstanceType secondary_model(application, |
| 125 | argc_copy, |
| 126 | argv_copy2.argv()); |
| 127 | std::cout << "Running secondary subscriber instance" << std::endl; |
| 128 | result = run_instance(secondary_model); |
| 129 | std::cout << "Secondary subscriber instance complete" << std::endl; |
| 130 | } |
| 131 | } catch (const CORBA::Exception& e) { |
| 132 | e._tao_print_exception("Exception caught in main():"); |
| 133 | return -1; |
| 134 | |
| 135 | } catch( const std::exception& ex) { |
| 136 | ACE_ERROR_RETURN((LM_ERROR, |
| 137 | ACE_TEXT("(%P|%t) ERROR: %N:%l: main() -") |
| 138 | ACE_TEXT(" Exception caught: %C\n"), |
| 139 | ex.what()), |
| 140 | -1); |
| 141 | } |
| 142 | |
| 143 | std::cout << "Subscriber exiting" << std::endl; |
| 144 | return result; |
| 145 | } |
nothing calls this directly
no test coverage detected