debug/src/eventdata.h

00001 /***************************************************************************
00002                           eventdata.h  -  description
00003                              -------------------
00004     begin                : Tus Feb 15 2005
00005     copyright            : (C) 2005 by Lynn Hazan
00006     email                : lynn.hazan.myrealbox.com
00007  ***************************************************************************/
00008 /***************************************************************************                                                                     *
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; either version 2 of the License, or     *
00012  *   (at your option) any later version.                                   *
00013  *                                                                         *
00014  *   This program is distributed in the hope that it will be useful,       *
00015  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00016  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00017  *   GNU General Public License for more details.                          *
00018  *                                                                         *
00019  *   You should have received a copy of the GNU General Public License     *
00020  *   along with this program; if not, write to the                         *
00021  *   Free Software Foundation, Inc.,                                       *
00022  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00023  ***************************************************************************/
00024 #ifndef EVENTDATA_H
00025 #define EVENTDATA_H
00026 
00027 //include files for the application
00028 #include "array.h"
00029 #include "types.h"
00030 
00031 //General C++ include files
00032 #include <iostream>
00033 using namespace std;
00034 
00035 
00039 class EventData{
00040 public:
00046    inline EventData(Array<int> d,Array<dataType> t,bool status){
00047      times = t;
00048      ids = d;
00049      ready = status;
00050    };
00051    
00052    inline EventData(){
00053     ready = false;
00054    };
00055     
00056    inline EventData& operator=(const EventData& source){
00057     if(&source != this){
00058      ready = source.ready;
00059      times = source.times;
00060      ids = source.ids;
00061     }     
00062     return *this;    
00063   };
00064 
00065    inline void setStatus(bool status){ready = status;};
00066    inline void setData(Array<dataType>& t,Array<int>& d){
00067      times = t;
00068      ids = d;
00069    };
00071    inline bool status(){return ready;};
00072    
00074    inline Array<int>& getIds(){return ids;};
00075    
00078    inline Array<dataType>& getTimes(){return times;};
00079    
00085    void computePositions(double samplingRate,double positionSamplingRate,long startTime);
00086    
00089    inline Array<dataType>& getPositions(){return positions;};
00090    
00091     
00092 private:    
00093     Array<dataType> times;
00094     Array<int> ids;
00095     bool ready;
00096     Array<dataType> positions;
00097 };
00098 
00099 #endif

Generated on Mon Sep 17 20:47:30 2007 for NeuroScope by  doxygen 1.5.1