#include <HashTableGeneric.h>
Public Member Functions | |
| HashTableFactory (ostream &monStream=cerr) | |
| void | createHashTable (HashTableGeneric &ht, SequenceReader &sequenceReader, int wordLength, int maxNumHits, int stepLength=0) |
| HashTableGeneric * | loadHashTable (const string &name, SourceReaderIndex *pReader=NULL) |
| void | loadHashTable (HashTableGeneric &ht, SourceReaderIndex *pReader=NULL) |
| void | saveHashTable (HashTableGeneric &ht) |
Public Attributes | |
| ostream & | monitoringStream_ |
Definition at line 422 of file HashTableGeneric.h.
| HashTableFactory::HashTableFactory | ( | ostream & | monStream = cerr |
) | [inline] |
| void HashTableFactory::createHashTable | ( | HashTableGeneric & | ht, | |
| SequenceReader & | sequenceReader, | |||
| int | wordLength, | |||
| int | maxNumHits, | |||
| int | stepLength = 0 | |||
| ) | [inline] |
Definition at line 433 of file HashTableGeneric.h.
References HashTableGeneric::createHashTable().
Referenced by main(), and processQuery().
00436 { 00437 ht.createHashTable 00438 ( sequenceReader, wordLength, maxNumHits, stepLength ); 00439 }
Here is the call graph for this function:

Here is the caller graph for this function:

| HashTableGeneric * HashTableFactory::loadHashTable | ( | const string & | name, | |
| SourceReaderIndex * | pReader = NULL | |||
| ) |
Definition at line 485 of file HashTableGeneric.cpp.
References g32BitPacked, g32BitPackedProtein, gStandard, gTranslated, HashTableGeneric::isInitialized(), and monitoringStream_.
Referenced by generateHashTable(), main(), and processQuery().
00486 { 00487 00488 monitoringStream_ << "loading hash table from file ...\n"; 00489 00490 ifstream nameFile( (name+(string)".name").c_str() ); 00491 00492 if ( nameFile.fail() ) 00493 { 00494 monitoringStream_ << "Error: failed to open " 00495 << name << ".name, aborting load." << endl; 00496 throw SSAHAException("Could not open .name file "); 00497 } // ~if 00498 00499 char firstChar = nameFile.peek(); 00500 string temp; 00501 temp += firstChar; 00502 00503 nameFile.close(); 00504 00505 HitListFormatType hitListFormat((HitListFormatType)atoi(temp.c_str())); 00506 00507 HashTableGeneric* pTable(NULL); 00508 00509 if (hitListFormat==gStandard) 00510 { 00511 monitoringStream_ << "... creating standard format hash table\n"; 00512 pTable = new HashTable(monitoringStream_,name); 00513 } // ~if 00514 else if (hitListFormat==g32BitPacked) 00515 { 00516 monitoringStream_ << "... creating 32 bit packed format hash table\n"; 00517 pTable = new HashTablePacked(monitoringStream_,name); 00518 } // ~else if 00519 else if (hitListFormat==g32BitPackedProtein) 00520 { 00521 monitoringStream_ 00522 << "... creating 32 bit packed format protein hash table\n"; 00523 pTable = new HashTablePackedProtein(monitoringStream_,name); 00524 } // ~else if 00525 else if (hitListFormat==gTranslated) 00526 { 00527 monitoringStream_ << "... creating translated format hash table\n"; 00528 pTable = new HashTableTranslated(monitoringStream_,name); 00529 } 00530 else 00531 { 00532 monitoringStream_ 00533 << "Error: type of hash table (" << hitListFormat 00534 << " not recognised.\n"; 00535 throw SSAHAException("Could not recognise hash table type"); 00536 } // ~else 00537 00538 assert (pTable!=NULL); 00539 00540 loadHashTable(*pTable, pReader); 00541 00542 assert (pTable->isInitialized()); 00543 00544 return pTable; 00545 00546 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void HashTableFactory::loadHashTable | ( | HashTableGeneric & | ht, | |
| SourceReaderIndex * | pReader = NULL | |||
| ) | [inline] |
Definition at line 472 of file HashTableGeneric.h.
References HashTableGeneric::loadHashTable().
00473 { 00474 ht.loadHashTable(pReader); 00475 }
Here is the call graph for this function:

| void HashTableFactory::saveHashTable | ( | HashTableGeneric & | ht | ) | [inline] |
Definition at line 485 of file HashTableGeneric.h.
References HashTableGeneric::saveHashTable().
Referenced by main(), and processQuery().
00486 { 00487 ht.saveHashTable(); 00488 }
Here is the call graph for this function:

Here is the caller graph for this function:

| ostream& HashTableFactory::monitoringStream_ |
Definition at line 491 of file HashTableGeneric.h.
Referenced by HashTableGeneric::loadHashTable(), and loadHashTable().
1.5.2