00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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