InPortProvider.h
Go to the documentation of this file.
1 // -*- C++ -*-
20 #ifndef RTC_INPORTPROVIDER_H
21 #define RTC_INPORTPROVIDER_H
22 
23 #include <string>
24 
25 #include <coil/Factory.h>
26 
27 #include <rtm/BufferBase.h>
28 #include <rtm/NVUtil.h>
29 #include <rtm/SystemLogger.h>
30 #include <rtm/DataPortStatus.h>
31 #include <rtm/InPortConnector.h>
32 
33 namespace RTC
34 {
35  class ConnectorListeners;
36  class ConnectorInfo;
37 
191  : public DataPortStatus
192  {
193  public:
208  InPortProvider();
209 
223  virtual ~InPortProvider(void);
224 
252  virtual void init(coil::Properties& prop) = 0;
253 
279  virtual void setBuffer(BufferBase<cdrMemoryStream>* buffer) = 0;
280 
311  virtual void setListener(ConnectorInfo& info,
312  ConnectorListeners* listeners) = 0;
313 
338  virtual void setConnector(InPortConnector* connector) = 0;
339 
363  virtual void publishInterfaceProfile(SDOPackage::NVList& properties);
364 
392  virtual bool publishInterface(SDOPackage::NVList& properties);
393 
394  protected:
412  void setInterfaceType(const char* interface_type);
413 
431  void setDataFlowType(const char* dataflow_type);
432 
450  void setSubscriptionType(const char* subs_type);
451 
452 
453  protected:
462 
470  mutable Logger rtclog;
471 
472  private:
473  std::string m_interfaceType;
474  std::string m_dataflowType;
475  std::string m_subscriptionType;
476 
477  public:
478  // functors
487  {
489  void operator()(InPortProvider* provider)
490  {
491  provider->publishInterfaceProfile(m_prop);
492  }
494  };
495 
504  {
506  : m_prop(prop), provider_(0) {}
507  void operator()(InPortProvider* provider)
508  {
509  if (provider->publishInterface(m_prop))
510  {
511  provider_ = provider;
512  }
513  }
515  InPortProvider* provider_;
516  };
517 
518 
519  };
520 
528  typedef ::coil::GlobalFactory<InPortProvider> InPortProviderFactory;
529 
530 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
531  EXTERN template class DLL_PLUGIN ::coil::GlobalFactory<InPortProvider>;
532 #endif
533 }; // namespace RTC
534 #endif // RTC_INPORTPROVIDER_H
ConnectorListeners class.
#define DATAPORTSTATUS_ENUM
Importing RTC::DataPortStatus macro.
virtual void setBuffer(BufferBase< cdrMemoryStream > *buffer)=0
Setting outside buffer&#39;s pointer.
DataPortStatus class.
virtual ~InPortProvider(void)
Destructor.
RT-Component.
Functor to publish interface profile.
void operator()(InPortProvider *provider)
SDOPackage::NVList m_properties
Properties to hold port profile.
publishInterfaceProfileFunc(SDOPackage::NVList &prop)
RT component logger class.
std::vector< std::pair< std::string, std::string > > NVList
Definition: IRTC.h:67
std::string m_dataflowType
std::string m_interfaceType
publishInterfaceFunc(SDOPackage::NVList &prop)
std::string m_subscriptionType
InPortConnector base class.
Buffer abstract class.
NameValue and NVList utility functions.
virtual void setConnector(InPortConnector *connector)=0
set Connector
void setDataFlowType(const char *dataflow_type)
Set the dataflow type.
virtual void init(coil::Properties &prop)=0
Initializing configuration.
virtual void publishInterfaceProfile(SDOPackage::NVList &properties)
Publish InterfaceProfile information.
prop
Organization::get_organization_property ();.
void setInterfaceType(const char *interface_type)
Set the interface type.
Class represents a set of properties.
Definition: Properties.h:101
Functor to publish interface profile.
virtual bool publishInterface(SDOPackage::NVList &properties)
Publish interface information.
Logger rtclog
Logger stream.
::coil::GlobalFactory< InPortProvider > InPortProviderFactory
InPortProviderFactory type definition.
DataPortStatus mixin class.
BufferBase abstract class.
Definition: BufferBase.h:104
DATAPORTSTATUS_ENUM InPortProvider()
Constructor.
#define EXTERN
void setSubscriptionType(const char *subs_type)
Set the subscription type.
virtual void setListener(ConnectorInfo &info, ConnectorListeners *listeners)=0
Set the listener.


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Jun 6 2019 19:25:58