gnStringHeader.h Source File

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

# gnStringHeader.h

Go to the documentation of this file.

    00001
    00002 // File:            gnStringHeader.h
    00003 // Purpose:         abstract Header class
    00004 // Description:     Provides an interface for Headers in memory.
    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 _gnStringHeader_h_
    00014 #define _gnStringHeader_h_
    00015
    00016 #include "gn/gnDefs.h"
    00017
    00018 #include <string>
    00019 #include "gn/gnClone.h"
    00020 #include "gn/gnLocation.h"
    00021 #include "gn/gnBaseHeader.h"
    00022
    00028 class GNDLLEXPORT gnStringHeader : public gnBaseHeader
    00029 {
    00030 public:
    00034         gnStringHeader();
    00040         gnStringHeader(const string& name, const string& header);
    00045         gnStringHeader(const gnStringHeader& s);
    00049         ~gnStringHeader() {};
    00050
    00051         gnStringHeader* Clone() const;
    00052
    00053         string GetHeader() const;
    00054         string GetHeaderName() const;
    00055
    00060         void SetHeader(const string& header);
    00065         void SetHeaderName(const string& name);
    00066
    00067         uint32 GetLength() const;
    00068 private:
    00069         string m_name;
    00070         string m_header;
    00071 }; //class gnStringHeader
    00072
    00073 inline
    00074 gnStringHeader::gnStringHeader(){
    00075         m_header = string();
    00076 }
    00077 inline
    00078 gnStringHeader::gnStringHeader(const string& name, const string& header){
    00079         m_name = name;
    00080         m_header = header;
    00081 }
    00082 inline
    00083 gnStringHeader::gnStringHeader(const gnStringHeader& s){
    00084         m_header = string(s.m_header);
    00085 }
    00086 inline
    00087 gnStringHeader* gnStringHeader::Clone() const{
    00088         return new gnStringHeader(*this);
    00089 }
    00090 inline
    00091 string gnStringHeader::GetHeader() const{
    00092         return m_header;
    00093 }
    00094 inline
    00095 string gnStringHeader::GetHeaderName() const{
    00096         return m_name;
    00097 }
    00098 inline
    00099 void gnStringHeader::SetHeader(const string& header){
    00100         m_header = header;
    00101 }
    00102 inline
    00103 void gnStringHeader::SetHeaderName(const string& name){
    00104         m_name = name;
    00105 }
    00106 inline
    00107 uint32 gnStringHeader::GetLength() const{
    00108         return m_header.length();
    00109 }
    00110
    00111 #endif
    00112         // _gnStringHeader_h_