MDA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | List of all members
MDAT::SequenceSetBase< SequenceType, MemSafe > Class Template Reference

This SequenceSet class uses less memory than the normal one. More...

#include <SequenceSet_memsafe.hpp>

Public Member Functions

 SequenceSetBase (const std::string &seq_f)
 
 SequenceSetBase (const std::string &seq_f, const std::string &index_f)
 
Operators
Seq_ptr next ()
 
SequenceType & operator[] (unsigned int index)
 Operator to access the sequence. More...
 
SequenceType & operator[] (std::string &seq_id)
 
const SequenceType & operator[] (unsigned int index) const
 
const SequenceType & operator[] (const std::string &seq_id) const
 
Basic methods
void build_index () const
 
size_t n_seqs () const
 
void read (const std::string &seq_f)
 
void set_file (const std::string &seq_f)
 
void set_file (const std::string &seq_f, const std::string &index_f)
 
const SequenceType * seq (unsigned int index) const
 
void read_index (const std::string &index_f)
 
void write_index (const std::string &index_f) const
 
bool index_changed () const
 

Detailed Description

template<typename SequenceType>
class MDAT::SequenceSetBase< SequenceType, MemSafe >

This SequenceSet class uses less memory than the normal one.

This memory uses less memory than the default class. This achieved by reading a sequence only when it is needed. The functionality is reduced compared to the default one.

Warning
Sequences are read when accessed. They only stay available until a new one is accessed.

Member Function Documentation

template<typename SequenceType >
SequenceType& MDAT::SequenceSetBase< SequenceType, MemSafe >::operator[] ( unsigned int  index)
inline

Operator to access the sequence.

Parameters
indexThe sequence position to return.
Returns
Pointer to the sequence.
template<typename SequenceType >
const SequenceType& MDAT::SequenceSetBase< SequenceType, MemSafe >::operator[] ( unsigned int  index) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.