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 Member Functions

 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.

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

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

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

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)
virtual string GetName () const
 Gets the name of this filter.

virtual void SetName (string name)
 Sets the name of this filter.


Static Public Member Functions

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

Protected Attributes

string m_name

Private Member Functions

void CreateProteinDNATranslator ()
void CreateDNAProteinTranslator ()

Private Attributes

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 32 of file gnFastTranslator.h.


Constructor & Destructor Documentation

gnFastTranslator::gnFastTranslator  
 

Definition at line 26 of file gnFastTranslator.cpp.

References m_defaultChar, and use_default.

Referenced by Clone(), DNAProteinTranslator(), and ProteinDNATranslator().

gnFastTranslator::gnFastTranslator gnTranslatorType    t_type
 

Definition at line 39 of file gnFastTranslator.cpp.

References CacheTranslator(), DNAProteinTranslatorType, m_defaultChar, ProteinDNATranslatorType, and use_default.

gnFastTranslator::gnFastTranslator const gnFastTranslator &    sf
 

Definition at line 32 of file gnFastTranslator.cpp.

References m_defaultChar, gnBaseFilter::m_name, m_transCache, and use_default.


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.

Definition at line 125 of file gnFastTranslator.cpp.

References gnTranslator::Filter(), gnSeqI, and m_transCache.

Referenced by gnFastTranslator().

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

Implements gnBaseFilter.

Definition at line 83 of file gnFastTranslator.h.

References gnFastTranslator().

void gnFastTranslator::CreateDNAProteinTranslator   [private]
 

void gnFastTranslator::CreateProteinDNATranslator   [private]
 

const gnFastTranslator * gnFastTranslator::DNAProteinTranslator   [static]
 

Definition at line 20 of file gnFastTranslator.cpp.

References gnFastTranslator().

Referenced by gnPosSpecificTranslator::gnPosSpecificTranslator().

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

Filters the given string.

Parameters:
seq The string to filter

Implements gnBaseFilter.

Definition at line 94 of file gnFastTranslator.cpp.

References gnSeqC, m_defaultChar, m_transCache, and uint32.

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

Implements gnBaseFilter.

Definition at line 63 of file gnFastTranslator.cpp.

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

Filter the given character.

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

Implements gnBaseFilter.

Definition at line 54 of file gnFastTranslator.cpp.

References gnSeqC, and m_defaultChar.

gnSeqC gnFastTranslator::GetDefaultChar   const [inline]
 

Definition at line 95 of file gnFastTranslator.h.

References gnSeqC, and m_defaultChar.

string gnBaseFilter::GetName   const [inline, virtual, inherited]
 

Gets the name of this filter.

Returns:
the filter name

Definition at line 65 of file gnBaseFilter.h.

References gnBaseFilter::m_name.

gnFastTranslator& gnFastTranslator::operator= const gnFastTranslator &    sf
 

const gnFastTranslator * gnFastTranslator::ProteinDNATranslator   [static]
 

Definition at line 16 of file gnFastTranslator.cpp.

References gnFastTranslator().

Referenced by gnPosSpecificTranslator::gnPosSpecificTranslator().

void gnFastTranslator::RemovePair const string &    ch
 

void gnFastTranslator::SetDefaultChar const gnSeqC    ch1 [inline]
 

Definition at line 89 of file gnFastTranslator.h.

References m_defaultChar, and use_default.

void gnBaseFilter::SetName string    name [inline, virtual, inherited]
 

Sets the name of this filter.

Parameters:
name the new filter name

Definition at line 70 of file gnBaseFilter.h.

References gnBaseFilter::m_name.

Referenced by gnFilter::CreateAlphabetCharacterFilter(), gnFilter::CreateBasicDNAFilter(), gnFilter::CreateBasicRNAFilter(), gnFilter::CreateDNAComplementFilter(), gnTranslator::CreateDNAProteinTranslator(), gnFilter::CreateDNAtoRNAFilter(), gnFilter::CreateFullDNAFilter(), gnFilter::CreateFullRNAFilter(), gnFilter::CreateNumberCharacterFilter(), gnTranslator::CreateProteinDNATranslator(), gnFilter::CreateProteinFilter(), gnTranslator::CreateProteinRNATranslator(), gnFilter::CreateRNAComplementFilter(), gnTranslator::CreateRNAProteinTranslator(), and gnFilter::CreateRNAtoDNAFilter().

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

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

Definition at line 101 of file gnFastTranslator.h.

References use_default.


Member Data Documentation

gnSeqC gnFastTranslator::m_defaultChar [private]
 

Definition at line 79 of file gnFastTranslator.h.

Referenced by Filter(), GetDefaultChar(), gnFastTranslator(), and SetDefaultChar().

string gnBaseFilter::m_name [protected, inherited]
 

Definition at line 60 of file gnBaseFilter.h.

Referenced by gnBaseFilter::GetName(), gnFastTranslator(), gnFilter::gnFilter(), gnPosSpecificTranslator::gnPosSpecificTranslator(), gnTranslator::gnTranslator(), and gnBaseFilter::SetName().

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

Definition at line 75 of file gnFastTranslator.h.

Referenced by CacheTranslator(), Filter(), and gnFastTranslator().

const gnTranslator* gnFastTranslator::m_translator [private]
 

Definition at line 76 of file gnFastTranslator.h.

boolean gnFastTranslator::use_default [private]
 

Definition at line 78 of file gnFastTranslator.h.

Referenced by gnFastTranslator(), SetDefaultChar(), and UseDefaultChar().


The documentation for this class was generated from the following files:
Generated on Mon Feb 3 02:34:46 2003 for libGenome by doxygen1.3-rc3