CDataFlowInterface_ptr CDataFlowInterface_i::getRemoteInterface(RTT::interface::DataFlowInterface* dfi, PortableServer::POA_ptr poa) { for (ServantMap::const_iterator it = s_servant_map.begin(); it != s_servant_map.end(); ++it) { if (it->second == dfi) return it->first; } CDataFlowInterface_i* servant = new CDataFlowInterface_i(dfi, poa ); CDataFlowInterface_ptr server = servant->_this(); registerServant( server, dfi); return server; }
CDataFlowInterface_ptr CDataFlowInterface_i::getRemoteInterface(RTT::DataFlowInterface* dfi, PortableServer::POA_ptr poa) { for (ServantMap::const_iterator it = s_servant_map.begin(); it != s_servant_map.end(); ++it) { if (it->getDataFlowInterface() == dfi) return it->objref; } CDataFlowInterface_i* servant = new CDataFlowInterface_i(dfi, poa ); CDataFlowInterface_ptr server = servant->_this(); servant->_remove_ref(); registerServant( server, servant); return server; }