|
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
|
printingconsumerImpl.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 00011 #ifndef ORCAIFACEIMPL_PRINTING_CONSUMER_IMPL_H 00012 #define ORCAIFACEIMPL_PRINTING_CONSUMER_IMPL_H 00013 00014 #include <orcaifaceimpl/consumerImpl.h> 00015 #include <orcaifaceutil/orcaifaceutil.h> 00016 00017 namespace orcaifaceimpl 00018 { 00019 00030 template<class ProviderType, class ProviderPrxType, class ConsumerType, class ConsumerPrxType, class ObjectType> 00031 class PrintingConsumerImpl : 00032 public ConsumerImpl<ProviderType,ProviderPrxType,ConsumerType,ConsumerPrxType,ObjectType> 00033 { 00034 using ConsumerImpl<ProviderType,ProviderPrxType,ConsumerType,ConsumerPrxType,ObjectType>::context_; 00035 public: 00038 PrintingConsumerImpl( const orcaice::Context &context, int recurse=1000, int expand=-1 ) : 00039 ConsumerImpl<ProviderType,ProviderPrxType,ConsumerType,ConsumerPrxType,ObjectType>(context), 00040 recurse_(recurse), 00041 expand_(expand) {} 00042 00044 virtual void dataEvent( const ObjectType& data ) 00045 { 00046 std::cout << "PrintingConsumerImpl::dataEvent() start" << std::endl; 00047 context_.tracer().info( ifaceutil::toString(data,recurse_,expand_) ); 00048 } 00049 private: 00050 int recurse_; 00051 int expand_; 00052 }; 00053 00054 } // namespace 00055 00056 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)
1.4.5