gnCompare Class Reference

#include <gnCompare.h>

Inheritance diagram for gnCompare:

Inheritance graph
[legend]
Collaboration diagram for gnCompare:

Collaboration graph
[legend]
List of all members.

Public Types

enum  gnCompareType { ProteinSeqCompareType, DNASeqCompareType, RNASeqCompareType }

Public Member Functions

gnCompareClone () const
boolean Contains (const string &seq, const string &seq2, boolean case_sensitive=false) const
boolean Contains (const gnSeqC *seq, const gnSeqC *seq2, const uint32 len, 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.
string GetName () const
 gnCompare (const gnCompare &sf)
 gnCompare (const gnCompareType c_type)
 Creates a gnCompare for a predefined compare type.
 gnCompare ()
boolean LessThan (const string &seq, const string &seq2, boolean case_sensitive=false) const
boolean LessThan (const gnSeqC *seq, const gnSeqC *seq2, const uint32 len, boolean case_sensitive=false) const
boolean LessThan (gnSeqC ch, gnSeqC ch2, boolean case_sensitive=false) const
void RemoveContained (const gnSeqC ch, const gnSeqC ch2)
void RemovePair (const gnSeqC ch, const gnSeqC ch2)
void RemoveSingle (const gnSeqC ch)
void SetContained (const gnSeqC ch, const gnSeqC ch2)
void SetName (string name)
void SetPair (const gnSeqC ch, const gnSeqC ch2)
void SetSingle (const gnSeqC ch)
 ~gnCompare ()

Static Public Member Functions

const gnCompareDNASeqCompare ()
 Returns a pointer to a ready to use DNA comparison object This comparator can handle comparisons between ambiguous DNA sequences.
const gnCompareProteinSeqCompare ()
 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.
const gnCompareRNASeqCompare ()
 Returns a pointer to a ready to use RNA comparison object This comparator can handle comparisons between ambiguous RNA sequences.

Private Member Functions

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

Private Attributes

gnSeqCm_containArray [GNSEQC_MAX]
boolean m_ignoreCase
string m_name
gnSeqCm_pairArray [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 73 of file gnCompare.cpp.

References gnSeqC, GNSEQC_MAX, m_containArray, and m_pairArray.

Referenced by 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 29 of file gnCompare.cpp.

References CreateDNAComparator(), CreateProteinComparator(), CreateRNAComparator(), DNASeqCompareType, gnSeqC, GNSEQC_MAX, m_containArray, m_pairArray, ProteinSeqCompareType, and RNASeqCompareType.

gnCompare::gnCompare const gnCompare sf  ) 
 

Definition at line 83 of file gnCompare.cpp.

References gnSeqC, GNSEQC_MAX, m_containArray, m_name, and m_pairArray.

gnCompare::~gnCompare  ) 
 

Definition at line 93 of file gnCompare.cpp.

References gnSeqC, GNSEQC_MAX, m_containArray, and m_pairArray.


Member Function Documentation

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

Definition at line 102 of file gnCompare.cpp.

References gnSeqC, and uint32.

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

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

Implements 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 67 of file gnCompare.cpp.

References Contains(), gnSeqC, and gnSeqI.

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

Definition at line 60 of file gnCompare.cpp.

References Contains(), gnSeqC, and uint32.

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 49 of file gnCompare.cpp.

References gnSeqC, and m_containArray.

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

void gnCompare::CreateDNAComparator  )  [private]
 

Definition at line 182 of file gnCompare.cpp.

References SetContained(), SetName(), SetPair(), and SetSingle().

Referenced by gnCompare().

void gnCompare::CreateProteinComparator  )  [private]
 

Definition at line 135 of file gnCompare.cpp.

References SetName(), and SetSingle().

Referenced by gnCompare().

void gnCompare::CreateRNAComparator  )  [private]
 

Definition at line 438 of file gnCompare.cpp.

References SetContained(), SetName(), SetPair(), and SetSingle().

Referenced by gnCompare().

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

Definition at line 112 of file gnCompare.cpp.

References gnSeqC, m_containArray, and uint32.

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

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 20 of file gnCompare.cpp.

References DNASeqCompareType, and gnCompare().

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

string gnCompare::GetName  )  const [inline]
 

Definition at line 117 of file gnCompare.h.

References m_name.

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

Definition at line 151 of file gnCompare.h.

References gnSeqC, gnSeqI, and LessThan().

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.

References gnSeqC, LessThan(), and uint32.

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

Definition at line 127 of file gnCompare.h.

References gnSeqC, and m_pairArray.

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

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 16 of file gnCompare.cpp.

References gnCompare(), and ProteinSeqCompareType.

Referenced by gnProteinSequence::gnProteinSequence().

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

Definition at line 186 of file gnCompare.h.

References DelArrayEntry(), gnSeqC, and m_containArray.

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

Definition at line 180 of file gnCompare.h.

References DelArrayEntry(), gnSeqC, and m_pairArray.

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

Definition at line 174 of file gnCompare.h.

References DelArrayEntry(), gnSeqC, m_containArray, and m_pairArray.

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 24 of file gnCompare.cpp.

References gnCompare(), and RNASeqCompareType.

Referenced by gnRNASequence::gnRNASequence().

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

Definition at line 169 of file gnCompare.h.

References AddArrayEntry(), gnSeqC, and m_containArray.

Referenced by CreateDNAComparator(), and CreateRNAComparator().

void gnCompare::SetName string  name  )  [inline]
 

Definition at line 121 of file gnCompare.h.

References m_name.

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

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

Definition at line 164 of file gnCompare.h.

References AddArrayEntry(), gnSeqC, and m_pairArray.

Referenced by CreateDNAComparator(), and CreateRNAComparator().

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

Definition at line 159 of file gnCompare.h.

References AddArrayEntry(), gnSeqC, m_containArray, and m_pairArray.

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


Member Data Documentation

gnSeqC* gnCompare::m_containArray[GNSEQC_MAX] [private]
 

Definition at line 107 of file gnCompare.h.

Referenced by Contains(), DelArrayEntry(), gnCompare(), RemoveContained(), RemoveSingle(), SetContained(), SetSingle(), and ~gnCompare().

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.

Referenced by GetName(), gnCompare(), and SetName().

gnSeqC* gnCompare::m_pairArray[GNSEQC_MAX] [private]
 

Definition at line 106 of file gnCompare.h.

Referenced by gnCompare(), LessThan(), RemovePair(), RemoveSingle(), SetPair(), SetSingle(), and ~gnCompare().


The documentation for this class was generated from the following files:
Generated on Mon Feb 14 19:29:47 2005 for libGenome by doxygen 1.3.8