ProteoWizard
pwiz
analysis
passive
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
26
#include "
pwiz/utility/misc/Export.hpp
"
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
38
struct
PWIZ_API_DECL
TabularConfig
39
{
40
PWIZ_API_DECL
enum
Delimiter
41
{
42
Delimiter_FixedWidth
,
43
Delimiter_Space
,
44
Delimiter_Comma
,
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_
pwiz
Definition:
CwtPeakDetector.hpp:35
pwiz::analysis::TabularConfig::copyDelimiterConfig
void copyDelimiterConfig(const TabularConfig &rhs)
Definition:
TabularConfig.hpp:52
pwiz::analysis::TabularConfig::operator==
bool operator==(const TabularConfig &rhs) const
Definition:
TabularConfig.hpp:54
Export.hpp
pwiz::analysis::TabularConfig::Delimiter_Comma
Definition:
TabularConfig.hpp:44
pwiz::analysis::TabularConfig::delim_equal
bool delim_equal(const TabularConfig &rhs) const
Definition:
TabularConfig.hpp:53
pwiz::analysis::TabularConfig
Definition:
TabularConfig.hpp:38
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition:
Export.hpp:32
pwiz::analysis::TabularConfig::Delimiter_Space
Definition:
TabularConfig.hpp:43
pwiz::analysis::TabularConfig::Delimiter_FixedWidth
Definition:
TabularConfig.hpp:42
pwiz::analysis::TabularConfig::Delimiter
Delimiter
Definition:
TabularConfig.hpp:40
pwiz::analysis::TabularConfig::delimiter_
Delimiter delimiter_
Definition:
TabularConfig.hpp:57
Generated by
1.8.12