ProteoWizard
TabularConfig.hpp
Go to the documentation of this file.
1 //
2 // $Id: TabularConfig.hpp 4136 2012-11-21 21:17:24Z chambm $
3 //
4 //
5 // Original author: John Chilton <jmchilton .@. gmail.com>
6 //
7 // Copyright 2012 University of Minnesota - Minneapolis, MN 55455
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 
23 #ifndef _TABULARCONFIG_HPP_
24 #define _TABULARCONFIG_HPP_
25 
27 #include <string>
28 
29 // for ease of extending this list and getting the usage statements right everywhere
30 #define TABULARCONFIG_DELIMITER_OPTIONS_STR "delimiter=fixed|space|comma|tab"
31 #define TABULARCONFIG_DELIMITER_USAGE_STR "delimiter: sets column separation; default is fixed width"
32 
33 
34 namespace pwiz {
35 namespace analysis {
36 
37 
39 {
41  {
45  Delimiter_Tab
46  };
47  /// delimiter between columns (unless set to Delimiter_FixedWidth)
48 
49  char getDelimiterChar() const;
50  std::string getFileExtension() const;
51  bool checkDelimiter(const std::string& arg); // set delimiter_ and return true iff arg is a valid delimiter setting
52 
53  protected:
54  TabularConfig();
55  Delimiter delimiter_; // gets set by checkDelimiter()
56 };
57 
58 } // namespace analysis
59 } // namespace pwiz
60 
61 
62 #endif // _TABULARCONFIG_HPP_