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

TrypticIterator.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_CHEMISTRY_TRYPTICITERATOR_H
00028 #define OPENMS_CHEMISTRY_TRYPTICITERATOR_H
00029 
00030 #include <OpenMS/CHEMISTRY/PepIterator.h>
00031 #include <OpenMS/CONCEPT/Exception.h>
00032 #include <vector>
00033 
00034 namespace OpenMS {
00039 class TrypticIterator : public PepIterator
00040 {
00041   
00042   public:
00043   
00044   typedef std::pair<String,String> FASTAEntry;  
00048   TrypticIterator();
00052   TrypticIterator (const TrypticIterator &);
00056   virtual ~TrypticIterator ();
00057   
00063   virtual FASTAEntry operator*() throw (Exception::InvalidIterator);
00064   
00070   virtual PepIterator & operator++() throw (Exception::InvalidIterator);
00071   
00077   virtual PepIterator * operator++(int i) throw (Exception::InvalidIterator);
00078 
00084   virtual void setFastaFile (const String & f) throw (Exception::FileNotFound);
00085   
00090   virtual String getFastaFile();
00091 
00096   virtual void setTolerance (float) throw (Exception::InvalidValue, Exception::NotImplemented)
00097   {
00098     throw Exception::NotImplemented(__FILE__, __LINE__, __PRETTY_FUNCTION__);
00099   };
00100   
00106   virtual float getTolerance () throw (Exception::InvalidValue, Exception::NotImplemented)
00107   {
00108     throw Exception::NotImplemented(__FILE__, __LINE__, __PRETTY_FUNCTION__);
00109   };
00110 
00115   virtual void setSpectrum (const std::vector<float> & ) throw (Exception::InvalidValue, Exception::NotImplemented)
00116   {
00117     throw Exception::NotImplemented(__FILE__, __LINE__, __PRETTY_FUNCTION__);
00118   };
00119 
00125   virtual const std::vector<float> & getSpectrum () throw (Exception::InvalidValue, Exception::NotImplemented)
00126   {
00127     throw Exception::NotImplemented(__FILE__, __LINE__, __PRETTY_FUNCTION__);
00128   };
00129 
00134   virtual bool begin () throw (Exception::InvalidIterator);
00135 
00141   virtual bool isAtEnd ();
00142 
00147   virtual bool isDigestingEnd (char aa1, char aa2);
00148   
00153   static const std::string getName()
00154   {
00155     return "TrypticIterator";
00156   }
00157 
00162   static PepIterator* create()
00163   {
00164     return new TrypticIterator;
00165   }
00166   
00167   
00168   
00169   protected:
00174     virtual std::string next_ ();
00175   
00180     bool hasNext_();
00181   
00185     void goToNextAA_ ();
00186 
00187     String f_file_; 
00188 
00189     std::string actual_pep_; 
00190 
00191     bool is_at_end_; 
00192 
00193     PepIterator* f_iterator_; 
00194 
00195     FASTAEntry f_entry_; 
00196 
00197     unsigned int b_,e_; 
00198 
00199   
00200   
00201 };
00202 
00203 }
00204 #endif //OPENMS_CHEMISTRY_EDWARDSLIPPERTITERATOR_H

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