ProteoWizard
Serializer_FASTA.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 _SERIALIZER_FASTA_HPP_
24 #define _SERIALIZER_FASTA_HPP_
25 
26 
28 #include "ProteomeData.hpp"
31 
32 
33 namespace pwiz {
34 namespace proteome {
35 
36 
37 /// ProteomeData <-> FASTA stream serialization
39 {
40  public:
41 
42  /// Serializer_FASTA configuration
44  {
46 
47  Config() : indexPtr(new data::MemoryIndex) {}
48  };
49 
50  Serializer_FASTA(const Config& config = Config());
51 
52  /// write ProteomeData object to ostream as FASTA
53  void write(std::ostream& os, const ProteomeData& pd,
54  const pwiz::util::IterationListenerRegistry* iterationListenerRegistry) const;
55 
56  /// read in ProteomeData object from a FASTA istream
57  void read(boost::shared_ptr<std::istream> is, ProteomeData& pd) const;
58 
59  private:
63 };
64 
65 
66 } // namespace proteome
67 } // namespace pwiz
68 
69 
70 #endif // _SERIALIZER_FASTA_HPP_
71 
IterationListener.hpp
pwiz::proteome::Serializer_FASTA::Config::indexPtr
data::IndexPtr indexPtr
Definition: Serializer_FASTA.hpp:45
pwiz
Definition: ChromatogramList_Filter.hpp:36
pwiz::proteome
Definition: AminoAcid.hpp:35
pwiz::data::IndexPtr
boost::shared_ptr< Index > IndexPtr
Definition: Index.hpp:72
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition: Export.hpp:32
pwiz::proteome::Serializer_FASTA
ProteomeData <-> FASTA stream serialization.
Definition: Serializer_FASTA.hpp:39
Export.hpp
pwiz::proteome::ProteomeData
Definition: ProteomeData.hpp:89
pwiz::proteome::Serializer_FASTA::Config::Config
Config()
Definition: Serializer_FASTA.hpp:47
pwiz::util::IterationListenerRegistry
handles registration of IterationListeners and broadcast of update messages
Definition: IterationListener.hpp:66
pwiz::proteome::Serializer_FASTA::config_
Config config_
Definition: Serializer_FASTA.hpp:60
pwiz::proteome::Serializer_FASTA::write
void write(std::ostream &os, const ProteomeData &pd, const pwiz::util::IterationListenerRegistry *iterationListenerRegistry) const
write ProteomeData object to ostream as FASTA
pwiz::proteome::Serializer_FASTA::Serializer_FASTA
Serializer_FASTA(const Config &config=Config())
ProteomeData.hpp
pwiz::proteome::Serializer_FASTA::read
void read(boost::shared_ptr< std::istream > is, ProteomeData &pd) const
read in ProteomeData object from a FASTA istream
pwiz::proteome::Serializer_FASTA::Config
Serializer_FASTA configuration.
Definition: Serializer_FASTA.hpp:44
pwiz::proteome::Serializer_FASTA::operator=
Serializer_FASTA & operator=(Serializer_FASTA &)
MemoryIndex.hpp
pwiz::proteome::Serializer_FASTA::Serializer_FASTA
Serializer_FASTA(Serializer_FASTA &)