InfoRepoDiscovery.cpp File Reference

#include "InfoRepoDiscovery.h"
#include "dds/DCPS/InfoRepoDiscovery/DataReaderRemoteC.h"
#include "dds/DCPS/InfoRepoDiscovery/DataReaderRemoteImpl.h"
#include "dds/DCPS/InfoRepoDiscovery/DataWriterRemoteC.h"
#include "dds/DCPS/InfoRepoDiscovery/DataWriterRemoteImpl.h"
#include "dds/DCPS/InfoRepoDiscovery/FailoverListener.h"
#include "dds/DCPS/Service_Participant.h"
#include "dds/DCPS/RepoIdBuilder.h"
#include "dds/DCPS/ConfigUtils.h"
#include "tao/ORB_Core.h"
#include "ace/Reactor.h"
#include "dds/DCPS/DomainParticipantImpl.h"
#include "dds/DCPS/BuiltInTopicUtils.h"
#include "dds/DCPS/Marked_Default_Qos.h"
#include "dds/DCPS/transport/framework/TransportRegistry.h"
#include "dds/DCPS/transport/framework/TransportExceptions.h"
#include "dds/DCPS/transport/tcp/TcpInst.h"
#include "dds/DCPS/transport/tcp/TcpInst_rch.h"
#include "dds/DdsDcpsCoreTypeSupportImpl.h"

Include dependency graph for InfoRepoDiscovery.cpp:

Go to the source code of this file.

Namespaces

namespace  OpenDDS
namespace  OpenDDS::DCPS

Functions

template<class T_impl, class T_ptr>
T_impl * remote_reference_to_servant (T_ptr p, CORBA::ORB_ptr orb)
template<class T>
T::_stub_ptr_type servant_to_remote_reference (T *servant, CORBA::ORB_ptr orb)
template<class T>
void deactivate_remote_object (T obj, CORBA::ORB_ptr orb)
DCPSInfo_ptr OpenDDS::DCPS::get_repo (const char *ior, CORBA::ORB_ptr orb)
 OpenDDS::DCPS::ACE_FACTORY_DEFINE (OpenDDS_InfoRepoDiscovery, IRDiscoveryLoader)

Variables

const ACE_TCHAR OpenDDS::DCPS::REPO_SECTION_NAME [] = ACE_TEXT("repository")


Function Documentation

template<class T>
void @19::deactivate_remote_object ( obj,
CORBA::ORB_ptr  orb 
) [static]

Definition at line 80 of file InfoRepoDiscovery.cpp.

Referenced by OpenDDS::DCPS::InfoRepoDiscovery::removeDataReaderRemote(), and OpenDDS::DCPS::InfoRepoDiscovery::removeDataWriterRemote().

00081 {
00082   CORBA::Object_var poa_obj =
00083     orb->resolve_initial_references("RootPOA");
00084   PortableServer::POA_var poa = PortableServer::POA::_narrow(poa_obj.in());
00085   PortableServer::ObjectId_var oid =
00086     poa->reference_to_id(obj);
00087   poa->deactivate_object(oid.in());
00088 }

template<class T_impl, class T_ptr>
T_impl* @19::remote_reference_to_servant ( T_ptr  p,
CORBA::ORB_ptr  orb 
) [static]

Get a servant pointer given an object reference.

Exceptions:
PortableServer::POA::ObjectNotActive PortableServer::POA::WrongAdapter PortableServer::POA::WongPolicy

Definition at line 41 of file InfoRepoDiscovery.cpp.

00042 {
00043   if (CORBA::is_nil(p)) {
00044     return 0;
00045   }
00046 
00047   CORBA::Object_var obj =
00048     orb->resolve_initial_references("RootPOA");
00049   PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in());
00050 
00051   T_impl* the_servant =
00052     dynamic_cast<T_impl*>(poa->reference_to_servant(p));
00053 
00054   // Use the ServantBase_var so that the servant's reference
00055   // count will not be changed by this operation.
00056   PortableServer::ServantBase_var servant = the_servant;
00057 
00058   return the_servant;
00059 }

template<class T>
T::_stub_ptr_type @19::servant_to_remote_reference ( T *  servant,
CORBA::ORB_ptr  orb 
) [static]

Given a servant, return the remote object reference from the local POA.

Exceptions:
PortableServer::POA::ServantNotActive,PortableServer::POA::WrongPolicy 

Definition at line 65 of file InfoRepoDiscovery.cpp.

Referenced by OpenDDS::DCPS::InfoRepoDiscovery::add_publication(), and OpenDDS::DCPS::InfoRepoDiscovery::add_subscription().

00066 {
00067   CORBA::Object_var obj =
00068     orb->resolve_initial_references("RootPOA");
00069   PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in());
00070 
00071   PortableServer::ObjectId_var oid = poa->activate_object(servant);
00072 
00073   obj = poa->id_to_reference(oid.in());
00074 
00075   typename T::_stub_ptr_type the_obj = T::_stub_type::_narrow(obj.in());
00076   return the_obj;
00077 }


Generated on Fri Feb 12 20:05:35 2016 for OpenDDS by  doxygen 1.4.7