include/gn/gnSourceSpec.h

Go to the documentation of this file.
00001 00002 // File: gnSourceSpec.h 00003 // Purpose: implements gnBaseSpec for source specs 00004 // Description: 00005 // Changes: 00006 // Version: libGenome 0.5.1 00007 // Author: Aaron Darling 00008 // Modified by: 00009 // Copyright: (c) Aaron Darling 00010 // Licenses: See COPYING file for details 00012 #ifndef _gnSourceSpec_h_ 00013 #define _gnSourceSpec_h_ 00014 00015 #include "gn/gnDefs.h" 00016 00017 #include <string> 00018 #include "gn/gnContigSpec.h" 00019 #include "gn/gnBaseSource.h" 00020 00026 class GNDLLEXPORT gnSourceSpec : public gnContigSpec 00027 { 00028 public: 00032 gnSourceSpec(); 00042 gnSourceSpec( gnBaseSource* m_pSource, const uint32 m_ContigIndex=ALL_CONTIGS, const gnSeqI startI=0, const gnSeqI endI=GNSEQI_END, const boolean revComp = false); 00047 gnSourceSpec( const gnSourceSpec& s ); 00048 ~gnSourceSpec(); 00049 00050 gnSourceSpec* Clone() const; 00051 // Source Spec Specific functions 00052 virtual void Clear(); 00053 virtual gnSeqI GetSourceLength() const; 00054 virtual gnBaseSource *GetSource() const; 00055 00064 virtual gnSourceSpec* CloneRange( const gnSeqI startI, const gnSeqI len ) const; 00065 00066 protected: 00067 virtual boolean Read(const gnSeqI start, gnSeqC* buf, gnSeqI& bufLen ) const; 00068 gnBaseSource* m_pSource; 00069 00070 }; // class gnSourceSpec 00071 00072 inline 00073 gnSourceSpec* gnSourceSpec::Clone() const 00074 { 00075 return new gnSourceSpec( *this ); 00076 } 00077 inline 00078 gnSeqI gnSourceSpec::GetSourceLength() const{ 00079 return m_pSource->GetContigSeqLength(m_SourceContigIndex); 00080 } 00081 inline 00082 gnBaseSource* gnSourceSpec::GetSource() const 00083 { 00084 return m_pSource; 00085 } 00086 00087 inline 00088 boolean gnSourceSpec::Read(const gnSeqI start, gnSeqC* buf, gnSeqI& bufLen) const{ 00089 return m_pSource->SeqRead(start, buf, bufLen, m_SourceContigIndex); 00090 } 00091 00092 #endif 00093 // _gnSourceSpec_h_

Generated on Mon Feb 14 19:28:18 2005 for libGenome by doxygen 1.3.8