PublisherBase.h
Go to the documentation of this file.
00001 // -*- C++ -*-
00020 #ifndef RTC_PUBLISHERBASE_H
00021 #define RTC_PUBLISHERBASE_H
00022 
00023 #include <coil/Properties.h>
00024 #include <coil/Factory.h>
00025 #include <rtm/RTC.h>
00026 #include <rtm/CdrBufferBase.h>
00027 #include <rtm/DataPortStatus.h>
00028 
00029 namespace coil
00030 {
00031   class Properties;
00032 }
00033 namespace RTC
00034 {
00035   class InPortConsumer;
00036   class ConnectorListeners;
00037   class ConnectorInfo;
00038 
00063   class PublisherBase
00064     : public DataPortStatus
00065   {
00066   public:
00067     DATAPORTSTATUS_ENUM
00079     virtual ~PublisherBase(void){};
00080 
00108     virtual ReturnCode init(coil::Properties& prop) = 0;
00109 
00135     virtual ReturnCode setConsumer(InPortConsumer* consumer) = 0;
00136 
00162     virtual ReturnCode setBuffer(BufferBase<cdrMemoryStream>* buffer) = 0;
00163 
00197     virtual ReturnCode setListener(ConnectorInfo& info,
00198                                    ConnectorListeners* listeners) = 0;
00199 
00256     virtual ReturnCode write(const cdrMemoryStream& data,
00257                              unsigned long sec,
00258                              unsigned long usec) = 0;
00259 
00287     virtual bool isActive() = 0;
00288 
00314     virtual ReturnCode activate() = 0;
00315 
00341     virtual ReturnCode deactivate() = 0;
00342   
00361     virtual void release(){}
00362   };
00363 
00364   typedef coil::GlobalFactory<PublisherBase> PublisherFactory;
00365 
00366 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
00367   EXTERN template class DLL_PLUGIN coil::GlobalFactory<PublisherBase>;
00368 #endif
00369 };
00370 #endif // RTC_PUBLISHERBASE_H


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Sat Jun 8 2019 18:49:06