orca-robotics INTRODUCTION Overview Download and Install Documentation REPOSITORY Interfaces Drivers Libraries Utilities Software Map DEVELOPER Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
localhistory.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 distribution is licensed to you under the terms described in 00007 * the LICENSE file included in this distribution. 00008 * 00009 */ 00010 00011 #ifndef HYDROICEUTIL_LOCAL_HISTORY_H 00012 #define HYDROICEUTIL_LOCAL_HISTORY_H 00013 00014 #include <hydroutil/history.h> 00015 #include <hydroutil/properties.h> 00016 #include <hydroutil/uncopyable.h> 00017 #include <gbxsickacfr/gbxiceutilacfr/timer.h> 00018 00019 #include <IceUtil/Mutex.h> 00020 #include <memory> 00021 00022 namespace hydroiceutil 00023 { 00024 00046 class LocalHistory : public hydroutil::History, 00047 public hydroutil::Uncopyable 00048 { 00049 public: 00051 LocalHistory( const hydroutil::Properties& props=hydroutil::Properties() ); 00052 00053 // from hydroutil::History 00054 virtual void set( const std::string &message ); 00055 virtual void setWithStartSequence( const std::string& message ); 00056 virtual void setWithFinishSequence( const std::string& message ); 00057 virtual void autoStart( bool force=false ); 00058 virtual void autoFinish( bool force=false ); 00059 virtual void flush(); 00060 00061 protected: 00062 00063 // We only have one communicator but may have multiple threads. 00064 IceUtil::Mutex mutex_; 00065 00066 private: 00067 00068 bool enabled_; 00069 std::string message_; 00070 gbxsickacfr::gbxiceutilacfr::Timer upTimer_; 00071 00072 std::auto_ptr<std::ofstream> file_; 00073 00074 hydroutil::Properties properties_; 00075 }; 00076 00077 } // namespace 00078 00079 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)