]> git.donarmstrong.com Git - bamtools.git/blob - src/api/internal/BamWriter_p.h
Removed explicit keyword from SamHeader-related object copy ctors
[bamtools.git] / src / api / internal / BamWriter_p.h
1 // ***************************************************************************
2 // BamWriter_p.h (c) 2010 Derek Barnett
3 // Marth Lab, Department of Biology, Boston College
4 // All rights reserved.
5 // ---------------------------------------------------------------------------
6 // Last modified: 19 November 2010 (DB)
7 // ---------------------------------------------------------------------------
8 // Provides the basic functionality for producing BAM files
9 // ***************************************************************************
10
11 #ifndef BAMWRITER_P_H
12 #define BAMWRITER_P_H
13
14 //  -------------
15 //  W A R N I N G
16 //  -------------
17 //
18 // This file is not part of the BamTools API.  It exists purely as an
19 // implementation detail.  This header file may change from version to
20 // version without notice, or even be removed.
21 //
22 // We mean it.
23
24 #include <api/BamAux.h>
25 #include <api/BGZF.h>
26 #include <string>
27 #include <vector>
28
29 namespace BamTools {
30
31 class SamHeader;
32
33 namespace Internal {
34
35 class BamWriterPrivate {
36
37     // ctor & dtor
38     public:
39         BamWriterPrivate(void);
40         ~BamWriterPrivate(void);
41
42     // "public" interface to BamWriter
43     public:
44         void Close(void);
45         bool Open(const std::string& filename,
46                   const std::string& samHeader,
47                   const BamTools::RefVector& referenceSequences,
48                   bool isWriteUncompressed);
49         void SaveAlignment(const BamAlignment& al);
50
51     // internal methods
52     public:
53         const unsigned int CalculateMinimumBin(const int begin, int end) const;
54         void CreatePackedCigar(const std::vector<BamTools::CigarOp>& cigarOperations, std::string& packedCigar);
55         void EncodeQuerySequence(const std::string& query, std::string& encodedQuery);
56
57     // data members
58     public:
59         BgzfData mBGZF;
60         bool IsBigEndian;
61 };
62
63 } // namespace Internal
64 } // namespace BamTools
65
66 #endif // BAMWRITER_P_H