// BamIndex.h (c) 2009 Derek Barnett
// Marth Lab, Department of Biology, Boston College
// ---------------------------------------------------------------------------
-// Last modified: 6 October 2011 (DB)
+// Last modified: 10 October 2011 (DB)
// ---------------------------------------------------------------------------
// Provides basic BAM index interface
// ***************************************************************************
#ifndef BAM_INDEX_H
#define BAM_INDEX_H
-#include <api/api_global.h>
-#include <api/BamAux.h>
+#include "api/api_global.h"
+#include "api/BamAux.h"
#include <string>
namespace BamTools {
It is exposed to the public API to allow advanced users to implement
their own custom indexing schemes.
-
- More documentation on methods & enums coming soon.
*/
class API_EXPORT BamIndex {
// enums
public:
- // specify index-caching behavior
- enum IndexCacheMode { FullIndexCaching = 0 // store entire index file contents in memory
- , LimitedIndexCaching // store only index data for current reference
- , NoIndexCaching // do not store any index data between jumps
- };
// list of supported BamIndex types
enum IndexType { BAMTOOLS = 0
// loads existing data from file into memory
virtual bool Load(const std::string& filename) =0;
- // change the index caching behavior
- virtual void SetCacheMode(const BamIndex::IndexCacheMode& mode) =0;
+ //! \cond
// internal methods
protected:
- void SetErrorString(const std::string& where, const std::string& what) {
+ void SetErrorString(const std::string& where, const std::string& what) const {
m_errorString = where + ": " + what;
}
// data members
protected:
Internal::BamReaderPrivate* m_reader; // copy, not owned
- std::string m_errorString;
+ mutable std::string m_errorString;
+
+ //! \endcond
};
} // namespace BamTools