bpp-core3  3.0.0
SequenceFileIndex.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
5 #ifndef BPP_SEQ_IO_SEQUENCEFILEINDEX_H
6 #define BPP_SEQ_IO_SEQUENCEFILEINDEX_H
7 
8 #include <Bpp/Exceptions.h>
9 #include <string>
10 
11 
12 namespace bpp
13 {
23 {
24 public:
25  virtual ~SequenceFileIndex() {}
29  virtual void build(const std::string& path) = 0;
30 
34  virtual std::streampos getSequencePosition(const std::string& id) const = 0;
35 
39  virtual size_t getNumberOfSequences() const = 0;
40 };
41 }
42 #endif // BPP_SEQ_IO_SEQUENCEFILEINDEX_H
virtual std::streampos getSequencePosition(const std::string &id) const =0
Get the position of a Sequence given its ID.
This alphabet is used to deal NumericAlphabet.
virtual void build(const std::string &path)=0
Build the index given a path to the file.
virtual size_t getNumberOfSequences() const =0
Get the number of sequences.
Index to retrieve Sequence in a file.