Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / performance-tests / RTEvent / lib / RTEC_Initializer.cpp
blobbb1ac2a9419fd0d23f455d3b358f769c2ff95b0f
1 /**
2 * @file RTEC_Initializer.cpp
4 * @author Carlos O'Ryan <coryan@uci.edu>
5 */
7 #include "RTEC_Initializer.h"
8 #include "RTCORBA_Setup.h"
10 #include "orbsvcs/Event/EC_Event_Channel.h"
11 #include "orbsvcs/Event/EC_Default_Factory.h"
12 #include "orbsvcs/Event/EC_RTCORBA_Factory.h"
14 #include "ace/Dynamic_Service.h"
16 TAO_EC_Event_Channel *
17 RTEC_Initializer::create (PortableServer::POA_ptr consumer_poa,
18 PortableServer::POA_ptr supplier_poa,
19 RTCORBA_Setup * rtcorba_setup)
21 TAO_EC_Event_Channel_Attributes attr (consumer_poa,
22 supplier_poa);
24 if (rtcorba_setup == 0)
26 return new TAO_EC_Event_Channel (attr);
29 TAO_EC_Factory *body =
30 ACE_Dynamic_Service<TAO_EC_Factory>::instance ("EC_Factory");
31 std::unique_ptr<TAO_EC_Factory> factory (
32 new TAO_EC_RTCORBA_Factory (body,
33 rtcorba_setup->lanes ()));
35 TAO_EC_Event_Channel *ec = new TAO_EC_Event_Channel (attr, factory.get (), 1);
36 factory.release ();
38 return ec;