source: trunk/yat/omic/BamWriteIterator.cc @ 2943

Last change on this file since 2943 was 2943, checked in by Peter, 9 years ago

merge release 0.10 into trunk

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1// $Id: BamWriteIterator.cc 2943 2013-01-04 06:38:38Z peter $
2//
3// Copyright (C) 2012 Peter Johansson
4//
5// This program is free software; you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation; either version 3 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful, but
11// WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13// General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18#include "BamWriteIterator.h"
19
20#include "BamFile.h"
21#include "config_bam.h"
22
23#include YAT_SAM_HEADER
24
25#include <cassert>
26
27namespace theplu {
28namespace yat {
29namespace omic {
30
31  BamWriter::BamWriter(void)
32    : out_(NULL)
33  {}
34
35
36  BamWriter::BamWriter(OutBamFile& o)
37  : out_(&o)
38  {}
39
40
41  void BamWriter::operator()(const BamRead& b) const
42  {
43    assert(out_);
44    out_->write(b);
45  }
46
47
48  BamWriteIterator::BamWriteIterator(OutBamFile& out)
49    : boost::function_output_iterator<BamWriter>(BamWriter(out))
50  {}
51
52}}}
Note: See TracBrowser for help on using the repository browser.