ProteoWizard
VendorReaderTestHarness.hpp
Go to the documentation of this file.
1 //
2 // $Id: VendorReaderTestHarness.hpp 1195 2009-08-14 22:12:04Z chambm $
3 //
4 //
5 // Original author: Matt Chambers <matt.chambers .@. vanderbilt.edu>
6 //
7 // Copyright 2009 Vanderbilt University - Nashville, TN 37232
8 //
9 // Licensed under the Apache License, Version 2.0 (the "License");
10 // you may not use this file except in compliance with the License.
11 // You may obtain a copy of the License at
12 //
13 // http://www.apache.org/licenses/LICENSE-2.0
14 //
15 // Unless required by applicable law or agreed to in writing, software
16 // distributed under the License is distributed on an "AS IS" BASIS,
17 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 // See the License for the specific language governing permissions and
19 // limitations under the License.
20 //
21 
22 
25 #include <string>
26 #include <vector>
27 
28 
29 namespace pwiz {
30 namespace util {
31 
32 
33 /// test implementations derive from this to define which paths should be tested
35 {
36  /// returns true iff the given rawpath is a real path to test/generate
37  virtual bool operator() (const std::string& rawpath) const = 0;
38 
39  virtual ~TestPathPredicate() {}
40 };
41 
42 
43 /// A common test harness for vendor readers;
45 int testReader(const pwiz::msdata::Reader& reader,
46  const std::vector<std::string>& args,
47  bool testAcceptOnly,
48  const TestPathPredicate& isPathTestable);
49 
50 
51 } // namespace util
52 } // namespace pwiz