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

SourceForge.net Logo
Project
Download
Mailing lists

 

         

notifyingconsumerImpl.h

00001 /*
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 #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,
00024          class ConsumerType,
00025          class ObjectType,
00026          class ConsumerTypeIType=ConsumerTypeI<ConsumerType,ObjectType> >
00027 class NotifyingConsumerImpl
00028     : public ConsumerImpl<ProviderType,ConsumerType,ObjectType,ConsumerTypeIType>,
00029       public gbxiceutilacfr::Notify<ObjectType>
00030 {
00031 
00032 public: 
00033 
00035     NotifyingConsumerImpl( const orcaice::Context &context )
00036         : ConsumerImpl<ProviderType,ConsumerType,ObjectType,ConsumerTypeIType>(context) {}
00037 
00038     virtual ~NotifyingConsumerImpl() {}
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)


Generated for Orca Robotics by  doxygen 1.4.5