gatb.core-API-0.0.0
BankFasta::Iterator Class Reference

Specific Iterator impl for Bank class. More...

#include <BankFasta.hpp>

Inheritance diagram for BankFasta::Iterator:
Inheritance graph

Public Types

Public Member Functions

 Iterator (BankFasta &ref, CommentMode_e commentMode=FULL)
 
 ~Iterator ()
 
void first ()
 
void next ()
 
bool isDone ()
 
Sequenceitem ()
 
void estimate (u_int64_t &number, u_int64_t &totalSize, u_int64_t &maxSize)
 
- Public Member Functions inherited from Iterator< Sequence >
Sequence * operator-> ()
 
Sequence & operator* ()
 
void iterate (const Functor &f)
 
virtual void setItem (Sequence &i)
 
bool get (std::vector< Sequence > &current)
 
virtual void reset ()
 
virtual std::vector< Iterator< Sequence > * > getComposition ()
 
- Public Member Functions inherited from SmartPointer
void use ()
 
void forget ()
 
- Public Member Functions inherited from ISmartPointer
virtual ~ISmartPointer ()
 

Additional Inherited Members

- Protected Member Functions inherited from SmartPointer
 SmartPointer ()
 
virtual ~SmartPointer ()
 

Detailed Description

Specific Iterator impl for Bank class.

This implementation relies on the initial code from Minia. It wraps the Iterator interface with the Minia code.

Note that we made some effort not to put implementation code here in the header; see in particular buffered_file and buffered_strings attributes whose type is void* (and not the implementation type defined in the cpp file).

Note the small improvement compared to Minia: it is possible to create an Iterator that provides (or not) sequence comments, according to the corresponding parameter given to the Iterator constructor.

IMPROVEMENTS:

  • in case we have several banks to read, we could have at one time only one stream opened on the currently iterated file. The current implementation opens all streams, which may be avoided.

Member Enumeration Documentation

Define what kind of comment we want to retrieve. Such comments can be retrieved through gatb::core::bank::Sequence

Enumerator
NONE 

Empty comments are provided to clients.

IDONLY 

Comments with only the FASTA ID are provided to clients.
Ex: 'ENSTTRP00000009639pep:novel'

FULL 

Full comments are provided to clients.
Ex: 'ENSTTRP00000001236pep:novel genescaffold:turTru1:GeneScaffold_3311:182575:189152:1'

Constructor & Destructor Documentation

Iterator ( BankFasta ref,
CommentMode_e  commentMode = FULL 
)

Constructor.

Parameters
[in]ref: the associated iterable instance.
[in]commentMode: kind of comments we want to retrieve
~Iterator ( )

Destructor

Member Function Documentation

void estimate ( u_int64_t &  number,
u_int64_t &  totalSize,
u_int64_t &  maxSize 
)

Estimation of the sequences information

void first ( )
virtual

Method that initializes the iteration.

Implements Iterator< Sequence >.

bool isDone ( )
inlinevirtual

Method telling whether the iteration is finished or not.

Returns
true if iteration is finished, false otherwise.

Implements Iterator< Sequence >.

Sequence& item ( )
inlinevirtual

Method that returns the current iterated item. Note that the returned type is the template type.

Returns
the current item in the iteration.

Implements Iterator< Sequence >.

void next ( )
virtual

Method that goes to the next item in the iteration.

Returns
status of the iteration

Implements Iterator< Sequence >.


The documentation for this class was generated from the following files: