00001 /* Last edited: Apr 19 11:09 2002 (ac2) */ 00002 00003 // ####################################################################### 00004 00005 // SSAHA : Sequence Search and Alignment by Hashing Algorithm 00006 // Version 3.2, released 1st March 2004 00007 // Copyright (c) Genome Research 2002 00008 00009 // SSAHA is free software; you can redistribute it and/or modify 00010 // it under the terms of version 2 of the GNU General Public Licence 00011 // as published by the Free Software Foundation. 00012 00013 // This program is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 // GNU General Public Licence for more details. 00017 00018 // You should have received a copy of the GNU General Public Licence 00019 // along with this program; if not, write to the Free Software 00020 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 // or see the on-line version at http://www.gnu.org/copyleft/gpl.txt 00022 00023 // ####################################################################### 00024 00025 // Module Name : SSAHAClient 00026 // File Name : SSAHAClient.h 00027 // Language : C++ 00028 // Module Author: Anthony J. Cox (ac2@sanger.ac.uk) 00029 00030 // Include guard: 00031 #ifndef INCLUDED_SSAHAClient 00032 #define INCLUDED_SSAHAClient 00033 00034 // Description: 00035 00036 // Includes: 00037 #include "GlobalDefinitions.h" 00038 #include "MatchStore.h" 00039 #include "SequenceReader.h" 00040 00041 // NB it is good practise for #include statements in header files to be 00042 // replaced by forward declarations if at all possible 00043 typedef pair< WordSequence, std::string> QueryInfo; 00044 00045 // ### Class Declarations ### 00046 00047 // Class Name : 00048 // Description: 00049 class MatchRemote : public Match 00050 { 00051 public: 00052 MatchRemote( vector<QueryInfo>& query ); 00053 00054 virtual ~MatchRemote(); 00055 virtual SequenceNumber getSubjectNum( void ) const 00056 { return data_.subjectNum; } 00057 virtual const char* getSubjectName( void ) const 00058 { return names_[ data_.subjectNum ].c_str(); } 00059 virtual SequenceOffset getSubjectStart( void ) const 00060 { return data_.subjectStart; } 00061 virtual SequenceOffset getSubjectEnd( void ) const 00062 { return data_.subjectEnd; } 00063 00064 virtual SequenceNumber getQueryNum( void ) const 00065 { return data_.queryNum; } 00066 virtual inline string getQueryName( void ) const; 00067 virtual SequenceOffset getQueryStart( void ) const 00068 { return data_.queryStart; } 00069 00070 virtual SequenceOffset getQueryEnd( void ) const 00071 { return data_.queryEnd; } 00072 00073 virtual inline int getQuerySize( void ) const; 00074 virtual int getNumBases(void ) const 00075 { return data_.numBases; } 00076 virtual bool isQueryForward( void ) const 00077 { return data_.isQueryForward; } 00078 virtual bool isSubjectForward( void ) const 00079 { return data_.isSubjectForward; } 00080 00081 virtual void print( void ) const {} 00082 MatchInfo data_; 00083 mutable map<SequenceNumber,std::string> names_; 00084 private: 00085 vector<QueryInfo>& query_; 00086 }; // ~class MatchRemote 00087 00088 00089 class MatchStoreRemote : public MatchStore 00090 { 00091 public: 00092 MatchStoreRemote( vector<QueryInfo>& query ) : 00093 match_(query) 00094 { 00095 push_back(&match_); 00096 } 00097 MatchRemote match_; 00098 }; 00099 00100 class SourceReaderDummy : public SourceReader 00101 { 00102 public: 00103 virtual void extractSource 00104 ( char** pSource, //vector<char>& source, 00105 SequenceNumber seqNum, 00106 SequenceOffset seqStart, 00107 SequenceOffset seqEnd ); 00108 00109 string source_; 00110 }; 00111 00112 00113 00114 00115 00116 // ### Function Declarations ### 00117 00118 // Name: 00119 // Arguments: 00120 // TYPE NAME IN/OUT COMMENT 00121 // Returns: TYPE COMMENT 00122 00123 // End of include guard: 00124 #endif 00125 00126 // End of file SSAHAClient.h
1.5.2