本文整理汇总了C++中portableserver::POA_var::reference_to_id方法的典型用法代码示例。如果您正苦于以下问题:C++ POA_var::reference_to_id方法的具体用法?C++ POA_var::reference_to_id怎么用?C++ POA_var::reference_to_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类portableserver::POA_var
的用法示例。
在下文中一共展示了POA_var::reference_to_id方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: guard
void
StructuredPushSupplier::disconnect()
{
DBG(cout << "Disconnecting StructuredPushSupplier." << endl);
Guard guard(connectedMutex_);
if (connected_) {
proxyConsumer_->disconnect_structured_push_consumer();
supplierAdmin_->destroy();
// Get reference to Root POA.
PortableServer::POA_var poa = _default_POA();
// Deactivate.
PortableServer::ObjectId_var oid =
poa->reference_to_id (objref_);
CORBA::release(objref_);
// deactivate from the poa.
poa->deactivate_object (oid.in ());
connected_ = false;
}
}
示例2: guard
void
StructuredPushConsumer::disconnect()
{
Guard guard(connectedMutex_);
if (connected_ == 1) {
MIRO_DBG(MIRO, LL_NOTICE, "Disconnecting StructuredPushConsumer.\n");
connected_ = -1;
try {
proxySupplier_->disconnect_structured_push_supplier();
// Get reference to Root POA.
PortableServer::POA_var poa = _default_POA();
// Deactivate.
PortableServer::ObjectId_var oid =
poa->reference_to_id(objref_);
CORBA::release(objref_);
// deactivate from the poa.
poa->deactivate_object(oid.in());
}
catch (const CORBA::Exception & e) {
MIRO_LOG_OSTR(LL_ERROR, "StructuredPushConsumer::disconnect() CORBA exception on: " << std::endl
<< e << std::endl);
}
}
}
示例3: RemoveFailure
void
Home_Servant_Impl<BASE_SKEL,
EXEC,
COMP_SVNT,
CONTAINER>::remove_component (
::Components::CCMObject_ptr comp)
{
CIAO_TRACE ("Home_Servant_Impl<>::remove_component");
typename CONTAINER::_var_type cnt_safe =
CONTAINER::_duplicate (this->container_.in());
PortableServer::POA_var poa = cnt_safe->the_POA ();
PortableServer::ObjectId_var oid = poa->reference_to_id (comp);
Components::CCMObject_var ccm_obj_var;
if (objref_map_.find (oid.in (), ccm_obj_var) != 0)
{
CIAO_ERROR (1, (LM_WARNING, CLINFO
"Home_Servant_Impl<>::remove_component - "
"Invalid component object reference\n"));
throw Components::RemoveFailure ();
}
typedef typename COMP_SVNT::_stub_type stub_type;
typename COMP_SVNT::_stub_var_type _ciao_comp =
stub_type::_narrow (ccm_obj_var.in ());
if (::CORBA::is_nil (_ciao_comp.in ()))
{
throw Components::RemoveFailure ();
}
else
{
_ciao_comp->remove ();
}
CIAO_DEBUG (6, (LM_INFO, CLINFO
"Home_Servant_Impl<>::remove_component - "
"Removed the component\n"));
}