ProteoWizard
pwiz
data
tradata
TraDataFile.hpp
Go to the documentation of this file.
1
//
2
// $Id$
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
23
#ifndef _TRADATAFILE_HPP_
24
#define _TRADATAFILE_HPP_
25
26
27
#include "
pwiz/utility/misc/Export.hpp
"
28
#include "
TraData.hpp
"
29
#include "
Reader.hpp
"
30
31
32
namespace
pwiz
{
33
namespace
tradata {
34
35
36
/// TraData object plus file I/O
37
struct
PWIZ_API_DECL
TraDataFile
:
public
TraData
38
{
39
/// constructs TraData object backed by file;
40
/// reader==0 -> use DefaultReaderList
41
TraDataFile
(
const
std::string& filename,
42
const
Reader
* reader = 0);
43
44
/// data format for write()
45
enum
PWIZ_API_DECL
Format {
Format_Text
, Format_traML};
46
47
/// configuration for write()
48
struct
PWIZ_API_DECL
WriteConfig
49
{
50
Format
format
;
51
bool
gzipped
;
// if true, file is written as .gz
52
53
WriteConfig
(Format
format
= Format_traML,
bool
gzipped =
false
)
54
:
format
(
format
), gzipped(gzipped)
55
{}
56
};
57
58
/// static write function for any TraData object;
59
static
void
write
(
const
TraData
& msd,
60
const
std::string& filename,
61
const
WriteConfig& config = WriteConfig());
62
63
/// member write function
64
void
write
(
const
std::string& filename,
65
const
WriteConfig& config = WriteConfig());
66
};
67
68
69
PWIZ_API_DECL
std::ostream&
operator<<
(std::ostream& os, TraDataFile::Format
format
);
70
PWIZ_API_DECL
std::ostream&
operator<<
(std::ostream& os,
const
TraDataFile::WriteConfig& config);
71
72
73
}
// namespace tradata
74
}
// namespace pwiz
75
76
77
#endif // _TRADATAFILE_HPP_
pwiz::tradata::TraDataFile
TraData object plus file I/O.
Definition:
TraDataFile.hpp:37
pwiz
Definition:
ChromatogramList_Filter.hpp:36
pwiz::tradata::TraDataFile::WriteConfig::WriteConfig
WriteConfig(Format format=Format_traML, bool gzipped=false)
Definition:
TraDataFile.hpp:53
pwiz::tradata::TraDataFile::WriteConfig::gzipped
bool gzipped
Definition:
TraDataFile.hpp:51
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition:
Export.hpp:32
pwiz::identdata::IO::write
PWIZ_API_DECL void write(minimxml::XMLWriter &writer, const CV &cv)
Export.hpp
pwiz::proteome::Reader
interface for file readers
Definition:
Reader.hpp:36
pwiz::tradata::TraData
Definition:
TraData.hpp:350
pwiz::tradata::TraDataFile::WriteConfig
configuration for write()
Definition:
TraDataFile.hpp:48
pwiz::msdata::detail::Bruker::format
PWIZ_API_DECL Reader_Bruker_Format format(const std::string &path)
returns Bruker format of 'path' if it is a Bruker directory; otherwise returns empty string
TraData.hpp
Reader.hpp
pwiz::tradata::operator<<
PWIZ_API_DECL std::ostream & operator<<(std::ostream &os, const data::Diff< TraData, DiffConfig > &diff)
pwiz::tradata::TraDataFile::WriteConfig::format
Format format
Definition:
TraDataFile.hpp:50
Format_Text
Format_Text
Definition:
TraDataFile.hpp:45
Generated by
1.8.17