OutPortConsumer.h
Go to the documentation of this file.
1 // -*- C++ -*-
20 #ifndef RTC_OUTPORTCONSUMER_H
21 #define RTC_OUTPORTCONSUMER_H
22 
23 #include <coil/Factory.h>
24 #include <rtm/DataPortStatus.h>
25 #include <rtm/CdrBufferBase.h>
26 
27 // Why RtORB does not allow the following foward declaration?
28 #ifndef ORB_IS_RTORB
29 namespace SDOPackage
30 {
31  class NVList;
32 };
33 #endif // ORB_IS_RTORB
34 
35 namespace coil
36 {
37  class Properties;
38 };
39 
40 namespace RTC
41 {
42  class ConnectorListeners;
43  class ConnectorInfo;
44 
172  : public DataPortStatus
173  {
174  public:
176 
191  virtual ~OutPortConsumer(void){};
192 
220  virtual void init(coil::Properties& prop) = 0;
221 
247  virtual void setBuffer(CdrBufferBase* buffer) = 0;
248 
279  virtual void setListener(ConnectorInfo& info,
280  ConnectorListeners* listeners) = 0;
281 
308  virtual ReturnCode get(cdrMemoryStream& data) = 0;
309 
335  virtual bool subscribeInterface(const SDOPackage::NVList& properties) = 0;
336 
360  virtual void unsubscribeInterface(const SDOPackage::NVList& properties) = 0;
361 
362  protected:
370  mutable Logger rtclog;
371 
379  struct subscribe
380  {
381  subscribe(const SDOPackage::NVList& prop) : m_prop(prop) {}
382  void operator()(OutPortConsumer* consumer)
383  {
384  consumer->subscribeInterface(m_prop);
385  }
387  };
388 
396  struct unsubscribe
397  {
398  unsubscribe(const SDOPackage::NVList& prop) : m_prop(prop) {}
399  void operator()(OutPortConsumer* consumer)
400  {
401  consumer->unsubscribeInterface(m_prop);
402  }
404  };
405  };
406 
414  typedef ::coil::GlobalFactory<OutPortConsumer> OutPortConsumerFactory;
415 
416 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
417  EXTERN template class DLL_PLUGIN ::coil::GlobalFactory<OutPortConsumer>;
418 #endif
419 }; // namespace RTC
420 #endif // RTC_OUTPORTCONSUMER_H
421 
subscribe(const SDOPackage::NVList &prop)
ConnectorListeners class.
#define DATAPORTSTATUS_ENUM
Importing RTC::DataPortStatus macro.
DataPortStatus class.
RT-Component.
std::vector< std::pair< std::string, std::string > > NVList
Definition: IRTC.h:67
::coil::GlobalFactory< OutPortConsumer > OutPortConsumerFactory
OutPortConsumerFactory type definition.
Functor to subscribe the interface.
const SDOPackage::NVList & m_prop
Enum
DataPortStatus return codes.
Definition: BufferStatus.h:84
SDO Package.
virtual void unsubscribeInterface(const SDOPackage::NVList &properties)=0
Unsubscribe the data receive notification.
void operator()(OutPortConsumer *consumer)
Functor to unsubscribe the interface.
virtual bool subscribeInterface(const SDOPackage::NVList &properties)=0
Subscribe the data receive notification.
Logger rtclog
Logger stream.
prop
Organization::get_organization_property ();.
Class represents a set of properties.
Definition: Properties.h:101
unsubscribe(const SDOPackage::NVList &prop)
virtual DATAPORTSTATUS_ENUM ~OutPortConsumer(void)
Destructor.
OutPortConsumer abstract class.
DataPortStatus mixin class.
BufferBase abstract class.
Definition: BufferBase.h:104
#define EXTERN
Common Object Interface Layer.
const SDOPackage::NVList & m_prop
void operator()(OutPortConsumer *consumer)


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Feb 28 2022 23:00:43