ProteoWizard
Diff.hpp
Go to the documentation of this file.
1 //
2 // $Id: Diff.hpp 1766 2010-01-29 21:42:48Z chambm $
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 _DIFF_HPP_
25 #define _DIFF_HPP_
26 
27 
29 #include "MSData.hpp"
30 
31 
32 namespace pwiz { namespace msdata { struct DiffConfig; } }
33 
34 
35 namespace pwiz {
36 namespace data {
37 namespace diff_impl {
38 
39 
40 using namespace msdata;
41 
42 
44 void diff(const SourceFile& a,
45  const SourceFile& b,
46  SourceFile& a_b,
47  SourceFile& b_a,
48  const DiffConfig& config);
49 
51 void diff(const FileDescription& a,
52  const FileDescription& b,
53  FileDescription& a_b,
54  FileDescription& b_a,
55  const DiffConfig& config);
56 
58 void diff(const Sample& a,
59  const Sample& b,
60  Sample& a_b,
61  Sample& b_a,
62  const DiffConfig& config);
63 
65 void diff(const Component& a,
66  const Component& b,
67  Component& a_b,
68  Component& b_a,
69  const DiffConfig& config);
70 
72 void diff(const ComponentList& a,
73  const ComponentList& b,
74  ComponentList& a_b,
75  ComponentList& b_a,
76  const DiffConfig& config);
77 
79 void diff(const Software& a,
80  const Software& b,
81  Software& a_b,
82  Software& b_a,
83  const DiffConfig& config);
84 
86 void diff(const InstrumentConfiguration& a,
87  const InstrumentConfiguration& b,
88  InstrumentConfiguration& a_b,
89  InstrumentConfiguration& b_a,
90  const DiffConfig& config);
91 
93 void diff(const ProcessingMethod& a,
94  const ProcessingMethod& b,
95  ProcessingMethod& a_b,
96  ProcessingMethod& b_a,
97  const DiffConfig& config);
98 
100 void diff(const DataProcessing& a,
101  const DataProcessing& b,
102  DataProcessing& a_b,
103  DataProcessing& b_a,
104  const DiffConfig& config);
105 
107 void diff(const ScanSettings& a,
108  const ScanSettings& b,
109  ScanSettings& a_b,
110  ScanSettings& b_a,
111  const DiffConfig& config);
112 
114 void diff(const Precursor& a,
115  const Precursor& b,
116  Precursor& a_b,
117  Precursor& b_a,
118  const DiffConfig& config);
119 
121 void diff(const Product& a,
122  const Product& b,
123  Product& a_b,
124  Product& b_a,
125  const DiffConfig& config);
126 
128 void diff(const Scan& a,
129  const Scan& b,
130  Scan& a_b,
131  Scan& b_a,
132  const DiffConfig& config);
133 
135 void diff(const ScanList& a,
136  const ScanList& b,
137  ScanList& a_b,
138  ScanList& b_a,
139  const DiffConfig& config);
140 
142 void diff(const BinaryDataArray& a,
143  const BinaryDataArray& b,
144  BinaryDataArray& a_b,
145  BinaryDataArray& b_a,
146  const DiffConfig& config);
147 
149 void diff(const Spectrum& a,
150  const Spectrum& b,
151  Spectrum& a_b,
152  Spectrum& b_a,
153  const DiffConfig& config);
154 
156 void diff(const Chromatogram& a,
157  const Chromatogram& b,
158  Chromatogram& a_b,
159  Chromatogram& b_a,
160  const DiffConfig& config);
161 
163 void diff(const SpectrumList& a,
164  const SpectrumList& b,
165  SpectrumListSimple& a_b,
166  SpectrumListSimple& b_a,
167  const DiffConfig& config);
168 
170 void diff(const ChromatogramList& a,
171  const ChromatogramList& b,
172  ChromatogramListSimple& a_b,
173  ChromatogramListSimple& b_a,
174  const DiffConfig& config);
175 
177 void diff(const Run& a,
178  const Run& b,
179  Run& a_b,
180  Run& b_a,
181  const DiffConfig& config);
182 
184 void diff(const MSData& a,
185  const MSData& b,
186  MSData& a_b,
187  MSData& b_a,
188  const DiffConfig& config);
189 
190 
191 } // namespace diff_impl
192 } // namespace data
193 } // namespace pwiz
194 
195 
196 // this include must come after the above declarations or GCC won't see them
198 
199 
200 namespace pwiz {
201 namespace msdata {
202 
203 
204 /// configuration struct for diffing MSData types
206 {
207  /// ignore members of SpectrumIdentity and ChromatogramIdentity
209 
210  /// ignore all file level metadata, and most scan level metadata,
211  /// i.e. verify scan binary data, plus important scan metadata:
212  /// - msLevel
213  /// - precursor.ionSelection
215 
218 
220 
222  : pwiz::data::BaseDiffConfig(),
223  ignoreIdentity(false),
224  ignoreMetadata(false),
225  ignoreSpectra(false),
226  ignoreChromatograms(false),
227  ignoreDataProcessing(false)
228  {}
229 };
230 
231 
232 PWIZ_API_DECL std::ostream& operator<<(std::ostream& os, const pwiz::data::Diff<MSData, DiffConfig>& diff);
233 
234 
235 } // namespace msdata
236 } // namespace pwiz
237 
238 
239 #endif // _DIFF_HPP_