ProteoWizard
Reader_FASTA.hpp
Go to the documentation of this file.
1 //
2 // $Id$
3 //
4 //
5 // Original author: Darren Kessner <darren@proteowizard.org>
6 //
7 // Copyright 2007 Spielberg Family Center for Applied Proteomics
8 // Cedars-Sinai Medical Center, Los Angeles, California 90048
9 //
10 // Licensed under the Apache License, Version 2.0 (the "License");
11 // you may not use this file except in compliance with the License.
12 // You may obtain a copy of the License at
13 //
14 // http://www.apache.org/licenses/LICENSE-2.0
15 //
16 // Unless required by applicable law or agreed to in writing, software
17 // distributed under the License is distributed on an "AS IS" BASIS,
18 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 // See the License for the specific language governing permissions and
20 // limitations under the License.
21 //
22 
23 
24 #ifndef _READER_FASTA_HPP_
25 #define _READER_FASTA_HPP_
26 
27 
29 #include "ProteomeData.hpp"
30 #include "Reader.hpp"
31 
32 
33 namespace pwiz {
34 namespace proteome {
35 
36 
37 /// FASTA -> ProteomeData stream serialization
39 {
40  public:
41 
42  /// Reader_FASTA configuration
44  {
45  /// read with a side-by-side index
46  bool indexed;
47 
48  Config() {}
49  };
50 
51  /// constructor
52  Reader_FASTA(const Config& config = Config());
53 
54  const char* getType() const {return "FASTA";}
55 
56  virtual std::string identify(const std::string& uri,
57  boost::shared_ptr<std::istream> uriStreamPtr) const;
58 
59  /// fill in the ProteomeData structure
60  virtual void read(const std::string& uri,
61  boost::shared_ptr<std::istream> uriStreamPtr,
62  ProteomeData& result) const;
63 
64  private:
68 };
69 
70 
71 PWIZ_API_DECL std::ostream& operator<<(std::ostream& os, const Reader_FASTA::Config& config);
72 
73 
74 } // namespace proteome
75 } // namespace pwiz
76 
77 
78 #endif // _READER_FASTA_HPP_
pwiz::proteome::Reader_FASTA::identify
virtual std::string identify(const std::string &uri, boost::shared_ptr< std::istream > uriStreamPtr) const
return file type iff Reader recognizes the file, else empty;
pwiz::proteome::Reader_FASTA::read
virtual void read(const std::string &uri, boost::shared_ptr< std::istream > uriStreamPtr, ProteomeData &result) const
fill in the ProteomeData structure
pwiz::proteome::operator<<
PWIZ_API_DECL std::ostream & operator<<(std::ostream &os, const data::Diff< ProteomeData, DiffConfig > &diff)
pwiz::proteome::Reader_FASTA
FASTA -> ProteomeData stream serialization.
Definition: Reader_FASTA.hpp:39
pwiz
Definition: ChromatogramList_Filter.hpp:36
pwiz::proteome
Definition: AminoAcid.hpp:35
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition: Export.hpp:32
pwiz::proteome::Reader_FASTA::Reader_FASTA
Reader_FASTA(Reader_FASTA &)
pwiz::proteome::Reader_FASTA::Reader_FASTA
Reader_FASTA(const Config &config=Config())
constructor
Export.hpp
pwiz::proteome::Reader
interface for file readers
Definition: Reader.hpp:37
pwiz::proteome::Reader_FASTA::Config::Config
Config()
Definition: Reader_FASTA.hpp:48
pwiz::proteome::ProteomeData
Definition: ProteomeData.hpp:89
Reader.hpp
ProteomeData.hpp
pwiz::proteome::Reader_FASTA::Config::indexed
bool indexed
read with a side-by-side index
Definition: Reader_FASTA.hpp:46
pwiz::proteome::Reader_FASTA::getType
const char * getType() const
Definition: Reader_FASTA.hpp:54
pwiz::proteome::Reader_FASTA::Config
Reader_FASTA configuration.
Definition: Reader_FASTA.hpp:44
pwiz::proteome::Reader_FASTA::config_
Config config_
Definition: Reader_FASTA.hpp:65
pwiz::proteome::Reader_FASTA::operator=
Reader_FASTA & operator=(Reader_FASTA &)