80 mpoa(poa), mservice(service)
91 return PortableServer::POA::_duplicate(
mpoa);
97 return CORBA::string_dup(
mservice.lock()->getName().c_str() );
103 return CORBA::string_dup(
mservice.lock()->doc().c_str() );
110 ::RTT::corba::CService::CProviderNames_var result = new ::RTT::corba::CService::CProviderNames();
111 result->length( names.size() );
112 for (
unsigned int i=0; i != names.size(); ++i )
113 result[i] = CORBA::string_dup( names[i].c_str() );
115 return result._retn();
119 const char * service_name)
121 std::string svc(service_name);
127 return RTT::corba::CService::_nil();
131 log(
Debug) <<
"Creating CService for "<< service_name <<endlog();
134 RTT::corba::CService_ptr serv;
137 mservs[svc] = std::pair<RTT::corba::CService_var,PortableServer::ServantBase_var>(serv, serv_i);
140 return RTT::corba::CService::_duplicate(
mservs[svc].first.in() );
146 return mservice.lock()->hasService( name );
152 ::RTT::corba::CServiceDescription_var d = new ::RTT::corba::CServiceDescription;
158 ::RTT::corba::COperationInterface::COperationDescriptions_var operations =
getOperations();
159 d->operations = operations;
161 ::RTT::corba::CDataFlowInterface::CPortDescriptions_var ports = getPortDescriptions();
164 ::RTT::corba::CConfigurationInterface::CPropertyNames_var properties =
getPropertyList();
165 d->properties = properties;
167 ::RTT::corba::CConfigurationInterface::CAttributeNames_var attributes =
getAttributeList();
168 d->attributes = attributes;
172 d->children.length( providers.size() );
173 d->children_descriptions.length( providers.size() );
175 for (
unsigned int i=0; i != providers.size(); ++i )
177 if (providers[i] ==
"this")
continue;
180 if (
mservice.lock()->getPort(providers[i]))
continue;
182 ::RTT::corba::CService_ptr provider =
getService(providers[i].c_str());
183 Servants::const_iterator it =
mservs.find(providers[i]);
189 d->children_descriptions[j] = child_description;
195 d->children.length(j);
196 d->children_descriptions.length(j);
virtual ::CORBA::Boolean hasService(const char *name)
virtual ::RTT::corba::CService_ptr getService(const char *name)
Complete description of a Service.
virtual char * getName(void)
virtual ::RTT::corba::CConfigurationInterface::CPropertyNames * getPropertyList(void)
virtual ::RTT::corba::CConfigurationInterface::CAttributeNames * getAttributeList(void)
std::vector< std::string > ProviderNames
PortableServer::POA_var mpoa
virtual ~RTT_corba_CService_i(void)
boost::shared_ptr< Service > shared_ptr
virtual RTT::corba::COperationInterface::COperationDescriptions * getOperations(void)
PortableServer::POA_ptr _default_POA()
Convenient short notation for every sub-namespace of RTT.
sequence< string > CProviderNames
RTT_corba_CService_i(RTT::ServicePtr service, PortableServer::POA_ptr poa)
virtual RTT::corba::CService_ptr activate_this()
virtual ::RTT::corba::CService::CProviderNames * getProviderNames(void)
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Represents a remote data flow interface.
virtual char * getServiceDescription(void)
virtual ::RTT::corba::CServiceDescription * getCServiceDescription(void)
boost::weak_ptr< RTT::Service > mservice