INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
storingconsumerImpl.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2009 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 00011 #ifndef ORCAIFACEIMPL_STORING_CONSUMER_IMPL_H 00012 #define ORCAIFACEIMPL_STORING_CONSUMER_IMPL_H 00013 00014 #include <gbxsickacfr/gbxiceutilacfr/store.h> 00015 #include <orcaifaceimpl/consumerImpl.h> 00016 00017 namespace orcaifaceimpl 00018 { 00019 00024 template<class ProviderType, 00025 class ConsumerType, 00026 class ObjectType, 00027 class ConsumerTypeIType=ConsumerTypeI<ConsumerType,ObjectType> > 00028 class StoringConsumerImpl : 00029 public ConsumerImpl<ProviderType,ConsumerType,ObjectType,ConsumerTypeIType> 00030 { 00031 public: 00033 StoringConsumerImpl( const orcaice::Context &context ) 00034 : ConsumerImpl<ProviderType,ConsumerType,ObjectType,ConsumerTypeIType>(context) {} 00035 00037 gbxiceutilacfr::Store<ObjectType> &store() { return store_; } 00038 00040 virtual void dataEvent( const ObjectType& data ) 00041 { 00042 store_.set( data ); 00043 } 00044 00045 private: 00046 gbxiceutilacfr::Store<ObjectType> store_; 00047 }; 00048 00049 } // namespace 00050 00051 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)