xmlreader.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Lynn Hazan                                      *
00003  *   lynn.hazan@myrealbox.com                                              *
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 #ifndef XMLREADER_H
00021 #define XMLREADER_H
00022 
00023 //include files for the application
00024 #include <channelcolorslayout.h>
00025 #include "channelcolors.h"
00026 #include "generalinformation.h"
00027 #include "neuroscopevideoinfo.h"
00028 #include "tags.h"
00029 #include "fileinformation.h"
00030 #include "programinformation.h"
00031 
00032 // include files for KDE
00033 #include <kurl.h>
00034 
00035 //include files for QT
00036 #include <qvaluelist.h> 
00037 
00038 //Libxml2 include files.
00039 #include <stdlib.h>
00040 #include <stdio.h>
00041 #include <libxml/tree.h>
00042 #include <libxml/parser.h>
00043 #include <libxml/xpath.h>
00044 #include <libxml/xpathInternals.h>
00045 
00046 
00050 class XmlReader{
00051 public:
00052     XmlReader();
00053     ~XmlReader();
00054 
00059   bool parseFile(const KURL& url);
00060 
00062   void closeFile();
00063   
00067  void getAcquisitionSystemInfo(QMap<QString,float>& acquisitionSystemInfo)const; 
00068  
00075  void getAnatomicalDescription(int nbChannels,QMap<int, QValueList<int> >& anatomicalGroups,QMap<QString, QMap<int,QString> >& attributes);
00076 
00083  void getSpikeDescription(int nbChannels,QMap<int, QValueList<int> >& spikeGroups,QMap<int, QMap<QString,QString> >& information);
00084    
00089  void getUnits(QMap< int,QValueList<QString> >& units)const;
00094  void getGeneralInformation(GeneralInformation& generalInformation)const;
00095      
00099  void getVideoInfo(QMap<QString,float>& videoInformation)const; 
00100  
00105  int getLfpInformation()const;
00106 
00107  //files
00108  
00113  void getFilesInformation(QValueList<FileInformation>& files)const;
00114 
00115   //NeuroScope related information
00116    
00120  void getChannelColors(QValueList<ChannelColors>& list)const;
00121  
00126  float getScreenGain() const;
00127 
00131  void getNeuroscopeVideoInfo(NeuroscopeVideoInfo& videoInfo) const; 
00132  
00136  void getChannelDefaultOffset(QMap<int,int>& channelDefaultOffsets)const;
00137  
00143   int getNbSamples()const;
00144 
00150   int getPeakSampleIndex()const;
00151  
00152  //programs
00153  
00157  void getProgramsInformation(QValueList<ProgramInformation>& programs) const; 
00158  
00162  void getProgramInformation(ProgramInformation& programInformation) const;
00163  
00164 private:
00165  QString readVersion;
00166  xmlDocPtr doc;  
00167  xmlXPathContextPtr xpathContex;  
00168 };
00169 
00170 #endif

Generated on Sat Sep 15 16:04:45 2007 for ndmanager.kdevelop by  doxygen 1.5.1