00001 #ifndef _PLOTLOG_H_
00002 #define _PLOTLOG_H_
00003
00004 #include "gnuplot.h"
00005 #include "logfile.h"
00006
00007
00008
00009
00010
00011 template <class T> class PlotLog : public Gnuplot<T> , public LogFile<T>
00012 {
00013 public:
00014 PlotLog(int buffersize,const std::string& filename="",const std::string& info="",const std::string& separator="\t")
00015 :Gnuplot<T>(buffersize)
00016 ,LogFile<T>(filename,info,separator){
00017 };
00018
00019 PlotLog(const std::string& filename="",const std::string& info="",const std::string& separator="\t")
00020 :Gnuplot<T>(256)
00021 ,LogFile<T>(filename,info,separator){
00022 };
00023
00024
00025 void addChannel(const T& name , const std::string& title="",const std::string& style="lines"){
00026 Gnuplot<T>::addChannel(name,title,style);
00027 LogFile<T>::addChannel(name);
00028 };
00029
00030
00031 void putData(const T& channel, double value){
00032 Gnuplot<T>::putData(channel,value);
00033 LogFile<T>::putData(channel,value);
00034 };
00035 };
00036
00037 #endif