Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / performance-tests / RTEvent / lib / Loopback_Pair.cpp
blob908d4b06f0f8fb146d8a0d58ed7a15cfb2a05ae4
1 /**
2 * @file Loopback_Pair.cpp
4 * @author Carlos O'Ryan <coryan@uci.edu>
5 */
7 #include "Loopback_Pair.h"
8 #include "Auto_Disconnect.h"
10 #if !defined(__ACE_INLINE__)
11 #include "Loopback_Pair.inl"
12 #endif /* __ACE_INLINE__ */
14 void
15 Loopback_Pair::init (CORBA::Long experiment_id,
16 CORBA::Long base_event_type,
17 PortableServer::POA_ptr supplier_poa,
18 PortableServer::POA_ptr consumer_poa)
20 this->loopback_supplier_ = new Loopback_Supplier (experiment_id,
21 base_event_type + 1,
22 supplier_poa);
23 this->loopback_consumer_ = new Loopback_Consumer (experiment_id,
24 base_event_type,
25 loopback_supplier_.in (),
26 consumer_poa);
29 void
30 Loopback_Pair::connect (RtecEventChannelAdmin::EventChannel_ptr ec)
32 this->loopback_supplier_->connect (ec);
33 Auto_Disconnect<Loopback_Supplier> loopback_supplier_disconnect (this->loopback_supplier_);
35 this->loopback_consumer_->connect (ec);
36 Auto_Disconnect<Loopback_Consumer> loopback_consumer_disconnect (this->loopback_consumer_);
38 loopback_consumer_disconnect.release ();
39 loopback_supplier_disconnect.release ();
42 void
43 Loopback_Pair::disconnect ()
45 Auto_Disconnect<Loopback_Supplier> loopback_supplier_disconnect (this->loopback_supplier_);
46 Auto_Disconnect<Loopback_Consumer> loopback_consumer_disconnect (this->loopback_consumer_);