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 ProviderPrxType, class ConsumerType, class ConsumerPrxType, class ObjectType> 00024 class NotifyingConsumerImpl 00025 : public ConsumerImpl<ProviderPrxType,ConsumerType,ConsumerPrxType,ObjectType>, 00026 public gbxsickacfr::gbxiceutilacfr::Notify<ObjectType> 00027 { 00028 00029 public: 00030 00032 NotifyingConsumerImpl( const orcaice::Context &context ) 00033 : ConsumerImpl<ProviderPrxType,ConsumerType,ConsumerPrxType,ObjectType>(context) {} 00034 00035 // from gbxsickacfr::gbxiceutilacfr::Notify: 00036 // void setNotifyHandler( NotifyHandler<Type>* handler ); 00037 00038 // from gbxsickacfr::gbxiceutilacfr::Notify (calls handler->handleData( const Type & )) 00039 // bool hasNotifyHandler() { return hasNotifyHandler_; }; 00040 00041 private: 00042 00043 // inherited from ConsumerImpl 00044 void handleData( const ObjectType &data ) 00045 { 00046 // results in handler->handleData(data) being called 00047 set( data ); 00048 } 00049 00050 }; 00051 00052 } 00053 00054 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)