Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

FastaIteratorIntern.h (Maintainer: Chris Bauer)

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // --------------------------------------------------------------------------
00005 //                   OpenMS Mass Spectrometry Framework
00006 // --------------------------------------------------------------------------
00007 //  Copyright (C) 2003-2008 -- Oliver Kohlbacher, Knut Reinert
00008 //
00009 //  This library is free software; you can redistribute it and/or
00010 //  modify it under the terms of the GNU Lesser General Public
00011 //  License as published by the Free Software Foundation; either
00012 //  version 2.1 of the License, or (at your option) any later version.
00013 //
00014 //  This library 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 GNU
00017 //  Lesser General Public License for more details.
00018 //
00019 //  You should have received a copy of the GNU Lesser General Public
00020 //  License along with this library; if not, write to the Free Software
00021 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 //
00023 // --------------------------------------------------------------------------
00024 // $Maintainer: Chris Bauer$
00025 // --------------------------------------------------------------------------
00026 
00027 #ifndef OPENMS_FORMAT_FASTAITERATORINTERN_H
00028 #define OPENMS_FORMAT_FASTAITERATORINTERN_H
00029 
00030 #include <OpenMS/CHEMISTRY/PepIterator.h>
00031 #include <vector>
00032 
00033 namespace OpenMS {
00034 
00042 class FastaIteratorIntern : public PepIterator
00043 {
00044 
00045   public: 
00046     
00047   typedef std::pair<String,String> FASTAEntry;
00048   
00052   FastaIteratorIntern();
00053   
00057   FastaIteratorIntern(const FastaIteratorIntern&);
00058 
00062   virtual ~FastaIteratorIntern();
00063 
00069   virtual FASTAEntry operator*() throw (Exception::InvalidIterator);
00070   
00076   virtual PepIterator & operator++() throw (Exception::InvalidIterator);
00077   
00083   virtual PepIterator * operator++(int i) throw (Exception::InvalidIterator);
00084   
00091   virtual void setFastaFile (const String & f) throw (Exception::FileNotFound,Exception::ParseError);
00092 
00097   virtual String getFastaFile();
00098   
00104   virtual void setSpectrum (const std::vector<float> &) throw (Exception::NotImplemented)
00105   {
00106     throw Exception::NotImplemented(__FILE__, __LINE__, __PRETTY_FUNCTION__);
00107   };
00108 
00114   virtual const std::vector<float> & getSpectrum () throw (Exception::NotImplemented)
00115   {
00116     throw Exception::NotImplemented(__FILE__, __LINE__, __PRETTY_FUNCTION__);
00117   };
00118   
00125   virtual void setTolerance (float) throw (Exception::NotImplemented)
00126   {
00127     throw Exception::NotImplemented(__FILE__, __LINE__, __PRETTY_FUNCTION__);
00128   };
00129   
00136   virtual float getTolerance()throw (Exception::NotImplemented)
00137   {
00138     throw Exception::NotImplemented(__FILE__, __LINE__, __PRETTY_FUNCTION__);
00139   };
00140 
00146   virtual bool begin () throw (Exception::InvalidIterator);
00147   
00152   virtual bool isAtEnd ();
00153 
00158   static const std::string getName()
00159   {
00160     return "FastaIteratorIntern";
00161   }
00162 
00167   static PepIterator * create()
00168   {
00169     return new FastaIteratorIntern;
00170   }
00171   
00172   
00173   
00174   protected:
00175 
00176   String fasta_file_; 
00177 
00178   std::vector<FASTAEntry > entrys_; 
00179 
00180   std::vector<FASTAEntry >::iterator it_; 
00181 
00182 };
00183 
00184 }
00185 
00186 #endif //OpenMS/FORMAT/FastaIteratorIntern

Generated Tue Apr 1 15:36:34 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1