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

SourceForge.net Logo
Project
Download
Mailing lists

 

         

bufferedconsumerImpl.h

00001 /*
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  
00011 #ifndef ORCAIFACEIMPL_BUFFERED_CONSUMER_IMPL_H
00012 #define ORCAIFACEIMPL_BUFFERED_CONSUMER_IMPL_H
00013 
00014 #include <gbxsickacfr/gbxiceutilacfr/buffer.h>
00015 #include <orcaifaceimpl/consumerImpl.h>
00016 
00017 namespace orcaifaceimpl
00018 {
00019 
00024 template<class ProviderPrxType, class ConsumerType, class ConsumerPrxType, class ObjectType>
00025 class BufferedConsumerImpl : 
00026         public ConsumerImpl<ProviderPrxType,ConsumerType,ConsumerPrxType,ObjectType>
00027 {
00028 public:
00030     BufferedConsumerImpl( int depth, gbxsickacfr::gbxiceutilacfr::BufferType type, const orcaice::Context &context )
00031         : ConsumerImpl<ProviderPrxType,ConsumerType,ConsumerPrxType,ObjectType>(context),
00032           buffer_(depth,type) {}
00033 
00035     gbxsickacfr::gbxiceutilacfr::Buffer<ObjectType> &buffer() { return buffer_; }
00036 
00038     virtual void handleData( const ObjectType& data ) { buffer_.push( data ); }
00039 
00040 private:
00041     gbxsickacfr::gbxiceutilacfr::Buffer<ObjectType> buffer_;
00042 };
00043 
00044 } // namespace
00045 
00046 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5