|
gnContigSpec.hGo to the documentation of this file.00001 00002 // File: gnContigSpec.h 00003 // Purpose: Abstract Contig Spec class 00004 // Description: Defines an interface for contig specs 00005 // Changes: 00006 // Version: libGenome 0.1.0 00007 // Author: Aaron Darling 00008 // Last Edited: April 15, 2001, 10:34:50pm 00009 // Modified by: 00010 // Copyright: (c) Aaron Darling 00011 // Licenses: Proprietary 00013 #ifndef _gnContigSpec_h_ 00014 #define _gnContigSpec_h_ 00015 00016 #include "gn/gnDefs.h" 00017 00018 #include <vector> 00019 #include <string> 00020 00021 #include "gn/gnBaseSpec.h" 00022 #include "gn/gnBaseFeature.h" 00023 #include "gn/gnDebug.h" 00028 class GNDLLEXPORT gnContigSpec : public gnBaseSpec 00029 { 00030 public: 00031 gnContigSpec(){} 00035 virtual ~gnContigSpec(){} 00036 virtual gnContigSpec* Clone() const = 0; 00037 virtual gnContigSpec* CloneRange( const uint32 startI, const uint32 len ) const = 0; 00042 virtual string GetSourceName() const; 00047 virtual gnSeqI GetStart() const; 00052 virtual gnSeqI GetLength() const; 00057 virtual gnSeqI GetSourceLength() const = 0; 00062 virtual uint32 GetSourceContigIndex() const; 00068 virtual void SetSourceName( const string& sourceName ); 00076 virtual void SetStart( const gnSeqI start ); 00084 virtual void SetLength( const gnSeqI len ); 00089 virtual void SetSourceContigIndex( const uint32 contigI ); 00096 virtual void SetReverseComplement( const boolean value ); 00097 00098 virtual void CropStart( gnSeqI cropLen ); 00099 virtual void CropEnd( gnSeqI cropLen ); 00100 00101 virtual boolean SeqRead(const gnSeqI start, gnSeqC* buf, uint32& bufLen, const uint32 contigI ) const; 00102 virtual void Clear(); 00103 protected: 00104 gnSeqI m_start; //start within the genome. 00105 gnSeqI m_length; 00106 uint32 m_SourceContigIndex; 00107 00112 virtual boolean Read(const gnSeqI start, gnSeqC* buf, uint32& bufLen ) const = 0; 00113 00114 private: 00115 00116 }; // class gnContigSpec 00117 00118 00119 inline 00120 string gnContigSpec::GetSourceName() const{ 00121 return m_sourceName; 00122 } 00123 inline 00124 void gnContigSpec::SetSourceName(const string& sourceName){ 00125 m_sourceName = sourceName; 00126 } 00127 00128 inline 00129 gnSeqI gnContigSpec::GetStart() const 00130 { 00131 return m_start; 00132 } 00133 inline 00134 gnSeqI gnContigSpec::GetLength() const 00135 { 00136 return m_length; 00137 } 00138 // SET 00139 inline 00140 void gnContigSpec::SetStart( const gnSeqI start ) 00141 { 00142 m_start = start; 00143 } 00144 inline 00145 void gnContigSpec::SetLength( const gnSeqI len ) 00146 { 00147 m_length = len; 00148 } 00149 inline 00150 uint32 gnContigSpec::GetSourceContigIndex() const{ 00151 return m_SourceContigIndex; 00152 } 00153 inline 00154 void gnContigSpec::SetSourceContigIndex( const uint32 contigI ){ 00155 m_SourceContigIndex = contigI; 00156 } 00157 00158 #endif 00159 // _gnContigSpec_h_ Generated at Fri Nov 30 15:36:50 2001 for libGenome by 1.2.8.1 written by Dimitri van Heesch, © 1997-2001 |