Google

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

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.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 _gnSourceSpec_h_
00014 #define _gnSourceSpec_h_
00015 
00016 #include "gn/gnDefs.h"
00017 
00018 #include <string>
00019 #include "gn/gnContigSpec.h"
00020 #include "gn/gnBaseSource.h"
00021 
00027 class GNDLLEXPORT gnSourceSpec : public gnContigSpec
00028 {
00029 public:
00033         gnSourceSpec();
00043         gnSourceSpec( gnBaseSource* m_pSource, const uint32 m_ContigIndex=ALL_CONTIGS, const gnSeqI start=0, const gnSeqI endI=GNSEQI_END, const boolean revComp = false);
00048         gnSourceSpec( const gnSourceSpec& s );
00049         ~gnSourceSpec();
00050 
00051         gnSourceSpec* Clone() const;
00052 // Source Spec Specific functions
00053         virtual void Clear();
00054         virtual gnSeqI GetSourceLength() const; 
00055         virtual gnBaseSource *GetSource() const;
00056 
00065         virtual gnSourceSpec* CloneRange( const gnSeqI startI, const gnSeqI len ) const;
00066 
00067 protected:
00068         virtual boolean Read(const gnSeqI start, gnSeqC* buf, uint32& bufLen ) const;
00069         gnBaseSource* m_pSource;
00070         
00071 }; // class gnSourceSpec
00072 
00073 inline
00074 gnSourceSpec* gnSourceSpec::Clone() const
00075 {
00076         return new gnSourceSpec( *this );
00077 }
00078 inline
00079 gnSeqI gnSourceSpec::GetSourceLength() const{
00080         return m_pSource->GetContigSeqLength(m_SourceContigIndex);
00081 }
00082 inline
00083 gnBaseSource* gnSourceSpec::GetSource() const
00084 {
00085         return m_pSource;
00086 }
00087 
00088 inline
00089 boolean gnSourceSpec::Read(const gnSeqI start, gnSeqC* buf, uint32& bufLen) const{
00090         return m_pSource->SeqRead(start, buf, bufLen, m_SourceContigIndex);
00091 }
00092 
00093 #endif
00094         // _gnSourceSpec_h_

Generated at Fri Nov 30 15:36:52 2001 for libGenome by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001