gnStringQualifier.h Source File

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

# gnStringQualifier.h

Go to the documentation of this file.

    00001
    00002 // File:            gnStringQualifier.h
    00003 // Purpose:         abstract Qualifier class
    00004 // Description:     Provides an interface for Qualifiers in memory and 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 _gnStringQualifier_h_
    00014 #define _gnStringQualifier_h_
    00015
    00016 #include "gn/gnDefs.h"
    00017
    00018 #include <string>
    00019 #include "gn/gnClone.h"
    00020 #include "gn/gnBaseQualifier.h"
    00021
    00026 class GNDLLEXPORT gnStringQualifier : public gnBaseQualifier
    00027 {
    00028 public:
    00032         gnStringQualifier();
    00038         gnStringQualifier(const string& name, const string& value);
    00043         gnStringQualifier(const gnStringQualifier& s);
    00047         ~gnStringQualifier(){}
    00048
    00049         gnStringQualifier* Clone() const;
    00050
    00051         string GetName() const;
    00052         string GetValue() const;
    00057         void SetName(const string& name);
    00062         void SetValue(const string& value);
    00063
    00064         uint32 GetNameLength() const;
    00065         uint32 GetValueLength() const;
    00066 private:
    00067         string m_name;
    00068         string m_value;
    00069 }; //class gnStringQualifier
    00070
    00071 inline
    00072 gnStringQualifier::gnStringQualifier(){
    00073         m_name = "";
    00074         m_value = "";
    00075 }
    00076 inline
    00077 gnStringQualifier::gnStringQualifier(const string& name, const string& value){
    00078         m_name = name;
    00079         m_value = value;
    00080 }
    00081 inline
    00082 gnStringQualifier::gnStringQualifier(const gnStringQualifier& s){
    00083         m_name = string(s.m_name);
    00084         m_value = string(s.m_value);
    00085 }
    00086 inline
    00087 gnStringQualifier* gnStringQualifier::Clone() const{
    00088         return new gnStringQualifier(*this);
    00089 }
    00090 inline
    00091 string gnStringQualifier::GetName() const{
    00092         return m_name;
    00093 }
    00094 inline
    00095 string gnStringQualifier::GetValue() const{
    00096         return m_value;
    00097 }
    00098 inline
    00099 void gnStringQualifier::SetName(const string& name){
    00100         m_name = name;
    00101 }
    00102 inline
    00103 void gnStringQualifier::SetValue(const string& value){
    00104         m_value = value;
    00105 }
    00106 inline
    00107 uint32 gnStringQualifier::GetNameLength() const{
    00108         return m_name.length();
    00109 }
    00110 inline
    00111 uint32 gnStringQualifier::GetValueLength() const{
    00112         return m_value.length();
    00113 }
    00114
    00115
    00116 #endif
    00117         // _gnStringQualifier_h_