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
33namespace pwiz {
34namespace 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
71PWIZ_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_
#define PWIZ_API_DECL
Definition Export.hpp:32
FASTA -> ProteomeData stream serialization.
Reader_FASTA(Reader_FASTA &)
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;
Reader_FASTA(const Config &config=Config())
constructor
const char * getType() const
Reader_FASTA & operator=(Reader_FASTA &)
virtual void read(const std::string &uri, boost::shared_ptr< std::istream > uriStreamPtr, ProteomeData &result) const
fill in the ProteomeData structure
interface for file readers
Definition Reader.hpp:37
PWIZ_API_DECL std::ostream & operator<<(std::ostream &os, const data::Diff< ProteomeData, DiffConfig > &diff)
Reader_FASTA configuration.
bool indexed
read with a side-by-side index