gnStringSpec Class Reference

gnStringSpec stores a sequence and annotation data in memory. More...

#include <gnStringSpec.h>

Inheritance diagram for gnStringSpec:

Inheritance graph
[legend]
Collaboration diagram for gnStringSpec:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void Clear ()
 Clears all data from this spec.
gnStringSpecClone () const
virtual gnStringSpecCloneRange (const gnSeqI startI, const gnSeqI len) const
 Copies a specified range of bases and returns a pointer to the resulting gnStringSpec.
virtual gnBaseSourceGetSource () const
virtual gnSeqI GetSourceLength () const
 Get the length of the source for this spec.
 gnStringSpec (const gnStringSpec &s)
 Copy constructor.
 gnStringSpec (const string &m_string, const gnSeqI startI=0, const gnSeqI endI=GNSEQI_END, const boolean revComp=false)
 Constructor, creates a gnStringSpec using sequence data in the given string.
 gnStringSpec ()
 Empty constructor.
 ~gnStringSpec ()

Protected Member Functions

virtual boolean Read (const gnSeqI start, gnSeqC *buf, gnSeqI &bufLen) const
 all derived classes must implement this! it simply reads the specified bases into buf, disregarding circularity and reverse complement.

Protected Attributes

string m_seqString

Detailed Description

gnStringSpec stores a sequence and annotation data in memory.

For a more complete description see the gnBaseSpec documentation.

Definition at line 25 of file gnStringSpec.h.


Constructor & Destructor Documentation

gnStringSpec::gnStringSpec  ) 
 

Empty constructor.

Definition at line 16 of file gnStringSpec.cpp.

References gnContigSpec::Clear().

Referenced by Clone(), and CloneRange().

gnStringSpec::gnStringSpec const string &  m_string,
const gnSeqI  startI = 0,
const gnSeqI  endI = GNSEQI_END,
const boolean  revComp = false
 

Constructor, creates a gnStringSpec using sequence data in the given string.

A circular spec will be created if the end index is greater than the start.

Parameters:
m_string The string to read base pairs from.
startI The index to start reading base pairs from the string.
endI The index to stop reading base pairs from the string.
revComp True if the sequence is read reverse complement.
Definition at line 21 of file gnStringSpec.cpp.

References gnSeqI, and m_seqString.

gnStringSpec::gnStringSpec const gnStringSpec s  ) 
 

Copy constructor.

Parameters:
s the gnStringSpec to copy.
Definition at line 44 of file gnStringSpec.cpp.

References gnBaseSpec::m_circular, gnContigSpec::m_length, gnBaseSpec::m_name, gnBaseSpec::m_reverseComplement, m_seqString, gnContigSpec::m_SourceContigIndex, gnBaseSpec::m_sourceName, and gnContigSpec::m_start.

gnStringSpec::~gnStringSpec  ) 
 

Definition at line 55 of file gnStringSpec.cpp.

References Clear().


Member Function Documentation

void gnStringSpec::Clear  )  [virtual]
 

Clears all data from this spec.

Reimplemented from gnContigSpec.

Definition at line 59 of file gnStringSpec.cpp.

References gnContigSpec::Clear(), and m_seqString.

Referenced by ~gnStringSpec().

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

Implements gnContigSpec.

Definition at line 75 of file gnStringSpec.h.

References gnStringSpec().

gnStringSpec * gnStringSpec::CloneRange const gnSeqI  startI,
const gnSeqI  len
const [virtual]
 

Copies a specified range of bases and returns a pointer to the resulting gnStringSpec.

You must delete the copy when you are finished with it.

Parameters:
startI The first base pair to copy
len The length of the piece to copy
Returns:
A copy of the gnStringSpec containing only the specified bases

Implements gnContigSpec.

Definition at line 65 of file gnStringSpec.cpp.

References gnSeqI, gnStringSpec(), gnBaseSpec::m_circular, gnContigSpec::m_length, gnBaseSpec::m_name, gnBaseSpec::m_reverseComplement, m_seqString, gnContigSpec::m_SourceContigIndex, gnBaseSpec::m_sourceName, and gnContigSpec::m_start.

gnBaseSource * gnStringSpec::GetSource  )  const [inline, virtual]
 

Definition at line 84 of file gnStringSpec.h.

gnSeqI gnStringSpec::GetSourceLength  )  const [inline, virtual]
 

Get the length of the source for this spec.

Returns:
The source length.

Implements gnContigSpec.

Definition at line 80 of file gnStringSpec.h.

References gnSeqI, and m_seqString.

boolean gnStringSpec::Read const gnSeqI  start,
gnSeqC buf,
gnSeqI bufLen
const [inline, protected, virtual]
 

all derived classes must implement this! it simply reads the specified bases into buf, disregarding circularity and reverse complement.

Implements gnContigSpec.

Definition at line 90 of file gnStringSpec.h.

References gnSeqC, gnSeqI, and m_seqString.


Member Data Documentation

string gnStringSpec::m_seqString [protected]
 

Definition at line 70 of file gnStringSpec.h.

Referenced by Clear(), CloneRange(), GetSourceLength(), gnStringSpec(), and Read().


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