Google

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

gnCompare Class Reference

#include <gnCompare.h>

Inheritance diagram for gnCompare::

gnClone List of all members.

Public Types

enum  gnCompareType { ProteinSeqCompareType, DNASeqCompareType, RNASeqCompareType }

Public Methods

 gnCompare ()
 gnCompare (const gnCompareType c_type)
 Creates a gnCompare for a predefined compare type. More...

 gnCompare (const gnCompare &sf)
 ~gnCompare ()
gnCompare* Clone () const
string GetName () const
void SetName (string name)
boolean LessThan (gnSeqC ch, gnSeqC ch2, boolean case_sensitive=false) const
boolean Contains (gnSeqC ch, gnSeqC ch2, boolean case_sensitive=false) const
 True if ch2 is equal to or contained within the scope of ch. More...

boolean LessThan (const gnSeqC *seq, const gnSeqC *seq2, const uint32 len, boolean case_sensitive=false) const
boolean Contains (const gnSeqC *seq, const gnSeqC *seq2, const uint32 len, boolean case_sensitive=false) const
boolean LessThan (const string &seq, const string &seq2, boolean case_sensitive=false) const
boolean Contains (const string &seq, const string &seq2, boolean case_sensitive=false) const
void SetSingle (const gnSeqC ch)
void SetPair (const gnSeqC ch, const gnSeqC ch2)
void SetContained (const gnSeqC ch, const gnSeqC ch2)
void RemoveSingle (const gnSeqC ch)
void RemovePair (const gnSeqC ch, const gnSeqC ch2)
void RemoveContained (const gnSeqC ch, const gnSeqC ch2)

Static Public Methods

const gnCompare* ProteinSeqCompare ()
 Returns a pointer to a ready to use Protein comparison object Do not delete the object when finished with it, it is a static object. More...

const gnCompare* DNASeqCompare ()
 Returns a pointer to a ready to use DNA comparison object This comparator can handle comparisons between ambiguous DNA sequences. More...

const gnCompare* RNASeqCompare ()
 Returns a pointer to a ready to use RNA comparison object This comparator can handle comparisons between ambiguous RNA sequences. More...


Private Methods

void CreateProteinComparator ()
void CreateDNAComparator ()
void CreateRNAComparator ()
void AddArrayEntry (gnSeqC *array[GNSEQC_MAX], const gnSeqC ch, const gnSeqC ch2)
void DelArrayEntry (gnSeqC *array[GNSEQC_MAX], const gnSeqC ch, const gnSeqC ch2)

Private Attributes

string m_name
boolean m_ignoreCase
gnSeqCm_pairArray [GNSEQC_MAX]
gnSeqCm_containArray [GNSEQC_MAX]

Member Enumeration Documentation

enum gnCompare::gnCompareType
 

Enumeration values:
ProteinSeqCompareType  
DNASeqCompareType  
RNASeqCompareType  

Definition at line 43 of file gnCompare.h.


Constructor & Destructor Documentation

gnCompare::gnCompare ( )
 

Definition at line 74 of file gnCompare.cpp.

Referenced by Clone(), DNASeqCompare(), ProteinSeqCompare(), and RNASeqCompare().

gnCompare::gnCompare ( const gnCompareType c_type )
 

Creates a gnCompare for a predefined compare type.

Used by the static compare constructors to avoid the "static initialization order fiasco" For general use of a predefined comaprison type, you should use one of the static member functions to get a pointer to that comparison object.

Parameters:
c_type   The type of comparator to create.
See also:
gnCompareType

Definition at line 30 of file gnCompare.cpp.

gnCompare::gnCompare ( const gnCompare & sf )
 

Definition at line 84 of file gnCompare.cpp.

gnCompare::~gnCompare ( )
 

Definition at line 94 of file gnCompare.cpp.


Member Function Documentation

void gnCompare::AddArrayEntry ( gnSeqC * array[GNSEQC_MAX],
const gnSeqC ch,
const gnSeqC ch2 ) [private]
 

Definition at line 103 of file gnCompare.cpp.

Referenced by SetContained(), SetPair(), and SetSingle().

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

Reimplemented from gnClone.

Definition at line 112 of file gnCompare.h.

boolean gnCompare::Contains ( const string & seq,
const string & seq2,
boolean case_sensitive = false ) const
 

Definition at line 68 of file gnCompare.cpp.

boolean gnCompare::Contains ( const gnSeqC * seq,
const gnSeqC * seq2,
const uint32 len,
boolean case_sensitive = false ) const
 

Definition at line 61 of file gnCompare.cpp.

boolean gnCompare::Contains ( gnSeqC ch,
gnSeqC ch2,
boolean case_sensitive = false ) const
 

True if ch2 is equal to or contained within the scope of ch.

Definition at line 50 of file gnCompare.cpp.

Referenced by Contains(), and gnTranslator::Filter().

void gnCompare::CreateDNAComparator ( ) [private]
 

Definition at line 183 of file gnCompare.cpp.

Referenced by gnCompare().

void gnCompare::CreateProteinComparator ( ) [private]
 

Definition at line 136 of file gnCompare.cpp.

Referenced by gnCompare().

void gnCompare::CreateRNAComparator ( ) [private]
 

Definition at line 439 of file gnCompare.cpp.

Referenced by gnCompare().

const gnCompare * gnCompare::DNASeqCompare ( ) [static]
 

Returns a pointer to a ready to use DNA comparison object This comparator can handle comparisons between ambiguous DNA sequences.

Do not delete the object when finished with it, it is a static object.

Definition at line 21 of file gnCompare.cpp.

Referenced by gnDNASequence::gnDNASequence(), and gnSequence::gnSequence().

void gnCompare::DelArrayEntry ( gnSeqC * array[GNSEQC_MAX],
const gnSeqC ch,
const gnSeqC ch2 ) [private]
 

Definition at line 113 of file gnCompare.cpp.

Referenced by RemoveContained(), RemovePair(), and RemoveSingle().

string gnCompare::GetName ( ) const [inline]
 

Definition at line 117 of file gnCompare.h.

boolean gnCompare::LessThan ( const string & seq,
const string & seq2,
boolean case_sensitive = false ) const [inline]
 

Definition at line 151 of file gnCompare.h.

boolean gnCompare::LessThan ( const gnSeqC * seq,
const gnSeqC * seq2,
const uint32 len,
boolean case_sensitive = false ) const [inline]
 

Definition at line 142 of file gnCompare.h.

boolean gnCompare::LessThan ( gnSeqC ch,
gnSeqC ch2,
boolean case_sensitive = false ) const [inline]
 

Definition at line 127 of file gnCompare.h.

Referenced by LessThan(), and gnSequence::compare().

const gnCompare * gnCompare::ProteinSeqCompare ( ) [static]
 

Returns a pointer to a ready to use Protein comparison object Do not delete the object when finished with it, it is a static object.

Definition at line 17 of file gnCompare.cpp.

Referenced by gnProteinSequence::gnProteinSequence().

const gnCompare * gnCompare::RNASeqCompare ( ) [static]
 

Returns a pointer to a ready to use RNA comparison object This comparator can handle comparisons between ambiguous RNA sequences.

Do not delete the object when finished with it, it is a static object.

Definition at line 25 of file gnCompare.cpp.

Referenced by gnRNASequence::gnRNASequence().

void gnCompare::RemoveContained ( const gnSeqC ch,
const gnSeqC ch2 ) [inline]
 

Definition at line 186 of file gnCompare.h.

void gnCompare::RemovePair ( const gnSeqC ch,
const gnSeqC ch2 ) [inline]
 

Definition at line 180 of file gnCompare.h.

void gnCompare::RemoveSingle ( const gnSeqC ch ) [inline]
 

Definition at line 174 of file gnCompare.h.

void gnCompare::SetContained ( const gnSeqC ch,
const gnSeqC ch2 ) [inline]
 

Definition at line 169 of file gnCompare.h.

Referenced by CreateDNAComparator(), and CreateRNAComparator().

void gnCompare::SetName ( string name ) [inline]
 

Definition at line 121 of file gnCompare.h.

Referenced by CreateDNAComparator(), CreateProteinComparator(), and CreateRNAComparator().

void gnCompare::SetPair ( const gnSeqC ch,
const gnSeqC ch2 ) [inline]
 

Definition at line 164 of file gnCompare.h.

Referenced by CreateDNAComparator(), and CreateRNAComparator().

void gnCompare::SetSingle ( const gnSeqC ch ) [inline]
 

Definition at line 159 of file gnCompare.h.

Referenced by CreateDNAComparator(), CreateProteinComparator(), and CreateRNAComparator().


Member Data Documentation

gnSeqC * gnCompare::m_containArray [private]
 

Definition at line 107 of file gnCompare.h.

boolean gnCompare::m_ignoreCase [private]
 

Definition at line 104 of file gnCompare.h.

string gnCompare::m_name [private]
 

Definition at line 103 of file gnCompare.h.

gnSeqC * gnCompare::m_pairArray [private]
 

Definition at line 106 of file gnCompare.h.


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