/**
* Load from a file
*
+ * The second parameter is a prefix to be used for multiple
+ * files. (SWCSAWrapper uses multiple save files!)
+ *
* New samplerate can be given, otherwise will use the one specified in the save file!
*
* Throws an exception if std::fread() fails.
*
*/
- static TextCollection* Load(FILE *, index_mode_t = index_mode_default, unsigned samplerate = 0);
+ static TextCollection* Load(FILE *, char const *, index_mode_t = index_mode_default, unsigned samplerate = 0);
/**
* Save data structure into a file
- *
+ *
+ * The second parameter is a prefix to be used for multiple
+ * files. (SWCSAWrapper uses multiple save files!)
+ *
* Throws an exception if std::fwrite() fails.
*/
- virtual void Save(FILE *) const = 0;
+ virtual void Save(FILE *, char const *) const = 0;
/**
* Virtual destructor
virtual full_result FullKMismatches(uchar const *, unsigned) const = 0;
virtual full_result FullKErrors(uchar const *, unsigned) const = 0;
+
+ virtual TextPosition getLength() const
+ {
+ std::cerr << "TextCollection::getLength() is unsupported! Use RLCSA instead." << std::endl;
+ std::exit(2);
+ return 0;
+ }
+
+ virtual TextPosition LF(uchar c, TextPosition i) const
+ {
+ std::cerr << "TextCollection::LF() is unsupported! Use RLCSA instead." << std::endl;
+ std::exit(2);
+ return 0;
+ }
+
+ virtual uchar* getSuffix(TextPosition pos, unsigned l) const
+ {
+ std::cerr << "TextCollection::getSuffix() is unsupported! Use RLCSA instead." << std::endl;
+ std::exit(2);
+ return 0;
+ }
+
+ virtual DocId getDoc(TextPosition i) const
+ {
+ std::cerr << "TextCollection::getDoc() is unsupported! Use RLCSA instead." << std::endl;
+ std::exit(2);
+ return 0;
+ }
+
+
protected:
// Protected constructor; use TextCollectionBuilder
TextCollection() { };