orca-robotics


INTRODUCTION
Overview
Download and Install
Documentation

REPOSITORY
Interfaces
Drivers
Libraries
Utilities
Software Map

DEVELOPER
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

simpletracer.h

00001 /*
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_SIMPLE_TRACER_H
00012 #define HYDROICEUTIL_SIMPLE_TRACER_H
00013 
00014 #include <gbxsickacfr/gbxutilacfr/tracer.h>
00015 #include <IceUtil/Mutex.h>
00016 
00017 namespace hydroiceutil
00018 {
00019 
00024 class SimpleTracer : public gbxsickacfr::gbxutilacfr::Tracer
00025 {
00026 public:
00028     SimpleTracer( const std::string& sysName="Tracer" );
00029 
00031     virtual void print( const std::string &message );
00032 
00034     virtual void info( const std::string &message, int level=1 );
00035     
00037     virtual void warning( const std::string &message, int level=1 );
00038     
00040     virtual void error( const std::string &message, int level=1 );
00041 
00043     virtual void debug( const std::string &message, int level=1 );
00044 
00046     virtual int verbosity( TraceType traceType, DestinationType destType ) const;
00047 
00048 private:
00049     // a string to prepend to all trace messages    
00050     std::string prefix_;
00051 
00052     // custom outgoing commands
00053     void toDisplay( const std::string& category, const std::string& message, int level );
00054 
00055     // utilities
00056     void assembleMessage( const std::string& category, const std::string& message, int level, std::string& s );
00057 
00058     // Tracer may be called from multiple threads.
00059     IceUtil::Mutex mutex_;
00060 };
00061 
00062 } // namespace
00063 
00064 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5