|
gnSourceQualifier.hGo to the documentation of this file.00001 00002 // File: gnSourceQualifier.h 00003 // Purpose: Source Qualifier class 00004 // Description: Provides an interface for gnBaseQualifier in files. 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 _gnSourceQualifier_h_ 00014 #define _gnSourceQualifier_h_ 00015 00016 #include "gn/gnDefs.h" 00017 00018 #include <string> 00019 #include "gn/gnBaseQualifier.h" 00020 #include "gn/gnBaseSource.h" 00021 00022 #ifdef __GNUG__ 00023 #include "pair.h" 00024 #endif 00025 00031 class GNDLLEXPORT gnSourceQualifier : public gnBaseQualifier 00032 { 00033 public: 00037 gnSourceQualifier(); 00045 gnSourceQualifier( gnBaseSource* source, string& name, uint32 begin, uint32 length ); 00050 gnSourceQualifier( const gnSourceQualifier& s ); 00054 ~gnSourceQualifier(); 00055 00056 gnSourceQualifier* Clone() const; 00057 00058 string GetName() const; 00059 string GetValue() const; 00060 00061 uint32 GetNameLength() const; 00062 uint32 GetValueLength() const; 00063 00068 uint32 GetValueStart() const; 00073 pair<uint32, uint32> GetValueLoc() const; 00074 00079 void SetValueStart(const uint32 start); 00084 void SetValueLength(const uint32 length); 00089 void SetValueLoc(const pair<uint32, uint32> startLen); 00090 00091 private: 00092 string m_name; 00093 uint32 m_start, m_length; 00094 gnBaseSource *m_source; 00095 }; //class gnSourceQualifier 00096 00097 inline 00098 gnSourceQualifier* gnSourceQualifier::Clone() const{ 00099 return new gnSourceQualifier(*this); 00100 } 00101 inline 00102 string gnSourceQualifier::GetName() const{ 00103 return m_name; 00104 } 00105 inline 00106 uint32 gnSourceQualifier::GetNameLength() const{ 00107 return m_name.length(); 00108 } 00109 inline 00110 uint32 gnSourceQualifier::GetValueStart() const{ 00111 return m_start; 00112 } 00113 inline 00114 uint32 gnSourceQualifier::GetValueLength() const{ 00115 return m_length; 00116 } 00117 inline 00118 pair<uint32, uint32> gnSourceQualifier::GetValueLoc() const{ 00119 pair<uint32, uint32> p; 00120 p.first = m_start; 00121 p.second = m_length; 00122 return p; 00123 } 00124 inline 00125 void gnSourceQualifier::SetValueStart(const uint32 start){ 00126 m_start = start; 00127 } 00128 inline 00129 void gnSourceQualifier::SetValueLength(const uint32 length){ 00130 m_length = length; 00131 } 00132 inline 00133 void gnSourceQualifier::SetValueLoc(const pair<uint32, uint32> startLen){ 00134 m_start = startLen.first; 00135 m_length = startLen.second; 00136 } 00137 00138 #endif 00139 // _gnSourceQualifier_h_ Generated at Fri Nov 30 15:36:52 2001 for libGenome by 1.2.8.1 written by Dimitri van Heesch, © 1997-2001 |