ProteoWizard
TabularConfig.hpp
Go to the documentation of this file.
1 //
2 // $Id: TabularConfig.hpp 4168 2012-12-04 23:19:57Z pcbrefugee $
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  void copyDelimiterConfig(const TabularConfig &rhs) {delimiter_ = rhs.delimiter_;};
53  bool delim_equal(const TabularConfig &rhs) const { return delimiter_==rhs.delimiter_;};
54  bool operator==(const TabularConfig &rhs) const {return delim_equal(rhs);};
55  protected:
56  TabularConfig();
57  Delimiter delimiter_; // gets set by checkDelimiter()
58 };
59 
60 } // namespace analysis
61 } // namespace pwiz
62 
63 
64 #endif // _TABULARCONFIG_HPP_
void copyDelimiterConfig(const TabularConfig &rhs)
bool operator==(const TabularConfig &rhs) const
bool delim_equal(const TabularConfig &rhs) const
#define PWIZ_API_DECL
Definition: Export.hpp:32