ProteoWizard
Serializer_protXML.hpp
Go to the documentation of this file.
1//
2// $Id$
3//
4//
5// Original author: Brian Pratt <brian.pratt .@. insilicos.com>
6// after Serializer_pepXML by Matt Chambers <matt.chambers .@. vanderbilt.edu>
7//
8// Copyright 2012 Spielberg Family Center for Applied Proteomics
9// University of Southern California, Los Angeles, California 90033
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_PROTXML_HPP_
26#define _SERIALIZER_PROTXML_HPP_
27
29#include "IdentData.hpp"
31
32
33namespace pwiz {
34namespace identdata {
35
36
37/// MZIDData <-> pepXML stream serialization
39{
40 public:
41
42 /// Serializer_protXML configuration
44 {
46
47 Config(bool readSpectrumQueries = true) : readSpectrumQueries(readSpectrumQueries) {}
48 };
49
50 Serializer_protXML(const Config& config = Config()) : config_(config) {}
51
52 /// write MZIDData object to ostream as pepXML
53 void write(std::ostream& os, const IdentData& mzid, const std::string& filepath,
55
56 /// read in MZIDData object from a protXML istream
57 void read(boost::shared_ptr<std::istream> is, IdentData& mzid,
58 std::vector<std::string> *sourceFilesPtr, // if non-null, just read the SourceFiles info and return it here
60
61 private:
65};
66
67} // namespace identdata
68} // namespace pwiz
69
70#endif // _SERIALIZER_PROTXML_HPP_
#define PWIZ_API_DECL
Definition Export.hpp:32
MZIDData <-> pepXML stream serialization.
Serializer_protXML(const Config &config=Config())
void read(boost::shared_ptr< std::istream > is, IdentData &mzid, std::vector< std::string > *sourceFilesPtr, const pwiz::util::IterationListenerRegistry *=0) const
read in MZIDData object from a protXML istream
Serializer_protXML(Serializer_protXML &)
Serializer_protXML & operator=(Serializer_protXML &)
void write(std::ostream &os, const IdentData &mzid, const std::string &filepath, const pwiz::util::IterationListenerRegistry *=0) const
write MZIDData object to ostream as pepXML
handles registration of IterationListeners and broadcast of update messages
Implementation of the MzIdentMLType from the mzIdentML schema.