ProteoWizard
Serializer_MSn.hpp
Go to the documentation of this file.
1//
2// $Id$
3//
4//
5// Original author: Barbara Frewen <frewen@u.washington.edu>
6//
7// Copyright 2008 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#ifndef _SERIALIZER_MSn_HPP_
23#define _SERIALIZER_MSn_HPP_
24
26#include "MSData.hpp"
27#include "BinaryDataEncoder.hpp"
29#include "SpectrumList_MSn.hpp"
30
31
32namespace pwiz {
33namespace msdata {
34
35
36/// MSData <-> MSn stream serialization
38{
39 public:
40
41 /// constructor
43
44 /// write MSData object to ostream as MSn;
45 /// iterationListenerRegistry may be used to receive progress updates
46 void write(std::ostream& os, const MSData& msd,
47 const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0) const;
48
49 /// read in MSData object from an MGF istream
50 /// note: istream may be managed by MSData's SpectrumList, to allow for
51 /// lazy evaluation of Spectrum data
52 void read(boost::shared_ptr<std::istream> is, MSData& msd) const;
53
54 private:
55 class Impl;
56 boost::shared_ptr<Impl> impl_;
59};
60
61
62} // namespace msdata
63} // namespace pwiz
64
65#endif // _SERIALIZER_MSn_HPP_
#define PWIZ_API_DECL
Definition Export.hpp:32
MSData <-> MSn stream serialization.
void write(std::ostream &os, const MSData &msd, const pwiz::util::IterationListenerRegistry *iterationListenerRegistry=0) const
write MSData object to ostream as MSn; iterationListenerRegistry may be used to receive progress upda...
Serializer_MSn(MSn_Type filetype)
constructor
Serializer_MSn & operator=(Serializer_MSn &)
boost::shared_ptr< Impl > impl_
void read(boost::shared_ptr< std::istream > is, MSData &msd) const
read in MSData object from an MGF istream note: istream may be managed by MSData's SpectrumList,...
Serializer_MSn(Serializer_MSn &)
handles registration of IterationListeners and broadcast of update messages
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition MSData.hpp:850