Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / orbsvcs / tests / Notify / lib / Direct_Supplier.cpp
blob2751578c16e2e931274fbe37c2ce27113ec5269f
1 #include "Direct_Supplier.h"
3 #if ! defined (__ACE_INLINE__)
4 #include "Direct_Supplier.inl"
5 #endif /* __ACE_INLINE__ */
8 #include "LookupManager.h"
10 TAO_Notify_Tests_Direct_Supplier::TAO_Notify_Tests_Direct_Supplier (ACE_CString& target)
11 : target_ (target)
15 TAO_Notify_Tests_Direct_Supplier::~TAO_Notify_Tests_Direct_Supplier ()
19 void
20 TAO_Notify_Tests_Direct_Supplier::connect ()
22 // Get the POA
23 PortableServer::POA_var poa;
24 LOOKUP_MANAGER->resolve (poa, this->poa_name_.c_str ());
26 // set the POA
27 this->set_poa (poa.in ());
29 // Get hold of the reference.
30 CosNotifyComm::StructuredPushSupplier_var supplier_ref =
31 this->_this ();
33 // Register the activated object.
34 LOOKUP_MANAGER->_register (supplier_ref.in (), this->name_.c_str ());
36 // Resolve the target object.
37 LOOKUP_MANAGER->resolve (this->target_object_, this->target_.c_str ());
40 void
41 TAO_Notify_Tests_Direct_Supplier::send_event (const CosNotification::StructuredEvent& event)
43 ACE_ASSERT (!CORBA::is_nil (this->target_object_.in ()));
45 this->target_object_->push_structured_event (event);