ProteoWizard
DefaultReaderList.hpp
Go to the documentation of this file.
1//
2// $Id$
3//
4//
5// Original author: Darren Kessner <darren@proteowizard.org>
6//
7// Copyright 2008 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 _DEFAULTREADERLIST_HPP_
25#define _DEFAULTREADERLIST_HPP_
26
27
29#include "Reader.hpp"
30
31
32namespace pwiz {
33namespace msdata {
34
35
37{
38 public:
39 virtual std::string identify(const std::string& filename, const std::string& head) const;
40 virtual void read(const std::string& filename, const std::string& head, MSData& result, int runIndex = 0, const Config& config = Config()) const;
41 virtual void read(const std::string& filename, const std::string& head, std::vector<MSDataPtr>& results, const Config& config = Config()) const;
42 virtual const char* getType() const {return "mzML";}
43
44 private:
45 enum Type { Type_mzML, Type_mzML_Indexed, Type_Unknown };
46 Type type(std::istream& is) const;
47};
48
49
51{
52 public:
53 virtual std::string identify(const std::string& filename, const std::string& head) const;
54 virtual void read(const std::string& filename, const std::string& head, MSData& result, int runIndex = 0, const Config& config = Config()) const;
55 virtual void read(const std::string& filename, const std::string& head, std::vector<MSDataPtr>& results, const Config& config = Config()) const;
56 virtual const char* getType() const {return "mzXML";}
57};
58
59
61{
62 public:
63 virtual std::string identify(const std::string& filename, const std::string& head) const;
64 virtual void read(const std::string& filename, const std::string& head, MSData& result, int runIndex = 0, const Config& config = Config()) const;
65 virtual void read(const std::string& filename, const std::string& head, std::vector<MSDataPtr>& results, const Config& config = Config()) const;
66 virtual const char* getType() const {return "Mascot Generic";}
67};
68
69
71{
72 public:
73 virtual std::string identify(const std::string& filename, const std::string& head) const;
74 virtual void read(const std::string& filename, const std::string& head, MSData& result, int runIndex = 0, const Config& config = Config()) const;
75 virtual void read(const std::string& filename, const std::string& head, std::vector<MSDataPtr>& results, const Config& config = Config()) const;
76 virtual const char* getType() const {return "MSn";}
77};
78
79
81{
82 public:
83 virtual std::string identify(const std::string& filename, const std::string& head) const;
84 virtual void read(const std::string& filename, const std::string& head, MSData& result, int runIndex = 0, const Config& config = Config()) const;
85 virtual void read(const std::string& filename, const std::string& head, std::vector<MSDataPtr>& results, const Config& config = Config()) const;
86 virtual const char* getType() const {return "Bruker Data Exchange";}
87};
88
89
91{
92 public:
93 virtual std::string identify(const std::string& filename, const std::string& head) const;
94 virtual void read(const std::string& filename, const std::string& head, MSData& result, int runIndex = 0, const Config& config = Config()) const;
95 virtual void read(const std::string& filename, const std::string& head, std::vector<MSDataPtr>& results, const Config& config = Config()) const;
96 virtual const char* getType() const {return "MZ5";}
97};
98
99
100/// default Reader list
102{
103 public:
105};
106
107
108} // namespace msdata
109} // namespace pwiz
110
111
112#endif // _DEFAULTREADERLIST_HPP_
#define PWIZ_API_DECL
Definition Export.hpp:32
virtual void read(const std::string &filename, const std::string &head, MSData &result, int runIndex=0, const Config &config=Config()) const
fill in the MSData structure from the first (or only) sample
virtual const char * getType() const
returns a unique string identifying the reader type
virtual std::string identify(const std::string &filename, const std::string &head) const
return file type iff Reader recognizes the file, else empty;
virtual void read(const std::string &filename, const std::string &head, std::vector< MSDataPtr > &results, const Config &config=Config()) const
fill in a vector of MSData structures; provides support for multi-run input files
virtual const char * getType() const
returns a unique string identifying the reader type
virtual void read(const std::string &filename, const std::string &head, std::vector< MSDataPtr > &results, const Config &config=Config()) const
fill in a vector of MSData structures; provides support for multi-run input files
virtual std::string identify(const std::string &filename, const std::string &head) const
return file type iff Reader recognizes the file, else empty;
virtual void read(const std::string &filename, const std::string &head, MSData &result, int runIndex=0, const Config &config=Config()) const
fill in the MSData structure from the first (or only) sample
virtual std::string identify(const std::string &filename, const std::string &head) const
return file type iff Reader recognizes the file, else empty;
virtual const char * getType() const
returns a unique string identifying the reader type
virtual void read(const std::string &filename, const std::string &head, std::vector< MSDataPtr > &results, const Config &config=Config()) const
fill in a vector of MSData structures; provides support for multi-run input files
virtual void read(const std::string &filename, const std::string &head, MSData &result, int runIndex=0, const Config &config=Config()) const
fill in the MSData structure from the first (or only) sample
virtual void read(const std::string &filename, const std::string &head, MSData &result, int runIndex=0, const Config &config=Config()) const
fill in the MSData structure from the first (or only) sample
virtual void read(const std::string &filename, const std::string &head, std::vector< MSDataPtr > &results, const Config &config=Config()) const
fill in a vector of MSData structures; provides support for multi-run input files
virtual const char * getType() const
returns a unique string identifying the reader type
virtual std::string identify(const std::string &filename, const std::string &head) const
return file type iff Reader recognizes the file, else empty;
virtual const char * getType() const
returns a unique string identifying the reader type
Type type(std::istream &is) const
virtual std::string identify(const std::string &filename, const std::string &head) const
return file type iff Reader recognizes the file, else empty;
virtual void read(const std::string &filename, const std::string &head, MSData &result, int runIndex=0, const Config &config=Config()) const
fill in the MSData structure from the first (or only) sample
virtual void read(const std::string &filename, const std::string &head, std::vector< MSDataPtr > &results, const Config &config=Config()) const
fill in a vector of MSData structures; provides support for multi-run input files
virtual const char * getType() const
returns a unique string identifying the reader type
virtual std::string identify(const std::string &filename, const std::string &head) const
return file type iff Reader recognizes the file, else empty;
virtual void read(const std::string &filename, const std::string &head, MSData &result, int runIndex=0, const Config &config=Config()) const
fill in the MSData structure from the first (or only) sample
virtual void read(const std::string &filename, const std::string &head, std::vector< MSDataPtr > &results, const Config &config=Config()) const
fill in a vector of MSData structures; provides support for multi-run input files
interface for file readers
Definition Reader.hpp:39
Reader container (composite pattern).
Definition Reader.hpp:150
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition MSData.hpp:850
Reader configuration.
Definition Reader.hpp:45