MatchTaskPrint Class Reference

#include <MatchStore.h>

Inheritance diagram for MatchTaskPrint:

Inheritance graph
[legend]
Collaboration diagram for MatchTaskPrint:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MatchTaskPrint (ostream &outputStream=cout)
virtual void operator() (MatchStore &store)

Private Attributes

ostream & outputStream_

Detailed Description

Definition at line 280 of file MatchStore.h.


Constructor & Destructor Documentation

MatchTaskPrint::MatchTaskPrint ( ostream &  outputStream = cout  )  [inline]

Definition at line 283 of file MatchStore.h.

00283                                                  :
00284     outputStream_( outputStream ) {}
  virtual void operator()( MatchStore& store );


Member Function Documentation

void MatchTaskPrint::operator() ( MatchStore store  )  [virtual]

Implements MatchTask.

Definition at line 185 of file MatchStore.cpp.

References outputStream_.

00186 {
00187   if (store.empty()) return;
00188 
00189   vector<Match*>::const_iterator i(store.begin());
00190 
00191   outputStream_ << endl << "Matches For Query " 
00192                << (*i)->getQueryNum()
00193                << " (" << (*i)->getQuerySize()
00194                << " bases): " << (*i)->getQueryName()
00195                << "\n\n";    
00196 
00197   outputStream_ << setprecision(2) << setiosflags(ios::fixed);
00198 
00199   for( ;i!=store.end();++i)
00200   {
00201 
00202     outputStream_ << (((*i)->isQueryForward() )?"F":"R")
00203                   << (((*i)->isSubjectForward() )?"F":"R")
00204                   << " " << (*i)->getSubjectNum() 
00205                   << "\t: " << (*i)->getSubjectName()
00206                   << "\tScore: " << (*i)->getNumBases()
00207                   << "\tQ: " << (*i)->getQueryStart()  
00208                   << " to " << (*i)->getQueryEnd() 
00209                   << "\tS: " << (*i)->getSubjectStart()  
00210                   << " to " << (*i)->getSubjectEnd()  
00211                   << "\t" << 100.0*((*i)->getNumBases()) / 
00212       ((*i)->getQueryEnd()-(*i)->getQueryStart()+1)
00213                   << "\%\n"; 
00214 
00215   }  // ~for i
00216    
00217   outputStream_ << endl;
00218 
00219 
00220 }


Member Data Documentation

ostream& MatchTaskPrint::outputStream_ [private]

Definition at line 287 of file MatchStore.h.

Referenced by operator()().


The documentation for this class was generated from the following files:
Generated on Fri Dec 21 13:18:58 2007 for ssaha by  doxygen 1.5.2