gatb.core-API-1.4.2
AbstractBank Class Reference

Abstract implementation of IBank for factorizing common behavior. More...

#include <AbstractBank.hpp>

Inheritance diagram for AbstractBank:
Inheritance graph

Public Member Functions

 AbstractBank ()
 
std::string getIdNb (int i)
 
int64_t estimateNbItemsBanki (int i)
 
const std::vector< IBank * > getBanks () const
 
int64_t estimateNbItems ()
 
u_int64_t estimateSequencesSize ()
 
u_int64_t getEstimateThreshold ()
 
void setEstimateThreshold (u_int64_t nbSeq)
 
void remove ()
 
void finalize ()
 
size_t getCompositionNb ()
 
- Public Member Functions inherited from IBank
virtual std::string getId ()=0
 
virtual tools::dp::Iterator< Sequence > * iterator ()=0
 
virtual void insert (const Sequence &item)=0
 
virtual u_int64_t getSize ()=0
 
virtual void estimate (u_int64_t &number, u_int64_t &totalSize, u_int64_t &maxSize)=0
 
- Public Member Functions inherited from Iterable< Sequence >
void iterate (Functor f)
 
virtual int64_t getNbItems ()=0
 
virtual Sequence * getItems (Sequence *&buffer)
 
virtual size_t getItems (Sequence *&buffer, size_t start, size_t nb)
 
- Public Member Functions inherited from ISmartPointer
virtual ~ISmartPointer ()
 
- Public Member Functions inherited from Bag< Sequence >
virtual void insert (const Sequence &item)=0
 
virtual void insert (const std::vector< Sequence > &items, size_t length=0)
 
virtual void insert (const Sequence *items, size_t length)
 
virtual void flush ()=0
 
- Public Member Functions inherited from SmartPointer
void use ()
 
void forget ()
 

Additional Inherited Members

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

Detailed Description

Abstract implementation of IBank for factorizing common behavior.

This abstract implementation of the IBank interface provides some methods having the same behavior for most implementations.

Note that it implements the system::ISmartPointer interface as well, so it can be used as a smart pointer.

Constructor & Destructor Documentation

AbstractBank ( )
inline

Constructor.

Member Function Documentation

int64_t estimateNbItems ( )
inlinevirtual

Shortcut to 'estimate' method.

Returns
estimation of the number of sequences

Implements IBank.

Reimplemented in BankDelegate.

int64_t estimateNbItemsBanki ( int  i)
inlinevirtual

In case of a composite bank,

Returns
estimation of the number of sequences of sub bank i

Implements IBank.

Reimplemented in BankDelegate, and BankComposite.

u_int64_t estimateSequencesSize ( )
inlinevirtual

Shortcut to 'estimate' method.

Returns
estimation of the size of sequences

Implements IBank.

Reimplemented in BankDelegate.

void finalize ( )
inlinevirtual

Method that may be called when the bank is done. It is called by BankFasta destructor for instance. It will close fclose() or something equivalent. You don't need to call this function yourself.

Implements IBank.

Reimplemented in BankFasta.

const std::vector<IBank*> getBanks ( ) const
inlinevirtual

Return the vector of sub IBank objects (in case of bank composite), or a vector containing only the bank itself

Returns
the IBank objects.

Implements IBank.

Reimplemented in BankComposite.

size_t getCompositionNb ( )
inlinevirtual

In case of a composite bank, return the number of sub banks.

Returns
number of sub banks.

Implements IBank.

Reimplemented in BankComposite.

u_int64_t getEstimateThreshold ( )
inlinevirtual

Returns
the number of sequences read from the bank for computing estimated information

Implements IBank.

Reimplemented in BankDelegate.

std::string getIdNb ( int  i)
inlinevirtual

In case of a composite bank, return the id of bank i

Returns
id of sub bank i

Implements IBank.

Reimplemented in BankComposite, and BankDelegate.

void remove ( )
inlinevirtual

Remove physically the bank. This method will have non-empty implementation for banks using file system for instance.

Implements IBank.

Reimplemented in BankComposite, BankAlbum, and BankBinary.

void setEstimateThreshold ( u_int64_t  nbSeq)
inlinevirtual

Set the number of sequences read from the bank for computing estimated information

Parameters
[in]nbSeq: the number of sequences to be read.

Implements IBank.

Reimplemented in BankDelegate.


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