recorder.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Gav Wood                                        *
00003  *   gav@cs.york.ac.uk                                                     *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00021 #ifndef __RECORDER_H
00022 #define __RECORDER_H
00023 
00024 #include <qmutex.h>
00025 #include <qfile.h>
00026 #include <qtextstream.h>
00027 #include <qwaitcondition.h>
00028 
00029 #ifdef __GEDDEI_BUILD
00030 #include "qfastwaitcondition.h"
00031 #include "processor.h"
00032 #else
00033 #include <qtextra/qfastwaitcondition.h>
00034 #include <geddei/processor.h>
00035 #endif
00036 
00058 class Recorder: public Processor
00059 {
00060  virtual void processor();
00061  virtual PropertiesInfo specifyProperties() const;
00062  virtual const bool verifyAndSpecifyTypes(const SignalTypeRefs &, SignalTypeRefs &);
00063  virtual void initFromProperties(const Properties &p);
00064  virtual void receivedPlunger();
00065  
00066  // Properties
00067  QFile theOutput;
00068  QTextStream stream;
00069  QString theFieldDelimiter, theRecordDelimiter;
00070  bool thePrintSection, thePrintSample, thePrintTime;
00071  uint thePadBefore, thePadAfter;
00072  
00073  // State
00074  uint theCurrentSample, theCurrentSection;
00075 public:
00079  Recorder() : Processor("Recorder", NotMulti, Guarded) {}
00080 };
00081 
00082 #endif

Generated on Thu Jul 13 06:56:33 2006 for Exscalibar by  doxygen 1.4.7