|
orca-robotics INTRODUCTION Overview Download and Install Quick Start Documentation Publications REPOSITORY Interfaces Components Libraries Utilities Software Map DEVELOPER Tutorials Examples Dev Guide Dashboard Wiki login/pass: orca/orca PEOPLE Contributors Users Project Download Mailing lists
|
notifyingconsumerImpl.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp 00005 * 00006 * This copy of Orca is licensed to you under the terms described in 00007 * the LICENSE file included in this distribution. 00008 * 00009 */ 00010 #ifndef ORCAIFACEIMPL_NOTIFYINGCONSUMERIMPL_H 00011 #define ORCAIFACEIMPL_NOTIFYINGCONSUMERIMPL_H 00012 00013 #include <gbxsickacfr/gbxiceutilacfr/notify.h> 00014 #include <orcaifaceimpl/consumerImpl.h> 00015 #include <iostream> 00016 00017 namespace orcaifaceimpl { 00018 00023 template<class ProviderType, class ProviderPrxType, class ConsumerType, class ConsumerPrxType, class ObjectType> 00024 class NotifyingConsumerImpl 00025 : public ConsumerImpl<ProviderType,ProviderPrxType,ConsumerType,ConsumerPrxType,ObjectType>, 00026 public gbxiceutilacfr::Notify<ObjectType> 00027 { 00028 00029 public: 00030 00032 NotifyingConsumerImpl( const orcaice::Context &context ) 00033 : ConsumerImpl<ProviderType,ProviderPrxType,ConsumerType,ConsumerPrxType,ObjectType>(context) {} 00034 00035 ~NotifyingConsumerImpl() 00036 { 00037 std::cout<<"NotifyingConsumerImpl::~NotifyingConsumerImpl()"<<std::endl; 00038 } 00039 00040 // from gbxiceutilacfr::Notify: 00041 // void setNotifyHandler( NotifyHandler<Type>* handler ); 00042 00043 // from gbxiceutilacfr::Notify (calls handler->handleData( const Type & )) 00044 // bool hasNotifyHandler() { return hasNotifyHandler_; }; 00045 00046 private: 00047 00048 // inherited from ConsumerImpl 00049 virtual void dataEvent( const ObjectType &data ) 00050 { 00051 // results in handler->handleData(data) being called 00052 set( data ); 00053 } 00054 }; 00055 00056 } 00057 00058 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)
1.4.5