| 78 |  | return((double)andbits/(double)orbits); | 
| 79 |  | }; | 
| 80 |  |  | 
| 81 | < | static const unsigned int bitsperint;// = 8 * sizeof(unsigned int); | 
| 81 | > | static unsigned int Getbitsperint(){ return bitsperint; } | 
| 82 |  |  | 
| 83 |  | private: | 
| 84 |  | ///Function object to set bits | 
| 100 |  | ///See Marshall Cline's C++ FAQ Lite document, www.parashift.com/c++-faq-lite/". | 
| 101 |  | static FPMapType& FPtsMap() | 
| 102 |  | { | 
| 103 | < | static FPMapType* fptm = new FPMapType; | 
| 103 | > | static FPMapType* fptm = NULL; | 
| 104 | > | if (!fptm) | 
| 105 | > | fptm = new FPMapType; | 
| 106 |  | return *fptm; | 
| 107 |  | }; | 
| 108 |  |  | 
| 115 |  |  | 
| 116 |  | private: | 
| 117 |  | static OBFingerprint* _pDefault; | 
| 118 | + | static const unsigned int bitsperint;// = 8 * sizeof(unsigned int); | 
| 119 | + | static int rubbish; | 
| 120 |  | }; | 
| 121 |  |  | 
| 122 |  |  | 
| 139 |  | FptIndexHeader header; | 
| 140 |  | std::vector<unsigned int> fptdata; | 
| 141 |  | std::vector<unsigned int> seekdata; | 
| 142 | + | bool Read(std::istream* pIndexstream); | 
| 143 | + | ///\brief Returns pointer to FP used or NULL and an error message | 
| 144 | + | OBFingerprint* CheckFP(); | 
| 145 |  | }; | 
| 146 |  |  | 
| 147 |  | /// \brief Class to search fingerprint index files | 
| 179 |  | { | 
| 180 |  | //see end of cpp file for detailed documentation | 
| 181 |  | public: | 
| 182 | + | ///\brief Constructor with a new index | 
| 183 |  | FastSearchIndexer(std::string& datafilename, std::ostream* os, std::string& fpid, | 
| 184 |  | int FptBits=0); | 
| 185 | + |  | 
| 186 | + | ///\brief Constructor using existing index | 
| 187 | + | FastSearchIndexer(FptIndex* pindex, std::ostream* os); | 
| 188 | + |  | 
| 189 |  | ~FastSearchIndexer(); | 
| 190 |  |  | 
| 191 |  | ///\brief Called for each object |