gnSourceHeader.h Source File

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

# gnSourceHeader.h

Go to the documentation of this file.

    00001
    00002 // File:            gnSourceHeader.h
    00003 // Purpose:         Source Header class
    00004 // Description:     Provides an interface for Headers on disk.
    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 _gnSourceHeader_h_
    00014 #define _gnSourceHeader_h_
    00015
    00016 #include "gn/gnDefs.h"
    00017
    00018 #include <string>
    00019 #include "gn/gnBaseHeader.h"
    00020 #include "gn/gnBaseSource.h"
    00021
    00022 #ifdef __GNUG__
    00023 #include "pair.h"
    00024 #endif
    00025
    00030 class GNDLLEXPORT gnSourceHeader : public gnBaseHeader
    00031 {
    00032 public:
    00036         gnSourceHeader();
    00044         gnSourceHeader( gnBaseSource* source, const string& name, const uint32 begin, const uint32 length );
    00049         gnSourceHeader( const gnSourceHeader& s );
    00053         ~gnSourceHeader();
    00054
    00055         gnSourceHeader* Clone() const;
    00056
    00057         string GetHeader() const;
    00058         string GetHeaderName() const;
    00060 //      void SetHeader(const string& header){};
    00062 //      void SetHeaderName(const string& name){};
    00063
    00064         uint32 GetLength() const;
    00069         uint32 GetHeaderStart() const;
    00074         pair<uint32, uint32> GetHeaderLoc() const;
    00075
    00080         void SetHeaderStart(const uint32 start);
    00085         void SetHeaderLength(const uint32 length);
    00090         void SetHeaderLoc(const pair<uint32, uint32> startLen);
    00091
    00092 private:
    00093         string m_name;
    00094         uint32 m_start, m_length;
    00095         gnBaseSource *m_source;
    00096 }; //class gnSourceHeader
    00097
    00098 inline
    00099 gnSourceHeader* gnSourceHeader::Clone() const{
    00100         return new gnSourceHeader(*this);
    00101 }
    00102 inline
    00103 string gnSourceHeader::GetHeaderName() const{
    00104         return m_name;
    00105 }
    00106 inline
    00107 uint32 gnSourceHeader::GetHeaderStart() const{
    00108         return m_start;
    00109 }
    00110 inline
    00111 uint32 gnSourceHeader::GetLength() const{
    00112         return m_length;
    00113 }
    00114 inline
    00115 pair<uint32, uint32> gnSourceHeader::GetHeaderLoc() const{
    00116         pair<uint32, uint32> p;
    00117         p.first = m_start;
    00118         p.second = m_length;
    00119         return p;
    00120 }
    00121 inline
    00122 void gnSourceHeader::SetHeaderStart(const uint32 start){
    00123         m_start = start;
    00124 }
    00125 inline
    00126 void gnSourceHeader::SetHeaderLength(const uint32 length){
    00127         m_length = length;
    00128 }
    00129 inline
    00130 void gnSourceHeader::SetHeaderLoc(const pair<uint32, uint32> startLen){
    00131         m_start = startLen.first;
    00132         m_length = startLen.second;
    00133 }
    00134
    00135
    00136 #endif
    00137         // _gnSourceHeader_h_