ProteoWizard
Main Page
Namespaces
Classes
Files
File List
File Members
pwiz
data
msdata
Serializer_mz5.hpp
Go to the documentation of this file.
1
//
2
// $Id: Serializer_mz5.hpp 2811 2011-06-23 20:44:29Z chambm $
3
//
4
//
5
// Original authors: Mathias Wilhelm <mw@wilhelmonline.com>
6
// Marc Kirchner <mail@marc-kirchner.de>
7
//
8
// Copyright 2011 Proteomics Center
9
// Children's Hospital Boston, Boston, MA 02135
10
//
11
// Licensed under the Apache License, Version 2.0 (the "License");
12
// you may not use this file except in compliance with the License.
13
// You may obtain a copy of the License at
14
//
15
// http://www.apache.org/licenses/LICENSE-2.0
16
//
17
// Unless required by applicable law or agreed to in writing, software
18
// distributed under the License is distributed on an "AS IS" BASIS,
19
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
// See the License for the specific language governing permissions and
21
// limitations under the License.
22
//
23
24
25
#ifndef _SERIALIZER_MZ5_HPP_
26
#define _SERIALIZER_MZ5_HPP_
27
28
29
#include "
MSData.hpp
"
30
#include "
pwiz/utility/misc/Export.hpp
"
31
#include "
pwiz/utility/misc/IterationListener.hpp
"
32
#include "
mz5/Configuration_mz5.hpp
"
33
34
35
namespace
pwiz {
36
namespace
msdata {
37
38
39
/// MSData <-> MZ5 file serialization
40
class
PWIZ_API_DECL
Serializer_mz5
41
{
42
public
:
43
44
/**
45
* Default constructor.
46
* @param config mz5 configuration containing dataset names and different parameters for write support.
47
*/
48
Serializer_mz5
(
const
mz5::Configuration_mz5
& config =
mz5::Configuration_mz5
());
49
50
/**
51
* Uses config to generate a Configuration_mz5 instance.
52
* @param config pwiz configuration
53
*/
54
Serializer_mz5
(
const
pwiz::msdata::MSDataFile::WriteConfig
& config);
55
56
/**
57
* Creates and writes MSData instances to a mz5 file.
58
* @param filename file name
59
* @param msd MSData object
60
* @param iterationListenerRegistry progress listener
61
*/
62
void
write
(
const
std::string& filename,
const
MSData
& msd,
63
const
pwiz::util::IterationListenerRegistry
* iterationListenerRegistry = 0)
const
;
64
65
/// This method is not supported by mz5 since mz5 can not write to ostreams.
66
void
write
(std::ostream& os,
const
MSData
& msd,
67
const
pwiz::util::IterationListenerRegistry
* iterationListenerRegistry = 0)
const
;
68
69
/**
70
* Reads the mz5 file and stores the information in the MSData object.
71
* @þaram filename file anme
72
* @param msd MSData object
73
*/
74
void
read
(
const
std::string& filename,
MSData
& msd)
const
;
75
76
/// This method is not supported by mz5 since mz5 can not read from an istream.
77
void
read
(boost::shared_ptr<std::istream> is,
MSData
& msd)
const
;
78
79
private
:
80
class
Impl;
81
boost::shared_ptr<Impl>
impl_
;
82
Serializer_mz5
(
Serializer_mz5
&);
83
Serializer_mz5
& operator=(
Serializer_mz5
&);
84
};
85
86
87
}
// namespace msdata
88
}
// namespace pwiz
89
90
91
#endif // _SERIALIZER_MZ5_HPP_
Generated on Mon Nov 26 2012 18:05:48 for ProteoWizard by
1.8.1.1