Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

gnFastTranslator Class Reference

#include <gnFastTranslator.h>

Inheritance diagram for gnFastTranslator::

gnBaseFilter gnClone List of all members.

Public Types

enum  gnTranslatorType { ProteinDNATranslatorType, DNAProteinTranslatorType }

Public Methods

 gnFastTranslator ()
 gnFastTranslator (gnTranslatorType t_type)
 gnFastTranslator (const gnFastTranslator &sf)
gnFastTranslator& operator= (const gnFastTranslator &sf)
gnFastTranslator* Clone () const
virtual void CacheTranslator (const gnTranslator *tranny, string inputs, const gnSeqI input_width)
 Queries the specified gnTranslator for every possible combination translation of the characters specified in the inputs string. More...

virtual gnSeqC Filter (const gnSeqC ch) const
 Filter the given character. More...

virtual void Filter (gnSeqC **seq, uint32 &len) const
 Filter the given character array. More...

virtual void Filter (string &seq) const
 Filters the given string. More...

void SetDefaultChar (const gnSeqC ch1)
gnSeqC GetDefaultChar () const
void UseDefaultChar (const boolean use=true)
void SetPair (const string &ch1, const string &ch2)
void RemovePair (const string &ch)

Static Public Methods

const gnFastTranslator* ProteinDNATranslator ()
const gnFastTranslator* DNAProteinTranslator ()

Private Methods

void CreateProteinDNATranslator ()
void CreateDNAProteinTranslator ()

Private Attributes

string m_name
map<string, string> m_transCache
const gnTranslatorm_translator
boolean use_default
gnSeqC m_defaultChar

Member Enumeration Documentation

enum gnFastTranslator::gnTranslatorType
 

Enumeration values:
ProteinDNATranslatorType  
DNAProteinTranslatorType  

Definition at line 33 of file gnFastTranslator.h.


Constructor & Destructor Documentation

gnFastTranslator::gnFastTranslator ( )
 

Referenced by Clone().

gnFastTranslator::gnFastTranslator ( gnTranslatorType t_type )
 

gnFastTranslator::gnFastTranslator ( const gnFastTranslator & sf )
 


Member Function Documentation

void gnFastTranslator::CacheTranslator ( const gnTranslator * tranny,
string inputs,
const gnSeqI input_width ) [virtual]
 

Queries the specified gnTranslator for every possible combination translation of the characters specified in the inputs string.

An input_width may be specified so that every possible combination of "input_width" characters in "inputs" will be cached. This is useful for DNA to protein translations, for example.

Parameters:
tranny   The gnTranslator to cache.
inputs   The characters to cache from tranny.
input_width   The number of characters in each query to make to tranny.

gnFastTranslator * gnFastTranslator::Clone ( ) const [inline, virtual]
 

Reimplemented from gnBaseFilter.

Definition at line 86 of file gnFastTranslator.h.

void gnFastTranslator::CreateDNAProteinTranslator ( ) [private]
 

void gnFastTranslator::CreateProteinDNATranslator ( ) [private]
 

const gnFastTranslator * gnFastTranslator::DNAProteinTranslator ( ) [static]
 

Referenced by main().

void gnFastTranslator::Filter ( string & seq ) const [virtual]
 

Filters the given string.

Parameters:
seq   The string to filter

Reimplemented from gnBaseFilter.

void gnFastTranslator::Filter ( gnSeqC ** seq,
uint32 & len ) const [virtual]
 

Filter the given character array.

Parameters:
seq   A pointer to the character array
len   the length of the character array to filter
Returns:
The filtered character

Reimplemented from gnBaseFilter.

gnSeqC gnFastTranslator::Filter ( const gnSeqC ch ) const [virtual]
 

Filter the given character.

Parameters:
ch   The character to filter
Returns:
The filtered character

Reimplemented from gnBaseFilter.

Referenced by main().

gnSeqC gnFastTranslator::GetDefaultChar ( ) const [inline]
 

Definition at line 98 of file gnFastTranslator.h.

const gnFastTranslator * gnFastTranslator::ProteinDNATranslator ( ) [static]
 

void gnFastTranslator::RemovePair ( const string & ch )
 

void gnFastTranslator::SetDefaultChar ( const gnSeqC ch1 ) [inline]
 

Definition at line 92 of file gnFastTranslator.h.

void gnFastTranslator::SetPair ( const string & ch1,
const string & ch2 )
 

void gnFastTranslator::UseDefaultChar ( const boolean use = true ) [inline]
 

Definition at line 104 of file gnFastTranslator.h.

gnFastTranslator & gnFastTranslator::operator= ( const gnFastTranslator & sf )
 


Member Data Documentation

gnSeqC gnFastTranslator::m_defaultChar [private]
 

Definition at line 82 of file gnFastTranslator.h.

string gnFastTranslator::m_name [private]
 

Reimplemented from gnBaseFilter.

Definition at line 75 of file gnFastTranslator.h.

map< string, string > gnFastTranslator::m_transCache<string, string> [private]
 

Definition at line 78 of file gnFastTranslator.h.

const gnTranslator * gnFastTranslator::m_translator [private]
 

Definition at line 79 of file gnFastTranslator.h.

boolean gnFastTranslator::use_default [private]
 

Definition at line 81 of file gnFastTranslator.h.


The documentation for this class was generated from the following file:
Generated at Fri Nov 30 15:36:54 2001 for libGenome by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001