gnBaseSpec.h Source File

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

# gnBaseSpec.h

Go to the documentation of this file.

    00001
    00002 // File:            gnBaseSpec.h
    00003 // Purpose:         abstract Spec class
    00004 // Description:     Defines a basic interface for all 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 _gnBaseSpec_h_
    00014 #define _gnBaseSpec_h_
    00015
    00016 #include "gn/gnDefs.h"
    00017
    00018 #include <vector>
    00019 #include <string>
    00020
    00021 #include "gn/gnClone.h"
    00022 #include "gn/gnBaseFeature.h"
    00023 #include "gn/gnBaseHeader.h"
    00024
    00028 class GNDLLEXPORT gnBaseSpec : public gnClone
    00029 {
    00030 public:
    00031         gnBaseSpec(){}
    00035         virtual ~gnBaseSpec(){}
    00036         virtual gnBaseSpec* Clone() const = 0;
    00037         virtual gnBaseSpec* CloneRange( const uint32 startI, const uint32 len ) const = 0;
    00042         virtual string GetName() const;
    00048         virtual void SetName( const string& name );
    00053         virtual gnSeqI GetLength() const = 0;
    00058         virtual boolean IsReverseComplement() const;
    00063         virtual boolean IsCircular() const;
    00068         virtual void SetReverseComplement( const boolean value ) = 0;
    00075         virtual void SetCircular( const boolean value );
    00081         virtual void CropStart( gnSeqI cropLen ) = 0;
    00087         virtual void CropEnd( gnSeqI cropLen ) = 0;
    00088
    00102         virtual boolean SeqRead(const gnSeqI start, gnSeqC* buf, uint32& bufLen, const uint32 contigI ) const = 0;
    00106         virtual void Clear();
    00107 protected:
    00108         boolean m_reverseComplement;
    00109         boolean m_circular;
    00110
    00111         string m_name;
    00112         string m_sourceName;
    00113
    00114 }; // class gnBaseSpec
    00115
    00116 inline
    00117 string gnBaseSpec::GetName() const{
    00118         return m_name;
    00119 }
    00120 inline
    00121 void gnBaseSpec::SetName( const string& name ){
    00122         m_name = name;
    00123 }
    00124 inline
    00125 boolean gnBaseSpec::IsReverseComplement() const{
    00126         return m_reverseComplement;
    00127 }
    00128 inline
    00129 boolean gnBaseSpec::IsCircular() const{
    00130         return m_circular;
    00131 }
    00132 inline
    00133 void gnBaseSpec::SetCircular( const boolean value ){
    00134         m_circular = value;
    00135 }
    00136 inline
    00137 void gnBaseSpec::Clear(){
    00138         m_sourceName = "";
    00139         m_name = "";
    00140         m_reverseComplement = false;
    00141         m_circular = false;
    00142 }
    00143
    00144 #endif
    00145         // _gnBaseSpec_h_