gnSourceSpec Class Reference

gnSourceSpec stores sequence and annotation data from another source. More...

#include <gnSourceSpec.h>

Inheritance diagram for gnSourceSpec:

Inheritance graph
[legend]
Collaboration diagram for gnSourceSpec:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void Clear ()
 Clears all data from this spec.
gnSourceSpecClone () const
virtual gnSourceSpecCloneRange (const gnSeqI startI, const gnSeqI len) const
 Copies a specified range of bases and returns a pointer to the resulting gnSourceSpec.
virtual gnBaseSourceGetSource () const
virtual gnSeqI GetSourceLength () const
 Get the length of the source for this spec.
 gnSourceSpec (const gnSourceSpec &s)
 Copy constructor.
 gnSourceSpec (gnBaseSource *m_pSource, const uint32 m_ContigIndex=ALL_CONTIGS, const gnSeqI startI=0, const gnSeqI endI=GNSEQI_END, const boolean revComp=false)
 Constructor, creates a gnSourceSpec using sequence data in the given source.
 gnSourceSpec ()
 Empty constructor.
 ~gnSourceSpec ()

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

gnBaseSourcem_pSource

Detailed Description

gnSourceSpec stores sequence and annotation data from another source.

See also:
gnContigSpec

gnBaseSpec

Definition at line 26 of file gnSourceSpec.h.


Constructor & Destructor Documentation

gnSourceSpec::gnSourceSpec  ) 
 

Empty constructor.

Definition at line 15 of file gnSourceSpec.cpp.

References Clear().

Referenced by Clone(), and CloneRange().

gnSourceSpec::gnSourceSpec gnBaseSource m_pSource,
const uint32  m_ContigIndex = ALL_CONTIGS,
const gnSeqI  startI = 0,
const gnSeqI  endI = GNSEQI_END,
const boolean  revComp = false
 

Constructor, creates a gnSourceSpec using sequence data in the given source.

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

Parameters:
m_pSource The source to read base pairs from.
m_ContigIndex The index of the contig in the source, ALL_CONTIGS by default.
startI The index to start reading base pairs from the source.
endI The index to stop reading base pairs from the source.
revComp True if the sequence is read reverse complement.
Definition at line 32 of file gnSourceSpec.cpp.

References gnSeqI, m_pSource, and uint32.

gnSourceSpec::gnSourceSpec const gnSourceSpec s  ) 
 

Copy constructor.

Parameters:
s the gnSourceSpec to copy.
Definition at line 20 of file gnSourceSpec.cpp.

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

gnSourceSpec::~gnSourceSpec  ) 
 

Definition at line 62 of file gnSourceSpec.cpp.


Member Function Documentation

void gnSourceSpec::Clear  )  [virtual]
 

Clears all data from this spec.

Reimplemented from gnContigSpec.

Definition at line 66 of file gnSourceSpec.cpp.

References gnContigSpec::Clear(), and m_pSource.

Referenced by gnSourceSpec().

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

Implements gnContigSpec.

Definition at line 73 of file gnSourceSpec.h.

References gnSourceSpec().

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

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

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 gnSourceSpec containing only the specified bases

Implements gnContigSpec.

Definition at line 73 of file gnSourceSpec.cpp.

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

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

Definition at line 82 of file gnSourceSpec.h.

References m_pSource.

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

Get the length of the source for this spec.

Returns:
The source length.

Implements gnContigSpec.

Definition at line 78 of file gnSourceSpec.h.

References gnBaseSource::GetContigSeqLength(), gnSeqI, and m_pSource.

boolean gnSourceSpec::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 88 of file gnSourceSpec.h.

References gnSeqC, gnSeqI, m_pSource, and gnBaseSource::SeqRead().


Member Data Documentation

gnBaseSource* gnSourceSpec::m_pSource [protected]
 

Definition at line 68 of file gnSourceSpec.h.

Referenced by Clear(), CloneRange(), GetSource(), GetSourceLength(), gnSourceSpec(), and Read().


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