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
|
ptrnotify.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 ORCAICE_ICE_PTR_NOTIFY_H 00012 #define ORCAICE_ICE_PTR_NOTIFY_H 00013 00014 #include <gbxsickacfr/gbxiceutilacfr/notify.h> 00015 00016 #include <Ice/Ice.h> 00017 #include <IceUtil/IceUtil.h> 00018 00019 namespace orcaice 00020 { 00021 00030 template<class Type> 00031 class PtrNotify : public gbxsickacfr::gbxiceutilacfr::Notify<Type> 00032 { 00033 using gbxsickacfr::gbxiceutilacfr::Notify<Type>::handler_; 00034 00035 protected: 00036 virtual void internalSet( const Type & obj ); 00037 }; 00038 00039 template<class Type> 00040 void PtrNotify<Type>::internalSet( const Type & obj ) 00041 { 00042 Ice::ObjectPtr clone = obj->ice_clone(); 00043 const Type subclass = Type::dynamicCast( clone ); 00044 00045 handler_->handleData( subclass ); 00046 } 00047 00048 } // end namespace 00049 00050 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)