20 #ifndef RTC_CORBAPORT_H 21 #define RTC_CORBAPORT_H 733 PortableServer::RefCountServantBase&
provider);
1105 std::string& iorstr);
1142 std::string& iorstr);
1221 const char* instance_name,
1222 PortableServer::RefCountServantBase* servant)
1228 #ifndef ORB_IS_RTORB 1239 CORBA::Object_var obj;
1242 CORBA::String_var ior_var = orb->object_to_string(obj);
1245 #else // ORB_IS_RTORB 1249 CORBA::Object_var obj;
1250 obj = CORBA::Object_var(
m_servant->__this());
1252 CORBA::String_var ior_var = orb->object_to_string(obj);
1254 #endif // ORB_IS_RTORB 1272 catch(const ::PortableServer::POA::ServantAlreadyActive &)
1321 const char* instance_name,
1325 m_consumer(consumer),
1337 CORBA::Object_var obj = orb->string_to_object(ior);
1338 if (CORBA::is_nil(obj))
1343 return m_consumer->setObject(obj.in());
1347 m_consumer->releaseObject();
1373 : m_consumers(consumers)
1379 for (CorbaConsumerList::iterator it(m_consumers.begin());
1380 it != m_consumers.end(); ++it)
1382 std::string name(nv.name);
1383 if (it->descriptor() == (
const char*)nv.name)
1385 it->releaseObject();
1393 #endif // RTC_CORBAPORT_H RTC's Port base class.
virtual ReturnCode_t publishInterfaces(ConnectorProfile &connector_profile)
Publish information about interfaces.
coil::Properties m_properties
Properties.
std::vector< CorbaProviderHolder > CorbaProviderList
vector to stored Providers' information
std::vector< CorbaConsumerHolder > CorbaConsumerList
void operator()(const SDOPackage::NameValue &nv)
CorbaPort(const char *name)
Constructor.
PortableServer::POA_ptr getPOA()
Get a pointer to RootPOA held by Manager.
PortableServer::ObjectId_var m_oid
unsubscribe(CorbaConsumerList &consumers)
std::vector< std::pair< std::string, std::string > > NVList
void init(coil::Properties &prop)
Initializing properties.
CorbaProviderList m_providers
std::string m_instanceName
CORBA::ORB_ptr getORB()
Get the pointer to ORB.
static Manager & instance()
Get instance of the manager.
CorbaConsumerBase * m_consumer
virtual ~CorbaPort(void)
Virtual destructor.
bool setObject(const char *ior)
The structure to be stored Consumer information.
CorbaConsumerHolder(const char *type_name, const char *instance_name, CorbaConsumerBase *consumer)
NameValue and NVList utility functions.
std::string instanceName()
The structure to be stored Provider information.
Functor to release Consumer's object.
PortableServer::RefCountServantBase * m_servant
const std::string & getIor()
std::string instanceName()
virtual void unsubscribeInterfaces(const ConnectorProfile &connector_profile)
Unsubscribe interfaces.
virtual void deactivateInterfaces()
Deactivate all Port interfaces.
prop
Organization::get_organization_property ();.
bool setObject(const std::string &ior, CorbaConsumerHolder &cons)
Setting IOR to Consumer.
virtual ReturnCode_t subscribeInterfaces(const ConnectorProfile &connector_profile)
Subscribe to interface.
Class represents a set of properties.
std::string m_instanceName
virtual bool findProvider(const NVList &nv, CorbaConsumerHolder &cons, std::string &iorstr)
Find out a provider corresponding to the consumer from NVList.
CorbaConsumerList m_consumers
virtual bool findProviderOld(const NVList &nv, CorbaConsumerHolder &cons, std::string &iorstr)
Find out a provider corresponding to the consumer from NVList.
bool releaseObject(const std::string &ior, CorbaConsumerHolder &cons)
Releasing Consumer Object.
virtual ~CorbaProviderHolder()
bool registerConsumer(const char *instance_name, const char *type_name, CorbaConsumerBase &consumer)
Register the consumer.
virtual void activateInterfaces()
Activate all Port interfaces.
bool registerProvider(const char *instance_name, const char *type_name, PortableServer::RefCountServantBase &provider)
Register the provider.
CorbaProviderHolder(const char *type_name, const char *instance_name, PortableServer::RefCountServantBase *servant)
CorbaConsumerList & m_consumers