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 
33 namespace pwiz {
34 namespace 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,
54  const pwiz::util::IterationListenerRegistry* = 0) const;
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
59  const pwiz::util::IterationListenerRegistry* = 0) const;
60 
61  private:
62  const Config config_;
65 };
66 
67 } // namespace identdata
68 } // namespace pwiz
69 
70 #endif // _SERIALIZER_PROTXML_HPP_
IterationListener.hpp
pwiz
Definition: ChromatogramList_Filter.hpp:36
pwiz::identdata::Serializer_protXML::Serializer_protXML
Serializer_protXML(const Config &config=Config())
Definition: Serializer_protXML.hpp:50
pwiz::identdata::Serializer_protXML::read
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
pwiz::identdata::Serializer_protXML::Config::Config
Config(bool readSpectrumQueries=true)
Definition: Serializer_protXML.hpp:47
pwiz::identdata::Serializer_protXML::Config::readSpectrumQueries
bool readSpectrumQueries
Definition: Serializer_protXML.hpp:45
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition: Export.hpp:32
pwiz::identdata::Serializer_protXML::operator=
Serializer_protXML & operator=(Serializer_protXML &)
Export.hpp
pwiz::identdata::Serializer_protXML::Serializer_protXML
Serializer_protXML(Serializer_protXML &)
IdentData.hpp
pwiz::util::IterationListenerRegistry
handles registration of IterationListeners and broadcast of update messages
Definition: IterationListener.hpp:66
pwiz::identdata::Serializer_protXML::write
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
pwiz::identdata::IdentData
Implementation of the MzIdentMLType from the mzIdentML schema.
Definition: IdentData.hpp:994
pwiz::identdata::Serializer_protXML::Config
Serializer_protXML configuration.
Definition: Serializer_protXML.hpp:44
pwiz::identdata::Serializer_protXML
MZIDData <-> pepXML stream serialization.
Definition: Serializer_protXML.hpp:39
pwiz::identdata::Serializer_protXML::config_
const Config config_
Definition: Serializer_protXML.hpp:62