]> git.donarmstrong.com Git - bamtools.git/blob - src/api/internal/BamFile_p.h
fd25a3e007787032c3bf0ec746de9e336a2bbf83
[bamtools.git] / src / api / internal / BamFile_p.h
1 // ***************************************************************************
2 // BamFile_p.h (c) 2011 Derek Barnett
3 // Marth Lab, Department of Biology, Boston College
4 // ---------------------------------------------------------------------------
5 // Last modified: 9 September 2011 (DB)
6 // ---------------------------------------------------------------------------
7 // Provides BAM file-specific IO behavior
8 // ***************************************************************************
9
10 #ifndef BAMFILE_P_H
11 #define BAMFILE_P_H
12
13 //  -------------
14 //  W A R N I N G
15 //  -------------
16 //
17 // This file is not part of the BamTools API.  It exists purely as an
18 // implementation detail. This header file may change from version to version
19 // without notice, or even be removed.
20 //
21 // We mean it.
22
23 #include <api/internal/ILocalIODevice_p.h>
24 #include <string>
25
26 namespace BamTools {
27 namespace Internal {
28
29 class BamFile : public ILocalIODevice {
30
31     // ctor & dtor
32     public:
33         BamFile(const std::string& filename);
34         ~BamFile(void);
35
36     // ILocalIODevice implementation
37     public:
38         void Close(void);
39         bool IsRandomAccess(void) const;
40         bool Open(const IBamIODevice::OpenMode mode);
41         bool Seek(const int64_t& position);
42
43     // data members
44     private:
45         std::string m_filename;
46 };
47
48 } // namespace Internal
49 } // namespace BamTools
50
51 #endif // BAMFILE_P_H