source: trunk/yat/omic/BamHeader.cc @ 2960

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

merge patch release 0.10.1 into trunk

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1// $Id: BamHeader.cc 2960 2013-01-17 08:19:07Z peter $
2//
3// Copyright (C) 2012, 2013 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 "BamHeader.h"
21
22#include <cassert>
23
24namespace theplu {
25namespace yat {
26namespace omic {
27
28  BamHeader::BamHeader(void)
29    : header_(NULL)
30  {
31  }
32
33
34  uint32_t BamHeader::target_length(size_t tid) const
35  {
36    assert(tid < static_cast<size_t>(n_targets()));
37    return header_->target_len[tid];
38  }
39
40
41  const char* BamHeader::target_name(size_t tid) const
42  {
43    assert(tid < static_cast<size_t>(n_targets()));
44    return header_->target_name[tid];
45  }
46
47
48  int32_t BamHeader::n_targets(void) const
49  {
50    assert(header_);
51    return header_->n_targets;
52  }
53
54}}}
Note: See TracBrowser for help on using the repository browser.