gatb.core-API-0.0.0
|
#include <Iterable.hpp>
Public Member Functions | |
virtual dp::Iterator< Item > * | iterator ()=0 |
template<typename Functor > | |
void | iterate (Functor f) |
virtual int64_t | getNbItems ()=0 |
virtual int64_t | estimateNbItems ()=0 |
virtual Item * | getItems (Item *&buffer) |
virtual size_t | getItems (Item *&buffer, size_t start, size_t nb) |
Public Member Functions inherited from ISmartPointer | |
virtual | ~ISmartPointer () |
virtual void | use ()=0 |
virtual void | forget ()=0 |
Iterable interface.
The Iterable interface provides an operation that creates an iterator. It also provides other methods that give the exact number (or an estimation) of items.
Note that one Iterable instance can create several iterators.
|
pure virtual |
Return the (approximate) number of items. If a specific implementation doesn't know the value, it should return -1 by convention.
Implemented in Partition< Type >, Partition< gatb::core::kmer::impl::Kmer::Count >, IterableFile< Item >, IBank, IterableAdaptor< T1, T2, Adaptor >, BankDelegate, CollectionAbstract< Item >, and AbstractBank.
|
inlinevirtual |
Return a buffer of items.
[out] | buffer | : the buffer |
Reimplemented in IterableFile< Item >, IterableAdaptor< T1, T2, Adaptor >, and CollectionAbstract< Item >.
|
inlinevirtual |
Return a buffer of items.
[out] | buffer | : the buffer |
[in] | start | : index where to start in the buffer |
[in] | nb | : number of items to be retrieved |
Reimplemented in IterableFile< Item >, IterableAdaptor< T1, T2, Adaptor >, and CollectionAbstract< Item >.
|
pure virtual |
Return the number of items. If a specific implementation doesn't know the value, it should return -1 by convention.
Implemented in Partition< Type >, Partition< gatb::core::kmer::impl::Kmer::Count >, IterableFile< Item >, BankComposite, IterableAdaptor< T1, T2, Adaptor >, BankDelegate, BankBinary, BankFasta, BankStrings, CollectionAbstract< Item >, BankSplitter, BankRandom, and BankKmers.
|
inline |
Direct iteration through a functor.
[in] | f | : the functor to be applied on each sequence of the bank. |
|
pure virtual |
Create an iterator for the given Iterable instance.
Implemented in Partition< Type >, Partition< gatb::core::kmer::impl::Kmer::Count >, IterableFile< Item >, BankFiltered< Filter >, BankKmers, BankComposite, IterableAdaptor< T1, T2, Adaptor >, IBank, BankDelegate, BankBinary, BankFasta, BankStrings, CollectionAbstract< Item >, BankSplitter, and BankRandom.