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
|
buttonImpl.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 ORCA_ORCAIFACEIMPL_BUTTON_IMPL_H 00012 #define ORCA_ORCAIFACEIMPL_BUTTON_IMPL_H 00013 00014 #include <orca/button.h> 00015 #include <IceStorm/IceStorm.h> 00016 00017 #include <gbxsickacfr/gbxiceutilacfr/store.h> 00018 #include <gbxsickacfr/gbxiceutilacfr/notify.h> 00019 #include <orcaice/context.h> 00020 00021 namespace gbxsickacfr { namespace gbxiceutilacfr { class Thread; } } 00022 00023 namespace orcaifaceimpl { 00024 00028 class ButtonImpl : public IceUtil::Shared, 00029 public gbxsickacfr::gbxiceutilacfr::Notify<bool> // Note: the 'bool' here is meaningless. 00030 { 00031 friend class ButtonI; 00032 00033 public: 00035 ButtonImpl( const std::string& interfaceTag, 00036 const orcaice::Context& context ); 00038 ButtonImpl( const orcaice::Context& context, 00039 const std::string& interfaceName ); 00040 ~ButtonImpl(); 00041 00043 void initInterface(); 00044 00047 void initInterface( gbxsickacfr::gbxiceutilacfr::Thread* thread, const std::string& subsysName="", int retryInterval=2 ); 00048 00049 private: 00050 00051 // remote call implementations, mimic (but do not inherit) the orca interface 00052 void internalPress(); 00053 00054 const std::string interfaceName_; 00055 00056 orcaice::Context context_; 00057 00058 // Hang onto this so we can remove from the adapter and control when things get deleted 00059 Ice::ObjectPtr ptr_; 00060 }; 00061 typedef IceUtil::Handle<ButtonImpl> ButtonImplPtr; 00062 00063 } // namespace 00064 00065 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)