summaryrefslogtreecommitdiff
path: root/quackleio/dawgfactory.h
diff options
context:
space:
mode:
authorJohn Fultz <jfultz@wolfram.com>2015-09-07 14:19:46 -0500
committerJohn Fultz <jfultz@wolfram.com>2015-09-07 15:45:41 -0500
commit5350a57f1be22b28914fca14225c73dac5b30b24 (patch)
tree399a309a1302d30ec83cc5d7281ac7286882523a /quackleio/dawgfactory.h
parent9ea9637922ca68d24d7517cf61870d8cee31f6c5 (diff)
Auto-generate gaddags
Need to add a user interface, but gaddags are now auto-generated if they can't be found. Some specific improvements here: * FixedLengthString gained a pop_back member. * Add code to allow v1 gaddags and v0 dawgs to work together. * Change memory allocation of dawgs and gaddags to be dynamic (the old limit didn't accommodate the ridiculously large Polish dictionary in the gaddag) * The Settings class now knows a bit about generating gaddags. This will be important for giving UI feedback. * Fixed several places using filenames which should be using string, not UVString. * Dawg/GaddagFactory should have been using UVString, not QString. My misunderstanding.
Diffstat (limited to 'quackleio/dawgfactory.h')
-rw-r--r--quackleio/dawgfactory.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/quackleio/dawgfactory.h b/quackleio/dawgfactory.h
index 23bb4f5..051e632 100644
--- a/quackleio/dawgfactory.h
+++ b/quackleio/dawgfactory.h
@@ -26,7 +26,7 @@
class DawgFactory {
public:
- DawgFactory(const QString& alphabetFile);
+ DawgFactory(const UVString& alphabetFile);
~DawgFactory();
int wordCount() const { return m_root.wordCount(); };
@@ -35,10 +35,10 @@ public:
int unencodableWords() const { return m_unencodableWords; };
int duplicateWords() const { return m_duplicateWords; };
- bool pushWord(const QString& word, bool inSmaller, int playability);
+ bool pushWord(const UVString& word, bool inSmaller, int playability);
void hashWord(const Quackle::LetterString &word);
void generate();
- void writeIndex(const QString& fname);
+ void writeIndex(const UVString& filename);
const char* hashBytes() { return m_hash.charptr; };