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

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

add syntax-check rule (included in maintainer-check), add two missing config.h includes, and prefer tests named with suffix '.test'

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1// $Id: BamWriteIterator.cc 2980 2013-02-04 07:36:57Z 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 <config.h>
19
20#include "BamWriteIterator.h"
21
22#include "BamFile.h"
23#include "config_bam.h"
24
25#include YAT_SAM_HEADER
26
27#include <cassert>
28
29namespace theplu {
30namespace yat {
31namespace omic {
32
33  BamWriter::BamWriter(void)
34    : out_(NULL)
35  {}
36
37
38  BamWriter::BamWriter(OutBamFile& o)
39  : out_(&o)
40  {}
41
42
43  void BamWriter::operator()(const BamRead& b) const
44  {
45    assert(out_);
46    out_->write(b);
47  }
48
49
50  BamWriteIterator::BamWriteIterator(OutBamFile& out)
51    : boost::function_output_iterator<BamWriter>(BamWriter(out))
52  {}
53
54}}}
Note: See TracBrowser for help on using the repository browser.